  @font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("/fonts/fraunces-var.woff2") format("woff2");
  }

  /* ---------- Design tokens ----------
     Colour: a near-black ground (never pure #000) plus four accent hues,
     one per dossier project (D01 PhoneStock / D02 Phoenix Chicha /
     D03 Notre Budget / D04 VendreMaVoiture). The accent is a filing system,
     not decoration — it identifies which project you're looking at.
     Type: Fraunces (display, self-hosted) + Archivo (body) + system
     monospace (technical/data labels — a deliberate register, not a
     fallback). Scale: 4px spacing rhythm, a defined type scale, three
     radius tiers. Every value below traces back to one of these tokens. */
  :root {
    color-scheme: dark;
    --paper: #0a0b10;
    --paper-2: #101219;
    --card: #171922;
    --ink: #edeff4;
    --graphite: #9aa0b0;
    --line: #262a35;
    --accent: #8aa2ff;
    --accent-2: #e7ab55;
    --accent-3: #52d6a6;
    --accent-4: #ec8b6a;
    --bezel: #0c0d12;
    --bezel-edge: #34384a;
    --glow-a: 20%;
    --glow-text: 0 2px 44px color-mix(in srgb, var(--accent) 40%, transparent);
    --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
    --font-body: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

    /* Spacing — 4px rhythm */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-14: 56px;
    --space-16: 64px;
    --space-20: 80px;
    --space-24: 96px;

    /* Type scale */
    --text-3xs: 0.7rem;
    --text-2xs: 0.76rem;
    --text-xs: 0.85rem;
    --text-sm: 0.94rem;
    --text-base: 1rem;
    --text-md: 1.08rem;
    --text-lg: 1.3rem;
    --text-xl: clamp(1.6rem, 3vw, 2.1rem);
    --text-2xl: clamp(1.9rem, 3.6vw, 2.7rem);
    --text-3xl: clamp(2.3rem, 4.2vw, 3.7rem);

    /* Radius — three tiers, never 0, never uniform */
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 999px;
  }

  /* Dark is the deliberate default, regardless of system preference,
     only the page's own theme toggle (data-theme) switches to light. */
  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0a0b10;
    --paper-2: #101219;
    --card: #171922;
    --ink: #edeff4;
    --graphite: #9aa0b0;
    --line: #262a35;
    --accent: #8aa2ff;
    --accent-2: #e7ab55;
    --accent-3: #52d6a6;
    --accent-4: #ec8b6a;
    --bezel: #0c0d12;
    --bezel-edge: #34384a;
    --glow-a: 20%;
    --glow-text: 0 2px 44px color-mix(in srgb, var(--accent) 40%, transparent);
  }
  :root[data-theme="light"] {
    color-scheme: light;
    --paper: #eceef0;
    --paper-2: #e2e5e9;
    --card: #f6f7f8;
    --ink: #14161c;
    --graphite: #565c68;
    --line: #cdd2d8;
    --accent: #29409e;
    --accent-2: #93641c;
    --accent-3: #1f7a5c;
    --accent-4: #a3402a;
    --bezel: #17191f;
    --bezel-edge: #34363f;
    --glow-a: 8%;
    --glow-text: none;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; overflow-x: hidden; }
  body { overflow-x: hidden; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  /* One quiet ambient glow, not four competing ones — confidence over
     decoration. It sits behind the hero only, not stretched fixed across
     the whole scroll. */
  body {
    margin: 0;
    background-color: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16.5px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }

  a { color: inherit; }
  img { max-width: 100%; }

  a:focus-visible,
  button:focus-visible,
  [tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
  }
  .skip-link {
    position: absolute;
    top: 0;
    left: var(--space-3);
    z-index: 100;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    text-decoration: none;
    transform: translateY(-130%);
    transition: transform 0.15s ease;
  }
  .skip-link:focus { transform: translateY(var(--space-3)); }

  :root { --wrap-pad: 44px; }
  @media (max-width: 640px) { :root { --wrap-pad: 20px; } }
  @media (max-width: 380px) { :root { --wrap-pad: 16px; } }
  .wrap { max-width: 1080px; margin: 0 auto; padding: 0 var(--wrap-pad); }

  /* ---------- Sidebar ----------
     A fixed identity panel instead of a scrolling top bar: name, nav and
     contact stay in view the whole time, content scrolls past on the
     right. This is the one structural break from a conventional
     stacked-header portfolio layout. */
  .scroll-progress { position: fixed; top: 0; left: 0; height: 2.5px; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2) 50%, var(--accent-4)); z-index: 60; }
  @media (prefers-reduced-motion: reduce) { .scroll-progress { transition: none; } }

  :root { --sidebar-w: 268px; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    border-right: 1px solid var(--line);
    background: var(--paper);
    display: flex;
    flex-direction: column;
    padding: var(--space-10) var(--space-8) var(--space-8);
    z-index: 20;
    overflow-y: auto;
  }
  .brand { text-decoration: none; display: block; margin-bottom: var(--space-14); }
  .brand-name { display: block; font-family: var(--font-display); font-weight: 650; font-size: var(--text-lg); line-height: 1.15; color: var(--ink); letter-spacing: -0.01em; }
  .brand-role { display: block; font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.06em; color: var(--graphite); margin-top: var(--space-2); transition: color 0.15s ease; }
  .brand:hover .brand-role { color: var(--accent); }
  .side-nav { display: flex; flex-direction: column; gap: var(--space-4); font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.03em; margin-bottom: auto; }
  .side-nav a { text-decoration: none; color: var(--graphite); transition: color 0.15s ease, padding-left 0.15s ease; padding-left: 0; }
  /* Conversational nav copy earns its room in the spacious vertical
     sidebar, but the same phrases crowd a horizontal mobile bar — swap
     to short, conventional labels below the breakpoint instead. */
  .nav-short { display: none; }
  .side-nav a:hover, .side-nav a.is-active { color: var(--ink); padding-left: var(--space-2); }
  .side-nav a.is-active { color: var(--accent); }
  .sidebar-foot { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); margin-top: var(--space-10); padding-top: var(--space-6); border-top: 1px solid var(--line); }
  .sidebar-contact { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--graphite); text-decoration: none; transition: color 0.15s ease; word-break: break-word; }
  .sidebar-contact:hover { color: var(--accent); }
  .theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--graphite);
    cursor: pointer;
    padding: 0;
    transition: color 0.15s ease, border-color 0.15s ease, transform 0.2s ease;
  }
  @media (hover: hover) and (pointer: fine) {
    .theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-8deg); }
  }
  .theme-toggle:active { transform: scale(0.92); }
  .theme-toggle svg { width: 16px; height: 16px; }
  .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 (prefers-reduced-motion: reduce) { .theme-toggle { transition: none; } .theme-toggle:hover { transform: none; } }

  .site-main { margin-left: var(--sidebar-w); min-width: 0; }

  @media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .sidebar {
      position: sticky;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      width: auto;
      height: auto;
      padding: var(--space-4) var(--wrap-pad);
      border-right: none;
      border-bottom: 1px solid var(--line);
      background: color-mix(in srgb, var(--paper) 90%, transparent);
      backdrop-filter: blur(8px);
    }
    .brand { margin-bottom: 0; }
    .brand-role { display: none; }
    .side-nav { flex-direction: row; gap: var(--space-5); margin-bottom: 0; flex-wrap: wrap; justify-content: flex-end; }
    .side-nav a:hover, .side-nav a.is-active { padding-left: 0; }
    .sidebar-foot { flex-direction: row; align-items: center; margin-top: 0; padding-top: 0; border-top: none; }
    .sidebar-contact { display: none; }
    .site-main { margin-left: 0; }
    .nav-full { display: none; }
    .nav-short { display: inline; }
  }
  @media (max-width: 640px) {
    .side-nav { gap: var(--space-3); font-size: var(--text-3xs); }
  }
  @media (max-width: 460px) {
    .sidebar { flex-wrap: wrap; row-gap: var(--space-2); }
    .side-nav { width: 100%; justify-content: flex-start; order: 3; }
  }

  /* ---------- Hero ----------
     Typography carries this section — the headline is the largest,
     boldest thing on the page, with a single quiet accent glow behind
     it rather than a decorative background treatment. */
  .hero { position: relative; padding: var(--space-16) 0 var(--space-14); overflow: hidden; }
  .hero::before {
    content: "";
    position: absolute;
    top: -20%;
    left: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 72%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
  }
  .hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-10); align-items: center; width: 100%; }
  .eyebrow { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 var(--space-6); display: flex; align-items: center; gap: var(--space-2); }
  .eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent-2); display: inline-block; }
  h1.headline { font-family: var(--font-display); font-weight: 640; font-variation-settings: "SOFT" 40, "WONK" 1; font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 var(--space-7); text-wrap: balance; }
  .hero p.lede { font-size: var(--text-md); line-height: 1.65; color: var(--graphite); max-width: 52ch; margin: 0 0 var(--space-7); }
  .chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }

  .hero-text .eyebrow, .hero-text h1.headline, .hero-text p.lede, .hero-text .chip-row {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .hero-text.in .eyebrow { transition-delay: 0.05s; }
  .hero-text.in h1.headline { transition-delay: 0.16s; }
  .hero-text.in p.lede { transition-delay: 0.3s; }
  .hero-text.in .chip-row { transition-delay: 0.44s; }
  .hero-text.in .eyebrow, .hero-text.in h1.headline, .hero-text.in p.lede, .hero-text.in .chip-row {
    opacity: 1;
    transform: none;
  }
  .hero-showcase { opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.9s ease 0.2s, transform 0.9s ease 0.2s; }
  .hero-showcase.in { opacity: 1; transform: none; }
  .chip { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.04em; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--graphite); background: var(--card); }
  .cta-inline { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.02em; text-decoration: none; color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 2px; margin-left: var(--space-1); transition: gap 0.15s ease; }
  .cta-inline:hover { color: var(--accent-2); border-color: var(--accent-2); }

  /* ---------- Hero showcase ----------
     An overlapping, gently rotated collage — the plain thin-border card
     treatment, staggered and layered like screenshots dropped on a desk.
     Sizes below are calibrated pixel values (not scale tokens): each
     thumbnail's width % was tuned against the others' aspect ratio so
     the four cards render at comparable heights side by side. */
  .hero-showcase { position: relative; height: 560px; isolation: isolate; }
  .hero-showcase::before {
    content: "";
    position: absolute;
    inset: -10%;
    z-index: -1;
    pointer-events: none;
    background:
      radial-gradient(38% 42% at 18% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 72%),
      radial-gradient(40% 44% at 85% 15%, color-mix(in srgb, var(--accent-4) 24%, transparent), transparent 72%),
      radial-gradient(42% 46% at 80% 88%, color-mix(in srgb, var(--accent-2) 24%, transparent), transparent 72%),
      radial-gradient(38% 42% at 12% 85%, color-mix(in srgb, var(--accent-3) 26%, transparent), transparent 72%);
    filter: blur(38px);
    opacity: 0.65;
  }
  .hero-spotlight { display: none; }
  .hero-thumb { position: absolute; text-decoration: none; display: block; transition: transform 0.45s cubic-bezier(.2,.8,.2,1); will-change: transform; }
  .hero-thumb .tilt { display: block; transition: transform 0.3s cubic-bezier(.2,.8,.2,1); }
  .hero-thumb .shotframe { width: 100%; }
  .hero-thumb .shotframe img { width: 100%; height: auto; max-height: none; }
  .thumb-a { top: 0; left: 0; width: 60%; z-index: 1; }
  .thumb-a .tilt { transform: rotate(-3deg); }
  .thumb-b { bottom: 0; right: 0; width: 57%; z-index: 3; }
  .thumb-b .tilt { transform: rotate(2.5deg); }
  .thumb-c { top: 2%; right: 0; width: 34%; z-index: 4; }
  .thumb-c .tilt { transform: rotate(5deg); }
  .thumb-d { bottom: 4%; left: 2%; width: 18%; z-index: 2; }
  .thumb-d .tilt { transform: rotate(-6deg); }
  @media (hover: hover) and (pointer: fine) {
    .hero-thumb:hover { z-index: 30 !important; }
    .hero-thumb:hover .tilt { transform: rotate(0deg) scale(1.06) !important; }
  }

  /* Mobile: the desktop collage (absolute-positioned, rotated screenshots
     of very different shapes) doesn't translate to a small screen without
     either cropping content awkwardly or looking like a cluttered pile.
     Simpler and cleaner: the hero is headline + copy + CTA only here, no
     showcase images. The four projects still get their full-size,
     uncropped screenshots lower down the page, in their own sections. */
  @media (max-width: 860px) {
    .hero { min-height: auto; }
    .hero .wrap { grid-template-columns: 1fr; }
    .hero-showcase { display: none; }
  }
  /* The sidebar collapses to a compact horizontal bar below 900px (see
     above), so the generous desktop top padding — sized to balance a
     fixed-height sidebar — just reads as a dead gap here. Tighten it. */
  @media (max-width: 900px) {
    .hero { padding-top: var(--space-8); }
  }

  /* ---------- Screenshot frames ----------
     One clean treatment for every screenshot, everywhere on the site:
     a rounded card, a thin border, a soft project-tinted shadow. No
     device chrome (bezels, notches, browser toolbars) — those kept
     looking synthetic no matter how much they were refined, so the
     screenshots now speak for themselves. */
  .shotframe {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    cursor: zoom-in;
    box-shadow:
      0 20px 40px -20px rgba(4,5,8,0.5),
      0 0 0 1px color-mix(in srgb, var(--proj, var(--accent)) 20%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  }
  .shotframe img { display: block; width: 100%; height: auto; }
  .shotframe .bar { display: none; }
  /* Each screenshot crops to the aspect ratio of the device it actually
     came from — a laptop screen, a tablet, a phone — instead of whatever
     odd ratio its own crop happened to be (a dashboard screenshot cropped
     tight to content, a full-page phone capture, etc). object-fit: cover
     fills that shape without distorting anything. */
  .shotframe.browser img { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
  .shotframe.tablet img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
  .shotframe.phone img { aspect-ratio: 9 / 19; object-fit: cover; object-position: top; }
  /* PhoneStock's dashboard crops lose stat cards on the right at 16:10 —
     show the whole responsive layout uncropped there instead of cropping. */
  .shotframe.browser.full img { object-fit: contain; object-position: center; background: var(--paper-2); }
  .dossier-visual { position: relative; }
  @media (hover: hover) and (pointer: fine) {
    .dossier-visual .shotframe:hover,
    .gallery-item .shotframe:hover,
    .hero-thumb .shotframe:hover {
      box-shadow:
        0 24px 46px -18px rgba(4,5,8,0.55),
        0 0 0 1px color-mix(in srgb, var(--proj, var(--accent)) 45%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.08);
    }
  }
  .hero-thumb .shotframe {
    box-shadow:
      0 30px 60px -22px rgba(2,3,6,0.6),
      0 0 0 1px color-mix(in srgb, var(--proj, var(--accent)) 30%, transparent),
      0 0 34px 2px color-mix(in srgb, var(--proj, var(--accent)) 14%, transparent),
      inset 0 1px 0 rgba(255,255,255,0.08);
  }
  @media (hover: hover) and (pointer: fine) {
    .hero-thumb .shotframe:hover {
      box-shadow:
        0 34px 64px -20px rgba(2,3,6,0.65),
        0 0 0 1px color-mix(in srgb, var(--proj, var(--accent)) 55%, transparent),
        0 0 44px 4px color-mix(in srgb, var(--proj, var(--accent)) 22%, transparent),
        inset 0 1px 0 rgba(255,255,255,0.1);
    }
  }
  .dossier-visual .shotframe:active,
  .gallery-item .shotframe:active { transform: scale(0.98); }
  .zoom-hint {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-family: var(--font-mono);
    font-size: var(--text-3xs);
    letter-spacing: 0.03em;
    color: var(--ink);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-3);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 5;
  }
  .dossier-visual:hover .zoom-hint { opacity: 1; transform: translateY(0); }
  @media (max-width: 780px) { .zoom-hint { display: none; } }

  /* Every screenshot — whatever its own native aspect ratio — caps to the
     same rendered height, so gallery rows and side-by-side visuals line
     up instead of one tall capture towering over its neighbours. (The
     hero collage is excluded: it sizes each thumbnail via its own width
     percentages, see above.) These max-heights are calibrated against the
     16:10 browser frame, not scale tokens. */
  .dossier-visual .shotframe,
  .gallery-item .shotframe {
    width: fit-content;
    margin: 0 auto;
  }
  .gallery-item .shotframe img {
    width: auto;
    height: auto;
    max-height: 260px;
    max-width: 100%;
  }
  /* Bigger on the homepage project cards specifically — this is the one
     screenshot representing the whole project, so it earns more room. */
  .dossier-visual .shotframe img {
    width: auto;
    height: auto;
    max-height: 360px;
    max-width: 100%;
  }

  /* ---------- Index (table of contents) ---------- */
  section.index { padding: var(--space-2) 0 var(--space-16); border-bottom: 1px solid var(--line); }
  .index-title { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite); margin: 0 0 var(--space-4); }
  ol.index-list { list-style: none; margin: 0; padding: 0; }
  .index-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 2px; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
  .index-row:last-child { border-bottom: 1px solid var(--line); }
  .index-thumb { width: 42px; height: 42px; border-radius: var(--radius-sm); overflow: hidden; flex: 0 0 auto; border: 1px solid var(--line); }
  .index-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .index-ref { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--proj, var(--accent)); flex: 0 0 auto; width: 3ch; }
  .index-name { font-family: var(--font-display); font-size: var(--text-lg); flex: 0 0 auto; white-space: nowrap; }
  .index-domain { font-size: var(--text-xs); color: var(--graphite); flex: 0 0 auto; white-space: nowrap; }
  .index-leader { flex: 1 1 auto; border-bottom: 1px dotted var(--line); margin-bottom: 5px; min-width: 24px; }
  .index-tag { font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.04em; color: var(--graphite); flex: 0 0 auto; }
  .index-row { transition: color 0.15s ease, background 0.15s ease; border-radius: var(--radius-sm); }
  .index-row:hover { background: var(--card); }
  .index-row:hover .index-name { color: var(--proj, var(--accent)); }
  .index-row:hover .index-leader { border-color: var(--proj, var(--accent)); }

  @media (max-width: 620px) {
    /* The desktop "table row with a dotted leader" doesn't fit a phone:
       long project names/domains were fixed to one line and had nowhere
       to shrink, which is what was pushing the page wider than the
       viewport. Rebuild as a compact two-line card instead. */
    .index-row {
      display: grid;
      grid-template-columns: 42px 1fr auto;
      grid-template-areas: "thumb name tag" "thumb domain domain";
      column-gap: var(--space-3);
      row-gap: 3px;
      align-items: center;
    }
    .index-thumb { grid-area: thumb; align-self: start; }
    .index-ref { display: none; }
    .index-name { grid-area: name; white-space: normal; flex: none; }
    .index-domain { grid-area: domain; white-space: normal; flex: none; width: auto; margin: 0; }
    .index-tag { grid-area: tag; }
    .index-leader { display: none; }
  }

  /* ---------- Dossier sections ---------- */
  section.dossier { position: relative; padding: var(--space-20) 0; border-bottom: 1px solid var(--line); }
  section.dossier.tint { background: color-mix(in srgb, var(--paper-2) 55%, transparent); }
  section.dossier[data-observe] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
  section.dossier[data-observe].in-view { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { section.dossier[data-observe] { opacity: 1; transform: none; transition: none; } }

  .dossier-head { position: relative; display: flex; align-items: flex-start; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
  .dossier-head::before {
    content: "";
    position: absolute;
    top: -70px;
    left: -70px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, var(--proj, var(--accent)) 0%, transparent 68%);
    opacity: 0.3;
    filter: blur(34px);
    z-index: -1;
    pointer-events: none;
  }
  .dossier-ref { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--proj, var(--accent)); padding-top: var(--space-1); flex: 0 0 auto; width: 3ch; }
  .dossier-icon { flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; color: var(--proj, var(--accent)); background: var(--card); }
  .dossier-icon svg { width: 24px; height: 24px; }
  .dossier-head-text { flex: 1 1 auto; min-width: 200px; }
  @media (max-width: 480px) {
    .dossier-head-text { min-width: 100%; }
    .status { margin-top: var(--space-1); }
  }
  .dossier-domain { display: block; font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--graphite); margin-bottom: var(--space-2); }
  .dossier-title { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); margin: 0; letter-spacing: -0.01em; }
  .status { flex: 0 0 auto; font-family: var(--font-mono); font-size: var(--text-3xs); letter-spacing: 0.05em; text-transform: uppercase; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); align-self: flex-start; margin-top: var(--space-2); }
  .status-demo { color: var(--graphite); border: 1px solid var(--line); }
  .status-staging { color: var(--proj, var(--accent-2)); border: 1px solid var(--proj, var(--accent-2)); background: color-mix(in srgb, var(--proj, var(--accent-2)) 12%, transparent); }
  .status-prod { color: var(--proj, var(--accent)); border: 1px solid var(--proj, var(--accent)); background: color-mix(in srgb, var(--proj, var(--accent)) 16%, transparent); font-weight: 600; }

  .meta-strip { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-7); }
  .meta-chip { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.02em; padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); border: 1px solid var(--line); background: var(--card); color: var(--graphite); }
  .meta-chip b { color: var(--ink); font-weight: 600; }

  .dossier-body { display: flex; gap: var(--space-12); align-items: flex-start; }
  section.dossier.reverse .dossier-body { flex-direction: row-reverse; }
  .dossier-visual { flex: 0 0 46%; }
  .dossier-visual.narrow { flex-basis: 34%; display: flex; justify-content: center; }
  .narrative { flex: 1 1 auto; min-width: 0; }
  .narrative p { font-size: var(--text-base); line-height: 1.72; color: var(--ink); max-width: 60ch; margin: 0 0 var(--space-5); }
  ul.features { list-style: none; margin: 0 0 var(--space-7); padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-5); max-width: 60ch; }
  @media (max-width: 480px) { ul.features { grid-template-columns: 1fr; } }
  ul.features li { font-size: var(--text-xs); color: var(--graphite); padding-left: var(--space-3); position: relative; line-height: 1.5; }
  ul.features li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 1px; background: var(--proj, var(--accent-2)); }

  .link-row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-7); }
  a.link-out { display: inline-flex; align-items: center; gap: var(--space-1); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.02em; text-decoration: none; color: var(--proj, var(--accent)); border-bottom: 1px solid var(--proj, var(--accent)); padding-bottom: 2px; transition: gap 0.15s ease; }
  a.link-out:hover { gap: var(--space-3); }

  @media (max-width: 780px) {
    .dossier-body, section.dossier.reverse .dossier-body { flex-direction: column; gap: var(--space-7); }
    .dossier-visual, .dossier-visual.narrow { flex: 1 1 auto; width: 100%; }
  }

  /* ---------- Footer ---------- */
  footer.colophon { padding: var(--space-14) 0 var(--space-20); }
  footer.colophon .lede { font-family: var(--font-display); font-size: var(--text-lg); line-height: 1.5; max-width: 34ch; margin: 0 0 var(--space-6); text-wrap: balance; }
  .contact-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-8); }
  a.contact-link { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: var(--text-sm); text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); transition: border-color 0.15s ease, color 0.15s ease; }
  a.contact-link:hover { border-color: var(--accent); color: var(--accent); }
  a.contact-link.contact-whatsapp:hover { border-color: #3fbc57; color: #3fbc57; }
  .fine-print { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--graphite); border-top: 1px solid var(--line); padding-top: var(--space-5); }

  /* ---------- Lightbox ---------- */
  .lightbox { position: fixed; inset: 0; background: rgba(8,9,12,0.86); display: none; align-items: center; justify-content: center; padding: var(--space-10); z-index: 100; }
  .lightbox.open { display: flex; }
  .lightbox img { max-width: min(92vw, 900px); max-height: 88vh; border-radius: var(--radius-md); box-shadow: 0 30px 70px -20px rgba(0,0,0,0.6); }

  /* ---------- Project case-study pages ---------- */
  .back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.02em;
    text-decoration: none;
    color: var(--graphite);
    margin-bottom: var(--space-7);
    transition: color 0.15s ease, gap 0.15s ease;
  }
  .back-link:hover { color: var(--proj, var(--accent)); gap: var(--space-3); }

  .project-hero { padding: var(--space-10) 0 var(--space-2); position: relative; }
  .project-hero .dossier-head { margin-bottom: var(--space-4); }
  .project-hero .dossier-head::before { top: -50px; left: -50px; width: 220px; height: 220px; }
  .project-hero p.project-summary { font-size: var(--text-md); line-height: 1.7; color: var(--graphite); max-width: 66ch; margin: var(--space-1) 0 0; }
  @media (max-width: 900px) {
    .project-hero { padding-top: var(--space-6); }
  }

  /* ---------- Approach section (challenge / method) ---------- */
  section.approach-section { padding: var(--space-10) 0 var(--space-1); }
  .approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-10);
    border-top: 1px solid var(--line);
    padding-top: var(--space-7);
  }
  .approach-block .index-title { color: var(--proj, var(--accent)); }
  .approach-block p { font-size: var(--text-sm); line-height: 1.72; color: var(--ink); margin: 0; max-width: 52ch; }
  @media (max-width: 720px) {
    .approach-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  }

  section.gallery-section { padding: var(--space-10) 0 var(--space-20); }
  .gallery-meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-7); border-top: 1px solid var(--line); padding-top: var(--space-5); }
  .gallery-meta .index-title { margin: 0; }
  .gallery-count { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--graphite); }

  /* Flex-wrap, not grid: every screenshot is capped to the same height
     (see .shotframe rules above) and keeps its own natural width, so a
     wide dashboard and a narrow phone shot sit at matching heights
     instead of a shared column width forcing their heights apart. */
  .gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--space-8) var(--space-7); }
  .gallery .gallery-item { flex: 0 0 auto; width: auto; max-width: 100%; }
  .gallery .gallery-item .gallery-caption { max-width: 300px; }
  @media (max-width: 560px) {
    .gallery { justify-content: center; }
    .gallery .gallery-item { max-width: 100%; }
  }
  .gallery-role-label { font-family: var(--font-mono); font-size: var(--text-2xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--proj, var(--accent)); margin: var(--space-10) 0 var(--space-4); }
  .gallery-role-label:first-of-type { margin-top: 0; }
  .gallery-item { display: flex; flex-direction: column; gap: var(--space-3); margin: 0; opacity: 0; transform: translateY(20px); transition: opacity 0.55s ease, transform 0.55s ease; }
  .gallery-item.in-view { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) { .gallery-item { opacity: 1; transform: none; transition: none; } }
  .gallery-item .shotframe { cursor: zoom-in; }
  .gallery-caption h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-md); margin: 0 0 var(--space-1); letter-spacing: -0.005em; }
  .gallery-caption p { font-size: var(--text-xs); line-height: 1.55; color: var(--graphite); margin: 0; max-width: 46ch; }
  .gallery-num { font-family: var(--font-mono); font-size: var(--text-3xs); color: var(--proj, var(--accent)); display: block; margin-bottom: var(--space-1); letter-spacing: 0.04em; }

  /* ---------- Process / method page ---------- */
  section.process-section { padding: var(--space-5) 0 var(--space-7); }
  .process-list { list-style: none; margin: 0; padding: 0; position: relative; counter-reset: step; }
  .process-list::before {
    content: "";
    position: absolute;
    left: 23px;
    top: var(--space-3);
    bottom: var(--space-3);
    width: 2px;
    background: linear-gradient(180deg, var(--proj, var(--accent)) 0%, color-mix(in srgb, var(--proj, var(--accent)) 25%, transparent) 85%, transparent 100%);
  }
  .process-step { position: relative; display: flex; gap: var(--space-6); padding: 0 0 var(--space-10); }
  .process-step:last-child { padding-bottom: 0; }
  .process-num {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--card);
    border: 1.5px solid var(--proj, var(--accent));
    color: var(--proj, var(--accent));
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
  }
  .process-body { padding-top: var(--space-1); min-width: 0; }
  .process-body h3 { font-family: var(--font-display); font-weight: 650; font-size: var(--text-lg); margin: 0 0 var(--space-2); letter-spacing: -0.005em; }
  .process-body p { font-size: var(--text-sm); line-height: 1.68; color: var(--ink); max-width: 62ch; margin: 0; }
  @media (max-width: 560px) {
    .process-num { width: 40px; height: 40px; font-size: var(--text-xs); }
    .process-list::before { left: 19px; }
    .process-step { gap: var(--space-4); padding-bottom: var(--space-8); }
  }

  .project-footer-nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4); padding: var(--space-10) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: var(--space-10); }
  .project-footer-nav a { font-family: var(--font-mono); font-size: var(--text-xs); text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: var(--space-2); }
  .project-footer-nav a:hover { color: var(--proj, var(--accent)); }
  .lightbox-close { position: fixed; top: 22px; right: 26px; background: var(--card); color: var(--ink); border: 1px solid var(--line); width: 38px; height: 38px; border-radius: var(--radius-full); font-size: 18px; cursor: pointer; }
