/* ==========================================================================
   Jonathan Van Gils — Portfolio
   Stylesheet built from the approved style guide (v1) tokens & components.
   ========================================================================== */

@font-face { font-family:'Inter'; font-weight:400; font-style:normal; font-display:swap;
  src:url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-weight:500; font-style:normal; font-display:swap;
  src:url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter Display'; font-weight:500; font-style:normal; font-display:swap;
  src:url('fonts/inter-display-500.woff2') format('woff2'); }
@font-face { font-family:'Inter Display'; font-weight:600; font-style:normal; font-display:swap;
  src:url('fonts/inter-display-600.woff2') format('woff2'); }
@font-face { font-family:'Inter Display'; font-weight:800; font-style:normal; font-display:swap;
  src:url('fonts/inter-display-800.woff2') format('woff2'); }

:root {
  --bg: #FAF7F7;
  --surface: #FFFFFF;
  --ink: #16151A;
  --ink-2: #5A5762;
  --ink-3: #908C99;
  --line: #E8E3E6;
  --mint: #CFFFF3;
  --aqua: #E3FFFC;
  --magenta: #FF00AA;
  --cyan: #00BBFF;
  --grad-signal: radial-gradient(80% 120% at 30% 20%, #00BBFF 0%, #E800F0 100%);
  --grad-aurora: linear-gradient(180deg, #99EEFF 0%, #9640FF 55%, #FF0080 100%);
  /* Horizontal aurora whose first and last stops match, so it can loop seamlessly. */
  --grad-aurora-x: linear-gradient(90deg, #99EEFF 0%, #9640FF 30%, #FF0080 50%, #9640FF 70%, #99EEFF 100%);
  --grad-halo: radial-gradient(50% 50% at 50% 50%, rgba(209,41,255,.27) 0%, #E3FFFC 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0E13;
    --surface: #17161D;
    --ink: #F5F2F7;
    --ink-2: #A9A5B3;
    --ink-3: #746F80;
    --line: #26242E;
    --mint: #1E3A33;
    --aqua: #16262B;
    --grad-halo: radial-gradient(50% 50% at 50% 50%, rgba(209,41,255,.25) 0%, rgba(21,38,43,.6) 100%);
  }
}
/* Explicit theme choice (localStorage via theme.js) always beats the media query. */
:root[data-theme="dark"] {
  --bg: #0F0E13;
  --surface: #17161D;
  --ink: #F5F2F7;
  --ink-2: #A9A5B3;
  --ink-3: #746F80;
  --line: #26242E;
  --mint: #1E3A33;
  --aqua: #16262B;
  --grad-halo: radial-gradient(50% 50% at 50% 50%, rgba(209,41,255,.25) 0%, rgba(21,38,43,.6) 100%);
}
:root[data-theme="light"] {
  --bg: #FAF7F7;
  --surface: #FFFFFF;
  --ink: #16151A;
  --ink-2: #5A5762;
  --ink-3: #908C99;
  --line: #E8E3E6;
  --mint: #CFFFF3;
  --aqua: #E3FFFC;
  --grad-halo: radial-gradient(50% 50% at 50% 50%, rgba(209,41,255,.27) 0%, #E3FFFC 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: 'cv11';
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- type roles ---------- */
.t-display-xl { font-family:'Inter Display',sans-serif; font-weight:800; font-size:clamp(56px, 11vw, 128px); line-height:.98; letter-spacing:-.045em; }
.t-display-l  { font-family:'Inter Display',sans-serif; font-weight:800; font-size:clamp(34px, 6vw, 64px); line-height:1.05; letter-spacing:-.03em; }
.t-title      { font-family:'Inter Display',sans-serif; font-weight:600; font-size:32px; line-height:1.15; letter-spacing:-.02em; }
.t-statement  { font-family:'Inter Display',sans-serif; font-weight:500; font-size:24px; line-height:1.4; letter-spacing:-.01em; }
.t-subhead    { font-family:'Inter Display',sans-serif; font-weight:600; font-size:20px; line-height:1.3; letter-spacing:-.01em; }
.t-body       { font-family:'Inter',sans-serif; font-weight:400; font-size:16px; line-height:1.65; }
.t-label      { font-family:'Inter',sans-serif; font-weight:500; font-size:12px; line-height:1.5; letter-spacing:.1em; text-transform:uppercase; }

h1,h2,h3,h4,p,ul,ol,dl,dd { margin:0; }
h2 { text-wrap: balance; }

.wrap { max-width:1060px; margin:0 auto; padding:0 24px; }
.col { max-width:720px; }

main section { padding: 72px 0 0; }
main section:last-of-type { padding-bottom: 96px; }

.eyebrow { color: var(--ink-3); display:block; margin-bottom:14px; }
.section-head { border-top:1px solid var(--line); padding-top:28px; }
.section-head h2 { margin-bottom: 8px; }
.section-head h1 { margin-bottom: 8px; }
.section-intro { color: var(--ink-2); max-width: 640px; margin-top: 8px; }

/* ---------- visually-hidden (skip link etc.) ---------- */
.visually-hidden {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
.skip-link:focus {
  position:static; width:auto; height:auto; margin:0; padding:10px 16px; clip:auto; white-space:normal;
  display:inline-block; background:var(--ink); color:var(--bg); border-radius:8px; z-index:100;
}

/* ---------- header / nav ---------- */
header.site {
  padding: 32px 0; border-bottom: 1px solid transparent;
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  header.site {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
}
/* Keep in-page anchors clear of the sticky header. */
#main, main section[id] { scroll-margin-top: 116px; }
.masthead { display:flex; align-items:center; justify-content:space-between; gap:16px 24px; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; flex-shrink:0; }
.brand svg { width:30px; height:auto; display:block; color:var(--ink); }
.brand-name { font-family:'Inter Display'; font-weight:600; font-size:15px; line-height:1; color:var(--ink); letter-spacing:-.01em; }
.site-nav { display:flex; align-items:center; gap:8px; margin-left:auto; }
.site-nav a {
  font-family:'Inter'; font-weight:500; font-size:15px; line-height:1; text-decoration:none; color:var(--ink-2);
  display:inline-flex; align-items:center; height:38px; padding:0 14px; border-radius:99px;
}
.site-nav a:hover { color: var(--ink); background: var(--surface); }
.site-nav a.is-cta { color: var(--ink); border:1px solid var(--line); background: var(--surface); }
.site-nav a.is-cta:hover { border-color: var(--magenta); }
.theme-toggle {
  display:inline-flex; align-items:center; justify-content:center;
  width:38px; height:38px; padding:0; border-radius:99px; cursor:pointer;
  color:var(--ink); border:1px solid var(--line); background:var(--surface);
}
.theme-toggle:hover { border-color: var(--magenta); }
.theme-toggle svg { width:17px; height:17px; display:block; }
/* show the icon of the theme you'd switch TO */
.theme-toggle .icon-sun { display:none; }
.theme-toggle .icon-moon { display:block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display:block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display:none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display:block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display:none; }
  :root[data-theme="light"] .theme-toggle .icon-sun { display:none; }
  :root[data-theme="light"] .theme-toggle .icon-moon { display:block; }
}
@media (max-width:560px) {
  .masthead { justify-content:flex-start; }
  .site-nav { margin-left:0; flex-basis:100%; }
}

/* ---------- animated aurora wash (landing page) ----------
   CSS restatement of the blurred, slowly-shifting canvas gradient that sits
   behind the top of the original site: full-bleed, heavily blurred, low
   opacity, and always behind the content. */
main.has-aurora { position:relative; overflow-x:hidden; overflow-x:clip; }
main.has-aurora > .wrap { position:relative; z-index:1; }
.page-aurora {
  position:absolute; z-index:0; top:0; left:-12vw; right:-12vw;
  height:1400px; max-height:165vh; overflow:hidden; pointer-events:none;
  filter:blur(72px); opacity:.5;
}
.page-aurora::before, .page-aurora::after {
  content:''; position:absolute; inset:-25%; background-repeat:no-repeat;
}
.page-aurora::before {
  background:
    radial-gradient(38% 40% at 22% 26%, rgba(0,187,255,.55), rgba(0,187,255,0) 70%),
    radial-gradient(40% 44% at 76% 20%, rgba(232,0,240,.42), rgba(232,0,240,0) 70%),
    radial-gradient(44% 40% at 58% 66%, rgba(150,64,255,.38), rgba(150,64,255,0) 70%);
}
.page-aurora::after {
  background:
    radial-gradient(36% 38% at 14% 72%, rgba(153,238,255,.55), rgba(153,238,255,0) 70%),
    radial-gradient(38% 36% at 86% 62%, rgba(255,0,128,.34), rgba(255,0,128,0) 70%),
    radial-gradient(34% 34% at 46% 12%, rgba(207,255,243,.60), rgba(207,255,243,0) 70%);
}
:root[data-theme="dark"] .page-aurora { opacity:.34; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .page-aurora { opacity:.34; } }
@media (prefers-reduced-motion: no-preference) {
  .page-aurora::before { animation: aurora-a 24s ease-in-out infinite alternate; }
  .page-aurora::after  { animation: aurora-b 31s ease-in-out infinite alternate; }
  @keyframes aurora-a {
    from { transform: translate3d(-4%,-3%,0) scale(1.05) rotate(-4deg); }
    to   { transform: translate3d(4%,3%,0)   scale(1.18) rotate(5deg); }
  }
  @keyframes aurora-b {
    from { transform: translate3d(5%,2%,0)   scale(1.14) rotate(6deg); }
    to   { transform: translate3d(-3%,-4%,0) scale(1.02) rotate(-6deg); }
  }
}

/* ---------- hero ---------- */
.hero { margin-top: 48px; position:relative; text-align:center; display:flex; flex-direction:column; align-items:center; }
.grad-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display:inline-block;
  padding-bottom: .08em;
}
@media (prefers-reduced-motion: no-preference) {
  .grad-text { background-size:100% 200%; animation: drift 9s ease-in-out infinite alternate; }
  @keyframes drift { from { background-position:0 0; } to { background-position:0 100%; } }
}
/* Statement-size intro line with playful inline images, echoing the original hero */
.hero-intro { margin:28px auto 0; color:var(--ink); max-width:720px; }
.hero-intro .inline-portrait {
  display:inline-block; width:2.2em; height:1.35em; vertical-align:-.38em; margin:0 .14em;
  border-radius:.5em; object-fit:cover;
}
.hero-intro .inline-pin { display:inline-block; width:1.8em; height:1.8em; vertical-align:-.55em; margin:0 .1em; object-fit:contain; }
.hero-sub { margin:20px auto 0; color:var(--ink-2); max-width:720px; }
.hero-sub .inline-wave { display:inline-block; width:2em; height:2em; vertical-align:-.6em; margin:0 .12em; object-fit:contain; }
.hero-actions { margin-top:32px; justify-content:center; }
.hero-sparkle { width:321px; max-width:60%; height:auto; margin:0 auto 24px; }

/* ---------- buttons & links ---------- */
.btn-row { display:flex; gap:14px; flex-wrap:wrap; align-items:center; }
.btn { font-family:'Inter'; font-weight:500; font-size:15px; text-decoration:none; border-radius:99px; padding:12px 26px; display:inline-block; border: 1px solid transparent; cursor:pointer; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline:2px solid var(--magenta); outline-offset:3px;
}
/* Hovers ease the gradient in behind the label rather than snapping to it, and
   keep it drifting while the pointer rests — same idea as the hero aurora. */
.btn-primary, .btn-ghost { position:relative; overflow:hidden; isolation:isolate; }
.btn-primary::before, .btn-ghost::before {
  content:''; position:absolute; inset:0; z-index:-1;
  background:var(--grad-signal); background-size:220% 220%; background-position:50% 50%;
  opacity:0; transition:opacity .35s ease;
}
.btn-primary { background:var(--ink); color:var(--bg); transition:color .3s ease; }
.btn-primary:hover, .btn-primary:focus-visible { color:#fff; }
.btn-primary:hover::before, .btn-primary:focus-visible::before { opacity:.8; }

.btn-ghost { border:1px solid var(--line); color:var(--ink); background:transparent;
  transition:border-color .3s ease; }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color:var(--magenta); }
.btn-ghost:hover::before, .btn-ghost:focus-visible::before { opacity:.14; }

@media (prefers-reduced-motion: no-preference) {
  .btn-primary:hover::before, .btn-primary:focus-visible::before,
  .btn-ghost:hover::before, .btn-ghost:focus-visible::before {
    animation: btn-sheen 7s ease-in-out infinite alternate;
  }
  @keyframes btn-sheen {
    from { background-position: 12% 30%; }
    to   { background-position: 88% 70%; }
  }
}

.link-grad {
  color:var(--ink); font-weight:500; text-decoration:none;
  background-image:var(--grad-aurora-x); background-repeat:repeat-x;
  background-size:200% 2px; background-position:0 100%;
  padding-bottom:3px;
  transition:background-size .3s ease, color .3s ease;
}
.link-grad:hover, .link-grad:focus-visible { background-size:200% 3px; color:var(--magenta); }
@media (prefers-reduced-motion: no-preference) {
  .link-grad:hover, .link-grad:focus-visible { animation: link-sweep 4s linear infinite; }
  @keyframes link-sweep {
    from { background-position: 0 100%; }
    to   { background-position: 200% 100%; }
  }
}

/* ---------- case-study cards (home) ---------- */
.case-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:32px; margin-top:40px; }
.case-card { display:flex; flex-direction:column; gap:0; text-decoration:none; color:inherit; border:1px solid var(--line); border-radius:16px; overflow:hidden; background:var(--surface); transition:border-color .15s ease; }
.case-card:hover { border-color: var(--magenta); }
.case-card:focus-visible { outline:2px solid var(--magenta); outline-offset:3px; }
/* One photo per card in an identical 4:3 frame so both cards read the same height.
   Each source photo is cover-cropped; object-position centres the device in frame. */
.case-media { flex:none; aspect-ratio:4/3; overflow:hidden; background:var(--grad-halo); }
.case-media img {
  --zoom:1;
  width:100%; height:100%; object-fit:cover; object-position:50% 50%;
  transform:scale(var(--zoom)); transition:transform .4s ease;
}
/* Candle's phone sits smaller in its source photo — zoom in so both devices read at one scale */
.case-media .focus-candle { --zoom:1.3; object-position:50% 56%; }
/* AGN's capture is a wide 1.93:1 desktop mockup. Cover-cropping it to 4:3 keeps only a
   centre slice; containing it leaves the laptop tiny. Contain, then scale back up so it
   fills the card and only the outer edges of the frame are trimmed. The card background is
   #F5F5F7, sampled from the mockup's own flat backdrop, so the letterbox shows no seam. */
.case-media.fit-whole { padding:14px; background:#F5F5F7; }
.case-media.fit-whole img { --zoom:1.25; object-fit:contain; }
.case-card:hover .case-media img { transform:scale(calc(var(--zoom) * 1.04)); }
@media (prefers-reduced-motion: reduce) {
  .case-media img, .case-card:hover .case-media img { transition:none; transform:none; }
}
.case-body { padding:28px; display:flex; flex-direction:column; gap:10px; border-top:1px solid var(--line); }
.case-body h3 { display:flex; align-items:center; gap:10px; }
.case-arrow { color: var(--ink-3); transition: transform .15s ease, color .15s ease; }
.case-card:hover .case-arrow { color: var(--magenta); transform: translateX(3px); }
.case-body p { color: var(--ink-2); }

/* ---------- about ---------- */
/* Banner card sits beside the bio text (original layout), stacks on mobile */
.about-grid { display:grid; grid-template-columns:383px 1fr; gap:48px; margin-top:40px; align-items:start; }
.about-banner-card { border-radius:16px; overflow:hidden; border:1px solid var(--line); background:var(--surface); }
.about-banner-card img { width:100%; height:auto; display:block; }
.about-links { margin-top:24px; display:flex; gap:20px; flex-wrap:wrap; }
/* Tools/programs marquee — logos are forced to solid black; two identical
   groups scroll as one to loop seamlessly. */
.tool-ticker {
  margin-top:40px; overflow:hidden; padding:28px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tool-ticker-track { display:flex; width:max-content; animation: tool-ticker-scroll 26s linear infinite; }
.tool-ticker:hover .tool-ticker-track { animation-play-state:paused; }
.tool-ticker-group { display:flex; align-items:center; gap:64px; padding-right:64px; flex-shrink:0; }
.tool-logo { height:32px; width:auto; filter:brightness(0); opacity:.72; }
@keyframes tool-ticker-scroll { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@media (prefers-reduced-motion:reduce) { .tool-ticker-track { animation:none; } }
@media (max-width:860px) {
  .about-grid { grid-template-columns:1fr; }
  .about-banner-card { max-width:383px; }
}

/* ---------- contact CTA (home) ---------- */
.cta-block {
  border-radius:24px; background:var(--grad-halo); padding:64px 40px; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:20px;
}
.cta-block .t-display-l { max-width:640px; }

/* ---------- metadata row (case studies) ---------- */
.meta-row { display:flex; gap:40px; flex-wrap:wrap; margin-top:32px; padding-top:28px; border-top:1px solid var(--line); }
.meta-item { display:flex; flex-direction:column; gap:8px; min-width:160px; }
.meta-item dt { font-family:'Inter'; font-weight:500; font-size:12px; line-height:1.5; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); }
.meta-item dd { color: var(--ink); font-family:'Inter'; font-weight:400; font-size:15px; }
.case-hero-img { width:100%; height:auto; border-radius:16px; border:1px solid var(--line); margin-top:32px; }

/* ---------- challenge split ---------- */
.challenge-grid { display:grid; grid-template-columns:1fr 1fr; gap:32px; margin-top:32px; }
.challenge-item { border:1px solid var(--line); border-radius:12px; padding:28px; background:var(--surface); }
.challenge-item h3 { margin-bottom:12px; }
.challenge-item p { color:var(--ink-2); }
@media (max-width:640px) { .challenge-grid { grid-template-columns:1fr; } }

/* ---------- statement / HMW ---------- */
.statement-block { margin-top:24px; }
.statement-block p { max-width:760px; }

/* ---------- insights ---------- */
.insights { counter-reset:insight; margin:32px 0 0; padding:0; list-style:none; display:flex; flex-direction:column; }
.insights li { counter-increment:insight; display:grid; grid-template-columns:56px 1fr; gap:20px; padding:20px 0; border-bottom:1px solid var(--line); }
.insights li:first-child { padding-top: 0; }
.insights li:last-child { border-bottom:none; }
.insights li::before {
  content: counter(insight, decimal-leading-zero); font-family:'Inter Display'; font-weight:800; font-size:22px; letter-spacing:-.02em;
  background:var(--grad-signal); -webkit-background-clip:text; background-clip:text; color:transparent; line-height:1.3;
}
.insights p { color: var(--ink-2); max-width:600px; }

/* ---------- process & iterations ---------- */
.process-section { margin-top:56px; }
.process-section:first-of-type { margin-top:32px; }
.process-section h3 { margin-bottom:14px; }
.process-section .t-body + .t-body { margin-top:12px; }
.process-section p.t-body { margin-top:14px; color: var(--ink-2); }
.media-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:20px; margin-top:24px; }
.media-grid.cols-2 { grid-template-columns:repeat(2,1fr); }
@media (max-width:640px) { .media-grid.cols-2 { grid-template-columns:1fr; } }
figure.media { margin:0; display:flex; flex-direction:column; gap:10px; }
figure.media img { border-radius:10px; border:1px solid var(--line); width:100%; height:auto; }
figure.media.full { grid-column: 1 / -1; }
/* A single card is artwork at card scale, not a screen — half the column width
   keeps it from reading as a full-bleed shot. Full width again on narrow
   screens, where half is too small to see. */
figure.media.half { max-width:50%; }
@media (max-width:640px) { figure.media.half { max-width:100%; } }
/* A logo mark is small artwork — centre it at a modest size instead of
   stretching it to the column width (which upscales past its native pixels). */
figure.media.logo-mark { align-items:center; text-align:center; }
figure.media.logo-mark img { width:auto; max-width:min(240px, 100%); height:auto; }
/* The AGN wordmark is a wide lockup (roughly 5:1), and its artwork is transparent
   with black type in it — so it needs more width than a square mark and a white
   plate to sit on, or the "LOS ANGELES" line disappears in the dark theme. */
figure.media.logo-mark.wordmark img { max-width:min(640px, 100%); background:#fff; padding:30px 34px; }
figure.media.logo-mark.wordmark figcaption { text-align:left; align-self:center; max-width:min(640px, 100%); }
/* Some artifacts only read in motion (the AGN three.js navigation). A <video> in
   a figure gets the same treatment as an image; always ship a poster so it has a
   still frame to fall back to. */
figure.media video { border-radius:10px; border:1px solid var(--line); width:100%; height:auto; display:block; }
/* Some AGN screens are the whole point at full length — the neighborhood pole is
   ~2.7x taller than it is wide. Scaling it to fit would make the posters
   unreadable, so it gets a fixed-height window you scroll inside instead. The
   frame is focusable so it can be scrolled from the keyboard too. */
.scroll-frame {
  /* Deliberately NOT overscroll-behavior:contain — this frame sits mid-page, and
     containing the scroll would trap the wheel once the reader hits its bottom. */
  height:min(640px, 78vh); overflow-y:auto;
  border-radius:10px; border:1px solid var(--line); background:#fff;
}
.scroll-frame:focus-visible { outline:2px solid var(--magenta); outline-offset:3px; }
figure.media .scroll-frame img { display:block; width:100%; height:auto; border:0; border-radius:0; }
/* Responsive 16:9 slot for third-party embeds (Miro board, prototypes). Keeps the
   same frame treatment as an image and never overflows its column. */
.embed-frame {
  position:relative; width:100%; aspect-ratio:16/9; overflow:hidden;
  border-radius:10px; border:1px solid var(--line); background:var(--surface);
}
.embed-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
figcaption.caption {
  font-family:'Inter'; font-weight:500; font-size:12px; letter-spacing:.02em; color:var(--ink-3);
  border-left:2px solid var(--line); padding-left:12px;
}
/* ---------- TEMPORARY: asset slots ----------
   Marks where a case-study image still needs to be dropped in. Replace each
   .media-slot with a real <figure class="media">, and delete this block once the
   last slot is gone. */
.media-slot {
  display:flex; align-items:center; justify-content:center; text-align:center;
  min-height:180px; padding:40px 24px;
  border:1px dashed var(--line); border-radius:10px; background:var(--surface);
  color:var(--ink-3); font-family:'Inter'; font-weight:500; font-size:12px;
  letter-spacing:.1em; text-transform:uppercase;
}
.media-slot.case-hero-slot { min-height:280px; margin-top:32px; border-radius:16px; }
.media-slot.media-slot-tall { min-height:340px; }
.media-slot.logo-slot { min-height:140px; max-width:240px; margin-inline:auto; }

.competitor-block { border:1px solid var(--line); border-radius:12px; padding:20px; background:var(--surface); display:flex; flex-direction:column; gap:14px; }
.competitor-block h4 { font-family:'Inter Display'; font-weight:600; font-size:16px; letter-spacing:-.01em; }
.competitor-head { display:flex; align-items:center; gap:12px; }
.competitor-logo { flex:none; width:44px; height:44px; border-radius:10px; border:1px solid var(--line); background:#fff; object-fit:cover; }
/* Marks whose artwork runs to the edge get inset and fitted whole, so the
   rounded tile doesn't clip them the way it does an app-icon-style logo. */
.competitor-logo.is-inset { object-fit:contain; padding:6px; }
/* ITK.LA has no logo mark; a monogram keeps the heads aligned across the grid. */
.competitor-logo.is-monogram {
  display:flex; align-items:center; justify-content:center; background:var(--bg);
  font-family:'Inter Display'; font-weight:600; font-size:12px; letter-spacing:.03em; color:var(--ink-3);
}
.competitor-block ul { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; color:var(--ink-2); font-size:14px; }
.competitor-block ul li { padding-left:16px; position:relative; }
.competitor-block ul li::before { content:'—'; position:absolute; left:0; color:var(--ink-3); }

/* ---------- stat row ---------- */
.demo, .stat-block { border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:36px; margin-top:40px; }
.stat-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:28px; }
.stat .num { font-family:'Inter Display'; font-weight:800; font-size:clamp(36px,5vw,52px); line-height:1; letter-spacing:-.03em;
  background:var(--grad-signal); -webkit-background-clip:text; background-clip:text; color:transparent;
  font-variant-numeric:tabular-nums; }
.stat .lbl { margin-top:10px; color:var(--ink-2); }

/* ---------- next-project teaser ---------- */
.teaser-card {
  display:flex; justify-content:space-between; align-items:center; gap:24px; flex-wrap:wrap;
  border:1px solid var(--line); border-radius:16px; padding:36px; margin-top:32px; background:var(--surface);
  text-decoration:none; color:inherit; transition:border-color .15s ease;
}
.teaser-card:hover { border-color: var(--magenta); }
.teaser-card:focus-visible { outline:2px solid var(--magenta); outline-offset:3px; }
.teaser-text .t-label { margin-bottom:10px; }
.teaser-arrow { color:var(--ink-3); font-size:28px; transition:transform .15s ease, color .15s ease; }
.teaser-card:hover .teaser-arrow { color:var(--magenta); transform: translateX(4px); }

/* ---------- contact form ---------- */
.form { max-width:520px; margin-top:40px; display:flex; flex-direction:column; gap:22px; }
.field { display:flex; flex-direction:column; gap:8px; }
.field label { font-family:'Inter'; font-weight:500; font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); }
.field input, .field textarea {
  font-family:'Inter'; font-size:16px; color:var(--ink); background:var(--surface);
  border:1px solid var(--line); border-radius:10px; padding:14px 16px; width:100%;
}
.field textarea { resize:vertical; min-height:140px; }
.field input:focus, .field textarea:focus { outline:none; border-color: var(--magenta); }
.form-submit { align-self:flex-start; margin-top:8px; }
.form-alt { margin-top:24px; color:var(--ink-2); }

/* ---------- footer ---------- */
footer.site-footer { border-top:1px solid var(--line); margin-top: 96px; }
.ftr { padding-top:56px; padding-bottom:40px; display:flex; flex-direction:column; gap:44px; }
.ftr-top { display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; }
.ftr-brand { display:flex; flex-direction:column; gap:16px; max-width:300px; }
.ftr-brand svg { width:36px; height:auto; color:var(--ink); }
.ftr-brand p { color:var(--ink-2); font-size:14px; line-height:1.6; }
.ftr-cols { display:flex; gap:56px; flex-wrap:wrap; }
.ftr-col { display:flex; flex-direction:column; gap:12px; min-width:120px; }
.ftr-col .t-label { color:var(--ink-3); margin-bottom:2px; }
.ftr-col a { color:var(--ink); text-decoration:none; font-size:15px; }
.ftr-col a:hover { color:var(--magenta); }
.ftr-col span.plain { color:var(--ink-2); font-size:15px; }
.ftr-bottom { border-top:1px solid var(--line); padding-top:20px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; color:var(--ink-3); font-size:13px; }
.ftr-bottom a { color:var(--ink-2); text-decoration:none; }
.ftr-bottom a:hover { color:var(--magenta); }

/* ---------- resume ---------- */
.resume-header { display:flex; align-items:center; gap:20px; }
.resume-header .resume-logo { width:44px; height:auto; color:var(--ink); flex-shrink:0; }
.resume-role { color:var(--ink-2); margin-top:10px; }
.resume-contact { margin-top:14px; display:flex; flex-wrap:wrap; gap:8px 24px; }
.resume-contact a { color:var(--ink-2); text-decoration:none; }
.resume-contact a:hover { color:var(--magenta); }
.resume-actions { margin-top:24px; }
.resume-download { display:inline-flex; align-items:center; gap:9px; }
.resume-download svg { width:17px; height:17px; flex-shrink:0; }
.entries { display:flex; flex-direction:column; margin-top:8px; }
.entry { position:relative; padding:28px 0 28px 26px; border-bottom:1px solid var(--line); }
.entry:last-child { border-bottom:none; }
.entry::before {
  content:''; position:absolute; left:0; top:34px; width:10px; height:10px; border-radius:99px;
  background:var(--grad-signal);
}
.entry-meta { display:block; margin-top:6px; color:var(--ink-3); }
.entry-intro { margin-top:12px; color:var(--ink-2); }
.entry ul { margin:12px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:8px; }
.entry ul li { color:var(--ink); }
.entry ul li::marker { color:var(--ink-3); }
.skill-row { display:grid; grid-template-columns:200px 1fr; gap:16px; padding:16px 0; border-bottom:1px solid var(--line); align-items:baseline; }
.skill-row:last-child { border-bottom:none; }
.skill-row .t-label { color:var(--ink-3); }
.skill-row p { color:var(--ink); }
@media (max-width:560px) { .skill-row { grid-template-columns:1fr; gap:6px; } }
.resume-list { margin:24px 0 0; padding-left:20px; display:flex; flex-direction:column; gap:10px; }
.resume-list li::marker { color:var(--ink-3); }

/* ---------- lightbox ---------- */
/* Case-study figures open in a modal <dialog> (see lightbox.js). The scrim is
   dark in both themes, so type and chrome inside it are fixed light values
   rather than --ink tokens. */
.zoomable { cursor:zoom-in; }
.zoomable:focus-visible { outline:2px solid var(--cyan); outline-offset:3px; }

.lightbox {
  width:100%; height:100%; max-width:100vw; max-height:100vh;
  padding:0; border:0; background:transparent; overflow:hidden; color:#fff;
}
.lightbox::backdrop { background:rgba(10,9,14,.84); backdrop-filter:blur(6px); }
.lightbox-inner {
  width:100%; height:100%;
  display:flex; flex-direction:column; align-items:safe center; justify-content:safe center;
  gap:18px; padding:64px 24px 32px; overflow:auto;
}
.lightbox-img {
  max-width:94vw; max-height:82vh; width:auto; height:auto;
  object-fit:contain; border-radius:12px; border:1px solid rgba(255,255,255,.14);
  background:var(--surface); box-shadow:0 24px 64px rgba(0,0,0,.5);
}
/* Opt-in via data-lightbox-detail on the thumbnail: a dense wide diagram opens
   at its natural size and pans, so fine type stays readable instead of being
   shrunk to fit. .lightbox-inner scrolls; 'safe center' keeps it centred while
   it fits but stops the overflowing edge from becoming unreachable. */
.lightbox-img.is-detail { max-width:none; max-height:none; }
.lightbox-caption { max-width:min(720px, 90vw); text-align:center; color:#D9D5E0; }

.lightbox-close {
  position:absolute; top:18px; right:18px; width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  border-radius:999px; border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.08); color:#fff; cursor:pointer;
}
.lightbox-close:hover { background:rgba(255,255,255,.18); }
.lightbox-close:focus-visible { outline:2px solid var(--cyan); outline-offset:2px; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation:lightbox-in .18s ease-out; }
  .lightbox[open]::backdrop { animation:lightbox-fade .18s ease-out; }
}
@keyframes lightbox-in { from { opacity:0; transform:scale(.985); } to { opacity:1; transform:none; } }
@keyframes lightbox-fade { from { opacity:0; } to { opacity:1; } }

@media (max-width:640px) {
  .lightbox-inner { padding:56px 14px 22px; gap:14px; }
  .lightbox-img { max-width:92vw; }
}

/* ---------- print (resume) ---------- */
@media print {
  :root, :root[data-theme="dark"], :root[data-theme="light"] {
    --bg:#fff; --surface:#fff; --ink:#000; --ink-2:#222; --ink-3:#444; --line:#bbb;
    --grad-signal:none; --grad-aurora:none; --grad-aurora-x:none; --grad-halo:none;
  }
  header.site, footer.site-footer, .theme-toggle, .skip-link, .page-aurora, .media-slot,
  .embed-frame, .lightbox, .resume-actions { display:none !important; }
  html { scroll-behavior:auto; }
  body { background:#fff; color:#000; font-size:11px; line-height:1.4; }
  @page { margin:0.55in; size:letter; }
  .wrap { max-width:100%; padding:0; }
  .col { max-width:100%; }
  main section { padding:14px 0 0; }
  main section:last-of-type { padding-bottom:0; }
  .section-head { padding-top:10px; break-after:avoid; }
  .section-intro { margin-top:4px; max-width:100%; }
  .t-title { font-size:17px; }
  .t-subhead { font-size:12.5px; }
  .t-body { font-size:11px; line-height:1.4; }
  .t-label { font-size:8.5px; }
  .resume-role { margin-top:4px; }
  .resume-contact { margin-top:8px; }
  .skill-row { padding:6px 0; }
  .resume-list { margin-top:10px; gap:4px; }
  .grad-text { background:none; color:#000; -webkit-text-fill-color:#000; animation:none; }
  a, .link-grad { color:#000 !important; text-decoration:none !important; background:none !important; padding-bottom:0 !important; }
  .entry { padding:12px 0 12px 16px; break-inside:avoid; }
  .entry::before { background:#000; width:7px; height:7px; top:17px; }
  .entry ul { gap:3px; }
  .entry-intro, .entry ul li, .section-intro { color:#000; }
  .resume-header .resume-logo { color:#000; width:36px; }
  .resume-contact { gap:4px 16px; }
}

/* ---------- responsive ---------- */
@media (max-width:640px) {
  .masthead { gap:10px; }
  .site-nav { gap:2px; }
  .site-nav a { padding:8px 10px; font-size:14px; }
  main section { padding-top:56px; }
  .meta-row { gap:24px; }
}
@media (max-width:400px) {
  .wrap { padding:0 16px; }
}
