/* ==========================================================================
   Janik Wahrheit — poster system
   Grey paper, black ink, one cobalt. Inter Tight only.
   Signatures: fluted glass, scrambled type, thick poster rules
   with metadata rows, and the speckled liquid line.
   ========================================================================== */

/* ---------- fonts (self-hosted, no request to Google) ---------- */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(../assets/fonts/inter-tight-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(../assets/fonts/inter-tight-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-style: italic; font-weight: 300 800; font-display: swap; src: url(../assets/fonts/inter-tight-italic-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-style: italic; font-weight: 300 800; font-display: swap; src: url(../assets/fonts/inter-tight-italic-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #E4E4E1;
  --bg-2: #D9D9D5;
  --card: #ECECE9;
  --ink: #0D0D0D;
  --ink-2: #2B2B29;
  --mute: #6A6A65;
  --hair: rgba(13, 13, 13, .16);
  --thick: 2px;
  --blue: #1F47E0;
  --blue-light: #6F8BFF;

  --font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --wrap: 1480px;
  --gutter: clamp(16px, 2.8vw, 44px);
  --gap: clamp(16px, 2vw, 32px);
  --mast-h: 76px;
  --sec-y: clamp(80px, 10vw, 152px);

  --ease: cubic-bezier(.2, .7, .1, 1);

  --jw-ink: var(--ink);
  --jw-chev: var(--blue);
  color-scheme: light;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip on html too — iOS ignores it on body alone; clip (unlike hidden) keeps the sticky header working */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--mast-h) + 12px); overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* print grain over everything — absolute over the whole page, not fixed: iOS Safari takes the colour of its
   status-bar area from fixed layers at the top, and a near-transparent one lets the page show through there */
body { position: relative; }
body::after {
  content: "";
  position: absolute; inset: 0; z-index: 300; pointer-events: none;
  opacity: .085;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* iOS Safari (floating address bar) paints the strip below the page end in its own lighter tint (#ECECE9 instead
   of --bg) unless a fixed layer touches the bottom edge — this one gives it the page colour; z-index -1 keeps it
   behind every section, so it only shows where there is no content */
body::before {
  content: "";
  position: fixed; left: 0; right: 0; bottom: 0; z-index: -1; pointer-events: none;
  height: calc(env(safe-area-inset-bottom, 0px) + 120px);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.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; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--gap); }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 400; background: var(--ink); color: var(--bg); padding: 10px 16px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- type ---------- */
.t-xs { font: 600 .8125rem/1.2 var(--font); letter-spacing: -.01em; }
.t-sm { font: 500 .9375rem/1.35 var(--font); letter-spacing: -.01em; }
.t-br { font: 600 .72rem/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase; }
.t-br::before { content: "[ "; } .t-br::after { content: " ]"; }
.lead { font: 500 clamp(1.3rem, 1rem + 1vw, 1.85rem)/1.2 var(--font); letter-spacing: -.03em; }
.lead strong { font-weight: 600; }

.display {
  font: 600 clamp(3.4rem, 10.9vw, 12.6rem)/.84 var(--font);
  letter-spacing: -.068em;
}
.h2 {
  font: 600 clamp(2.6rem, 6.2vw, 6.8rem)/.9 var(--font);
  letter-spacing: -.058em;
  max-width: 14ch;
  margin-bottom: clamp(48px, 6vw, 96px);
  text-wrap: balance;
}
.h2--xl { font-size: clamp(2.9rem, 8.4vw, 9.4rem); max-width: 13ch; }
.h3 { font: 600 clamp(1.45rem, 1.1rem + 1vw, 2.1rem)/1.02 var(--font); letter-spacing: -.045em; }

.arr { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); flex: none; }

/* status dot */
.status { display: inline-flex; align-items: center; gap: 9px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; animation: ping 2.4s var(--ease) infinite; }
.dot--idle { background: transparent; border: 1.5px solid currentColor; animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(31, 71, 224, .45); } 70%, 100% { box-shadow: 0 0 0 9px rgba(31, 71, 224, 0); } }


/* fluted backdrop — soft vertical reeds like ribbed glass */
.flutes {
  --fl: 66px;   /* reed width */
  --flutes: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, .34) calc(var(--fl) * .21),
    rgba(255, 255, 255, .06) calc(var(--fl) * .52),
    rgba(0, 0, 0, .035) calc(var(--fl) * .88),
    rgba(255, 255, 255, 0) var(--fl));
  background-image: var(--flutes);
}
.hero.flutes { background-image: linear-gradient(to bottom, transparent calc(100% - 140px), var(--bg)), var(--flutes); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  height: 52px; padding: 0 22px;
  border-radius: 999px; border: var(--thick) solid var(--ink);
  font: 600 .95rem/1 var(--font); letter-spacing: -.01em; white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover .arr { transform: translateX(3px); }
.btn:hover .arr-down { transform: translateY(3px); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-sm { height: 38px; padding: 0 16px; font-size: .85rem; }

/* ---------- masthead ---------- */
.mast {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: var(--thick) solid var(--ink);
}
.mast-inner {
  height: var(--mast-h);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); align-items: center;
}
.brand { display: inline-flex; align-items: center; gap: 12px; position: relative; z-index: 2; justify-self: start; }
.mark { width: 44px; height: auto; aspect-ratio: 1700 / 1540; }
.mast-tag { max-width: 11ch; }
.nav { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 2px 22px; }
.nav a { font: 600 .8125rem/1.25 var(--font); letter-spacing: -.01em; color: var(--mute); transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a.active span { border-bottom: 1.5px solid currentColor; }
.nav .nav-contact { display: none; }
.mast-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; position: relative; z-index: 2; }
.lang-toggle {
  height: 38px; min-width: 44px; padding: 0 12px; border-radius: 999px;
  border: var(--thick) solid var(--ink); background: transparent;
  font: 700 .75rem/1 var(--font); letter-spacing: .02em; cursor: pointer;
}
.lang-toggle:hover { background: var(--ink); color: var(--bg); }
.theme-toggle {
  width: 44px; height: 38px; padding: 0; border-radius: 999px; display: grid; place-items: center;
  border: var(--thick) solid var(--ink); background: transparent; cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.theme-toggle circle { fill: none; stroke: currentColor; stroke-width: 2; }
.theme-toggle path { fill: currentColor; }
.theme-toggle:hover { background: var(--ink); color: var(--bg); }
[data-theme="dark"] .theme-toggle svg { transform: rotate(180deg); }
.nav-toggle { display: none; width: 44px; height: 38px; border-radius: 999px; border: var(--thick) solid var(--ink); background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav-toggle span:first-child { top: 13px; } .nav-toggle span:last-child { top: 20px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 16.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 16.5px; transform: rotate(-45deg); }

/* ---------- hero (poster) ---------- */
.hero { padding-bottom: clamp(24px, 3vw, 40px); overflow: hidden; }
.meta-row { padding: 16px 0 18px; border-bottom: var(--thick) solid var(--ink); }
.meta-row p { max-width: 24ch; }
.hero-title { position: relative; padding: clamp(40px, 7vw, 120px) 0 clamp(36px, 5vw, 80px); }
.hero .display .l { display: block; }
.hero .display .l2 { padding-left: 8%; }
.hero .display .l3, .hero .display .l4 { text-align: right; }
.hero .display .l5 {
  font-size: clamp(1.5rem, 3.4vw, 3.8rem); letter-spacing: -.05em; line-height: 1;
  color: var(--mute); margin-top: .45em;
}
.rotator { display: inline-block; }
.rotator.is-scrambling { color: var(--blue); }

.foot-row { padding-top: 18px; border-top: var(--thick) solid var(--ink); align-items: start; row-gap: 16px; }
.hero-sub { grid-column: 1 / span 2; font: 500 1.0625rem/1.4 var(--font); letter-spacing: -.015em; max-width: 46ch; }
.hero .foot-row .btn { justify-self: stretch; }



/* ---------- fluted glass ---------- */
[data-glass-area] { position: relative; }
.glass {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: clamp(200px, 30%, 520px);
  display: flex; pointer-events: none; z-index: 3;
  transform: translate3d(var(--gx, 22vw), 0, 0);
  will-change: transform;
}
.glass i {
  flex: 1 1 0;
  -webkit-backdrop-filter: blur(var(--b, 7px));
  backdrop-filter: blur(var(--b, 7px));
  background: linear-gradient(90deg,
    rgba(255, 255, 255, .30) 0%,
    rgba(255, 255, 255, .06) 22%,
    rgba(255, 255, 255, 0) 55%,
    rgba(0, 0, 0, .07) 88%,
    rgba(255, 255, 255, .22) 100%);
}
.glass i:nth-child(4n+1) { --b: 6px; }
.glass i:nth-child(4n+2) { --b: 11px; }
.glass i:nth-child(4n+3) { --b: 8px; }
.glass i:nth-child(4n) { --b: 14px; }


/* ---------- hover blur — a soft round blur spot that follows the cursor over big type ---------- */
.blur-lens {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  width: clamp(220px, 24vw, 400px); aspect-ratio: 1; border-radius: 50%;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  -webkit-mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 45%, transparent 100%);
  transform: translate3d(calc(var(--lx, 0px) - 50%), calc(var(--ly, 0px) - 50%), 0) scale(var(--ls, 0));
  will-change: transform;
}

/* ---------- sections ---------- */
.sec { padding-block: var(--sec-y); position: relative; }
.sec--tint { background: var(--bg-2); }
.sec-head { padding-top: 14px; border-top: var(--thick) solid var(--ink); margin-bottom: clamp(28px, 3.5vw, 52px); align-items: start; }
.sec-sub { grid-column: 3 / span 2; color: var(--ink-2); max-width: 46ch; }
.sec-num { font-variant-numeric: tabular-nums; }

/* services — full panels; in the zoom scene (JS) they pin and zoom in one after another */
.zoom-stage { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); display: grid; gap: var(--gap); }
.zpanel {
  position: relative; overflow: hidden; border-radius: 8px;
  padding: clamp(18px, 2.6vw, 40px);
  min-height: min(78svh, 760px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto 1fr auto;
  column-gap: var(--gap); row-gap: clamp(16px, 2.5vh, 28px);
  color: var(--ink);
}
.zpanel--grey { background: var(--card); }
.zpanel--ink { background: #0D0D0D; color: #ECECE9; }
.zpanel--blue { background: var(--blue); color: #fff; }
.zpanel--light { background: #F4F4F2; }
.zpanel--blue .dot { background: #fff; }
.zpanel-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: var(--thick) solid currentColor; }
.zpanel-title { grid-column: 1 / span 2; grid-row: 2; align-self: center; font: 600 clamp(3rem, 8.2vw, 9.6rem)/.86 var(--font); letter-spacing: -.066em; text-wrap: balance; }
.zpanel-visual { grid-column: 3 / span 2; grid-row: 2 / span 2; align-self: center; justify-self: center; width: 100%; max-width: 620px; }
.zpanel-text { grid-column: 1 / span 2; grid-row: 3; align-self: end; max-width: 42ch; font: 500 clamp(1.02rem, .95rem + .45vw, 1.35rem)/1.38 var(--font); letter-spacing: -.02em; opacity: .9; }
.zpanel .dot { background: #6F8BFF; }

.zv { width: 100%; height: auto; }
.zv .frame { fill: none; stroke: currentColor; stroke-width: 2; opacity: .35; }
.zv .dim { fill: currentColor; opacity: .22; }
.zv .soft { fill: currentColor; opacity: .1; }
.zv .ink { fill: currentColor; opacity: .9; }
.zv .accent { fill: var(--blue); }
.zv .tint { fill: var(--blue); opacity: .14; }
.zv-dash .bar { fill: currentColor; opacity: .85; transform-box: fill-box; transform-origin: bottom; animation: bars 2.6s var(--ease) infinite alternate; animation-delay: var(--d); }
.zv-dash .bar.accent { fill: #6F8BFF; opacity: 1; }
.zv-dash .accent { fill: #6F8BFF; }
.zv-dash .line { fill: none; stroke: #6F8BFF; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
@keyframes bars { 0% { transform: scaleY(.72); } 100% { transform: scaleY(1); } }
.zv-flow .track { fill: none; stroke: currentColor; stroke-width: 2; opacity: .3; stroke-dasharray: 4 7; }
.zv-flow .pulse { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 10 200; animation: flow 3.2s linear infinite; }
.zv-flow .node rect { fill: var(--blue); stroke: #fff; stroke-width: 2; }
.zv-flow .node path, .zv-flow .node circle { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.zv-flow .node .fillw { fill: #fff; stroke: none; }
.zv-flow .node--done rect { fill: #fff; }
.zv-flow .node--done path { stroke: var(--blue); stroke-width: 3.4; }
@keyframes flow { from { stroke-dashoffset: 10; } to { stroke-dashoffset: -100; } }
.zchat { display: grid; gap: 14px; }
.zchat p { font: 500 clamp(1.15rem, 1rem + 1vw, 1.9rem)/1.25 var(--font); letter-spacing: -.03em; padding: .7em 1em; border-radius: 22px; max-width: 22ch; }
.zchat-q { background: #fff; color: var(--ink); justify-self: start; border-bottom-left-radius: 6px; }
.zchat-a { background: #0D0D0D; color: #fff; justify-self: end; border-bottom-right-radius: 6px; }
.zpanel--light .zchat-q { background: var(--bg-2); }
.zpanel--light .zchat-a { background: var(--blue); }

/* approach — ink panel with the liquid line */
.sec--ink {
  background: #0D0D0D; color: #ECECE9; overflow: hidden;
  --ink: #ECECE9; --ink-2: rgba(236, 236, 233, .84); --mute: rgba(236, 236, 233, .6); --hair: rgba(236, 236, 233, .22);
}
.sec--ink ::selection { background: #fff; color: var(--blue); }
.sec--ink > .wrap { position: relative; z-index: 1; }
.liquid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.liquid-path { fill: none; stroke: var(--blue); stroke-width: 96; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 0); }

.stages { counter-reset: s; }
.stage { padding-top: 14px; border-top: var(--thick) solid var(--ink); display: flex; flex-direction: column; gap: 14px; }
.stage-top { display: flex; gap: 14px; align-items: baseline; color: var(--ink-2); }
.stage-arr { margin-left: auto; font: 600 1.4rem/1 var(--font); color: var(--ink); }
.stage .h3 { margin-top: clamp(24px, 4vw, 64px); }
.stage p { color: var(--ink-2); max-width: 38ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips li { font: 600 .78rem/1 var(--font); padding: 9px 13px; border-radius: 999px; background: #ECECE9; color: #0D0D0D; }
.note { margin-top: clamp(56px, 7vw, 104px); padding-top: 14px; border-top: 1px solid var(--hair); font: 500 clamp(1.2rem, 1rem + .8vw, 1.6rem)/1.25 var(--font); letter-spacing: -.03em; max-width: 34ch; }

/* process */
.htrack-stage { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.steps { row-gap: 48px; }
.step { position: relative; padding-top: 14px; border-top: var(--thick) solid var(--ink); display: flex; flex-direction: column; gap: 12px; }
.step-node { display: none; }
.step-n { font: 600 clamp(6rem, 12vw, 12.5rem)/.78 var(--font); letter-spacing: -.08em; margin: 8px 0 clamp(20px, 3vw, 44px) -.06em; }
.step p { color: var(--ink-2); max-width: 32ch; }
.step:nth-child(1) .step-n { color: var(--blue); }

/* ==========================================================================
   Scroll scenes — scrubbed to scroll position (Apple-style), JS sets the vars.
   Without JS or with reduced motion none of the classes below are applied.
   ========================================================================== */

/* headline words light up one by one */
.h2 .w { opacity: var(--o, 1); transition: opacity .12s linear; }

/* elements that rise out of blur as they enter */
.scrub { opacity: var(--v, 1); transform: translate3d(0, calc((1 - var(--v, 1)) * 64px), 0); filter: blur(calc((1 - var(--v, 1)) * 10px)); will-change: transform, opacity; }

/* pinned process scene */
/* zoom scene (services) */
.is-zoom .zoom-track { height: calc((var(--n) + .4) * 100svh); position: relative; }
.is-zoom .zoom-stage {
  position: sticky; top: var(--mast-h);
  height: calc(100svh - var(--mast-h));
  max-width: none; padding: 0; display: block; overflow: hidden;
}
.is-zoom .zpanel {
  position: absolute; inset: 14px var(--gutter) 18px; min-height: 0;
  transform: scale(calc(.5 + var(--z, 0) * .5 - var(--d, 0) * .07));
  opacity: var(--a, 0);
  border-radius: calc(8px + (1 - var(--z, 0)) * 28px);
  will-change: transform, opacity;
}
.is-zoom .zpanel::after { content: ""; position: absolute; inset: 0; background: #000; opacity: calc(var(--d, 0) * .45); pointer-events: none; }
.is-zoom .zpanel-head, .is-zoom .zpanel-title, .is-zoom .zpanel-visual, .is-zoom .zpanel-text {
  opacity: var(--c, 1); transform: translate3d(0, calc((1 - var(--c, 1)) * 30px), 0);
}

/* horizontal timeline (process) */
.is-htrack .htrack-wrap { position: relative; height: calc(var(--dist, 1500px) + 100svh - var(--mast-h)); }
.is-htrack .htrack-stage {
  position: sticky; top: var(--mast-h);
  height: calc(100svh - var(--mast-h));
  max-width: none; padding: 0; overflow: hidden;
  display: flex; align-items: center;
}
.is-htrack .htrack {
  display: flex; gap: clamp(20px, 2.4vw, 36px); width: max-content;
  padding: 44px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 0;
  transform: translate3d(var(--tx, 0px), 0, 0); will-change: transform;
  position: relative;
}
.is-htrack .htrack::before, .is-htrack .htrack::after { content: ""; position: absolute; top: 15px; height: 2px; left: 0; }
.is-htrack .htrack::before { right: 0; background: var(--hair); }
.is-htrack .htrack::after { width: var(--lf, 0px); background: var(--blue); }
.is-htrack .step {
  flex: none; width: clamp(280px, 36vw, 520px); min-height: min(58svh, 520px);
  border-top: 0; padding: clamp(20px, 2vw, 28px); background: var(--card);
  opacity: .38; transform: scale(.94); transform-origin: left center;
  transition: opacity .5s var(--ease), transform .6s var(--ease), box-shadow .6s var(--ease);
}
.is-htrack .step.is-lit { opacity: 1; transform: none; box-shadow: 0 30px 50px -40px rgba(0, 0, 0, .45); }
.is-htrack .step-node {
  display: block; position: absolute; left: 0; top: -37px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--ink); transition: background-color .3s, border-color .3s, transform .4s var(--ease);
}
.is-htrack .step.is-lit .step-node { background: var(--blue); border-color: var(--blue); transform: scale(1.15); }
.is-htrack .step-n { color: var(--ink); margin-top: 0; }
.is-htrack .step.is-lit .step-n { color: var(--blue); }
.is-htrack .step .h3 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 3rem); margin-top: auto; }
.is-htrack .step p { font-size: 1.05rem; }


/* client work — live sites in a browser window */
.browser { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 40px 70px -50px rgba(0, 0, 0, .55); border: 1px solid rgba(0, 0, 0, .08); }
.browser-bar { display: flex; align-items: flex-end; gap: 18px; padding: 10px 14px 0; background: var(--bg-2); }
.browser-dots { display: inline-flex; gap: 7px; padding-bottom: 12px; flex: none; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(13, 13, 13, .18); }
.browser-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.browser-tab {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 16px 11px; border: 0; border-radius: 10px 10px 0 0; cursor: pointer;
  background: transparent; color: var(--mute); font: 600 .82rem/1 var(--font); letter-spacing: -.01em;
  transition: background-color .25s, color .25s;
}
.browser-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .35); }
.browser-tab[aria-selected="true"] { background: var(--card); color: var(--ink); }
.browser-url { display: flex; align-items: center; gap: 10px; margin: 8px 12px; padding: 9px 14px; border-radius: 999px; background: var(--bg); }
.browser-lock { width: 10px; height: 12px; border: 1.6px solid var(--mute); border-radius: 2px; position: relative; flex: none; }
.browser-lock::before { content: ""; position: absolute; left: 1px; right: 1px; top: -6px; height: 6px; border: 1.6px solid var(--mute); border-bottom: 0; border-radius: 5px 5px 0 0; }
.browser-addr { font: 500 .85rem/1 var(--font); color: var(--ink-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-open { color: var(--blue); white-space: nowrap; }
.browser-open[hidden] { display: none; }
.browser-view { position: relative; height: clamp(440px, 72svh, 780px); background: #fff; border-top: 1px solid rgba(0, 0, 0, .06); }
.bpanel { position: absolute; inset: 0; }
.bpanel iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.browser-shield { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: linear-gradient(to top, rgba(13, 13, 13, .28), rgba(13, 13, 13, 0) 45%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 28px; transition: opacity .3s; }
.browser-shield .btn { pointer-events: none; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .5); }
.browser-shield:hover .btn { background: var(--blue); border-color: var(--blue); color: #fff; }
.bpanel.is-live .browser-shield { opacity: 0; pointer-events: none; }
.bpanel--cta { background-color: var(--card); display: flex; align-items: center; padding: clamp(24px, 6%, 72px); overflow: auto; }
.bpanel--cta::before { content: ""; position: absolute; inset: 14px; border: 2px dashed var(--hair); border-radius: 14px; pointer-events: none; }
.cta-slot { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: clamp(14px, 2.4vw, 24px); max-width: 860px; }
.cta-slot-kicker { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--hair); }
.cta-slot-title { font: 600 clamp(2.2rem, 6.4vw, 6.4rem)/.9 var(--font); letter-spacing: -.06em; }
.cta-slot-title em { font-style: normal; color: var(--blue); }
.cta-slot-text { max-width: 52ch; color: var(--ink-2); }
.cta-slot-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.browser-captions { margin-top: 22px; }
.bcap { padding-top: 14px; border-top: var(--thick) solid var(--ink); align-items: baseline; row-gap: 8px; }
.bcap .h3 { grid-column: 2; }
.bcap p { grid-column: 3 / span 2; color: var(--ink-2); max-width: 56ch; }
.is-tabs .bpanel:not(.is-active), .is-tabs .bcap:not(.is-active) { display: none; }
.glass--static { width: 100%; transform: none; }
.glass--static i:nth-child(odd) { --b: 9px; }
.glass--static i:nth-child(even) { --b: 4px; }


/* about teaser */
.teaser { align-items: end; row-gap: 32px; }
.teaser-name { grid-column: 1; align-self: start; font: 600 clamp(2rem, 3.6vw, 4rem)/.88 var(--font); letter-spacing: -.06em; text-transform: uppercase; }
.teaser-photo { grid-column: 2; }
.teaser-text { grid-column: 3 / span 2; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.teaser-text > p:not(.lead) { color: var(--ink-2); max-width: 50ch; }
.bw { position: relative; overflow: hidden; background: var(--bg-2); }
.bw img { width: 100%; height: auto; filter: grayscale(1) contrast(1.12) brightness(1.03); transition: filter .8s var(--ease), transform .8s var(--ease); }
.bw:hover img { filter: grayscale(0); transform: scale(1.02); }
.bw figcaption { position: absolute; left: 10px; bottom: 10px; background: var(--bg); padding: 5px 8px; }

/* contact */
.contact { padding-bottom: clamp(64px, 8vw, 120px); }
.contact .h2--xl { max-width: 12ch; }
.contact-grid { row-gap: 40px; align-items: start; }
.contact-copy { grid-column: 1 / span 2; grid-row: 1; display: flex; flex-direction: column; gap: 20px; max-width: 34ch; }
.contact-alt { grid-column: 1 / span 2; grid-row: 2; align-self: end; display: flex; flex-direction: column; gap: 14px; max-width: 34ch; }
.big-links { border-top: var(--thick) solid var(--ink); }
.contact-grid > .big-links { grid-column: 3 / span 2; }
.big-links--sm .bl-main { font-size: clamp(1.8rem, 2.8vw, 2.8rem); }
.big-links li { border-bottom: 1px solid var(--hair); }
.big-links a { display: flex; flex-direction: column; gap: 6px; padding: 16px 0 18px; }
.bl-main { font: 600 clamp(2.4rem, 5.2vw, 5.4rem)/.9 var(--font); letter-spacing: -.06em; text-transform: uppercase; transition: color .25s, letter-spacing .5s var(--ease); }
.bl-arr { display: inline-block; font-weight: 400; transition: transform .4s var(--ease); }
.big-links a:hover .bl-main { color: var(--blue); }
.big-links a:hover .bl-arr { transform: translate(6px, -6px); }
.bl-sub { color: var(--mute); }

/* contact chat */
.chat { grid-column: 3 / span 2; grid-row: 1 / span 2; position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 40px 70px -50px rgba(0, 0, 0, .55); }
.chat-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); }
.chat-bar .browser-dots { padding: 0; margin-right: 6px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bg); object-fit: cover; flex: none; }
.chat-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.chat-who strong { font: 600 .95rem/1.2 var(--font); letter-spacing: -.01em; }
.chat-who .t-xs { display: inline-flex; align-items: center; gap: 7px; color: var(--mute); }
.chat-log { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 18px; min-height: 320px; max-height: min(58svh, 540px); overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.chat-msg { max-width: 82%; padding: .7em 1em; border-radius: 20px; font: 500 1.0625rem/1.35 var(--font); letter-spacing: -.015em; white-space: pre-wrap; overflow-wrap: anywhere; animation: chat-in .45s var(--ease) both; }
.chat-msg--bot { background: #fff; color: var(--ink); border-bottom-left-radius: 6px; }
.chat-msg--ok { background: var(--blue); color: #fff; }
.chat-msg--err { box-shadow: inset 3px 0 0 #C2361B; }
.chat-msg--me { align-self: flex-end; background: var(--ink); color: var(--bg); border: 0; border-bottom-right-radius: 6px; text-align: left; cursor: pointer; transition: background-color .25s; }
.chat-msg--me:hover:not(:disabled) { background: var(--blue); color: #fff; }
.chat-msg--me:disabled { cursor: default; }
.chat-typing { display: inline-flex; gap: 5px; padding: 15px 16px; background: #fff; border-radius: 20px; border-bottom-left-radius: 6px; animation: chat-in .3s var(--ease) both; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); animation: chat-dot 1s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes chat-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-form { border-top: 1px solid var(--hair); padding: 14px; }
.chat-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.chat-row { display: flex; align-items: flex-end; gap: 8px; padding: 5px 5px 5px 18px; background: var(--bg); border-radius: 27px; border: 1.5px solid transparent; transition: border-color .2s; }
.chat-row--area { border-radius: 22px; }
.chat-row:focus-within, .chat-field .chat-input:focus { border-color: var(--ink); }
.chat-input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 500 1.0625rem/1.35 var(--font); letter-spacing: -.01em; }
.chat-input::placeholder { color: var(--mute); }
.chat-row .chat-input { flex: 1; padding: 10px 0; outline: none; resize: none; }
.chat-go { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--ink); color: var(--bg); cursor: pointer; transition: background-color .25s, color .25s; }
.chat-go:hover { background: var(--blue); color: #fff; }
.chat-go:hover .arr { transform: translateX(2px); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-chip { position: relative; }
.chat-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chat-chip span { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; border: var(--thick) solid var(--ink); font: 600 .95rem/1 var(--font); letter-spacing: -.01em; cursor: pointer; transition: background-color .25s, color .25s; }
.chat-chip span:hover, .chat-chip input:checked + span { background: var(--ink); color: var(--bg); }
.chat-chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 3px; }
.chat-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.chat-field { display: flex; flex-direction: column; gap: 6px; }
.chat-field > span { color: var(--mute); padding-left: 4px; }
.chat-field .chat-input { padding: 12px 14px; background: var(--bg); border: 1.5px solid transparent; border-radius: 14px; outline: none; transition: border-color .2s; }
.chat-step-btn { margin-top: 12px; }
.chat-hint { color: var(--mute); margin: 8px 4px 0; }
@media (hover: none) { .chat-hint--keys { display: none; } }
.chat-hint a { text-decoration: underline; text-underline-offset: 2px; }
.chat-step[data-step="send"] .chat-hint { margin-top: 0; }
.chat-noscript { padding: 14px 18px; border-top: 1px solid var(--hair); }
.chat-noscript a { text-decoration: underline; }
html:not(.js) .chat-form { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.foot { padding-bottom: 20px; overflow: hidden; }
.foot-mark { overflow: hidden; border-top: var(--thick) solid var(--ink); }
.mega {
  font: 600 clamp(3.5rem, 16.2vw, 15.4rem)/.8 var(--font); letter-spacing: -.075em;
  white-space: nowrap; padding: .12em 0 .06em; margin-left: -.04em;
}
.foot-mark .glass { width: clamp(200px, 26%, 420px); }
.foot-row.g4 { border-top: var(--thick) solid var(--ink); padding-top: 14px; }
.foot-nav { display: flex; flex-direction: column; gap: 3px; }
.foot-nav a { color: var(--mute); transition: color .2s; }
.foot-nav a:hover { color: var(--ink); }
.foot-end { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; text-align: right; }
.made-by { display: inline-flex; align-items: center; gap: 8px; }
.made-by .mark { width: 22px; }

/* ==========================================================================
   CV page (/aboutme) — personal, static (no reveal animation)
   ========================================================================== */
.cv-name .l-r { text-align: right; }
@media (min-width: 1101px) { .cv-page .mast-actions { grid-column: 4; } }
.cv-page .display { font-size: clamp(4rem, 17vw, 19rem); }

.intro { row-gap: 40px; align-items: start; }
.intro-photo { grid-column: 1 / span 2; position: sticky; top: calc(var(--mast-h) + 24px); max-width: 560px; }
.intro-text { grid-column: 3 / span 2; display: flex; flex-direction: column; gap: 18px; color: var(--ink-2); max-width: 60ch; }
.intro-text .lead { color: var(--ink); }
.intro-text a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.intro-text a:hover { color: var(--blue); }
.inline-links { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; border-top: var(--thick) solid var(--ink); }
.inline-links a { font: 600 .8125rem/1.2 var(--font); text-decoration: none; }


/* legal pages — Impressum, Datenschutz */
.legal-title { padding: clamp(40px, 7vw, 110px) 0 clamp(28px, 4vw, 56px); font-size: clamp(3rem, 9vw, 9rem); }
.legal { grid-column: 2 / span 2; max-width: 68ch; }
.legal h2 { font: 600 1.35rem/1.15 var(--font); letter-spacing: -.03em; margin: 2.4em 0 .7em; padding-top: 12px; border-top: var(--thick) solid var(--ink); }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font: 600 1.05rem/1.25 var(--font); letter-spacing: -.015em; margin: 1.6em 0 .4em; }
.legal p, .legal li { font: 400 1rem/1.55 var(--font); color: var(--ink-2); }
.legal p + p { margin-top: .8em; }
.legal ul { margin: .6em 0 .9em 1.2em; list-style: disc; }
.legal li + li { margin-top: .3em; }
.legal a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal a:hover { color: var(--blue); }
.legal .legal-meta { margin-top: 2.4em; color: var(--mute); }
.foot-legal { display: flex; gap: 14px; }
.foot-legal a { color: var(--mute); transition: color .2s; }
.foot-legal a:hover { color: var(--ink); }
@media (max-width: 860px) { .legal { grid-column: 1 / -1; } }

/* core technologies — grouped by kind, details on hover / tap */
.techs { border-top: var(--thick) solid var(--ink); }
.tech-row { padding: 18px 0 22px; border-bottom: 1px solid var(--hair); align-items: baseline; row-gap: 12px; }
.tech-cat { grid-column: 1; padding-top: .6em; }
.tech-list, .tool-list { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: baseline; }
.tech-list { column-gap: .3em; font: 600 clamp(2.2rem, 5.4vw, 5.8rem)/1 var(--font); letter-spacing: -.058em; }
.tech { position: relative; display: flex; align-items: baseline; }
.tech:not(:last-child)::after { content: ","; transition: filter .4s var(--ease), opacity .4s var(--ease); }
.tech-btn {
  font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  transition: filter .4s var(--ease), opacity .4s var(--ease), color .25s;
}
/* the kind of technology is readable from the type treatment */
.tech-row--lang .tech-list { color: var(--ink); }
.tech--plain .tech-btn { cursor: default; }
.tech-row--field .tech-list { color: var(--blue); }
.tech-row--fw .tech-btn { color: transparent; -webkit-text-stroke: 1.6px var(--ink); }
.tech-row--fw .tech::after { color: var(--ink); }
.tech-row--fw .tech-btn:hover, .tech-row--fw .tech.is-open .tech-btn { color: var(--ink); }
.tool-list { gap: 8px; padding-top: 4px; }
.tool-list li { font: 600 .9rem/1 var(--font); padding: 10px 14px; border-radius: 999px; border: var(--thick) solid var(--ink); }

/* focus: everything except the hovered / opened technology blurs back */
@media (hover: hover) and (pointer: fine) {
  .techs:has(.tech:hover) .tech:not(:hover) .tech-btn,
  .techs:has(.tech:hover) .tech:not(:hover)::after { filter: blur(4px); opacity: .35; }
}
.techs:has(.tech.is-open) .tech:not(.is-open) .tech-btn,
.techs:has(.tech.is-open) .tech:not(.is-open)::after { filter: blur(4px); opacity: .35; }

/* detail card */
.tech-pop {
  position: absolute; left: 0; top: calc(100% + 10px); z-index: 20;
  width: max-content; max-width: min(420px, 82vw);
  translate: var(--px, 0px) 0;   /* JS keeps the card on screen */
  padding: 16px 18px 18px; border-radius: 6px;
  background: #0D0D0D; color: #ECECE9;
  font: 500 1rem/1.4 var(--font); letter-spacing: -.01em;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s .25s;
}
.tech-pop .t-br { color: rgba(236, 236, 233, .6); }
.tech-libs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tech-pop--wide { max-width: min(520px, 86vw); }
.tech-group { margin-top: 12px; font: 600 .7rem/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase; color: rgba(236, 236, 233, .55); }
.tech-group + .tech-libs { margin-top: 6px; }
.tech-libs li { font: 600 .85rem/1 var(--font); padding: 8px 11px; border-radius: 999px; border: 1.5px solid rgba(236, 236, 233, .35); }
.tech-row--field .tech-libs li { border-color: #6F8BFF; }
.tech-note { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(236, 236, 233, .2); font-size: .9rem; color: rgba(236, 236, 233, .8); }
@media (hover: hover) and (pointer: fine) {
  .tech:hover .tech-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s; }
}
.tech.is-open .tech-pop, .tech-btn:focus-visible + .tech-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .35s var(--ease), visibility 0s; }
.tech-hint { margin-top: 14px; color: var(--mute); }

/* core & satellites — data at the centre, design + full stack in orbit */
.cs { margin-top: clamp(64px, 8vw, 120px); padding-top: 14px; border-top: var(--thick) solid var(--ink); row-gap: 48px; align-items: center; }
.cs-text { grid-column: 1 / span 2; display: flex; flex-direction: column; gap: 18px; max-width: 54ch; }
.cs-text .h3 { margin-top: 6px; font-size: clamp(2.1rem, 1.4rem + 2.4vw, 3.6rem); letter-spacing: -.055em; line-height: .98; }
.cs-lead { font: 500 clamp(1.1rem, 1rem + .4vw, 1.35rem)/1.38 var(--font); letter-spacing: -.02em; }
.cs-bridges { margin-top: 4px; border-top: var(--thick) solid var(--ink); }
.cs-bridge { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hair); transition: background-color .3s var(--ease); }
.cs-bridge-k { display: flex; align-items: baseline; gap: 10px; font-weight: 600; color: var(--blue); }
.cs-bridge-n, .cs-sat-n { color: var(--mute); font-variant-numeric: tabular-nums; }
.cs-close { color: var(--ink-2); }

.cs-orbit { grid-column: 3 / span 2; position: relative; width: 100%; max-width: 600px; justify-self: end; aspect-ratio: 1; container-type: inline-size; }
.cs-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cs-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 1 7; stroke-linecap: round; vector-effect: non-scaling-stroke; transform-origin: 50px 50px; animation: cs-spin 120s linear infinite; }
.cs-ring--inner { stroke: var(--hair); stroke-dasharray: none; animation: none; }
.cs-flow { stroke: var(--blue); stroke-width: 2; stroke-dasharray: 3 5; stroke-linecap: round; vector-effect: non-scaling-stroke; animation: cs-flow 1.4s linear infinite; }
.cs-port { fill: var(--blue); stroke: var(--bg-2); stroke-width: 3; vector-effect: non-scaling-stroke; }
@keyframes cs-spin { to { transform: rotate(360deg); } }
@keyframes cs-flow { to { stroke-dashoffset: -8; } }

.cs-core {
  position: absolute; left: 50%; top: 50%; width: 41%; aspect-ratio: 1; translate: -50% -50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqi;
  border-radius: 50%; background: var(--ink); color: var(--card); text-align: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.cs-core .t-br { color: var(--blue-light); font-size: max(.62rem, 2.1cqi); }
.cs-core ul { display: flex; flex-direction: column; align-items: center; gap: .25em; font: 600 max(.76rem, 3.2cqi)/1.15 var(--font); letter-spacing: -.03em; }

.cs-sat {
  position: absolute; width: 42%; display: flex; flex-direction: column; gap: max(6px, 1.4cqi);
  padding: max(11px, 2.8cqi) max(12px, 3cqi) max(12px, 3cqi); border-radius: 16px;
  background: var(--card); border: var(--thick) solid var(--ink);
  box-shadow: 0 24px 44px -30px rgba(0, 0, 0, .55);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s var(--ease);
}
.cs-sat--a { right: 0; top: 0; }
.cs-sat--b { left: 0; bottom: 0; }
.cs-sat-head { display: flex; justify-content: space-between; align-items: baseline; }
.cs-sat .t-br { color: var(--mute); font-size: max(.6rem, 2cqi); }
.cs-sat-n { font-size: max(.62rem, 2cqi); }
.cs-sat strong { font: 600 max(1.1rem, 4.6cqi)/1 var(--font); letter-spacing: -.05em; }
.cs-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.cs-tags li { font: 600 max(.62rem, 1.95cqi)/1 var(--font); letter-spacing: -.01em; padding: .45em .62em; border-radius: 999px; border: 1.5px solid var(--hair); }

/* text line ↔ satellite card: hovering one highlights the other */
@media (hover: hover) and (pointer: fine) {
  .cs-bridge:hover, .cs:has(.cs-sat--a:hover) .cs-bridge--a, .cs:has(.cs-sat--b:hover) .cs-bridge--b { background: rgba(31, 71, 224, .06); }
  .cs-sat:hover, .cs:has(.cs-bridge--a:hover) .cs-sat--a, .cs:has(.cs-bridge--b:hover) .cs-sat--b { transform: translateY(-4px); border-color: var(--blue); box-shadow: 0 30px 50px -28px rgba(31, 71, 224, .55); }
}
@media (max-width: 560px) { .cs-orbit { aspect-ratio: 1 / 1.26; } .cs-sat { width: 46%; } }

/* CV timeline — a cobalt line fills with scroll, steps lock in as it reaches them */
.cv { position: relative; border-top: var(--thick) solid var(--ink); padding-left: 40px; --p: 1; }
.cv::before, .cv::after { content: ""; position: absolute; left: 7px; top: 0; width: 2px; }
.cv::before { bottom: 0; background: var(--hair); }
.cv::after { height: calc(var(--p) * 100%); background: var(--blue); }
.cv-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 6px; padding: 20px 0 22px; align-items: baseline; }
.cv-row::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hair); transform-origin: left; transition: transform 1.1s var(--ease); }
.cv-row::before {
  content: ""; position: absolute; left: -40px; top: 23px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--ink); box-sizing: border-box; z-index: 1;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), transform .45s var(--ease);
}
.cv-row.is-passed::before { background: var(--blue); border-color: var(--blue); transform: scale(1.12); }
.cv-row.is-now.is-passed::before { animation: ping 2.4s var(--ease) infinite; }
.cv-date { color: var(--mute); font-variant-numeric: tabular-nums; transition: color .3s; }
.cv-row.is-passed .cv-date { color: var(--ink); }
.cv-date.is-scrambling { color: var(--blue); }
.cv-row h3 { grid-column: 2; font: 600 clamp(1.15rem, 1rem + .6vw, 1.5rem)/1.12 var(--font); letter-spacing: -.035em; }
.cv-row p { grid-column: 3 / span 2; color: var(--ink-2); font-size: .95rem; max-width: 56ch; }
.cv-row h3, .cv-row p { transition: transform .9s var(--ease), opacity .9s var(--ease), clip-path .9s var(--ease); }
.cv-row p { transition-delay: .08s; }

/* entry state (only when JS runs and motion is allowed) */
.cv-anim .cv-row:not(.is-in)::after { transform: scaleX(0); }
.cv-anim .cv-row:not(.is-in) h3, .cv-anim .cv-row:not(.is-in) p { opacity: 0; transform: translateY(70%); clip-path: inset(0 0 100% 0); }
.cv-anim .cv-row:not(.is-in) .cv-date { opacity: 0; }
.cv-anim .cv-row:not(.is-in)::before { transform: scale(0); }

/* side projects — files in a code editor */
.editor { background: #0D0D0D; color: #ECECE9; border-radius: 12px; overflow: hidden; box-shadow: 0 40px 70px -50px rgba(0, 0, 0, .7); }
.editor .browser-dots i { background: rgba(236, 236, 233, .22); }
.editor-bar { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-bottom: 1px solid rgba(236, 236, 233, .1); }
.editor-bar .browser-dots { padding: 0; }
.editor-title { color: rgba(236, 236, 233, .55); margin-inline: auto; transform: translateX(-30px); }
.editor-body { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); min-height: 440px; }
.editor-side { border-right: 1px solid rgba(236, 236, 233, .1); padding: 14px 0; background: #121211; }
.editor-folder { padding: 0 16px 10px; color: rgba(236, 236, 233, .55); }
.editor-files { display: flex; flex-direction: column; }
.editor-file {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 16px 9px 28px; border: 0; background: transparent; cursor: pointer;
  font: 500 .88rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: rgba(236, 236, 233, .7);
  transition: background-color .2s, color .2s;
}
.editor-file::before { content: ""; width: 9px; height: 9px; border-radius: 2px; flex: none; background: var(--fc, #888); }
.f-py { --fc: #6F8BFF; } .f-java { --fc: #E4E4E1; } .f-jsx { --fc: #8FD3FF; } .f-md { --fc: #9C9C96; }
.editor-file:hover { background: rgba(236, 236, 233, .06); color: #fff; }
.editor-file[aria-selected="true"] { background: rgba(111, 139, 255, .16); color: #fff; box-shadow: inset 2px 0 0 #6F8BFF; }
.editor-main { display: flex; flex-direction: column; min-width: 0; }
.editor-tab { align-self: flex-start; padding: 10px 18px; border-right: 1px solid rgba(236, 236, 233, .1); border-bottom: 2px solid #6F8BFF; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fff; }
.editor-panels { flex: 1; padding: 22px 0 28px; }
.code { counter-reset: ln; font: 500 clamp(.92rem, .86rem + .3vw, 1.08rem)/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }
.code li { counter-increment: ln; position: relative; min-height: 1.65em; padding: 0 24px 0 72px; }
.code li::before { content: counter(ln); position: absolute; left: 0; width: 52px; color: rgba(236, 236, 233, .28); text-align: right; user-select: none; }
.c-h { color: #fff; font-weight: 700; }
.c-mark { color: #6F8BFF; }
.c-q { color: rgba(236, 236, 233, .6); font-style: italic; }
.c-p { color: rgba(236, 236, 233, .88); max-width: 72ch; }
.c-k { color: #6F8BFF; }
.c-s { color: #B6E3A8; }
.c-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.editor-status { display: flex; gap: 22px; padding: 8px 16px; background: var(--blue); color: #fff; }
.is-tabs .editor-panel:not(.is-active) { display: none; }
.editor-panel + .editor-panel { margin-top: 28px; }
.is-tabs .editor-panel + .editor-panel { margin-top: 0; }
/* lines type in one after another when a file opens */
.editor-panel.is-active .code li { animation: line-in .45s var(--ease) both; animation-delay: calc(var(--li, 0) * 70ms); }
.editor-panel.is-active .code li:last-child::after { content: ""; display: inline-block; width: .6em; height: 1.1em; margin-left: 4px; vertical-align: -.15em; background: #6F8BFF; animation: caret 1s steps(2, jump-none) infinite; }
@keyframes line-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes caret { 50% { opacity: 0; } }


@media (max-width: 860px) {
  .intro-photo { grid-column: 1 / -1; position: static; max-width: 420px; }
  .intro-text { grid-column: 1 / -1; }
  .cv-row { grid-template-columns: 1fr; }
  .tech-cat, .tech-list, .tool-list { grid-column: 1 / -1; }
  .editor-body { grid-template-columns: minmax(0, 1fr); }
  .editor-side { border-right: 0; border-bottom: 1px solid rgba(236, 236, 233, .1); padding: 10px 0; }
  .editor-folder { display: none; }
  .editor-files { flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
  .editor-file { width: auto; white-space: nowrap; padding: 8px 12px; border-radius: 6px; }
  .editor-file[aria-selected="true"] { box-shadow: none; }
  .code li { padding: 0 14px 0 46px; }
  .code li::before { width: 32px; }
  .bcap .h3, .bcap p { grid-column: 1 / -1; }
  .browser-view { height: 70svh; }
  .chat-log { padding: 18px 14px; min-height: 280px; }
  .chat-msg { max-width: 90%; font-size: 1rem; }
  .chat-fields { grid-template-columns: minmax(0, 1fr); }
  .tech-cat { padding-top: 0; }
  .cv-row h3, .cv-row p { grid-column: 1; }
  .cs-text, .cs-orbit { grid-column: 1 / -1; }
  .cs-bridge { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cs-orbit { justify-self: center; }
}

/* ==========================================================================
   Motion — elements come into focus
   ========================================================================== */
.js .reveal { opacity: 0; filter: blur(14px); transform: translateY(18px); transition: opacity 1s var(--ease), filter 1s var(--ease), transform 1s var(--ease); transition-delay: var(--reveal-delay, 0s); }
.js .reveal.is-visible { opacity: 1; filter: blur(0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; filter: none; transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .mast-tag { display: none; }
  .mast-inner { grid-template-columns: auto 1fr auto; }
  .nav { justify-content: center; grid-template-columns: repeat(5, auto); }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teaser-name { grid-column: 1 / -1; }
  .teaser-photo { grid-column: 1 / span 2; max-width: 420px; }
  .teaser-text { grid-column: 3 / span 2; }
  .contact-copy, .contact-alt, .chat, .contact-grid > .big-links { grid-column: 1 / -1; grid-row: auto; }
  .contact-copy { max-width: 52ch; }
}

@media (max-width: 860px) {
  :root { --mast-h: 64px; }
  .mast-cta { display: none; }
  .mast-inner { grid-template-columns: 1fr auto; }
  .nav-toggle { display: inline-block; }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0;
    padding: var(--mast-h) var(--gutter) 40px;
    background: var(--bg);
    /* closed = display: none, not an invisible full-screen layer (iOS Safari would tint its status bar from it) */
    display: none; opacity: 0; transition: opacity .35s var(--ease), display .35s allow-discrete;
  }
  .nav.is-open { display: flex; opacity: 1; }
  @starting-style { .nav.is-open { opacity: 0; } .nav.is-open a { filter: blur(10px); opacity: 0; } }
  .nav a {
    font: 600 clamp(2.8rem, 12vw, 4.4rem)/.98 var(--font); letter-spacing: -.06em; color: var(--ink);
    filter: blur(10px); opacity: 0; transition: filter .6s var(--ease), opacity .6s var(--ease);
  }
  .nav.is-open a { filter: none; opacity: 1; }
  .nav.is-open a:nth-child(2) { transition-delay: .04s; } .nav.is-open a:nth-child(3) { transition-delay: .08s; }
  .nav.is-open a:nth-child(4) { transition-delay: .12s; } .nav.is-open a:nth-child(5) { transition-delay: .16s; }
  .nav.is-open a:nth-child(6) { transition-delay: .2s; }
  /* big tight-set menu: an underline instead of a border, so it does not run into the next line */
  .nav a.active span { border-bottom: 0; text-decoration: underline 3px; text-underline-offset: .08em; }
  .nav .nav-contact { display: block; color: var(--blue); }
  html.nav-locked { overflow: hidden; }

  .meta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
  .hero .display .l2 { padding-left: 0; }
  .foot-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-sub { grid-column: 1 / -1; }

  .sec-head { grid-template-columns: auto 1fr; column-gap: 20px; row-gap: 10px; }
  .sec-sub { grid-column: 1 / -1; }

  .stages { grid-template-columns: 1fr; row-gap: 40px; }
  .stage .h3 { margin-top: 8px; }
  .stage-arr { transform: rotate(90deg); }


  .foot-row.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .foot-end { align-items: flex-start; text-align: left; }
}

@media (max-width: 620px) {
  /* finer, slightly crisper reeds so the ribbed glass still reads on a narrow screen */
  .flutes { --fl: 30px; }
  .hero.flutes { background-image: linear-gradient(to bottom, transparent calc(100% - 100px), var(--bg)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0) 0px, rgba(255, 255, 255, .45) 6px, rgba(255, 255, 255, .08) 16px, rgba(0, 0, 0, .05) 26px, rgba(255, 255, 255, 0) 30px); }
  .zpanel { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; }
  .zpanel-title, .zpanel-visual, .zpanel-text { grid-column: 1; grid-row: auto; }
  .zpanel-title { font-size: clamp(2.6rem, 12.5vw, 4.4rem); }
  .zpanel-visual { max-width: 340px; justify-self: start; }
  .zchat p { font-size: 1.05rem; }
  .is-htrack .step { width: 78vw; min-height: 52svh; }
  .is-htrack .step-n { font-size: clamp(5rem, 28vw, 8rem); }
  .steps { grid-template-columns: 1fr; }
  .teaser-photo, .teaser-text { grid-column: 1 / -1; }
  .teaser-photo { max-width: 320px; }
  .hero .foot-row .btn { grid-column: 1 / -1; }
}

/* ==========================================================================
   Dark mode (test) — js/theme.js sets html[data-theme]. Tokens flip; the rest
   below are spots that hard-code light colours.
   ========================================================================== */
:root[data-theme="dark"] {
  --bg: #121211;
  --bg-2: #1A1A19;
  --card: #1F1F1D;
  --ink: #ECECE9;
  --ink-2: #C4C4BF;
  --mute: #8E8E88;
  --hair: rgba(236, 236, 233, .18);
  --blue: #4D6BFF;          /* brighter cobalt: readable as text on near-black, still holds white text */
  --blue-light: #8DA2FF;
  color-scheme: dark;
}
[data-theme="dark"] body::after { opacity: .05; }

/* fluted glass: white highlights would glare on dark — keep only a faint sheen and deeper shadows */
[data-theme="dark"] .flutes {
  --flutes: repeating-linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, .055) calc(var(--fl) * .21),
    rgba(255, 255, 255, .01) calc(var(--fl) * .52),
    rgba(0, 0, 0, .28) calc(var(--fl) * .88),
    rgba(255, 255, 255, 0) var(--fl));
}
[data-theme="dark"] .glass i {
  background: linear-gradient(90deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .015) 22%, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .25) 88%, rgba(255, 255, 255, .05) 100%);
}
@media (max-width: 620px) {
  [data-theme="dark"] .hero.flutes { background-image: linear-gradient(to bottom, transparent calc(100% - 100px), var(--bg)), var(--flutes); }
}

/* service panels */
[data-theme="dark"] .zpanel--ink { background: #000; box-shadow: inset 0 0 0 1px var(--hair); }
[data-theme="dark"] .zpanel--light { background: #2A2A27; }
[data-theme="dark"] .zchat-q { background: var(--bg-2); }
[data-theme="dark"] .zpanel--light .zchat-q { background: var(--bg); }
[data-theme="dark"] .zchat-a { background: #000; }

/* ink sections, popovers and the editor are already dark — set them apart with a hairline */
[data-theme="dark"] .sec--ink { background: #000; border-block: 1px solid var(--hair); }
[data-theme="dark"] .tech-pop { background: #000; box-shadow: inset 0 0 0 1px var(--hair), 0 24px 40px -24px rgba(0, 0, 0, .8); }
[data-theme="dark"] .editor { background: #000; box-shadow: inset 0 0 0 1px var(--hair); }
[data-theme="dark"] .editor-side { background: #0B0B0A; }

/* browser window + chat */
[data-theme="dark"] .browser, [data-theme="dark"] .chat { border-color: var(--hair); box-shadow: 0 40px 70px -50px rgba(0, 0, 0, .9); }
[data-theme="dark"] .browser-dots i { background: rgba(236, 236, 233, .22); }
[data-theme="dark"] .browser-tab:hover { background: rgba(255, 255, 255, .06); }
[data-theme="dark"] .browser-view { border-top-color: var(--hair); }
[data-theme="dark"] .chat-msg--bot, [data-theme="dark"] .chat-typing { background: #2A2A27; }

/* core & satellites: the core stays a dark disc with a light ring */
[data-theme="dark"] .cs-core { background: #000; color: var(--ink); box-shadow: inset 0 0 0 var(--thick) var(--ink), 0 30px 60px -30px rgba(0, 0, 0, .9); }
[data-theme="dark"] .cs-sat { box-shadow: 0 24px 44px -30px rgba(0, 0, 0, .9); }
[data-theme="dark"] .is-htrack .step.is-lit { box-shadow: 0 30px 50px -40px rgba(0, 0, 0, .9); }

/* photos sit a touch darker so they do not glare */
[data-theme="dark"] .bw img { filter: grayscale(1) contrast(1.1) brightness(.88); }
[data-theme="dark"] .bw:hover img { filter: grayscale(0) brightness(.95); }
