/* ==========================================================================
   Tapasvikumar Patel — Portfolio
   Theme "Solar Night": photovoltaic night blue, solar gold, volt teal,
   code violet and flare orange. Each section carries its own accent
   (data-theme) and the page chrome follows the section in view.
   Type: Archivo (variable width + weight), Instrument Serif Italic,
   JetBrains Mono. All fonts are self-hosted (no third-party requests).
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'ArchivoVar';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-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: 'ArchivoVar';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(../fonts/archivo-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JBMono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-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: 'JBMono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'InstrumentSerif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(../fonts/instrument-serif-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;
}

/* ---------- Registered properties (animatable) ---------- */
@property --accent { syntax: '<color>'; inherits: true; initial-value: #ffb547; }
@property --accent-2 { syntax: '<color>'; inherits: true; initial-value: #ff6b3d; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------- Tokens ----------
   Dark "Solar Night" is the default; [data-mode='light'] "Solar Day" overrides the
   same tokens. Infographic panels and the circuit board stay dark in both modes
   (see .surface-dark below). */
:root {
  --bg: #06080f;
  --bg-2: #0a0f1d;
  --line: rgba(243, 239, 230, .08);
  --line-2: rgba(243, 239, 230, .16);
  --text: #f3efe6;
  --text-2: #aab2c5;
  --text-3: #7d879f;
  --ink: #0a0c12;                          /* text on accent / inverted fills */
  --glass: rgba(10, 14, 28, .6);           /* pills, chips, ghost buttons */
  --header-bg: #06080f;                    /* solid: a blur behind it would re-render every frame */
  --card-a: #141c33;                       /* raised cards, gradient top */
  --card-b: #090d1a;                       /* raised cards, gradient bottom */
  --tile: rgba(7, 10, 19, .92);            /* stat and data cells */
  --screen: #04070f;                       /* infographic screens */
  --grid-line: rgba(243, 239, 230, .035);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
  --stack-shadow: 0 -24px 60px -20px rgba(0, 0, 0, .6);
  --photo-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8);
  --badge-shadow: 0 50px 90px -30px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .5) inset;

  /* Bright accents: fills on dark surfaces, identical in both modes */
  --sun-b: #ffb547;
  --flare-b: #ff6b3d;
  --volt-b: #3df2cb;
  --code-b: #9483ff;
  --sky-b: #38b6ff;
  --rose-b: #ff6fb1;
  /* Mode accents: text and lines on the page background */
  --sun: var(--sun-b);
  --flare: var(--flare-b);
  --volt: var(--volt-b);
  --code: var(--code-b);
  --sky: var(--sky-b);
  --rose: var(--rose-b);
  --ok: #3df29a;

  --accent: var(--sun);
  --accent-2: var(--flare);

  --font-sans: 'ArchivoVar', 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'InstrumentSerif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-mono: 'JBMono', ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
  --font-indic: 'Nirmala UI', 'Noto Sans Gujarati', 'Noto Sans Devanagari', 'Gujarati Sangam MN', 'Kohinoor Devanagari', sans-serif;

  --fs-base: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-lg: clamp(1.1rem, 1rem + .45vw, 1.35rem);
  --fs-h2: clamp(2.5rem, 1.3rem + 4.8vw, 6.4rem);

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --maxw: 1440px;
  --header-h: 76px;
  --radius: 24px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

:root[data-mode='light'] {
  color-scheme: light;
  --bg: #f5f1e8;
  --bg-2: #ece6d9;
  --line: rgba(14, 19, 34, .09);
  --line-2: rgba(14, 19, 34, .17);
  --text: #0e1322;
  --text-2: #485064;
  --text-3: #687085;
  --ink: #fffaf2;
  --glass: rgba(255, 255, 255, .72);
  --header-bg: #f5f1e8;
  --card-a: #ffffff;
  --card-b: #f8f4ec;
  --tile: rgba(255, 255, 255, .9);
  --grid-line: rgba(14, 19, 34, .05);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .032 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --shadow: 0 30px 70px -40px rgba(60, 45, 20, .35);
  --stack-shadow: 0 -20px 50px -26px rgba(60, 45, 20, .3);
  --photo-shadow: 0 40px 80px -40px rgba(60, 45, 20, .5);
  --badge-shadow: 0 40px 70px -30px rgba(60, 45, 20, .45), 0 0 0 1px rgba(14, 19, 34, .08);
  --sun: #b45309;
  --flare: #c2410c;
  --volt: #0f766e;
  --code: #5b45e0;
  --sky: #1d6fd1;
  --rose: #be185d;
  --ok: #15803d;
}

[data-theme='sun'] { --accent: var(--sun); --accent-2: var(--flare); --accent-b: var(--sun-b); --accent-2b: var(--flare-b); }
[data-theme='volt'] { --accent: var(--volt); --accent-2: var(--sky); --accent-b: var(--volt-b); --accent-2b: var(--sky-b); }
[data-theme='code'] { --accent: var(--code); --accent-2: var(--rose); --accent-b: var(--code-b); --accent-2b: var(--rose-b); }
[data-theme='flare'] { --accent: var(--flare); --accent-2: var(--sun); --accent-b: var(--flare-b); --accent-2b: var(--sun-b); }

/* Screens and boards keep the dark palette (and bright accents) in light mode too. */
.surface-dark, .card__visual, .pcb, .stat {
  --text: #f3efe6;
  --text-2: #aab2c5;
  --text-3: #7d879f;
  --ink: #0a0c12;
  --line: rgba(243, 239, 230, .08);
  --line-2: rgba(243, 239, 230, .16);
  --glass: rgba(10, 14, 28, .6);
  --sun: var(--sun-b);
  --flare: var(--flare-b);
  --volt: var(--volt-b);
  --code: var(--code-b);
  --ok: #3df29a;
  --accent: var(--accent-b);
  --accent-2: var(--accent-2b);
  color: var(--text);
}

/* Theme switch: the new mode sweeps in as a circle from the toggle (main.js). */
html.is-mode-switch::view-transition-old(root),
html.is-mode-switch::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--text);
  color-scheme: dark;
  scroll-padding-top: var(--header-h);
}
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-size-adjust: from-font;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
p, h1, h2, h3 { overflow-wrap: break-word; }
strong { font-weight: 650; color: var(--text); }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus, section:focus { outline: none; }

.icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: -.18em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 1000;
  padding: .75rem 1rem; border-radius: 10px;
  background: var(--text); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
  transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.container { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin: 0;
  font: 500 .74rem/1 var(--font-mono);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Background layers ---------- */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: var(--grain); }
.bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 88px 88px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 85%);
  mask-image: radial-gradient(120% 90% at 50% 30%, #000 30%, transparent 85%);
}
.bg__fluid { position: absolute; inset: 0; width: 100%; height: 100%; }
main, .footer { position: relative; z-index: 1; }

/* Daylight behind the page (solar.js): a warm glow arcs from dawn to dusk as you scroll. */
.bg__sky { position: absolute; inset: 0; overflow: hidden; }
.bg__glow { position: absolute; width: 110vmax; height: 110vmax; border-radius: 50%; }
.bg__glow--sun { left: 0; top: 0; margin: -55vmax 0 0 -55vmax; background: radial-gradient(closest-side, rgba(255, 181, 71, .13), rgba(255, 140, 60, .05) 45%, transparent); transform: translate3d(8vw, 105vh, 0); will-change: transform; }
.bg__glow--dusk { right: 0; bottom: 0; margin: 0 -55vmax -55vmax 0; background: radial-gradient(closest-side, rgba(255, 92, 60, .16), rgba(148, 70, 160, .06) 50%, transparent); opacity: 0; will-change: opacity; }
:root[data-mode='light'] .bg__glow--sun { background: radial-gradient(closest-side, rgba(255, 176, 92, .22), rgba(255, 196, 120, .08) 45%, transparent); }
:root[data-mode='light'] .bg__glow--dusk { background: radial-gradient(closest-side, rgba(240, 120, 80, .2), rgba(200, 120, 170, .07) 50%, transparent); }

/* ---------- Header: quiet bar, solid only once you scroll ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: transform .6s var(--ease-out), background-color .4s, border-color .4s;
}
.header.is-scrolled {
  background: var(--header-bg);
  border-color: var(--line);
}
.header.is-hidden { transform: translateY(-105%); }
/* One solar day (solar.js): a PV production curve fills as you scroll and the sun rides along it. */
.daycurve { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; color: var(--sun); }
.daycurve__base { fill: none; stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 2 5; }
.daycurve__line { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-opacity: .75; }
.daycurve__sun circle:first-child { fill: currentColor; opacity: .22; }
.daycurve__sun circle:last-child { fill: #fff3d6; stroke: currentColor; stroke-width: 1.2; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand__mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 12px;
  font: 700 .78rem/1 var(--font-sans); font-stretch: 118%; letter-spacing: .02em;
  transition: background-color .35s, color .35s, border-color .35s;
}
.brand:hover .brand__mark { background: var(--text); color: var(--bg); border-color: transparent; }
.brand__name { font: 600 .95rem/1 var(--font-sans); letter-spacing: -.01em; }

.nav { position: relative; }
.nav__list { display: flex; gap: clamp(1.1rem, 2.2vw, 2.1rem); margin: 0; padding: 0; list-style: none; }
.nav__link {
  display: block; padding: .6rem 0;
  color: var(--text-2); text-decoration: none;
  font-size: .9rem; font-weight: 500; white-space: nowrap;
  transition: color .3s;
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__indicator {
  position: absolute; left: 0; bottom: -1px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  transform: translateX(var(--x, 0px));
  opacity: var(--o, 0);
  transition: transform .6s var(--ease-out), opacity .3s;
  pointer-events: none;
}
.header__actions { display: flex; align-items: center; gap: .6rem; }

.lang { display: inline-flex; align-items: center; }
.lang__btn {
  padding: .5rem .45rem; border: 0; border-radius: 8px; background: none;
  font: 600 .72rem/1 var(--font-mono); letter-spacing: .1em;
  color: var(--text-3); cursor: pointer; transition: color .3s;
}
.lang__btn:hover, .lang__btn[aria-pressed='true'] { color: var(--text); }
.lang__sep { width: 1px; height: 12px; background: var(--line-2); }

.icon-btn {
  width: 40px; height: 40px; padding: 0; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  background: transparent; color: var(--text);
  cursor: pointer; transition: border-color .3s, background-color .3s;
}
.icon-btn:hover { border-color: var(--text-3); }
/* Light/dark switch: a tiny horizon where the sun rises for light and the moon for dark. */
.mode-btn {
  position: relative; flex: none; width: 52px; height: 32px; padding: 0; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  background: linear-gradient(#0b1430, #1a1830 70%, #3a2026);
  transition: border-color .3s;
}
:root[data-mode='light'] .mode-btn { background: linear-gradient(#bfe0ff, #ffe7c2); }
.mode-btn:hover { border-color: var(--text-3); }
.mode-btn__sun, .mode-btn__moon { position: absolute; left: 50%; top: 50%; border-radius: 50%; transition: transform .8s var(--ease-out), opacity .5s; }
.mode-btn__sun { width: 14px; height: 14px; margin: -7px; background: #ffb547; box-shadow: 0 0 10px 3px rgba(255, 181, 71, .55); transform: translateY(17px); }
.mode-btn__moon { width: 11px; height: 11px; margin: -5.5px; box-shadow: -3px 2px 0 0 #e8e4d8; transform: translate(5px, -2px); }
:root[data-mode='light'] .mode-btn__sun { transform: translateY(-2px); }
:root[data-mode='light'] .mode-btn__moon { opacity: 0; transform: translate(5px, 18px); }
.mode-btn__ground { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: #0d1a14; border-top: 1px solid rgba(255, 255, 255, .12); }
:root[data-mode='light'] .mode-btn__ground { background: #7c9a5e; }

.header__cta {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.05rem; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--text); text-decoration: none;
  font: 600 .86rem/1 var(--font-sans); white-space: nowrap;
  transition: background-color .35s, color .35s, border-color .35s;
}
.header__cta:hover, .header__cta:focus-visible { background: var(--text); color: var(--bg); border-color: transparent; }

.menu-btn { display: none; }
.menu-btn__lines { display: grid; gap: 6px; width: 18px; }
.menu-btn__lines span { height: 1.5px; border-radius: 2px; background: var(--text); }
.menu-btn__lines span:last-child { width: 60%; justify-self: end; }

/* Mobile menu (native dialog: focus trap + Esc for free) */
.menu {
  position: fixed; inset: 0;
  width: 100%; max-width: none; height: 100%; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--bg); color: var(--text);
  opacity: 0;
  transition: opacity .45s var(--ease-out), display .45s allow-discrete, overlay .45s allow-discrete;
}
.menu[open] { opacity: 1; }
@starting-style { .menu[open] { opacity: 0; } }
.menu::backdrop { background: transparent; }
.menu__inner {
  min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
}
.menu__close {
  position: absolute; top: 15px; right: var(--gutter);
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%; background: transparent; cursor: pointer;
}
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.menu__list a {
  display: flex; align-items: baseline; gap: 1rem; padding: .35rem 0;
  font: 700 clamp(2rem, 8.5vw, 3.6rem)/1.1 var(--font-sans); font-stretch: 112%; letter-spacing: -.03em;
  color: var(--text); text-decoration: none;
}
.menu__num { font: 500 .78rem/1 var(--font-mono); color: var(--accent); letter-spacing: .1em; }
.menu[open] .menu__list li { animation: menu-in .7s var(--ease-out) both; }
.menu__list li:nth-child(2) { animation-delay: .04s; }
.menu__list li:nth-child(3) { animation-delay: .08s; }
.menu__list li:nth-child(4) { animation-delay: .12s; }
.menu__list li:nth-child(5) { animation-delay: .16s; }
.menu__list li:nth-child(6) { animation-delay: .2s; }
.menu__list li:nth-child(7) { animation-delay: .24s; }
@keyframes menu-in { from { opacity: 0; transform: translateY(24px); } }
.menu__foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font: 500 .85rem/1 var(--font-mono); color: var(--text-2); }
.menu__foot a { color: var(--text); }
.menu__controls { display: flex; align-items: center; gap: .6rem; }

/* Section rail */
.rail {
  position: fixed; right: clamp(.8rem, 1.6vw, 1.6rem); top: 50%; z-index: 90;
  transform: translateY(-50%);
  display: flex; align-items: center;
  transition: opacity .5s, visibility .5s;
}
/* Out of the way on the hero, appears once you scroll into the content. */
.rail.is-idle { opacity: 0; visibility: hidden; }
.rail__list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.05rem; }
.rail__list a { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; text-decoration: none; }
.rail__dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1.5px solid var(--text-3); background: var(--bg);
  transition: transform .4s var(--ease-back), background-color .4s, border-color .4s, box-shadow .4s;
}
.rail__label {
  font: 500 .66rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
  opacity: 0; transform: translateX(8px); transition: opacity .3s, transform .4s var(--ease-out);
  white-space: nowrap;
}
.rail:hover .rail__label { opacity: 1; transform: none; }
.rail__list a.is-active .rail__dot { background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 12px var(--accent); }
.rail__line { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line-2); }
.rail__fill { position: absolute; inset: 0; background: linear-gradient(var(--sun), var(--volt), var(--code)); transform-origin: 50% 0; transform: scaleY(0); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .rail__fill { animation: grow-y auto linear both; animation-timeline: scroll(root); }
  }
}
@keyframes grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- Buttons & chips ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-fill: var(--accent);
  --btn-fill-fg: var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: .65rem;
  padding: 1.05rem 1.55rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 .95rem/1 var(--font-sans); letter-spacing: .005em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: color .5s var(--ease-out), border-color .5s;
}
.btn::before {
  content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit;
  background: var(--btn-fill);
  clip-path: circle(0 at var(--mx, 50%) var(--my, 50%));
  transition: clip-path .7s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }
.btn:hover, .btn:focus-visible { color: var(--btn-fill-fg); border-color: transparent; }
.btn__label, .btn .icon { position: relative; display: inline-block; transition: transform .5s var(--ease-out); }
.btn:hover .icon { transform: translate(2px, -2px); }
.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--ink); --btn-fill: var(--text); border-color: transparent; box-shadow: 0 10px 40px -12px color-mix(in oklab, var(--accent) 70%, transparent); }
.btn--ghost { --btn-bg: var(--glass); }
/* "Download CV" charges like a battery on hover */
.batt { position: relative; flex: none; width: 24px; height: 12px; border: 1.6px solid currentColor; border-radius: 3px; }
.batt::after { content: ''; position: absolute; right: -5px; top: 2.4px; width: 2.6px; height: 4px; border-radius: 0 1.5px 1.5px 0; background: currentColor; }
.batt i { position: absolute; inset: 1.4px; border-radius: 1px; background: var(--volt); transform: scaleX(.15); transform-origin: 0 50%; transition: transform .9s var(--ease-out); }
.btn:hover .batt i, .btn:focus-visible .batt i { transform: scaleX(1); }
.btn--sm { padding: .78rem 1.1rem; font-size: .84rem; }

/* ---------- Section scaffolding ---------- */
.section { position: relative; padding-block: clamp(6rem, 15vh, 11rem); }
.section-head { max-width: 58rem; margin-bottom: clamp(3rem, 7vh, 5.5rem); }
.section-head--wide { max-width: 70rem; }
.section-head__index {
  display: flex; align-items: center; gap: .9rem; margin: 0 0 1.6rem;
  font: 500 .74rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2);
}
.section-head__index::after { content: ''; width: 64px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); }
.section-head__num {
  padding: .4rem .6rem; border-radius: 999px; color: var(--accent);
  border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.section-head__title {
  margin: 0;
  font-size: var(--fs-h2); font-weight: 650; font-stretch: 110%;
  line-height: .98; letter-spacing: -.035em;
  text-wrap: balance;
}
.section-head__title em, .langs__title em, .contact__title em, .hero__tagline em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; font-stretch: 100%;
  letter-spacing: -.01em; color: var(--accent);
}
.section-head__title em { font-size: 1.08em; }
.section-head__sub {
  margin: 1.6rem 0 0; max-width: 48ch;
  font-size: var(--fs-lg); line-height: 1.5; color: var(--text-2); text-wrap: pretty;
}

/* ---------- Split text & reveals (hidden states only when JS runs) ---------- */
[data-split] .w { display: inline-block; clip-path: inset(-.25em -.3em -.2em -.3em); vertical-align: baseline; }
[data-split] .w__i { display: inline-block; }
.js [data-split]:not(.is-in) .w__i { transform: translateY(115%) rotate(4deg); }
.js [data-split] .w__i {
  transform-origin: 0 100%;
  transition: transform 1.1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.js [data-reveal] { transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: calc(var(--d, 0) * 1ms); }
.js [data-reveal='up']:not(.is-in) { opacity: 0; transform: translateY(42px); }
.js [data-reveal='fade']:not(.is-in) { opacity: 0; }

/* Scroll-lit paragraph: words brighten as it scrolls through the viewport */
.about__lit .sw { opacity: clamp(.16, calc((var(--p) * (var(--n, 60) + 6) - var(--i, 0)) / 6), 1); }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .js .about__lit { animation: scrub-p linear both; animation-timeline: view(); animation-range: cover 18% cover 58%; }
  }
}
@keyframes scrub-p { from { --p: 0; } to { --p: 1; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  --field-h: clamp(210px, 34vh, 380px);
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; align-items: center;
  padding-block: calc(var(--header-h) + clamp(1.5rem, 5vh, 3.5rem)) max(clamp(4.5rem, 10vh, 7rem), calc(var(--field-h) * .62));
  overflow: clip;
}
/* Sunrise over a PV tracker field (solar.js): the sun follows the pointer, the rows follow the sun. */
.hero__sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero__sun {
  position: absolute; left: 0; top: 0; width: 70vmin; height: 70vmin; margin: -35vmin 0 0 -35vmin; border-radius: 50%;
  background: radial-gradient(closest-side, #fff3d6 0 2.6%, rgba(255, 222, 160, .6) 3.4%, rgba(255, 170, 92, .2) 16%, rgba(255, 140, 80, .06) 48%, transparent);
  will-change: transform;
}
:root[data-mode='light'] .hero__sun { background: radial-gradient(closest-side, #fffaf0 0 2.6%, rgba(255, 214, 150, .7) 3.4%, rgba(255, 186, 118, .28) 16%, rgba(255, 170, 110, .08) 48%, transparent); }
.hero__field { position: absolute; left: 0; bottom: 0; z-index: -1; display: block; width: 100%; height: var(--field-h); pointer-events: none; }
.js .hero__sun, .js .hero__field { opacity: 0; }
.js.is-ready .hero__sun, .js.is-ready .hero__field { opacity: 1; transition: opacity 1.2s var(--ease-out) .2s; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center; gap: clamp(2rem, 5vw, 6rem);
}
.hero__content {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(1rem, 2.4vh, 1.7rem);
  min-width: 0;
}
.hero__title {
  margin: 0;
  font-size: var(--name-size, clamp(3rem, 6.6vw, 7.5rem));
  font-weight: 700; font-stretch: 100%;
  line-height: .88; letter-spacing: -.045em;
  text-transform: uppercase;
  color: var(--text);
}
.hero__line { display: block; white-space: nowrap; width: max-content; }
.hero__title .ch {
  display: inline-block;
  font-weight: calc(700 + var(--f, 0) * 200);
  font-stretch: calc(100% + var(--f, 0) * 16%);
}
.hero__title.is-measuring .ch { font-weight: 700 !important; font-stretch: 100% !important; animation: none !important; }
.js .hero__title .ch { opacity: 0; }
.js.is-ready .hero__title .ch {
  opacity: 1;
  animation: ch-in 1s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 30ms + 60ms);
}
@keyframes ch-in {
  0% { opacity: 0; font-weight: 100; font-stretch: 62%; transform: translateY(.3em); }
  14% { opacity: .9; }
  20% { opacity: .1; }
  28% { opacity: 1; }
  34% { opacity: .35; }
  42% { opacity: 1; }
}
.hero__tagline {
  margin: 0; max-width: 22ch;
  font: 450 clamp(1.4rem, 1rem + 1.5vw, 2.3rem)/1.14 var(--font-sans);
  letter-spacing: -.02em; text-wrap: balance;
}
.hero__tagline em { font-size: 1.12em; }
.t-sun { color: var(--sun); }
.t-volt { color: var(--volt); }
.t-code { color: var(--code); }
.hero__lead { margin: 0; max-width: 48ch; color: var(--text-2); font-size: var(--fs-base); text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.js .hero [data-intro] { opacity: 0; transform: translateY(26px); }
.js.is-ready .hero [data-intro] {
  opacity: 1; transform: none;
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * .5ms + 150ms);
}

/* Portrait: one clean frame, nothing floating around it */
.hero__photo { position: relative; margin: 0; justify-self: end; width: min(100%, 460px, calc((100svh - var(--header-h) - 10rem) * .8)); }
.hero__photo::before {
  content: ''; position: absolute; inset: 0 -22% -12%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 20%, transparent), transparent);
  pointer-events: none;
}
.hero__frame {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line-2); border-radius: 28px;
  background: var(--bg-2);
  box-shadow: var(--photo-shadow);
}
.hero__frame img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 28%;
  scale: 1.05;
  will-change: transform;
}
.hero__caption {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem;
  font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3);
}
.hero__caption > span { display: inline-flex; align-items: center; gap: .5rem; }
.hero__caption .icon { color: var(--accent); }
.hero__caption time { color: var(--text-2); }
/* Intro: the frame wipes open from the bottom while the photo settles */
.js .hero__frame { clip-path: inset(100% 0 0 0 round 28px); }
.js .hero__frame img { scale: 1.22; }
.js.is-ready .hero__frame { clip-path: inset(0 0 0 0 round 28px); transition: clip-path 1.1s var(--ease-out) .1s; }
.js.is-ready .hero__frame img { scale: 1.05; transition: scale 1.4s var(--ease-out) .1s; }
.js.is-ready .hero__photo:hover .hero__frame img { scale: 1.09; transition: scale 1.2s var(--ease-out); }

.hero__scroll {
  position: absolute; left: 50%; bottom: clamp(1.4rem, 4vh, 2.4rem); translate: -50% 0;
  display: inline-flex; align-items: center; gap: .8rem;
  font: 500 .68rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase;
  padding: .5rem .9rem; border-radius: 999px; background: color-mix(in oklab, var(--bg) 72%, transparent);
  color: var(--text-3); text-decoration: none; white-space: nowrap;
  transition: color .3s;
}
.hero__scroll:hover { color: var(--text); }
.hero__scroll-line { position: relative; width: 40px; height: 1px; background: var(--line-2); overflow: hidden; }
.hero__scroll-line::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: translateX(-100%); animation: scroll-cue 2.4s var(--ease-in-out) infinite; }
@keyframes scroll-cue { 50% { transform: none; } 100% { transform: translateX(100%); } }

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .hero { view-timeline: --hero; }
    .hero__content { animation: hero-lift linear both; animation-timeline: --hero; animation-range: exit 0% exit 90%; }
    .hero__photo { animation: hero-photo-out linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
  }
}
@keyframes hero-lift { to { transform: translateY(-10vh); opacity: 0; } }
@keyframes hero-photo-out { to { transform: translateY(-5vh) scale(.96); opacity: .3; } }

/* ==========================================================================
   MARQUEE
   ========================================================================== */
.marquee { position: relative; padding-block: clamp(3.5rem, 9vh, 6.5rem); overflow: clip; }
.marquee__band {
  position: relative; width: 110vw; margin-left: -5vw;
  display: flex; overflow: hidden;
  padding-block: clamp(.7rem, 1.4vw, 1.1rem);
  background: var(--accent); color: var(--ink);
  transform: rotate(-2.2deg);
  box-shadow: 0 24px 60px -24px color-mix(in oklab, var(--accent) 70%, transparent);
}
.marquee__band--ghost {
  transform: rotate(1.7deg);
  margin-bottom: -1.6rem;
  background: color-mix(in oklab, var(--bg-2) 92%, transparent); color: var(--text-2);
  border-block: 1px solid var(--line-2);
  box-shadow: none;
}
.marquee__inner { display: flex; width: max-content; will-change: transform; }
.marquee__track { display: flex; align-items: center; flex: none; gap: clamp(1.2rem, 2.4vw, 2.4rem); padding-right: clamp(1.2rem, 2.4vw, 2.4rem); }
.marquee__item {
  font: 800 clamp(1.4rem, .9rem + 2.4vw, 3rem)/1 var(--font-sans); font-stretch: 125%;
  text-transform: uppercase; letter-spacing: -.02em; white-space: nowrap;
}
.marquee__band--ghost .marquee__item { color: transparent; -webkit-text-stroke: 1.2px var(--text-2); }
.marquee__sep { width: clamp(1.3rem, 2.4vw, 2.3rem); height: clamp(1.3rem, 2.4vw, 2.3rem); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.marquee__band--ghost .marquee__sep { stroke: var(--accent); }

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about__grid {
  display: grid; grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 7rem); align-items: start;
}
.about__badge-col {
  position: sticky; top: var(--header-h);
  display: flex; flex-direction: column; align-items: center;
  margin-top: calc(-1 * clamp(6rem, 15vh, 11rem));
}
.lanyard {
  position: relative; display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  rotate: var(--rot, 0deg);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  will-change: rotate;
}
.lanyard__strap {
  width: 32px; height: clamp(110px, 22vh, 210px);
  display: grid; place-items: center; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .28), transparent 25%, transparent 75%, rgba(0, 0, 0, .28)),
    linear-gradient(var(--accent), var(--accent-2));
  border-radius: 0 0 5px 5px;
}
.lanyard__strap span {
  writing-mode: vertical-rl;
  font: 700 .56rem/1 var(--font-mono); letter-spacing: .32em;
  color: var(--ink); opacity: .75; white-space: nowrap;
}
.lanyard__ring {
  position: relative; z-index: 2;
  width: 28px; height: 28px; margin: -10px 0 -14px;
  border: 3px solid #d5dae4; border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.badge {
  position: relative; overflow: hidden;
  width: min(330px, 80vw);
  padding-bottom: 1.25rem;
  border-radius: 22px;
  background: linear-gradient(165deg, #faf7f0, #e7e2d6);
  color: #0b0d12;
  box-shadow: var(--badge-shadow);
  transform: perspective(1000px) rotateY(var(--tilt, 0deg));
  will-change: transform;
  cursor: grab;
}
.badge__hole { width: 56px; height: 11px; margin: 15px auto 0; border-radius: 11px; background: var(--bg); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6); }
.badge__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding: .75rem 1.25rem;
  background: linear-gradient(90deg, var(--sun), var(--flare));
  font: 700 .68rem/1 var(--font-mono); letter-spacing: .22em; text-transform: uppercase;
}
.badge__body { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; padding: 1.25rem 1.25rem 0; }
.badge__photo { grid-row: span 2; width: 100px; height: 122px; border-radius: 12px; overflow: hidden; background: #cfd6e2; box-shadow: 0 0 0 3px #fff, 0 8px 18px -8px rgba(0, 0, 0, .5); }
.badge__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.badge__name { align-self: end; margin: 0 0 .45rem; font: 800 1.2rem/1.02 var(--font-sans); font-stretch: 110%; letter-spacing: -.02em; text-transform: uppercase; }
.badge__role { align-self: start; margin: 0; font: 500 .82rem/1.3 var(--font-sans); color: #3b4354; }
.badge__data { grid-column: 1 / -1; display: grid; gap: .5rem; margin: 1.15rem 0 0; padding-top: 1rem; border-top: 1px dashed rgba(11, 13, 18, .22); }
.badge__data div { display: flex; justify-content: space-between; gap: 1rem; }
.badge__data dt { font: 600 .62rem/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: #6b7385; }
.badge__data dd { margin: 0; font: 650 .8rem/1.4 var(--font-sans); text-align: right; }
.badge__foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; margin-top: 1.1rem; }
.badge__barcode {
  width: 132px; height: 30px;
  background: repeating-linear-gradient(90deg, #0b0d12 0 2px, transparent 2px 4px, #0b0d12 4px 5px, transparent 5px 8px, #0b0d12 8px 11px, transparent 11px 12px, #0b0d12 12px 13px, transparent 13px 16px);
}
.badge__no { font: 600 .64rem/1 var(--font-mono); letter-spacing: .1em; color: #6b7385; }
.badge__sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255, 255, 255, .7) 44%, rgba(150, 220, 255, .35) 49%, rgba(255, 190, 120, .3) 54%, transparent 66%);
  background-size: 300% 100%;
  background-position: var(--sheen, 60%) 0;
  mix-blend-mode: soft-light;
}
.about__hint { display: inline-flex; align-items: center; gap: .5rem; margin: 1.6rem 0 0; font: 500 .7rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

.about__body { padding-top: .5rem; }
.about__lit {
  margin: 0 0 2rem;
  font-size: clamp(1.3rem, .95rem + 1.35vw, 2.1rem); font-weight: 450; line-height: 1.32; letter-spacing: -.012em;
  text-wrap: pretty;
}
.about__text { margin: 0; max-width: 60ch; color: var(--text-2); font-size: var(--fs-lg); line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2.6rem 0 0; border-top: 1px solid var(--line); }
.facts__item { padding: 1.15rem 1.25rem 1.15rem 0; border-bottom: 1px solid var(--line); }
.facts__item:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.facts dt { margin-bottom: .5rem; font: 500 .68rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.facts dd { margin: 0; font-weight: 550; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.6rem, 1.2vw, 1rem);
  margin-top: clamp(4.5rem, 11vh, 8rem); padding: 0; list-style: none;
}
/* Each stat is a monocrystalline cell (busbars, fine fingers, cut corners) that charges with a sweep of light. */
.stat {
  --cut: clamp(14px, 1.6vw, 24px);
  position: relative; overflow: hidden; padding: clamp(1.4rem, 2.8vw, 2.6rem);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  background:
    linear-gradient(90deg, transparent calc(33.3% - 1px), rgba(205, 216, 238, .2) calc(33.3% - 1px) 33.3%, transparent 33.3% calc(66.6% - 1px), rgba(205, 216, 238, .2) calc(66.6% - 1px) 66.6%, transparent 66.6%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 8px),
    linear-gradient(160deg, #1c346d, #0b1a3e);
}
.stat::after { content: ''; position: absolute; inset: -40% -70%; pointer-events: none; background: linear-gradient(105deg, transparent 42%, rgba(255, 236, 196, .34) 50%, transparent 58%); transform: translateX(-70%); }
.stat.is-in::after { transform: translateX(70%); transition: transform 1.9s var(--ease-out) calc(var(--d, 0) * 1ms + .25s); }
.stat__icon { width: 28px; height: 28px; color: var(--accent); }
.stat__num {
  margin: 1.5rem 0 .6rem;
  font: 750 clamp(3.4rem, 2rem + 4.4vw, 6.6rem)/.9 var(--font-sans); font-stretch: 125%;
  letter-spacing: -.055em; font-variant-numeric: tabular-nums;
}
.stat__suffix { color: var(--accent); }
.stat__label { margin: 0; max-width: 24ch; color: var(--text-2); font-size: .95rem; line-height: 1.45; }
.stat__bar {
  position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform 1.6s var(--ease-out) .3s;
}
.stat.is-in .stat__bar, html:not(.js) .stat__bar { transform: scaleX(1); }

/* ==========================================================================
   EXPERTISE — stacking cards
   ========================================================================== */
.stack { display: grid; gap: 5vh; padding-bottom: 4vh; }
.card {
  --shrink: 0;
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem);
  min-height: min(76vh, 760px);
  padding: clamp(1.4rem, 3.4vw, 3.4rem);
  border: 1px solid var(--line-2); border-radius: 34px;
  background: linear-gradient(160deg, var(--card-a), var(--card-b) 70%);
  box-shadow: var(--stack-shadow);
  transform: scale(calc(1 - var(--shrink) * .06));
  transform-origin: 50% 0;
  overflow: clip;
}
/* Cards stack (stick and get covered) only where a whole card fits on screen. */
@media (min-width: 900px) and (min-height: 720px) {
  .card { position: sticky; top: calc(var(--header-h) + 2vh + var(--i) * 26px); will-change: transform; }
  .card::after { will-change: opacity; }
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 0% 0%, color-mix(in oklab, var(--accent) 20%, transparent), transparent 70%),
    radial-gradient(50% 45% at 100% 100%, color-mix(in oklab, var(--accent-2) 10%, transparent), transparent 70%);
}
.card::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: var(--bg); opacity: calc(var(--shrink) * .6); border-radius: inherit; }
.card__body { position: relative; display: flex; flex-direction: column; }
.card__kicker {
  display: flex; align-items: center; gap: .6rem; margin: 0;
  font: 500 .74rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2);
}
.card__no { color: var(--accent); font-weight: 700; }
.card__of { color: var(--text-3); margin-right: .6rem; }
.card__kicker .icon { color: var(--accent); }
.card__title {
  margin: 1.4rem 0 1rem;
  font: 650 clamp(1.8rem, 1.1rem + 2.3vw, 3.3rem)/1.02 var(--font-sans); font-stretch: 106%;
  letter-spacing: -.03em; text-wrap: balance;
}
.card__text { margin: 0; max-width: 52ch; color: var(--text-2); }
.card__list { display: grid; gap: .7rem; margin: 1.8rem 0 2rem; padding: 0; list-style: none; }
.card__list li { display: flex; align-items: center; gap: .85rem; font-size: .97rem; }
.card__list .icon {
  width: 34px; height: 34px; padding: 7px; border-radius: 10px;
  color: var(--accent);
  background: color-mix(in oklab, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, transparent);
}
.card__source { margin: auto 0 0; font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.card__visual {
  position: relative; display: grid; place-items: center; padding: clamp(.8rem, 2vw, 1.6rem);
  border: 1px solid var(--line); border-radius: 24px;
  background: radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, .04), transparent 70%), var(--screen);
}

/* Infographic SVGs */
.viz { width: 100%; height: auto; max-height: 100%; overflow: visible; }
.viz-grid path { fill: none; stroke: rgba(255, 255, 255, .045); stroke-width: 1; }
.viz-label { font: 600 9.5px var(--font-mono); letter-spacing: .14em; fill: var(--text-3); }
.viz-tag { font: 700 10px var(--font-mono); letter-spacing: .1em; fill: var(--accent); }
.viz-tag--dim { fill: var(--text-3); font-weight: 500; }
.viz-wire { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 3; stroke-linecap: round; }
.viz-wire--thin { stroke-width: 1.4; }
.viz-flow { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 12; animation: dash 1s linear infinite; }
.viz-flow--slow { animation-duration: 1.5s; }
@keyframes dash { to { stroke-dashoffset: -14; } }
.viz-beams path { fill: none; stroke: #ffd27a; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 4 7; opacity: .85; animation: dash .9s linear infinite; }
.viz-box { fill: rgba(255, 255, 255, .04); stroke: rgba(255, 255, 255, .4); stroke-width: 1.5; }
.viz-line { fill: none; stroke: rgba(255, 255, 255, .78); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.viz-spin { animation: spin 22s linear infinite; transform-box: fill-box; transform-origin: center; }
.viz-pulse { transform-box: fill-box; transform-origin: center; animation: viz-pulse 3.2s ease-in-out infinite; }
@keyframes viz-pulse { 50% { transform: scale(1.2); opacity: .04; } }
.viz-sheen { opacity: .08; animation: viz-sheen 4.5s ease-in-out infinite; }
@keyframes viz-sheen { 0%, 20% { transform: translateX(0); opacity: 0; } 30% { opacity: .1; } 70% { transform: translateX(150px); opacity: .1; } 80%, 100% { transform: translateX(160px); opacity: 0; } }
.viz-panel { fill: rgba(255, 255, 255, .03); stroke: rgba(255, 255, 255, .1); }
.viz-curve { fill: none; stroke: var(--accent); stroke-width: 2; }
.viz-dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.viz-bars { stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.viz-hill { fill: color-mix(in oklab, var(--accent) 7%, transparent); }
.viz-hill--front { fill: color-mix(in oklab, var(--accent) 13%, transparent); }
.viz-wind path { fill: none; stroke: color-mix(in oklab, var(--accent) 65%, white); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 28 16; opacity: .7; animation: wind-dash 2.2s linear infinite; }
.viz-wind path:nth-child(2) { animation-duration: 1.7s; }
.viz-wind path:nth-child(3) { animation-duration: 2.6s; }
@keyframes wind-dash { to { stroke-dashoffset: -88; } }
.viz-turbine-far { opacity: .5; }
.viz-track { fill: rgba(255, 255, 255, .08); }
.viz-meter { fill: var(--accent); transform-box: fill-box; transform-origin: 0 50%; animation: viz-meter 3.1s ease-in-out infinite alternate; }
.viz-meter--2 { animation-duration: 2.4s; animation-delay: -.8s; }
.viz-meter--3 { animation-duration: 3.7s; animation-delay: -1.6s; }
@keyframes viz-meter { from { transform: scaleX(.38); } to { transform: scaleX(.94); } }
.viz-leader { fill: none; stroke: rgba(255, 255, 255, .3); stroke-width: 1.2; stroke-dasharray: 3 4; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   JOURNEY — pinned horizontal timeline
   ========================================================================== */
.journey { padding-bottom: 0; }
.journey__pin { position: relative; }
.journey__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; }
.journey__head .section-head { margin-bottom: 0; }
.journey__aside { display: grid; justify-items: end; gap: 1rem; text-align: right; }
.journey__sub { margin: 0; max-width: 34ch; color: var(--text-2); font-size: var(--fs-lg); }
.journey__count { display: flex; align-items: center; gap: .7rem; margin: 0; font: 500 .74rem/1 var(--font-mono); letter-spacing: .12em; color: var(--text-3); }
.journey__count b { font: 750 1.6rem/1 var(--font-sans); font-stretch: 120%; color: var(--text); font-variant-numeric: tabular-nums; }
.journey__bar { position: relative; width: 120px; height: 2px; background: var(--line-2); overflow: hidden; border-radius: 2px; }
.journey__bar span { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--jp, 0)); }
.journey__viewport { position: relative; }
.journey__track { position: relative; display: flex; width: max-content; padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); }
.journey__list { position: relative; display: flex; gap: clamp(1rem, 2vw, 1.75rem); margin: 0; padding: 2.6rem 0 0; list-style: none; }
.journey__wire { position: absolute; left: 0; top: 0; width: 100%; height: 2.6rem; overflow: visible; pointer-events: none; }
.journey__wire-base { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.journey__wire-live { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--jp, 0)); }
.job {
  position: relative; flex: none;
  width: clamp(290px, 29vw, 420px);
  display: flex; flex-direction: column; gap: .85rem;
  padding: 1.7rem 1.7rem 1.6rem;
  border: 1px solid var(--line-2); border-radius: 28px;
  background: linear-gradient(180deg, var(--card-a), var(--card-b));
  transition: border-color .6s, transform .8s var(--ease-out), box-shadow .6s;
}
.job::before {
  content: ''; position: absolute; left: 1.7rem; top: calc(-2.6rem + 1.3rem - 7px);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-2);
  transition: background-color .5s, border-color .5s, box-shadow .5s;
}
.job.is-lit::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 14px var(--accent); }
.job.is-active { border-color: color-mix(in oklab, var(--accent) 55%, transparent); transform: translateY(-10px); box-shadow: 0 30px 60px -30px color-mix(in oklab, var(--accent) 50%, transparent); }
.job__top { display: flex; align-items: center; gap: .7rem; }
.job__num { font: 800 3rem/1 var(--font-sans); font-stretch: 125%; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--text-3); transition: -webkit-text-stroke-color .5s; margin-right: auto; }
.job.is-active .job__num { -webkit-text-stroke-color: var(--accent); }
.job__flag { display: inline-block; width: 22px; height: 15px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.job__flag--in { background: linear-gradient(#ff9933 0 33.3%, #ffffff 0 66.6%, #138808 0); }
.job__flag--de { background: linear-gradient(#000000 0 33.3%, #dd0000 0 66.6%, #ffce00 0); }
.job__place { font: 500 .7rem/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.job__icon { width: 40px; height: 40px; padding: 8px; border-radius: 12px; color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.job__meta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.job__date {
  display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .5rem .75rem;
  border: 1px solid var(--line-2); border-radius: 999px;
  font: 600 .7rem/1 var(--font-mono); letter-spacing: .06em; color: var(--text-2); white-space: nowrap;
}
.job__date--now { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); }
.job__date--now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.job__role { margin: .2rem 0 0; font: 650 1.5rem/1.1 var(--font-sans); font-stretch: 106%; letter-spacing: -.02em; }
.job__company { margin: 0; color: var(--accent); font-weight: 600; }
.job__text { margin: 0; color: var(--text-2); font-size: .94rem; line-height: 1.55; }
.job__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: auto 0 0; padding: .6rem 0 0; list-style: none; }
.job__tags li { padding: .45rem .65rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .64rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }

@media (min-width: 900px) {
  .js .journey__pin { height: calc(100vh + var(--distance, 0px)); }
  .js .journey__sticky {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; justify-content: center; gap: clamp(1.5rem, 4.5vh, 3.2rem);
    padding-top: var(--header-h); overflow: clip;
  }
  .js .journey__track { will-change: transform; }
}
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .js .journey__pin { view-timeline: --journey; }
    .js .journey__track { animation: journey-x linear both; animation-timeline: --journey; animation-range: contain 0% contain 100%; }
  }
}
@keyframes journey-x { to { transform: translateX(calc(-1 * var(--distance, 0px))); } }

/* Globe */
.globe-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(5rem, 13vh, 9rem); }
.globe-block__km {
  display: flex; align-items: baseline; gap: .6rem; margin: 1.2rem 0 .4rem;
  font: 800 clamp(4rem, 2.6rem + 6vw, 9.4rem)/.9 var(--font-sans); font-stretch: 125%; letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, #ffe2a3, var(--accent) 45%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.globe-block__unit { font-size: .3em; letter-spacing: .02em; -webkit-text-fill-color: var(--text-2); color: var(--text-2); }
.globe-block__title { margin: 0 0 1.2rem; font: 600 clamp(1.4rem, 1rem + 1.4vw, 2.2rem)/1.15 var(--font-sans); letter-spacing: -.02em; text-wrap: balance; max-width: 24ch; }
.globe-block__text-p { margin: 0; max-width: 50ch; color: var(--text-2); }
.globe-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 2.2rem 0 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--line); }
.globe-stats div { padding: 1rem 1.1rem; background: var(--tile); }
.globe-stats dt { margin-bottom: .5rem; font: 500 .62rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.globe-stats dd { margin: 0; font: 700 1.3rem/1 var(--font-sans); font-stretch: 112%; font-variant-numeric: tabular-nums; }
.globe { position: relative; width: 100%; max-width: 660px; aspect-ratio: 1; justify-self: center; touch-action: pan-y; cursor: grab; }
.globe:active { cursor: grabbing; }
.globe__canvas { width: 100%; height: 100%; }

/* ==========================================================================
   SKILLS — circuit board
   ========================================================================== */
.pcb {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .55fr) minmax(0, 1fr);
  grid-template-areas: 'u1 core u2' 'u1 core u3';
  gap: clamp(2rem, 4.5vw, 4.5rem) clamp(2rem, 6vw, 6.5rem);
  padding: clamp(1.4rem, 4vw, 4rem);
  border: 1px solid color-mix(in oklab, var(--accent) 22%, var(--line));
  border-radius: 34px;
  background:
    radial-gradient(circle at 1px 1px, rgba(61, 242, 203, .13) 1px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(80% 70% at 50% 50%, rgba(61, 242, 203, .07), transparent 70%),
    linear-gradient(160deg, #0a1a1c, #061011 60%, #060b10);
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .25), 0 40px 90px -40px rgba(0, 0, 0, .8);
}
.pcb__traces { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pcb__traces .trace { fill: none; stroke: rgba(61, 242, 203, .2); stroke-width: 1.6; stroke-linejoin: round; transition: stroke .3s; }
.pcb__traces .trace.is-live { stroke: var(--accent); stroke-width: 2.2; }
.pcb__traces .pulse-dot { fill: #fff; stroke: var(--accent); stroke-width: 1.5; }
.pcb__traces .via { fill: #071314; stroke: rgba(212, 184, 120, .7); stroke-width: 1.5; }
.pcb__group[data-group='U1'] { grid-area: u1; align-self: center; }
.pcb__group[data-group='U2'] { grid-area: u2; }
.pcb__group[data-group='U3'] { grid-area: u3; }
.pcb__group { position: relative; z-index: 1; }
.pcb__label { display: flex; align-items: center; gap: .7rem; margin: 0 0 1.1rem; font: 600 .7rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.pcb__label span:first-child { padding: .35rem .5rem; border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent); border-radius: 6px; }
.pcb__chips { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.chip {
  --pin: #c9a96a;
  position: relative;
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px;
  background: linear-gradient(180deg, #171e2c, #0d121d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 20px -10px rgba(0, 0, 0, .6);
  font: inherit; color: var(--text);
  transition: border-color .3s, box-shadow .3s, transform .45s var(--ease-out);
}
.chip::before, .chip::after { content: ''; position: absolute; top: 24%; bottom: 24%; width: 5px; background: repeating-linear-gradient(to bottom, var(--pin) 0 3px, transparent 3px 7px); }
.chip::before { left: -6px; }
.chip::after { right: -6px; }
.chip .icon { width: 20px; height: 20px; color: var(--accent); }
.chip__name { flex: 1; min-width: 0; font-size: .94rem; font-weight: 500; line-height: 1.25; }
.chip:hover, .chip.is-probed { border-color: color-mix(in oklab, var(--accent) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in oklab, var(--accent) 30%, transparent), 0 0 34px -4px color-mix(in oklab, var(--accent) 35%, transparent); transform: translateY(-2px); }
.pcb__core {
  grid-area: core; align-self: center; justify-self: center;
  position: relative; z-index: 1;
  width: min(100%, 230px); aspect-ratio: 1;
  display: grid; place-content: center; justify-items: center; gap: .35rem; text-align: center;
  border-radius: 20px;
  background: linear-gradient(145deg, #1d2434, #0c111c);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, .28), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 60px -10px color-mix(in oklab, var(--accent) 30%, transparent);
}
.pcb__core::before, .pcb__core::after { content: ''; position: absolute; pointer-events: none; }
.pcb__core::before { inset: 14% -11px; background: repeating-linear-gradient(to bottom, #c9a96a 0 4px, transparent 4px 14px); -webkit-mask: linear-gradient(90deg, #000 0 10px, transparent 10px calc(100% - 10px), #000 0); mask: linear-gradient(90deg, #000 0 10px, transparent 10px calc(100% - 10px), #000 0); }
.pcb__core::after { inset: -11px 14%; background: repeating-linear-gradient(to right, #c9a96a 0 4px, transparent 4px 14px); -webkit-mask: linear-gradient(#000 0 10px, transparent 10px calc(100% - 10px), #000 0); mask: linear-gradient(#000 0 10px, transparent 10px calc(100% - 10px), #000 0); }
.pcb__core-ref { font: 600 .65rem/1 var(--font-mono); letter-spacing: .2em; color: var(--text-3); }
.pcb__core-name { font: 800 3.6rem/1 var(--font-sans); font-stretch: 125%; letter-spacing: -.06em; background: linear-gradient(135deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pcb__core-sub { max-width: 12ch; font: 500 .64rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.dept__title {
  display: flex; align-items: center; gap: .85rem; margin: 0 0 1.3rem;
  font: 650 clamp(1.35rem, 1rem + 1.2vw, 2rem)/1.1 var(--font-sans); font-stretch: 106%; letter-spacing: -.02em;
}
.dept__tag {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 12px; color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 30%, transparent);
}
.dept__tag .icon { width: 22px; height: 22px; }
/* Secondary skills: deliberately quieter than the board */
.extra { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin-top: clamp(1.6rem, 4vh, 2.4rem); }
.extra__title { margin: 0; font: 600 .7rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.extra__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.extra__list li { padding: .5rem .8rem; border: 1px solid var(--line-2); border-radius: 999px; font: 500 .72rem/1 var(--font-mono); letter-spacing: .06em; color: var(--text-2); }

/* ==========================================================================
   EDUCATION & LANGUAGES
   ========================================================================== */
.steps { position: relative; --rise: clamp(2rem, 5.2vw, 5rem); padding-top: 1rem; }
.steps__wave { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.steps__wave path { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.steps.is-drawn .steps__wave path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease-out); }
html:not(.js) .steps__wave path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .js .steps { view-timeline: --steps; }
    .js .steps__wave path { animation: draw linear both; animation-timeline: --steps; animation-range: entry 25% cover 55%; }
  }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.steps__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 1.5vw, 1.3rem); align-items: end; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 250px;
  margin-bottom: calc((var(--n) - 1) * var(--rise));
  padding: 1.4rem 1.3rem 1.5rem;
  border: 1px solid var(--line-2); border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--accent) 7%, var(--card-a)), var(--card-b));
}
.step::after { content: ''; position: absolute; left: 50%; top: 100%; width: 1px; height: calc((var(--n) - 1) * var(--rise)); background: linear-gradient(color-mix(in oklab, var(--accent) 60%, transparent), transparent); }
.step__level { margin: 0; font: 600 .66rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.step__icon { width: 42px; height: 42px; margin: 1.1rem 0 .2rem; padding: 9px; border-radius: 12px; color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
.step__title { margin: .7rem 0 .5rem; font: 650 1.18rem/1.2 var(--font-sans); font-stretch: 104%; letter-spacing: -.015em; text-wrap: balance; }
.step__place { margin: 0; color: var(--text-2); font-size: .9rem; line-height: 1.4; }
.step__country { display: flex; align-items: center; gap: .5rem; margin: auto 0 0; padding-top: 1rem; font: 500 .66rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }

.langs { margin-top: clamp(5.5rem, 13vh, 9rem); }
.langs__title { margin: 0 0 2.2rem; font: 650 clamp(1.9rem, 1.2rem + 2.5vw, 3.6rem)/1.04 var(--font-sans); font-stretch: 108%; letter-spacing: -.03em; }
.langs__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.lang-card { position: relative; overflow: hidden; padding: 1.6rem; border: 1px solid var(--line-2); border-radius: 24px; background: var(--tile); }
.lang-card::after { content: ''; position: absolute; right: -30%; bottom: -60%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--accent) 22%, transparent), transparent 65%); pointer-events: none; }
.lang-card__hello { margin: 0 0 1.4rem; font: 650 clamp(2rem, 1.4rem + 1.8vw, 2.9rem)/1.25 var(--font-sans); font-stretch: 105%; letter-spacing: -.02em; }
.lang-card__hello:lang(gu), .lang-card__hello:lang(hi) { font-family: var(--font-indic); font-stretch: 100%; letter-spacing: 0; }
.lang-card__name { margin: 0; font-weight: 600; font-size: 1.05rem; }
.lang-card__level { margin: .3rem 0 0; font: 500 .68rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.signal { position: absolute; top: 1.5rem; right: 1.5rem; display: flex; align-items: flex-end; gap: 4px; height: 24px; }
.signal i { width: 5px; border-radius: 2px; background: var(--line-2); transition: background-color .5s, box-shadow .5s; }
.signal i:nth-child(1) { height: 20%; } .signal i:nth-child(2) { height: 40%; } .signal i:nth-child(3) { height: 60%; } .signal i:nth-child(4) { height: 80%; } .signal i:nth-child(5) { height: 100%; }
.lang-card.is-in .signal i.on, html:not(.js) .signal i.on { background: var(--accent); box-shadow: 0 0 8px color-mix(in oklab, var(--accent) 60%, transparent); }
.lang-card.is-in .signal i.half, html:not(.js) .signal i.half { background: linear-gradient(to top, var(--accent) 50%, var(--line-2) 50%); }
.lang-card .signal i:nth-child(2) { transition-delay: .1s; } .lang-card .signal i:nth-child(3) { transition-delay: .2s; } .lang-card .signal i:nth-child(4) { transition-delay: .3s; } .lang-card .signal i:nth-child(5) { transition-delay: .4s; }

/* ==========================================================================
   CONTACT & FOOTER
   ========================================================================== */
.contact { min-height: 100vh; display: grid; align-items: center; overflow: clip; padding-block: clamp(7rem, 16vh, 12rem) clamp(15rem, 34vh, 23rem); }
/* Dusk over a wind farm (solar.js): rotors speed up while you scroll; the red lights blink in sync. */
.contact__farm { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(300px, 56vh, 520px); pointer-events: none; }
.farm-s0 { stop-color: rgba(10, 15, 34, 0); } .farm-s1 { stop-color: rgba(37, 27, 60, .5); } .farm-s2 { stop-color: rgba(92, 43, 54, .85); }
.farm-g0 { stop-color: rgba(255, 138, 80, .5); } .farm-g1 { stop-color: rgba(255, 138, 80, 0); }
.farm-stars circle { fill: #fff; }
.farm-sun { fill: #ffb27a; }
.farm-hill--far { fill: #1b1c3a; } .farm-hill--mid { fill: #121529; } .farm-hill--near { fill: var(--bg); }
.farm-turbine path, .farm-turbine rect, .farm-rotor circle { fill: var(--tc); }
.farm-turbine--far { --tc: rgba(196, 204, 228, .42); } .farm-turbine--mid { --tc: rgba(214, 221, 240, .68); } .farm-turbine--near { --tc: #e9eef7; }
/* German wind farms flash W-rot in sync: 1 s on, 0.5 s off, 1 s on, 1.5 s off. */
.farm-beacon { fill: #ff3b2f; animation: farm-beacon 4s steps(1, end) infinite; }
.contact__farm.is-paused .farm-beacon { animation-play-state: paused; }
@keyframes farm-beacon { 0% { opacity: 1; } 25% { opacity: .08; } 37.5% { opacity: 1; } 62.5% { opacity: .08; } }
:root[data-mode='light'] .farm-s0 { stop-color: rgba(166, 198, 234, 0); }
:root[data-mode='light'] .farm-s1 { stop-color: rgba(233, 217, 199, .55); }
:root[data-mode='light'] .farm-s2 { stop-color: rgba(246, 201, 160, .9); }
:root[data-mode='light'] .farm-g0 { stop-color: rgba(255, 176, 104, .5); }
:root[data-mode='light'] .farm-stars, :root[data-mode='light'] .farm-beacon { display: none; }
:root[data-mode='light'] .farm-sun { fill: #fff2d8; }
:root[data-mode='light'] .farm-hill--far { fill: #b7c6c6; } :root[data-mode='light'] .farm-hill--mid { fill: #9bb2a4; }
:root[data-mode='light'] .farm-turbine--far { --tc: rgba(255, 255, 255, .8); } :root[data-mode='light'] .farm-turbine--mid { --tc: rgba(255, 255, 255, .92); } :root[data-mode='light'] .farm-turbine--near { --tc: #fff; }
:root[data-mode='light'] .farm-turbine path, :root[data-mode='light'] .farm-turbine rect { stroke: rgba(40, 50, 70, .22); stroke-width: .6; }
:root[data-mode='light'] .globe-block__km { background-image: linear-gradient(120deg, var(--accent), var(--accent-2)); }
.contact__inner { position: relative; z-index: 1; }
.contact__title {
  margin: 1.4rem 0 2.2rem; max-width: 12.5ch;
  font: 750 clamp(2.8rem, 1.4rem + 6.4vw, 8.6rem)/.95 var(--font-sans); font-stretch: 114%;
  letter-spacing: -.045em; text-wrap: balance;
}
.contact__intro { display: flex; align-items: center; gap: 1.2rem; max-width: 48rem; }
.contact__avatar { position: relative; flex: none; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.contact__avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact__text { margin: 0; max-width: 48ch; color: var(--text-2); font-size: var(--fs-lg); }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin: clamp(2rem, 5vh, 3.4rem) 0 2rem; }
.mail-link {
  padding-bottom: .12em;
  font: 650 clamp(1.6rem, .9rem + 3vw, 3.8rem)/1.1 var(--font-sans); font-stretch: 104%; letter-spacing: -.03em;
  color: var(--text); text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 3px no-repeat;
  transition: background-size .7s var(--ease-out);
}
.mail-link:hover, .mail-link:focus-visible { background-size: 100% 3px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .75rem 1.05rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--glass); color: var(--text);
  font: 600 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  cursor: pointer; transition: border-color .3s, background-color .3s, color .3s;
}
.copy-btn:hover { border-color: var(--accent); }
.copy-btn.is-copied { background: var(--accent); color: var(--ink); border-color: transparent; }
.contact__list { display: flex; flex-wrap: wrap; gap: .9rem 2.2rem; margin: 0; padding: 0; list-style: none; color: var(--text-2); }
.contact__list li { display: inline-flex; align-items: center; gap: .6rem; }
.contact__list .icon { color: var(--accent); }
.contact__list a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .3s; }
.contact__list a:hover { border-color: var(--accent); }

.footer { padding-bottom: 2rem; background: linear-gradient(color-mix(in oklab, var(--bg) 60%, transparent), var(--bg) 40%); }
.footer::before {
  content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sun) 30%, #ffe2a3 50%, var(--sun) 70%, transparent);
  box-shadow: 0 0 34px 8px rgba(255, 150, 60, .35);
}
.footer__big {
  margin: clamp(2.5rem, 6vh, 4rem) 0 1.6rem;
  font: 800 var(--fit-size, 10vw)/.85 var(--font-sans); font-stretch: 125%;
  letter-spacing: -.055em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--text) 26%, transparent);
}
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; font: 500 .7rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }
.footer__row p { margin: 0; }
.footer__top { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 1.6rem; z-index: 300;
  padding: .8rem 1.2rem; border-radius: 999px;
  background: var(--text); color: var(--ink);
  font: 600 .85rem/1 var(--font-sans);
  translate: -50% 150%; opacity: 0; visibility: hidden;
  transition: translate .6s var(--ease-back), opacity .3s, visibility .6s;
  pointer-events: none;
}
.toast.is-on { translate: -50% 0; opacity: 1; visibility: visible; transition: translate .6s var(--ease-back), opacity .3s; }

/* ==========================================================================
   CURSOR (fine pointers only; injected by cursor.js)
   ========================================================================== */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor :is(input, textarea, select) { cursor: auto !important; }
.cursor { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 10000; pointer-events: none; mix-blend-mode: difference; transition: opacity .3s; }
.cursor.is-plain { mix-blend-mode: normal; }
.cursor.is-hidden, .cursor.is-native { opacity: 0; }
.cursor__defs { position: absolute; width: 0; height: 0; }
.cursor__goo { position: absolute; left: 0; top: 0; width: 300px; height: 300px; filter: url(#cursor-goo); will-change: transform; transition: opacity .25s; }
.cursor__blob, .cursor__drop { position: absolute; left: 0; top: 0; border-radius: 50%; background: var(--cursor-fill, #fff); will-change: transform; transition: background-color .35s; }
.cursor__dot { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #fff; will-change: transform; transition: opacity .2s; }
.cursor__caret { position: absolute; left: 0; top: 0; width: 3px; border-radius: 2px; background: #fff; opacity: 0; will-change: transform; transition: opacity .2s, height .3s var(--ease-out); }
.cursor.is-text .cursor__caret { opacity: 1; animation: caret-blink 1.05s steps(1) infinite .4s; }
@keyframes caret-blink { 50% { opacity: .2; } }
.cursor__ring { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border: 1.5px solid #fff; border-radius: 50%; opacity: 0; }
.cursor__label {
  position: absolute; left: 0; top: 0;
  font: 700 .72rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap; opacity: 0; will-change: transform;
  transition: opacity .25s;
}
.cursor.has-label .cursor__label { opacity: 1; }
.cursor.is-probe .cursor__label { color: var(--volt-b); padding: .35rem .5rem; border-radius: 6px; background: rgba(4, 8, 10, .85); border: 1px solid color-mix(in oklab, var(--volt-b) 45%, transparent); }
.cursor__probe { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; opacity: 0; transition: opacity .25s; will-change: transform; }
.cursor__probe svg { width: 100%; height: 100%; fill: none; stroke: var(--volt-b); stroke-width: 1.5; }
.cursor.is-probe .cursor__probe { opacity: 1; }

/* ==========================================================================
   PERFORMANCE
   ========================================================================== */
/* Infographic loops stop while their card is off screen (main.js). */
.card__visual.is-paused * { animation-play-state: paused !important; }
/* Lite mode (main.js): low-power devices, or sustained slow frames. */
.is-lite .bg__fluid, .is-lite .cursor__drop { display: none; }
.is-lite .cursor__goo { filter: none; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1320px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
}
@media (max-width: 1100px) {
  .rail { display: none; }
}
@media (max-width: 899px) {
  :root { --header-h: 66px; }
  .header__cta { display: none; }

  .hero { --field-h: clamp(170px, 26vh, 240px); align-items: start; padding-block: calc(var(--header-h) + 1.5rem) calc(var(--field-h) * .9); }
  .hero__sun { display: none; }
  .contact__farm { height: clamp(220px, 36vh, 320px); }
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__photo { justify-self: start; width: min(100%, 440px); }
  .hero__frame { aspect-ratio: 1 / 1; }
  .hero__frame img { object-position: 50% 22%; }
  .hero__scroll { display: none; }

  .about__grid { grid-template-columns: 1fr; }
  .about__badge-col { position: relative; top: 0; margin-top: 0; }
  .facts { grid-template-columns: 1fr; }
  .facts__item:nth-child(even) { padding-left: 0; border-left: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .card { grid-template-columns: 1fr; min-height: 0; }
  .card__visual { order: -1; }
  .card__list { margin-bottom: 1.4rem; }

  .journey__head { flex-direction: column; align-items: flex-start; }
  .journey__aside { justify-items: start; text-align: left; }
  .journey__count { display: none; }
  .journey__sticky { padding-top: 0; }
  .journey__track { padding-inline: 0; width: auto; transform: none !important; animation: none !important; }
  .journey__wire { display: none; }
  .journey__list { flex-direction: column; width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; padding: 2.2rem 0 0 1.6rem; border-left: 1px solid var(--line-2); }
  .job { width: 100%; }
  .job::before { left: calc(-1.6rem - 8px); top: 2rem; }
  .job.is-active { transform: none; }

  .globe-block { grid-template-columns: 1fr; }
  .globe { max-width: 520px; }
  .globe-stats { grid-template-columns: 1fr 1fr; }
  .globe-stats div:first-child { grid-column: 1 / -1; }

  .pcb { grid-template-columns: 1fr; grid-template-areas: 'core' 'u1' 'u2' 'u3'; }
  .pcb__traces { display: none; }
  .pcb__core { width: 170px; }

  .steps__list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
  .step { margin-bottom: 0; }
  .step:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .step::after, .steps__wave { display: none; }
  .langs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .brand__name { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat__label { font-size: .85rem; }
  .steps__list, .langs__list { grid-template-columns: 1fr; }
}

/* ==========================================================================
   REDUCED MOTION: everything visible, nothing moves on its own
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-split] .w__i, .js .hero [data-intro], .js .hero__title .ch { opacity: 1 !important; transform: none !important; }
  .js .hero__frame { clip-path: none !important; }
  .js .hero__frame img { scale: 1.05 !important; }
  .about__lit .sw { opacity: 1 !important; }
  .steps__wave path { stroke-dashoffset: 0; }
  .lang-card .signal i.on { background: var(--accent); }
  .stat__bar { transform: scaleX(1); }
  .journey__viewport { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; }
  .job { scroll-snap-align: start; }
  .journey__wire { display: none; }
}
