/* Direction: precision dark tech, issue-style cover. Type: Geist for display and text, Geist Mono for labels, numbers and metadata.
   Palette: near-black ground, slightly lighter surfaces, soft gray text, one lime accent. Signature: faint hairline grid behind the layout and a lime glow behind the masthead.
   Motion: crisp line-rise on the masthead, short fade-up reveals, tiles that lift 2px on hover. */

:root {
  color-scheme: dark;

  --neutral-950: oklch(0.14 0.005 270);
  --neutral-900: oklch(0.17 0.006 270);
  --neutral-850: oklch(0.2 0.007 270);
  --neutral-800: oklch(0.25 0.008 270);
  --neutral-700: oklch(0.33 0.008 270);
  --neutral-400: oklch(0.7 0.01 270);
  --neutral-200: oklch(0.88 0.008 270);
  --neutral-50: oklch(0.97 0.004 270);
  --lime-400: oklch(0.88 0.19 125);
  --lime-300: oklch(0.93 0.17 125);

  --color-bg: var(--neutral-950);
  --color-bg-surface: var(--neutral-900);
  --color-bg-sunken: var(--neutral-850);
  --color-text-primary: var(--neutral-50);
  --color-text-secondary: var(--neutral-400);
  --color-text-on-accent: oklch(0.2 0.04 125);
  --color-border: oklch(1 0 0 / 0.09);
  --color-border-strong: oklch(1 0 0 / 0.2);
  --color-accent-solid: var(--lime-400);
  --color-accent-solid-hover: var(--lime-300);
  --color-accent-text: var(--lime-400);
  --color-focus-ring: var(--lime-400);

  --radius-md: 12px;
  --radius-button: 10px;

  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-small: 0.875rem;
  --text-body: 1rem;
  --text-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-h2: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  --text-h3: 1.25rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --gutter: clamp(20px, 5vw, 48px);
  --content-width: 1240px;
  --header-height: 64px;
  --section-pad: clamp(64px, 10vw, 120px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --tile-ring: 0 0 0 1px oklch(1 0 0 / 0.08);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-secondary);
  background-color: var(--color-bg);
  background-image:
    linear-gradient(to right, oklch(1 0 0 / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(1 0 0 / 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  background-position: center top;
}

img, svg { max-width: 100%; }
img { display: block; height: auto; }

h1, h2, h3, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { color: var(--color-text-primary); font-weight: 600; text-wrap: balance; }
h2 { font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.015em; }
p { text-wrap: pretty; max-width: 65ch; }

:where(a) { color: var(--color-accent-text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:where(a):hover { color: var(--color-text-primary); }

:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
::selection { background: var(--color-accent-solid); color: var(--color-text-on-accent); }

.container { width: min(100% - 2 * var(--gutter), var(--content-width)); margin-inline: auto; }

.mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.eyebrow {
  display: block;
  margin-block-end: var(--space-4);
  color: var(--color-accent-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 8px; z-index: 100;
  padding: 12px 20px; border-radius: var(--radius-button);
  background: var(--color-accent-solid); color: var(--color-text-on-accent); font-weight: 600;
}
.skip-link:focus { inset-inline-start: 16px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; max-width: 100%; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--radius-button);
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button:active { transform: scale(0.97); }
.button-primary { background: var(--color-accent-solid); color: var(--color-text-on-accent); }
.button-primary:hover { background: var(--color-accent-solid-hover); color: var(--color-text-on-accent); }
.button-secondary { border-color: var(--color-border-strong); background: transparent; color: var(--color-text-primary); }
.button-secondary:hover { background: var(--color-bg-sunken); color: var(--color-text-primary); }

.icon-button {
  display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 1px solid var(--color-border-strong); border-radius: 999px;
  background: var(--color-bg-sunken); color: var(--color-text-primary); cursor: pointer;
  box-shadow: 0 1px 3px oklch(0 0 0 / 0.4);
}
.icon-button svg { width: 20px; height: 20px; }

/* Issue bar */
.issue-bar { border-block-end: 1px solid var(--color-border); background: var(--color-bg); }
.issue-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; min-height: 40px; padding-block: 8px; color: var(--color-text-secondary); }
.issue-place { display: none; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-inline-end: 8px; border-radius: 50%; background: var(--color-accent-solid); box-shadow: 0 0 0 4px oklch(0.88 0.19 125 / 0.18); }
@media (min-width: 40rem) { .issue-place { display: inline; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; border-block-end: 1px solid var(--color-border); }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in oklch, var(--color-bg) 82%, transparent); backdrop-filter: blur(20px) saturate(180%); }
@media (prefers-reduced-transparency: reduce) { .site-header::before { background: var(--color-bg); backdrop-filter: none; } }
.header-row { display: flex; align-items: center; gap: 16px; min-height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-inline-end: auto; min-height: 44px; color: var(--color-text-primary); font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand svg { color: var(--color-accent-solid); }
.header-cta { display: none; }
.site-nav ul { display: flex; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; border-radius: 8px; color: var(--color-text-secondary); text-decoration: none; transition: color 150ms ease, background-color 150ms ease; }
.site-nav a:hover { color: var(--color-text-primary); background: var(--color-bg-sunken); }

.menu-toggle { display: none; }
.menu-toggle svg { grid-area: 1 / 1; transition: opacity 300ms cubic-bezier(0.2, 0, 0, 1), transform 300ms cubic-bezier(0.2, 0, 0, 1), filter 300ms cubic-bezier(0.2, 0, 0, 1); }
.menu-toggle .icon-close, .menu-toggle[aria-expanded="true"] .icon-open { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.menu-toggle[aria-expanded="true"] .icon-close { opacity: 1; transform: none; filter: none; }
html.js .menu-toggle { display: inline-grid; }
html.js .site-nav { display: none; position: fixed; inset: var(--header-height) 0 0; z-index: 49; padding: 24px var(--gutter); background: var(--color-bg); overflow-y: auto; }
html.js .site-nav[data-open="true"] { display: block; opacity: 1; translate: 0 0; transition: opacity 300ms var(--ease-drawer), translate 300ms var(--ease-drawer), display 300ms allow-discrete; }
@starting-style { html.js .site-nav[data-open="true"] { opacity: 0; translate: 0 -8px; } }
html.js .site-nav ul { flex-direction: column; gap: 0; }
html.js .site-nav a { min-height: 56px; padding-inline: 0; font-size: 1.5rem; color: var(--color-text-primary); border-radius: 0; border-block-end: 1px solid var(--color-border); width: 100%; }
body:has(.site-nav[data-open="true"]) { overflow: hidden; }
@media (min-width: 56rem) {
  .header-cta { display: inline-flex; min-height: 40px; padding: 8px 16px; }
  html.js .menu-toggle { display: none; }
  html.js .site-nav { display: block; position: static; padding: 0; background: none; overflow: visible; }
  html.js .site-nav ul { flex-direction: row; gap: 4px; }
  html.js .site-nav a { min-height: 44px; padding-inline: 12px; font-size: 1rem; color: var(--color-text-secondary); border-radius: 8px; border-block-end: 0; width: auto; }
  html.js .site-nav a:hover { color: var(--color-text-primary); }
}

/* Hero */
.hero { position: relative; padding-block: clamp(32px, 6vw, 72px) var(--section-pad); overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset-inline: 0; top: -10%; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 30%, oklch(0.88 0.19 125 / 0.2), transparent 70%);
}
.hero-eyebrow { margin-block-end: var(--space-5); }
.masthead {
  display: block;
  font-size: clamp(3.5rem, 1.2rem + 17vw, 14.5rem);
  line-height: 0.9; letter-spacing: -0.055em; font-weight: 650; color: var(--color-text-primary);
  margin-block-end: clamp(24px, 4vw, 48px);
}
.masthead .line { display: block; overflow: clip; padding-block-end: 0.08em; }
.masthead .line > span { display: block; animation: line-rise 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 90ms); }
.masthead-dot { color: var(--color-accent-solid); }
@keyframes line-rise { from { translate: 0 110%; } }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: stretch; }
.hero-cover { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-md); box-shadow: var(--tile-ring), 0 30px 80px -30px oklch(0.88 0.19 125 / 0.25); animation: fade-up 700ms var(--ease-out) 350ms both; }
.frame { display: block; overflow: clip; border-radius: var(--radius-md); background: var(--color-bg-sunken); }
.frame img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid oklch(1 0 0 / 0.1); outline-offset: -1px; }
.cover-scrim { position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to top, oklch(0.14 0.005 270 / 0.92), transparent); pointer-events: none; }
.cover-caption { position: absolute; inset: auto var(--space-5) var(--space-5) var(--space-5); color: var(--color-text-primary); text-transform: uppercase; letter-spacing: 0.08em; }

.hero-side { display: flex; flex-direction: column; gap: 24px; justify-content: space-between; animation: fade-up 700ms var(--ease-out) 450ms both; }
.hero-lead { font-size: var(--text-lead); line-height: 1.45; color: var(--color-text-primary); letter-spacing: -0.01em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.coverlines { border-block-start: 1px solid var(--color-border); }
.coverlines li { border-block-end: 1px solid var(--color-border); }
.coverlines a { display: flex; align-items: center; gap: 16px; min-height: 52px; color: var(--color-text-primary); text-decoration: none; transition: color 150ms ease, padding 250ms var(--ease-out); }
.coverlines a .mono { color: var(--color-accent-text); }
.coverlines a:hover { color: var(--color-accent-text); }
@media (hover: hover) and (pointer: fine) { .coverlines a:hover { padding-inline-start: 8px; } }

@keyframes fade-up { from { opacity: 0; translate: 0 12px; } }

@media (min-width: 56rem) {
  .hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
  .hero-cover { aspect-ratio: auto; min-height: 420px; }
}

/* Hero collage: a faint mosaic of photos behind the masthead */
.hero-collage {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 8px;
  opacity: 0.22;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 92%);
  mask-image: linear-gradient(to bottom, black 0%, black 35%, transparent 92%);
}
.hero-collage img { width: 100%; height: 100%; object-fit: cover; }
.hero-collage img:nth-child(n+5) { display: none; }
@media (min-width: 48rem) {
  .hero-collage { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .hero-collage img:nth-child(n+5) { display: block; }
}

/* Photo strip on the home page */
.strip { padding-block: clamp(32px, 6vw, 64px); border-block-start: 1px solid var(--color-border); }
.strip-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.strip-row .frame { display: block; aspect-ratio: var(--ratio, 1 / 1); }
.strip-row .frame img { transition: scale 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .strip-row .frame:hover img { scale: 1.04; } }
.strip-link { margin-block-start: 16px; }
@media (min-width: 40rem) { .strip-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Photo band */
.photo-band { position: relative; height: clamp(240px, 38vw, 480px); overflow: clip; border-block-start: 1px solid var(--color-border); }
.photo-band img { width: 100%; height: 100%; object-fit: cover; }
.band-scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, oklch(0.14 0.005 270 / 0.5), transparent 35%, transparent 65%, oklch(0.14 0.005 270 / 0.6)); pointer-events: none; }

/* About portrait */
.about-portrait { max-width: 320px; }
.about-portrait .frame { aspect-ratio: var(--ratio, 4 / 5); }
.about-portrait figcaption { margin-block-start: 8px; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }

/* Inner pages */
.page-head { padding-block: clamp(40px, 8vw, 96px) clamp(24px, 4vw, 40px); }
.page-title { font-size: clamp(3rem, 1.2rem + 9vw, 8rem); line-height: 0.95; letter-spacing: -0.05em; font-weight: 650; margin-block-end: 20px; }
.page-lead { font-size: var(--text-lead); color: var(--color-text-primary); }
.site-nav a[aria-current="page"] { color: var(--color-accent-text); }
html.js .site-nav a[aria-current="page"] { color: var(--color-accent-text); }
.page-head + .section { border-block-start: 0; }

.about-page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; align-items: start; }
@media (min-width: 56rem) { .about-page-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .about-page-grid .about-portrait { max-width: none; } }

.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photo-grid .frame { aspect-ratio: var(--ratio, 4 / 3); }
@media (min-width: 48rem) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Project covers: illustrations drawn in each project's own colors */
.cover { position: relative; display: grid; place-items: center; aspect-ratio: var(--ratio, 3 / 2); color: oklch(0.72 0.02 210); text-decoration: none; }
.cover svg { width: 100%; height: 100%; }
.cover-label { position: absolute; inset: auto 12px 12px auto; padding: 4px 10px; border-radius: 999px; background: oklch(0.14 0.005 270 / 0.82); color: var(--color-text-primary); letter-spacing: 0.04em; }
.cover-radar { background: radial-gradient(circle at 50% 50%, oklch(0.2 0.04 230), oklch(0.12 0.03 230)); }
.cover-chart { background: linear-gradient(160deg, oklch(0.18 0.035 230), oklch(0.12 0.03 230)); }
.cover-grid { background: #f6f5ef; }
.cover-grid svg { width: auto; height: 100%; }
.frame.cover-logo {
  position: relative; isolation: isolate;
  aspect-ratio: auto; height: clamp(240px, 30vw, 340px);
  margin: calc(-1 * clamp(20px, 3vw, 32px)) calc(-1 * clamp(20px, 3vw, 32px)) 4px;
  border-radius: 0; padding: clamp(28px, 5vw, 56px);
  background: radial-gradient(90% 90% at 50% 40%, oklch(0.3 0.08 285), oklch(0.15 0.04 270));
}
.tile-feature .frame.cover-logo { height: clamp(280px, 34vw, 460px); padding: clamp(36px, 6vw, 80px); }
.frame.cover-logo::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 45%, oklch(0.97 0.004 270 / 0.2), transparent 70%);
}
.frame.cover-logo::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 38%; z-index: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--color-bg-surface));
}
.frame.cover-logo img.cover-logo-img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; outline: 0; transition: scale 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .frame.cover-logo:hover img.cover-logo-img { scale: 1.04; } }
.cover-logo .cover-label { z-index: 2; background: oklch(0.14 0.005 270 / 0.55); }
/* One backdrop per project, tuned to that project's own site */
.frame.cover-logo-ur { background: radial-gradient(85% 100% at 30% 20%, oklch(0.36 0.1 190), transparent 65%), radial-gradient(80% 90% at 85% 80%, oklch(0.34 0.15 303), transparent 62%), linear-gradient(160deg, oklch(0.18 0.04 230), oklch(0.12 0.03 250)); }
.frame.cover-logo-ga { background: radial-gradient(85% 100% at 20% 15%, oklch(0.38 0.11 245), transparent 65%), radial-gradient(80% 90% at 85% 85%, oklch(0.4 0.13 150), transparent 62%), linear-gradient(160deg, oklch(0.19 0.05 255), oklch(0.12 0.04 260)); }
.frame.cover-logo-ufo { background: radial-gradient(85% 100% at 75% 20%, oklch(0.36 0.13 275), transparent 65%), radial-gradient(80% 90% at 15% 85%, oklch(0.38 0.09 195), transparent 62%), linear-gradient(160deg, oklch(0.17 0.05 275), oklch(0.12 0.03 240)); }
.cover-after { background: radial-gradient(circle at 50% 50%, oklch(0.22 0.05 125 / 0.45), oklch(0.12 0.01 270)); }
.cover-after svg { width: auto; height: 100%; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { flex: none; width: 32px; height: 32px; border-radius: 7px; }
.brand-logo { flex: none; width: auto; height: 40px; max-width: 72px; padding: 4px; border-radius: 8px; background: oklch(0.97 0.004 270); object-fit: contain; }
.cover-empty { background: transparent; box-shadow: inset 0 0 0 1px var(--color-border-strong); }
.cover-empty .cover-label { position: static; background: none; color: var(--color-text-secondary); }
.tile-feature .cover { aspect-ratio: 21 / 9; }
.tile-feature .cover svg { width: auto; height: 100%; }
@media (hover: hover) and (pointer: fine) { .cover:hover svg { scale: 1.03; } }
.cover svg { transition: scale 600ms var(--ease-out); }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.work-tile .frame { aspect-ratio: var(--ratio, 3 / 2); }
@media (min-width: 48rem) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Portfolio */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: clamp(24px, 4vw, 40px); }
.filter-bar[hidden] { display: none; }
html.js .filter-bar:not([hidden]) { display: flex; }
.filter-button { min-height: 44px; padding: 8px 18px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: transparent; color: var(--color-text-primary); font: inherit; font-weight: 500; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
.filter-button:hover { background: var(--color-bg-sunken); }
.filter-button:active { transform: scale(0.97); }
.filter-button[aria-pressed="true"] { background: var(--color-accent-solid); border-color: var(--color-accent-solid); color: var(--color-text-on-accent); }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portfolio-item[hidden] { display: none; }
.portfolio-item .frame { aspect-ratio: var(--ratio, 4 / 3); }
.portfolio-item .gallery-item { text-align: start; }
.portfolio-caption { display: grid; gap: 2px; padding-block-start: 10px; }
.portfolio-caption h3 { font-size: 1rem; }
.portfolio-caption p { color: var(--color-text-secondary); }
.cover-sky { background: radial-gradient(circle at 50% 40%, oklch(0.22 0.05 270), oklch(0.11 0.02 270)); }
.cover-video { background: linear-gradient(160deg, oklch(0.2 0.02 270), oklch(0.12 0.01 270)); }
.cover-sky svg, .cover-video svg { width: 100%; height: 100%; }
@media (min-width: 40rem) { .portfolio-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }

/* Gallery */
.masonry { columns: 2; column-gap: 12px; }
.masonry > li { break-inside: avoid; margin-block-end: 12px; }
@media (min-width: 60rem) { .masonry { columns: 3; column-gap: 16px; } .masonry > li { margin-block-end: 16px; } }
.gallery-item { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery-item .frame { aspect-ratio: var(--ratio, 4 / 3); }
.frame img { transition: scale 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .gallery-item:hover .frame img { scale: 1.04; } }
.lightbox { width: min(1100px, 100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; background: transparent; overflow: visible; color: var(--color-text-primary); }
.lightbox::backdrop { background: oklch(0.1 0 0 / 0.92); }
.lightbox figure { position: relative; display: grid; gap: 12px; justify-items: center; }
.lightbox img { max-height: calc(100dvh - 120px); width: auto; max-width: 100%; object-fit: contain; transition: opacity 200ms ease; }
.lightbox-caption { color: oklch(0.92 0 0); }
.lightbox[data-loading] img { opacity: 0.3; }
.lightbox[data-loading] figure::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 3px solid oklch(1 0 0 / 0.25); border-top-color: oklch(1 0 0); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { rotate: 1turn; } }
.lightbox-button { position: fixed; z-index: 1; border-color: transparent; background: oklch(0.98 0 0 / 0.94); color: oklch(0.2 0 0); box-shadow: 0 2px 10px oklch(0 0 0 / 0.35); }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 16px; top: 50%; translate: 0 -50%; }

/* Sections */
.section { padding-block: var(--section-pad); border-block-start: 1px solid var(--color-border); }
.section-tint { background: color-mix(in oklch, var(--color-bg-surface) 82%, transparent); }
.section-head { display: grid; gap: 0; margin-block-end: clamp(32px, 5vw, 56px); max-width: 24ch; }
.section-head h2 { max-width: 20ch; }

/* Bento */
.bento { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 12px; overflow: clip;
  padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-md);
  background: var(--color-bg-surface); box-shadow: var(--tile-ring);
  transition: translate 300ms var(--ease-out), box-shadow 300ms var(--ease-out), background-color 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { translate: 0 -2px; background: var(--color-bg-sunken); box-shadow: 0 0 0 1px oklch(0.88 0.19 125 / 0.35), 0 20px 40px -24px oklch(0.88 0.19 125 / 0.3); }
}
.tile-empty { background: transparent; box-shadow: 0 0 0 1px var(--color-border-strong); border-style: dashed; }
.tile-meta { color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.08em; }
.tile h3 { color: var(--color-text-primary); }
.tile-feature h3 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); letter-spacing: -0.03em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: auto; }
.tags li { padding: 4px 10px; border: 1px solid var(--color-border-strong); border-radius: 999px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--color-text-primary); white-space: nowrap; }
.tile-art { width: 100%; height: 110px; margin-block-start: 8px; color: var(--color-text-secondary); }
.tile-stat { justify-content: space-between; }
.stat-number { font-size: clamp(3.5rem, 2.5rem + 4vw, 5.5rem); font-weight: 600; line-height: 1; letter-spacing: -0.05em; color: var(--color-text-primary); font-variant-numeric: tabular-nums; }
.stat-number span { margin-inline-start: 4px; font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0; color: var(--color-accent-text); }
.tile-label { font-size: var(--text-small); }
.tile-accent { background: var(--color-accent-solid); color: var(--color-text-on-accent); box-shadow: none; }
.tile-accent .stat-number, .tile-accent .tile-label { color: var(--color-text-on-accent); }
.tile-accent .stat-number span { color: var(--color-text-on-accent); }
.tile-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-block-start: auto; font-weight: 600; text-decoration: none; }
.tile-link svg { transition: translate 250ms var(--ease-out); }
.tile-link:hover svg { translate: 4px 0; }

@media (min-width: 40rem) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-feature, .tile-wide { grid-column: 1 / -1; }
}
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
  .tile-feature { grid-column: span 3; grid-row: span 2; }
  .tile-wide { grid-column: span 3; }
}

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px 64px; align-items: start; }
.about-grid .section-head { margin-block-end: 0; }
.about-copy { display: grid; gap: 20px; font-size: 1.0625rem; column-gap: 48px; }
.about-copy p:first-child { color: var(--color-text-primary); font-size: var(--text-lead); line-height: 1.5; }
.pullquote { padding-inline-start: var(--space-5); border-inline-start: 2px solid var(--color-accent-solid); }
.pullquote p { font-size: clamp(1.5rem, 1rem + 2.4vw, 2.75rem); line-height: 1.15; letter-spacing: -0.03em; font-weight: 500; color: var(--color-text-primary); max-width: 22ch; }
@media (min-width: 56rem) {
  .about-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .about-copy { grid-column: 2; }
  .pullquote { grid-column: 1 / -1; margin-block-start: 24px; }
}

/* Stack */
.stack-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.stack-list li { padding-block: 12px; border-block-end: 1px solid var(--color-border); color: var(--color-text-primary); }
.stack-list li:first-child { border-block-start: 1px solid var(--color-border); }
@media (min-width: 48rem) { .stack-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Notes */
.notes { border-block-start: 1px solid var(--color-border-strong); }
.notes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding-block: 20px; border-block-end: 1px solid var(--color-border); transition: background-color 200ms ease; }
.note-date { grid-column: 1 / -1; color: var(--color-accent-text); text-transform: uppercase; }
.note-title { color: var(--color-text-primary); font-size: 1.125rem; letter-spacing: -0.01em; }
.note-kind { color: var(--color-text-secondary); text-transform: uppercase; }
@media (min-width: 48rem) {
  .notes li { grid-template-columns: 120px minmax(0, 1fr) auto; gap: 24px; align-items: center; }
  .note-date { grid-column: auto; }
  .note-title { font-size: 1.375rem; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.contact-title { font-size: clamp(2.25rem, 1.2rem + 4.5vw, 4.5rem); line-height: 1; letter-spacing: -0.04em; max-width: 12ch; margin-block-end: 20px; }
.contact-lead { margin-block-end: 20px; font-size: var(--text-lead); color: var(--color-text-primary); }
.contact-direct a { font-family: var(--font-mono); font-size: 1rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 64px; } }

.form { gap: 20px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--color-text-primary); font-weight: 500; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--color-text-primary);
  background: var(--color-bg); border: 1px solid var(--color-border-strong); border-radius: var(--radius-button);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder { color: var(--color-text-secondary); opacity: 0.7; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--color-accent-solid); box-shadow: 0 0 0 3px oklch(0.88 0.19 125 / 0.25); }
.field [aria-invalid="true"] { border-color: oklch(0.72 0.19 25); }
.field-error { color: oklch(0.78 0.15 25); font-size: var(--text-small); }
.form .button { align-self: flex-start; }
.form-status { color: var(--color-accent-text); min-height: 1.6em; }

/* Footer */
.site-footer { padding-block: clamp(48px, 8vw, 96px) 32px; border-block-start: 1px solid var(--color-border); background: color-mix(in oklch, var(--color-bg-surface) 70%, transparent); overflow: clip; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.footer-blurb { color: var(--color-text-primary); font-size: 1.125rem; max-width: 32ch; }
.footer-nav ul li, .footer-links ul li { border-block-end: 1px solid var(--color-border); }
.footer-nav a, .footer-links a { display: flex; gap: 12px; align-items: center; min-height: 44px; color: var(--color-text-primary); text-decoration: none; }
.footer-nav a .mono { color: var(--color-accent-text); }
.footer-nav a:hover, .footer-links a:hover { color: var(--color-accent-text); }
.footer-wordmark { margin-block: clamp(32px, 6vw, 64px) 16px; font-size: clamp(4.5rem, 2rem + 20vw, 18rem); line-height: 0.85; font-weight: 650; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1px oklch(1 0 0 / 0.18); user-select: none; white-space: nowrap; max-width: none; }
.footer-small { color: var(--color-text-secondary); }
@media (min-width: 48rem) { .footer-top { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 48px; } }

/* Reveal */
html.js [data-reveal] { opacity: 0; translate: 0 24px; transition: opacity 700ms var(--ease-out), translate 700ms var(--ease-out); transition-delay: calc(min(var(--i, 0), 8) * 60ms); }
html.js [data-reveal].is-visible { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .masthead .line > span, .hero-cover, .hero-side { animation: none; }
  html.js [data-reveal] { translate: 0 0; transition: opacity 200ms ease; }
  .tile, .tile-link svg, .coverlines a { transition: none; }
  .tile:hover { translate: 0 0; }
}