:root{color-scheme:light dark;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);}
:root[data-theme="dark"]{color-scheme:dark;} :root[data-theme="light"]{color-scheme:light;}
html{-webkit-text-size-adjust:100%; scroll-padding-top:calc(var(--nav-h) + 20px);} img,svg{max-width:100%;} [hidden]{display:none!important;}

  /* ============================================================
     TOKENS  —  Monochrome. Pure black & white, with a few honest
     greys for rules and secondary text. Theme follows time of day.
     ============================================================ */
  :root {
    --bg:        #FFFFFF;
    --bg-far:    #E8F5F1;
    --bg-2:      #F4F4F4;
    --surface:   #FFFFFF;
    --surface-2: #F6F6F6;
    --ink:       #0A0A0A;
    --muted:     #565656;
    --faint:     #6B6B6B;
    --line:      #E4E4E4;
    --line-soft: #EFEFEF;
    --accent:      #0A0A0A;
    --accent-ink:  #0A0A0A;
    --accent-soft: #F0F0F0;
    --on-accent:   #FFFFFF;
    --spot:        #0FB5A6;   /* teal used for the hero spotlight + design cursor */
    --focus:     #0A0A0A;
    --shadow:    0 1px 2px rgba(0,0,0,.05), 0 12px 30px -16px rgba(0,0,0,.18);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.07), 0 40px 80px -34px rgba(0,0,0,.26);

    --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
    --font-body: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --wrap: 1340px;
    --gutter: clamp(20px, 5vw, 72px);
    --nav-h: 66px;
    --img-radius: 18px;

    --ease: cubic-bezier(.22, 1, .36, 1);
    --dur: .6s;
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg:        #000000;
      --bg-far:    #0A1613;
      --bg-2:      #0D0D0D;
      --surface:   #0B0B0B;
      --surface-2: #151515;
      --ink:       #F6F6F6;
      --muted:     #A6A6A6;
      --faint:     #808080;
      --line:      #262626;
      --line-soft: #1A1A1A;
      --accent:      #FFFFFF;
      --accent-ink:  #FFFFFF;
      --accent-soft: #1C1C1C;
      --on-accent:   #000000;
      --focus:     #FFFFFF;
      --shadow:    0 1px 2px rgba(0,0,0,.5), 0 14px 34px -14px rgba(0,0,0,.7);
      --shadow-lg: 0 2px 8px rgba(0,0,0,.6), 0 44px 90px -34px rgba(0,0,0,.8);
    }
  }
  :root[data-theme="dark"] {
    --bg:        #000000;
    --bg-far:    #0A1613;
    --bg-2:      #0D0D0D;
    --surface:   #0B0B0B;
    --surface-2: #151515;
    --ink:       #F6F6F6;
    --muted:     #A6A6A6;
    --faint:     #808080;
    --line:      #262626;
    --line-soft: #1A1A1A;
    --accent:      #FFFFFF;
    --accent-ink:  #FFFFFF;
    --accent-soft: #1C1C1C;
    --on-accent:   #000000;
    --focus:     #FFFFFF;
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 14px 34px -14px rgba(0,0,0,.7);
    --shadow-lg: 0 2px 8px rgba(0,0,0,.6), 0 44px 90px -34px rgba(0,0,0,.8);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; background: var(--bg); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-far) 100%);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
  }

  ::selection { background: var(--accent); color: var(--on-accent); }

  a { color: inherit; text-decoration: none; }

  :focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 3px;
  }

  .wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

  .skip {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--ink); color: var(--bg);
    padding: 10px 16px; border-radius: 8px; font-weight: 600;
    transition: top .2s var(--ease);
  }
  .skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }

  .eyebrow {
    font-family: var(--font-mono);
    font-size: 12px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--muted);
    display: inline-flex; align-items: center; gap: 9px;
  }

  /* ============================================================ SCROLL BACKGROUND */
  .bg-field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
  .blob { position: absolute; border-radius: 50%; filter: blur(34px); will-change: transform; }
  .blob-a { width: 78vmax; height: 78vmax; left: -22vmax; top: -14vmax;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--ink) 7%, transparent), transparent 60%); }
  .blob-b { width: 64vmax; height: 64vmax; right: -22vmax; top: 44vh;
    background: radial-gradient(circle at center, color-mix(in srgb, var(--ink) 6%, transparent), transparent 62%); }
  main, footer { position: relative; z-index: 1; }
  /* ============================================================ NAV */
  .nav {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60;
    backdrop-filter: saturate(1.2) blur(12px);
    -webkit-backdrop-filter: saturate(1.2) blur(12px);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), transform .4s var(--ease);
  }
  .nav.scrolled { border-bottom-color: var(--line); }
  .nav.hide { transform: translateY(-102%); }
  .nav-inner {
    max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter);
    height: var(--nav-h); display: flex; align-items: center; gap: 20px;
  }
  .brand { display: inline-flex; align-items: center; margin-right: auto; }
  .mono { display: inline-flex; align-items: center; gap: 9px; }
  .mono-dot {
    width: 11px; height: 11px; border-radius: 50%;
    background: var(--accent); flex: none; position: relative;
    transition: transform .4s var(--ease);
  }
  .mono-dot::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--accent); opacity: 0; transform: scale(1); pointer-events: none;
  }
  .mono-txt {
    font-family: var(--font-display); font-weight: 800; font-size: clamp(17px, 2vw, 20px);
    letter-spacing: -.03em; line-height: 1; color: var(--ink);
    display: inline-block; white-space: nowrap;
  }
  .mono-txt span { display: inline-block; }

  /* hover choreography — dot pops + pings, letters bounce in stagger */
  .brand:hover .mono-dot { transform: scale(1.15); }
  .js-animate .brand:hover .mono-dot { animation: monoDot .55s var(--ease); }
  .js-animate .brand:hover .mono-dot::after { animation: monoPing .6s var(--ease); }
  .js-animate .brand:hover .mono-txt span { animation: monoHop .5s var(--ease); }
  .js-animate .brand:hover .mono-txt span:nth-child(2) { animation-delay: .06s; }
  .js-animate .brand:hover .mono-txt span:nth-child(3) { animation-delay: .12s; }
  @keyframes monoDot { 0% { transform: scale(1); } 45% { transform: scale(1.5); } 100% { transform: scale(1.15); } }
  @keyframes monoPing { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(2.5); } }
  @keyframes monoHop { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-5px); } }

  .nav-links { display: flex; align-items: center; gap: 4px; }
  .nav-links a {
    font-size: 14.5px; font-weight: 500; color: var(--muted);
    padding: 8px 12px; border-radius: 8px;
    position: relative; transition: color .2s var(--ease);
  }
  .nav-links a:hover { color: var(--ink); }
  .nav-links a[aria-current="true"] { color: var(--ink); }
  .nav-links a[aria-current="true"]::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px;
    height: 2px; background: var(--ink); border-radius: 2px;
  }

  .nav-actions { display: flex; align-items: center; gap: 10px; }

  .icon-btn {
    width: 40px; height: 40px; display: grid; place-items: center;
    border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); cursor: pointer;
    transition: border-color .2s var(--ease), transform .2s var(--ease);
  }
  .icon-btn:hover { border-color: var(--ink); transform: translateY(-1px); }
  .icon-btn svg { width: 18px; height: 18px; }
  .theme-toggle .moon { display: none; }
  :root[data-theme="dark"] .theme-toggle .sun { display: none; }
  :root[data-theme="dark"] .theme-toggle .moon { display: block; }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  }

  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    font-family: var(--font-body); font-weight: 600; font-size: 15px;
    padding: 12px 20px; border-radius: 12px; cursor: pointer;
    border: 1px solid transparent; white-space: nowrap;
    transition: transform .2s var(--ease), background .2s var(--ease),
                border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
  }
  .btn svg { width: 16px; height: 16px; }
  .btn-primary { background: var(--accent); color: var(--on-accent); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
  .btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
  .btn-sm { padding: 9px 15px; font-size: 14px; border-radius: 10px; }

  .menu-btn { display: none; }
  .menu-btn .close-ico { display: none; }
  .menu-btn[aria-expanded="true"] .menu-ico { display: none; }
  .menu-btn[aria-expanded="true"] .close-ico { display: block; }

  /* ============================================================ VIEWS */
  .view { display: block; }
  .view[hidden] { display: none !important; }

  section { padding-block: clamp(50px, 7vw, 100px); }
  .section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(32px, 5vw, 60px); }
  .section-head h2 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(30px, 5vw, 54px); line-height: 1.02; letter-spacing: -.025em;
    margin: 0; text-wrap: balance; max-width: 16ch;
  }
  .section-head p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 18px; }

  /* ============================================================ HERO */
  .hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 84px); position: relative; overflow: clip; }
  /* Option 4: parallax spotlight + tilt */
  .hero-fx {
    position: absolute; inset: -6% -2% -12% -2%; width: auto; height: auto;
    z-index: 0; pointer-events: none; opacity: .9;
  }
  .hero .wrap { position: relative; z-index: 1; }
  .hero-grid {
    display: grid; grid-template-columns: 1.55fr .9fr;
    gap: clamp(28px, 5vw, 84px); align-items: center;
  }
  .hero-eyebrow { margin-bottom: 24px; }

  /* ---------- Figma-style multiplayer design cursor ---------- */
  .mcursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
    opacity: 0; transition: opacity .18s ease; will-change: transform; }
  .mcursor.on { opacity: 1; }
  .mcursor svg { display: block; filter: drop-shadow(0 2px 5px rgba(0,0,0,.28)); }
  .mcursor svg path { fill: #0A0A0A; }
  .mcursor .tag { position: absolute; top: 20px; left: 16px; white-space: nowrap;
    font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 500; letter-spacing: .02em;
    color: #fff; background: var(--spot); padding: 3px 9px; border-radius: 8px 8px 8px 2px;
    line-height: 1.3; box-shadow: 0 3px 10px rgba(0,0,0,.22);
    transform: scale(1); transform-origin: top left; transition: transform .18s var(--ease); }
  .mcursor .mc-hand { display: none; transform: translate(-6px, -1px); }
  .mcursor.tap .mc-arrow { display: none; }
  .mcursor.tap .mc-hand { display: block; }
  /* hide the native arrow only where a custom cursor is safe; keep the text caret in fields */
  body.has-mcursor, body.has-mcursor * { cursor: none !important; }
  @media (hover: none), (pointer: coarse) { .mcursor { display: none !important; } body.has-mcursor, body.has-mcursor * { cursor: auto !important; } }
  .hero h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(33px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.03em;
    margin: 0 0 26px; text-wrap: balance;
  }
  .hero h1 .accent { font-style: italic; text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .1em; }
  .hero h1 .word { display: inline-block; }
  .hero-lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--muted); max-width: 48ch; margin: 0 0 24px; }

  .hero-values { list-style: none; margin: 0 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; }
  .hero-values li { position: relative; color: var(--muted); font-size: 15.5px; }
  .hero-values li b { color: var(--ink); font-weight: 600; }
  .hero-values li:not(:last-child)::after { content: ""; position: absolute; right: -15px; top: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--faint); transform: translateY(-50%); }

  .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

  /* photo slot (a real image frame, kept intentionally) */
  .portrait {
    position: relative; aspect-ratio: 9/10; max-width: 100%;
    border-radius: var(--img-radius); overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-2);
  }
  .portrait::after {
    content: ""; position: absolute; inset: 0;
    background-image:
      linear-gradient(var(--line-soft) 1px, transparent 1px),
      linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
    background-size: 30px 30px; opacity: .7;
  }
  .portrait-inner {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px; text-align: center;
    color: var(--faint); z-index: 1; padding: 20px;
  }
  .portrait.has-photo::after { display: none; }
  .portrait-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; filter: grayscale(1) contrast(1.04); }
  .portrait-inner svg { width: 74px; height: 74px; color: var(--muted); opacity: .55; }
  .portrait-inner span { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
  .portrait .badge {
    position: absolute; left: 16px; bottom: 16px; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: 7px 13px; font-size: 13px; font-weight: 600;
  }
  .portrait .badge .live { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 30%, transparent); }

  /* ============================================================ WORK (home) */
  .work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 34px); }
  .work-grid { display: grid; gap: 0; }

  /* flat, un-boxed editorial rows */
  .case-card {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 4vw, 64px); align-items: center;
    padding-block: clamp(30px, 4.5vw, 56px);
    border-top: 1px solid var(--line);
  }
  .work-grid .case-card:first-child { border-top: none; }
  .case-card:nth-child(even) .case-thumb { order: 2; }
  /* work page: keep every row text-left / image-right (no alternating) */
  #view-work .case-card:nth-child(even) .case-thumb { order: 0; }
  .case-meta-row { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
  .tag { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
  .case-card h3 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(26px, 3.6vw, 44px); line-height: 1.02; letter-spacing: -.025em;
    margin: 0 0 14px; text-wrap: balance;
  }
  .case-card p { color: var(--muted); margin: 0 0 22px; max-width: 44ch; }
  .case-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
  .case-link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
  .case-card:hover .case-link svg { transform: translateX(5px); }
  .case-card:hover .case-link { text-decoration: underline; text-underline-offset: 4px; }

  .case-thumb {
    aspect-ratio: 16/10; border-radius: var(--img-radius); overflow: hidden;
    position: relative; background: var(--surface-2);
    display: grid; place-items: center;
    transition: transform .4s var(--ease);
  }
  .case-card:hover .case-thumb { transform: scale(1.012); }
  .case-thumb .glyph { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 9vw, 104px); color: var(--ink); opacity: .12; letter-spacing: -.04em; }
  .thumb-tag { position: absolute; left: 12px; bottom: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(4px); padding: 4px 8px; border-radius: 6px; }
  .case-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

  /* ============================================================ ABOUT */
  .about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 6vw, 96px); align-items: start; }
  .about-copy p { font-size: clamp(19px, 2.4vw, 25px); line-height: 1.5; letter-spacing: -.01em; margin: 0 0 22px; text-wrap: pretty; }
  .about-copy p .hl { color: var(--ink); font-weight: 600; }
  .about-side { display: flex; flex-direction: column; gap: 34px; }
  .stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .stat .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.03em; line-height: 1; }
  .stat .l { font-size: 14px; color: var(--muted); margin-top: 10px; max-width: 20ch; }
  .toolbox h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; font-weight: 500; }
  .toolbox ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
  .toolbox li { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 14.5px; font-weight: 500; color: var(--ink); background: var(--surface); transition: border-color .2s var(--ease), transform .2s var(--ease); }
  .toolbox li:hover { border-color: var(--ink); transform: translateY(-2px); }

  /* ---- Experience snapshot (at-a-glance for recruiters) ---- */
  .experience { margin-top: clamp(52px, 7vw, 96px); }
  .exp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(20px, 3vw, 30px); }
  .exp-head .t { display: flex; flex-direction: column; gap: 12px; }
  .exp-head h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 54px); line-height: 1.02; letter-spacing: -.025em; margin: 0; text-wrap: balance; }
  .exp-head .t p { margin: 0; color: var(--muted); font-size: 16px; }
  .exp-list { list-style: none; margin: 0; padding: 0; }
  .exp-item { display: grid; grid-template-columns: 176px 1fr auto; gap: 6px 36px; padding-block: clamp(20px, 2.6vw, 30px); border-top: 1px solid var(--line); align-items: baseline; }
  .exp-loc { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); text-align: right; white-space: nowrap; }
  .exp-when { font-family: var(--font-mono); font-size: 13.5px; color: var(--muted); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
  .exp-main { display: flex; flex-direction: column; gap: 7px; }
  .exp-role { display: flex; align-items: baseline; gap: 0 10px; flex-wrap: wrap; }
  .exp-role h4 { font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 25px); letter-spacing: -.02em; margin: 0; }
  .exp-co { color: var(--muted); font-size: 15.5px; }
  .exp-co::before { content: "·"; margin-right: 10px; color: var(--faint); }
  .exp-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
  .exp-desc { color: var(--muted); font-size: 15.5px; margin: 0; max-width: 66ch; }
  @media (max-width: 640px) {
    .exp-item { grid-template-columns: 1fr auto; gap: 4px 14px; }
    .exp-when { order: -2; }
    .exp-loc { order: -1; }
    .exp-main { grid-column: 1 / -1; }
  }

  /* ============================================================ CONTACT (un-boxed) */
  .contact-card {
    display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(30px, 6vw, 80px); align-items: start;
    border-top: 1px solid var(--line); padding-top: clamp(36px, 5vw, 64px);
  }
  .contact-card h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 5.4vw, 60px); line-height: 1; letter-spacing: -.03em; margin: 14px 0 18px; text-wrap: balance; }
  .contact-card p { color: var(--muted); margin: 0 0 28px; font-size: 18px; max-width: 40ch; }
  .contact-list { display: flex; flex-direction: column; }
  .contact-row {
    display: flex; align-items: center; gap: 16px; padding: 18px 0;
    border-bottom: 1px solid var(--line);
  }
  .contact-list .contact-row:first-child { border-top: 1px solid var(--line); }
  .contact-row .ci { flex: none; color: var(--ink); display: grid; place-items: center; }
  .contact-row .ci svg { width: 21px; height: 21px; }
  .contact-row .ct { display: flex; flex-direction: column; min-width: 0; }
  .contact-row .ct .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
  .contact-row .ct .v { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  a.contact-row:hover .v { text-decoration: underline; text-underline-offset: 3px; }
  .contact-row .copy { margin-left: auto; font-size: 12px; font-family: var(--font-mono); color: var(--faint); display: inline-flex; align-items: center; }
  .contact-row .copy svg { width: 17px; height: 17px; display: block; }
  .contact-row:hover .copy { color: var(--ink); }
  .contact-row .copy.arrow { font-size: 22px; line-height: 1; color: var(--muted); transition: transform .3s var(--ease), color .2s var(--ease); }
  .contact-row:hover .copy.arrow { color: var(--ink); transform: rotate(45deg); }
  .contact-row .lang-links { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
  .contact-row .lang-links .btn { padding: 6px 12px; font-size: 13px; border-radius: 9px; border-color: var(--ink); color: var(--ink); }
  .contact-row .lang-links .btn:hover { border-color: var(--ink); }

  /* ============================================================ FOOTER */
  footer { border-top: 1px solid var(--line); padding-block: 46px; }
  .foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
  .foot-inner .brand { margin-right: 0; }
  .foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
  .foot-links a { color: var(--muted); font-size: 14px; }
  .foot-links a:hover { color: var(--ink); }
  .foot-note { color: var(--muted); font-size: 14px; }

  /* ============================================================ WORK PAGE */
  .page-hero { padding-top: clamp(48px, 7vw, 104px); padding-bottom: clamp(28px, 4vw, 52px); }
  .page-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5vw, 54px); line-height: 1.02; letter-spacing: -.025em; margin: 0 0 18px; text-wrap: balance; }
  .page-hero p { color: var(--muted); font-size: 19px; max-width: 58ch; margin: 0; }
  .back-link { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); margin-bottom: 8px; }
  .back-link svg { width: 15px; height: 15px; transition: transform .2s var(--ease); }
  .back-link:hover { color: var(--ink); }
  .back-link:hover svg { transform: translateX(-3px); }

  .archive { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 48px); padding-bottom: clamp(60px, 9vw, 130px); }
  .archive-card { display: flex; flex-direction: column; gap: 14px; }
  .archive-card .thumb { aspect-ratio: 16/10; position: relative; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--img-radius); overflow: hidden; transition: transform .4s var(--ease); }
  .archive-card:hover .thumb { transform: scale(1.012); }
  .archive-card .thumb .glyph { font-family: var(--font-display); font-weight: 700; font-size: clamp(56px, 12vw, 128px); color: var(--ink); opacity: .12; }
  .archive-body { display: flex; flex-direction: column; gap: 8px; }
  .archive-body h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(21px, 2.7vw, 30px); letter-spacing: -.02em; margin: 0; }
  .archive-card:hover .archive-body h3 { text-decoration: underline; text-underline-offset: 4px; }
  .archive-body p { color: var(--muted); margin: 0; font-size: 15.5px; max-width: 46ch; }
  .archive-body .row { margin-top: 4px; display: flex; align-items: center; gap: 14px; }
  .placeholder-tile {
    border: 1px dashed var(--line); border-radius: var(--img-radius); display: grid; place-items: center;
    aspect-ratio: 16/10; color: var(--faint); text-align: center; gap: 10px; padding: 30px;
  }
  .placeholder-tile svg { width: 28px; height: 28px; color: var(--muted); opacity: .6; }
  .placeholder-tile span { font-family: var(--font-mono); font-size: 12.5px; }

  /* ============================================================ CASE STUDY PAGE */
  .case-view { padding-bottom: clamp(60px, 9vw, 130px); }

  .gate { max-width: 460px; margin: clamp(50px, 10vw, 120px) auto; text-align: center; padding-inline: 4px; }
  .gate .lock-badge { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 22px; color: var(--ink); }
  .gate .lock-badge svg { width: 34px; height: 34px; }
  .gate h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 4vw, 38px); letter-spacing: -.02em; margin: 0 0 10px; }
  .gate p { color: var(--muted); margin: 0 0 26px; }
  .gate form { display: flex; gap: 10px; }
  .gate input {
    flex: 1; font-family: var(--font-body); font-size: 16px;
    padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink);
  }
  .gate input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
  .gate .err { color: #c0392b; font-size: 14px; margin-top: 14px; min-height: 20px; font-weight: 500; }
  :root[data-theme="dark"] .gate .err { color: #ff8a75; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .gate .err { color: #ff8a75; } }
  .gate .hint { margin-top: 24px; font-size: 15px; color: var(--muted); font-family: var(--font-body); letter-spacing: normal; text-transform: none; }
  .gate .back-link { justify-content: center; margin-top: 26px; font-family: var(--font-body); font-size: 15px; letter-spacing: normal; text-transform: none; }

  .cs-hero { padding-top: clamp(30px, 5vw, 58px); padding-bottom: clamp(30px, 5vw, 58px); }
  .cs-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 6.6vw, 80px); line-height: .98; letter-spacing: -.035em; margin: 18px 0 20px; text-wrap: balance; max-width: 18ch; }
  .cs-hero .sub { font-size: clamp(18px, 2.4vw, 23px); color: var(--muted); max-width: 56ch; margin: 0; }
  .cs-facts { display: flex; flex-wrap: wrap; gap: 16px 60px; margin-top: clamp(32px, 5vw, 52px); border-top: 1px solid var(--line); padding-top: 24px; }
  .cs-facts .fact .k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
  .cs-facts .fact .v { font-weight: 600; font-size: 16px; line-height: 1.45; }

  .cs-cover { aspect-ratio: 16/8; border-radius: var(--img-radius); margin-block: clamp(30px, 5vw, 56px); position: relative; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
  .cs-cover .glyph { font-family: var(--font-display); font-weight: 700; font-size: clamp(60px, 14vw, 160px); color: var(--ink); opacity: .1; position: relative; }
  .cs-cover.has-img { aspect-ratio: 16/9; background: var(--surface); overflow: hidden; }
  .cs-cover.has-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .6s var(--ease); }
  .cs-cover.has-img:hover img { transform: scale(1.02); }

  /* ---------- before / after comparison slider ---------- */
  .cs-ba-wrap { margin-block: clamp(30px, 5vw, 56px); }
  .ba { position: relative; width: 100%; aspect-ratio: var(--ba-ar, 16/9); border-radius: var(--img-radius);
    overflow: hidden; border: 1px solid var(--line); user-select: none; touch-action: none; cursor: ew-resize;
    background: var(--surface); }
  .ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
  .ba .after { z-index: 1; }
  .ba .before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
  .ba .ba-lbl { position: absolute; bottom: 14px; z-index: 3; font-family: var(--font-mono); font-size: 11px;
    letter-spacing: .1em; text-transform: uppercase; background: rgba(0,0,0,.6); color: #fff; padding: 5px 10px;
    border-radius: 8px; pointer-events: none; transition: opacity .2s var(--ease); }
  .ba .ba-lbl.b { left: 14px; } .ba .ba-lbl.a { right: 14px; }
  .ba .ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff;
    z-index: 4; transform: translateX(-1px); box-shadow: 0 0 0 1px rgba(0,0,0,.22); }
  .ba .ba-grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 42px; height: 42px;
    border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
  .ba .ba-grip svg { width: 22px; height: 22px; }
  .ba:focus-visible { outline: 3px solid var(--spot); outline-offset: 3px; }
  .ba.dragging .ba-lbl { opacity: 0; }
  .ba-cap { display: block; text-align: center; margin: 14px 0 0; font-family: var(--font-mono); font-size: 11.5px;
    letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

  .cs-body { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
  .cs-toc { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 20px); display: flex; flex-direction: column; gap: 2px; }
  .cs-toc a { font-size: 14px; color: var(--muted); padding: 7px 14px; border-left: 2px solid var(--line); }
  .cs-toc a:hover { color: var(--ink); border-left-color: var(--ink); }
  .cs-toc a.active { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
  .cs-block { position: relative; padding-block: 0; padding-top: 56px; margin-bottom: clamp(34px, 3.8vw, 56px); scroll-margin-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 20px); }
  .cs-block h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.02em; margin: 0 0 16px; }
  .cs-block p { color: var(--muted); font-size: 18px; margin: 0 0 16px; max-width: none; }
  .cs-block .fill { border: 1px dashed var(--line); border-radius: 4px; padding: 16px 18px; color: var(--faint); font-family: var(--font-mono); font-size: 13px; }
  /* impact stat tiles (outcome sections) */
  .cs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 6px 0 26px; }
  .cs-stat { border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px; background: var(--surface); }
  .cs-stat .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.6vw, 50px); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
  .cs-stat .l { font-size: 14px; color: var(--muted); margin-top: 11px; line-height: 1.35; max-width: 24ch; }
  .cs-block ul, .cs-block ol { color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0 0 18px; padding-left: 1.25em; max-width: none; }
  .cs-block li { margin-bottom: 9px; }
  .cs-block li::marker { color: var(--faint); }
  .cs-block strong { color: var(--ink); font-weight: 600; }
  .cs-block em { color: var(--muted); }
  .cs-table-wrap { overflow-x: auto; margin: 4px 0 18px; }
  .cs-table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 480px; }
  .cs-table th, .cs-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); line-height: 1.5; }
  .cs-table thead th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 500; border-top: none; }
  .cs-table td:first-child { color: var(--ink); font-weight: 600; }
  .img-slot { aspect-ratio: 2 / 1; border-radius: var(--img-radius); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--faint); gap: 8px; margin: 30px 0; text-align: center; }
  .img-slot svg { width: 26px; height: 26px; color: var(--muted); opacity: .6; }
  .img-slot span { font-family: var(--font-mono); font-size: 12.5px; }
  .cs-next { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 30px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
  .cs-next .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
  .cs-next a.big { font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 2vw, 24px); letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 9px; }
  .cs-next a.big svg { width: 20px; height: 20px; flex: none; }
  .cs-next a.big:hover { text-decoration: underline; text-underline-offset: 4px; }
  .cs-next a.big:hover svg { transform: none; }

  /* end-of-case CTA banner (always dark, stands out in both themes) */
  .cta-banner { position: relative; overflow: hidden; margin-top: clamp(44px, 6vw, 80px);
    background: #0B0B0B; color: #F5F5F0; border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px; padding: clamp(36px, 5vw, 64px);
    display: grid; grid-template-columns: 1fr auto; gap: clamp(28px, 5vw, 60px); align-items: center; }
  .cta-copy { order: 1; }
  .cta-art { order: 2; width: clamp(220px, 30vw, 340px); height: auto; opacity: .95; }
  @media (max-width: 720px) { .cta-banner { grid-template-columns: 1fr; gap: 24px; } .cta-art { display: none; } }
  .cta-banner::before { content: ""; position: absolute; top: -40%; right: -8%; width: 60%; height: 170%;
    background: radial-gradient(circle at center, rgba(255,255,255,.09), transparent 60%); pointer-events: none; }
  .cta-banner > * { position: relative; z-index: 1; }
  .cta-eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(245,245,240,.6); display: inline-flex; align-items: center; gap: 9px; }
  .cta-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #F5F5F0; }
  .cta-banner h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 5.4vw, 58px); line-height: 1.02; letter-spacing: -.03em; margin: 18px 0 16px; max-width: 18ch; text-wrap: balance; }
  .cta-banner p { color: rgba(245,245,240,.74); font-size: clamp(17px, 2.2vw, 20px); line-height: 1.55; max-width: 52ch; margin: 0 0 30px; }
  .cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
  .cta-btn { background: #F5F5F0; color: #0B0B0B; }
  .cta-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -18px rgba(0,0,0,.55); }
  .cta-ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #F5F5F0; }
  .cta-ghost:hover { border-color: #F5F5F0; transform: translateY(-2px); }

  /* ---- case study polish ---- */
  .cs-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
  .cs-num { font-family: var(--font-mono); font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
  .cs-head h2 { margin: 0; }
  .cs-block::before { display: none; }

  /* boxes-and-arrows flow diagram (case study support visual) */
  .cs-flowdiagram { margin: 16px 0 6px; }
  .cs-flowdiagram svg { width: 100%; height: auto; display: block; }
  .cs-flowdiagram .fx-box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
  .cs-flowdiagram .fx-start { fill: var(--ink); stroke: var(--ink); }
  .cs-flowdiagram .fx-t { fill: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 15px; }
  .cs-flowdiagram .fx-t-inv { fill: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: 15px; }
  .cs-flowdiagram .fx-line { stroke: var(--muted); stroke-width: 1.8; stroke-dasharray: 2 5; stroke-linecap: round; fill: none; }
  .cs-flowdiagram .fx-head { fill: var(--muted); }
  .cs-block:first-of-type::before { display: none; }
  .js-animate .cs-block.reveal::before { transform: scaleX(0); transition: transform .8s var(--ease); }
  .js-animate .cs-block.reveal.in::before { transform: scaleX(1); }

  .cs-quote { margin: 2px 0 24px; padding-left: 22px; border-left: 2px solid var(--ink);
    font-family: var(--font-display); font-weight: 600; font-size: clamp(21px, 3vw, 32px);
    line-height: 1.28; letter-spacing: -.02em; text-wrap: balance; max-width: 34ch; }

  /* customer-testimonial treatment — clean, italic, full-width, with quotation marks */
  .cs-quote.customer { margin: 22px 0; padding-left: 22px; border-left: 3px solid var(--spot);
    background: none; max-width: none; font-style: italic; font-weight: 500;
    font-size: clamp(17px, 2vw, 22px); line-height: 1.42; letter-spacing: -.01em; color: var(--ink); }
  .cs-quote.customer::before { content: "\201C"; }
  .cs-quote.customer::after { content: "\201D"; }

  .img-slot { transition: transform .5s var(--ease); }
  .img-slot:hover { transform: scale(1.015); }
  .cs-img { margin: 30px 0; border-radius: var(--img-radius); overflow: hidden; border: 1px solid var(--line); }
  .cs-img img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
  .cs-img:hover img { transform: scale(1.02); }
  .cs-cover .glyph { will-change: transform; }

  .listen-row { display: flex; align-items: center; gap: 10px; margin-top: 24px; }
  .listen-btn { gap: 10px; }
  .listen-btn .eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 13px; }
  .listen-btn .eq i { width: 2.5px; height: 5px; background: currentColor; border-radius: 2px; font-style: normal; animation: eq 1.1s ease-in-out infinite; }
  .listen-btn .eq i:nth-child(2) { animation-delay: .18s; }
  .listen-btn .eq i:nth-child(3) { animation-delay: .36s; }
  .listen-btn[data-state="playing"] .eq i { animation-duration: .65s; }
  @keyframes eq { 0%, 100% { height: 4px; } 50% { height: 13px; } }
  @media (prefers-reduced-motion: reduce) { .listen-btn .eq i { animation: none; height: 9px; } }
  .listen-stop { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .2s var(--ease); }
  .listen-stop:hover { border-color: var(--ink); }
  .listen-stop svg { width: 14px; height: 14px; }

  .case-bar { position: fixed; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 40;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
    border-bottom: 1px solid var(--line);
    opacity: 0; transform: translateY(-8px); pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease); }
  .case-bar.show { opacity: 1; transform: none; pointer-events: auto; }
  .case-bar .cb-inner { max-width: var(--wrap); margin-inline: auto; padding: 11px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .case-bar .cb-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .case-bar .cb-sec { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

  /* ============================================================ MOTION */
  /* Silky scroll reveal: ease-out-expo, GPU-composited, gently staggered. */
  .js-animate .reveal {
    opacity: 0;
    transform: translate3d(0, 80px, 0) scale(.95);
    filter: blur(14px);
    transition: opacity .9s cubic-bezier(.16, 1, .3, 1),
                transform 1.15s cubic-bezier(.16, 1, .3, 1),
                filter .9s cubic-bezier(.16, 1, .3, 1);
    will-change: opacity, transform, filter;
    backface-visibility: hidden;
  }
  .js-animate .reveal.in { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
  .js-animate .reveal[data-d="1"] { transition-delay: .08s; }
  .js-animate .reveal[data-d="2"] { transition-delay: .16s; }
  .js-animate .reveal[data-d="3"] { transition-delay: .24s; }
  .js-animate .reveal[data-d="4"] { transition-delay: .32s; }
  .js-animate .reveal[data-d="5"] { transition-delay: .40s; }
  .js-animate .reveal[data-d="6"] { transition-delay: .48s; }

  .js-animate .hero h1 .word { opacity: 0; transform: translateY(28px); animation: rise .8s var(--ease) forwards; }
  @keyframes rise { to { opacity: 1; transform: none; } }

  /* ============================================================ TOAST */
  .toast {
    position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translate(-50%, 20px); z-index: 90;
    background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 10px;
    font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease); box-shadow: var(--shadow-lg);
  }
  .toast.show { opacity: 1; transform: translate(-50%, 0); }

  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

  /* ============================================================ RESPONSIVE */
  @media (max-width: 960px) {
    .hero-grid { grid-template-columns: 1fr; }
    .portrait { width: 340px; max-width: 100%; margin-inline: auto; order: -1; }
    .case-card { grid-template-columns: 1fr; gap: 22px; }
    .case-card:nth-child(even) .case-thumb { order: -1; }
    .case-thumb { order: -1; }
    .about-grid { grid-template-columns: 1fr; }
    .contact-card { grid-template-columns: 1fr; }
    .cs-body { grid-template-columns: 1fr; }
    .cs-toc { position: static; flex-direction: column; gap: 0; margin-bottom: 20px;
      border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: var(--surface); }
    .cs-toc a { border-left: none; border-bottom: 1px solid var(--line-soft);
      padding: 12px 14px; font-size: 15px; border-radius: 8px; }
    .cs-toc a:last-child { border-bottom: none; }
    .cs-toc a.active { border-left: none; border-bottom-color: var(--line-soft);
      background: var(--surface-2); color: var(--ink); font-weight: 600; }
    .archive { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    body { font-size: 16px; }
    .nav-links { display: none; }
    .menu-btn { display: grid; }
    .nav .resume-btn { display: none; }
    .stat-row { grid-template-columns: 1fr 1fr; gap: 20px; }
    .mobile-menu { display: block; }
    .portrait { width: min(240px, 70vw); max-width: none; aspect-ratio: 1; border-radius: 50%; }
    .portrait .badge { display: none; }
  }

  /* mobile menu panel */
  .mobile-menu {
    display: none; position: fixed; inset: 0; z-index: 55;
    background: var(--bg); padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 20px) var(--gutter) 40px;
    flex-direction: column; gap: 2px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .mobile-menu.open { opacity: 1; transform: none; pointer-events: auto; display: flex; }
  .mobile-menu a { font-family: var(--font-body); font-weight: 600; font-size: 18px; letter-spacing: -.01em; padding: 15px 2px; border-bottom: 1px solid var(--line-soft); }
  .mobile-menu .mm-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
  body.menu-open { overflow: hidden; }


  /* ---- process flow (two-row snake) ---- */
  .pflow{margin:26px 0 8px; --pf-fill:#ECECEC; --pf-line:#B4B4B4;}
  :root[data-theme="dark"] .pflow{--pf-fill:#1E1E1E; --pf-line:#5E5E5E;}
  @media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .pflow{--pf-fill:#1E1E1E; --pf-line:#5E5E5E;} }
  .pflow .pflow-svg{width:100%; max-width:860px; height:auto; display:block; margin-inline:auto;}
  .pflow .pflow-node{fill:var(--pf-fill); stroke:var(--pf-line); stroke-width:1.4;}
  .pflow .pflow-node.start{stroke-width:1.4;}
  .pflow .pflow-lbl{fill:var(--ink); font-family:var(--font-display); font-weight:600; font-size:19px; text-anchor:middle;}
  .pflow .pflow-arrow{stroke:var(--pf-line); stroke-width:1.4; fill:none;}
  .pflow .pflow-svg marker path{fill:var(--pf-line); fill-opacity:1;}


  /* ---- back-to-top button ---- */
  .to-top{ position:fixed; right:calc(env(safe-area-inset-right,0px) + 22px); bottom:calc(env(safe-area-inset-bottom,0px) + 22px);
    z-index:45; width:46px; height:46px; display:grid; place-items:center; border-radius:13px;
    border:1px solid var(--line); background:color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter:saturate(1.2) blur(10px); -webkit-backdrop-filter:saturate(1.2) blur(10px);
    color:var(--ink); cursor:pointer; box-shadow:var(--shadow);
    opacity:0; transform:translateY(10px); pointer-events:none;
    transition:opacity .3s var(--ease), transform .3s var(--ease), border-color .2s var(--ease); }
  .to-top.show{ opacity:1; transform:none; pointer-events:auto; }
  .to-top:hover{ border-color:var(--ink); transform:translateY(-2px); }
  .to-top svg{ width:20px; height:20px; }


  /* ---- editor IA diagram (case study) ---- */
  .cs-ia{ margin:28px 0; border:1px solid var(--line); border-radius:var(--img-radius); overflow:hidden; background:var(--surface-2); }
  .cs-ia-inner{ padding:clamp(14px,2.4vw,22px); }
  .cs-ia-bar{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:12px; }
  .cs-ia-z{ border:1px solid var(--line); border-radius:10px; background:var(--surface); min-height:46px; display:grid; place-items:center; text-align:center; padding:8px 10px; }
  .cs-ia-z span{ font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); line-height:1.35; }
  .cs-ia-body{ display:grid; grid-template-columns:2.5fr 1fr; gap:12px; }
  .cs-ia-canvas, .cs-ia-panel{ border:1px solid var(--line); border-radius:12px; background:var(--surface); min-height:300px; display:grid; place-items:center; text-align:center; padding:16px; }
  .cs-ia-panel{ border-color:color-mix(in srgb, var(--spot) 45%, var(--line)); box-shadow:inset 3px 0 0 var(--spot); }
  .cs-ia-canvas b, .cs-ia-panel b{ font-family:var(--font-display); font-weight:700; font-size:16px; color:var(--ink); display:block; }
  .cs-ia-canvas small, .cs-ia-panel small{ font-family:var(--font-mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); display:block; margin-top:8px; }
  .cs-ia figcaption{ font-family:var(--font-mono); font-size:12px; letter-spacing:.02em; color:var(--muted); text-align:center; padding:14px clamp(16px,3vw,28px) 2px; line-height:1.5; }
  @media (max-width:640px){ .cs-ia-bar{ grid-template-columns:1fr; } .cs-ia-body{ grid-template-columns:1fr; } .cs-ia-canvas{ min-height:180px; } .cs-ia-panel{ min-height:140px; } }
