@import url('../fonts/fonts.css');

/* =========================================================== design tokens */

:root {
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Palette taken from the FD monogram. */
  --navy-950: #050f1d;
  --navy-900: #071426;
  --navy-850: #091a30;
  --navy-800: #0b2038;
  --navy-700: #102c4c;
  --navy-600: #163a63;
  --blue-600: #1546a0;
  --blue-500: #1d5bc7;
  --blue-400: #3b82f6;
  --blue-300: #6ea8ff;
  --blue-200: #a8c9ff;

  --paper: #f7f8fa;
  --paper-2: #eef1f6;
  --ink: #0a1424;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 30px;

  --wrap: 1220px;
  --gut: clamp(1.15rem, 4vw, 3rem);

  --sec-y: clamp(4rem, 7vw, 6.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.7s;

  --shadow-1: 0 1px 2px rgb(2 8 20 / 0.4);
  --shadow-2: 0 18px 50px -18px rgb(2 8 20 / 0.65);
  --shadow-3: 0 40px 90px -30px rgb(2 8 20 / 0.75);
}

/* Dark is the default look. */
:root,
:root[data-theme='dark'] {
  --bg: var(--navy-900);
  --bg-2: var(--navy-850);
  --bg-3: var(--navy-800);
  --surface: rgb(255 255 255 / 0.035);
  --surface-2: rgb(255 255 255 / 0.06);
  --line: rgb(255 255 255 / 0.1);
  --line-2: rgb(255 255 255 / 0.18);
  --text: #eaf0fa;
  --text-2: #a9bbd6;
  --text-3: #7188a8;
  --accent: var(--blue-300);
  --accent-2: var(--blue-400);
  --accent-ink: #04101f;
  --glow: rgb(59 130 246 / 0.4);
  --grain: 0.035;
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: var(--paper);
  --bg-2: #ffffff;
  --bg-3: var(--paper-2);
  --surface: rgb(10 20 36 / 0.025);
  --surface-2: rgb(10 20 36 / 0.05);
  --line: rgb(10 20 36 / 0.12);
  --line-2: rgb(10 20 36 / 0.22);
  --text: var(--ink);
  --text-2: #46587a;
  --text-3: #6b7d9c;
  --accent: var(--blue-600);
  --accent-2: var(--blue-500);
  --accent-ink: #ffffff;
  --glow: rgb(29 91 199 / 0.22);
  --grain: 0.02;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: var(--paper);
    --bg-2: #ffffff;
    --bg-3: var(--paper-2);
    --surface: rgb(10 20 36 / 0.025);
    --surface-2: rgb(10 20 36 / 0.05);
    --line: rgb(10 20 36 / 0.12);
    --line-2: rgb(10 20 36 / 0.22);
    --text: var(--ink);
    --text-2: #46587a;
    --text-3: #6b7d9c;
    --accent: var(--blue-600);
    --accent-2: var(--blue-500);
    --accent-ink: #ffffff;
    --glow: rgb(29 91 199 / 0.22);
    --grain: 0.02;
    color-scheme: light;
  }
}

/* ================================================================== reset */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  /* Safari uses the root canvas outside the visual viewport, including bounce. */
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain over everything, cheap and static. */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

ul, ol { list-style: none; padding: 0; }

h1, h2, h3 { font-weight: 620; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }

p { text-wrap: pretty; }

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

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

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

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.wrap {
  width: min(100% - var(--gut) * 2, var(--wrap));
  margin-inline: auto;
}

.dim { color: var(--text-3); }

/* ================================================================== skip */

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.skip:focus-visible { transform: none; }

/* ============================================================== progress */

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 2px;
  z-index: 90;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 14px var(--glow);
}

/* ================================================================ header */

.site-head {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--gut);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-head.is-stuck {
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--line);
  padding-block: 0.6rem;
}

.brand { display: flex; align-items: center; gap: 0.7rem; }
/* fill is inherited into the <use> shadow content, so currentColor works. */
.mark { fill: currentColor; color: var(--text); }
.brand-mark { width: 34px; height: auto; transition: color 0.3s, transform 0.5s var(--ease); }
.brand:hover .brand-mark { color: var(--accent); transform: translateY(-2px); }
.brand-txt { display: grid; line-height: 1.15; }
.brand-txt b { font-size: 0.95rem; font-weight: 620; letter-spacing: -0.015em; }
.brand-txt em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav { margin-inline: auto; }
.nav ul { display: flex; gap: 0.35rem; }
.navlink {
  position: relative;
  display: block;
  padding: 0.5rem 0.85rem;
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text-2);
  transition: color 0.25s;
}
.navlink::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--surface-2);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.navlink:hover { color: var(--text); }
.navlink:hover::before { opacity: 1; transform: none; }
.navlink span { position: relative; }
.navlink.is-active { color: var(--text); }
.navlink.is-active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
}

.head-tools { display: flex; align-items: center; gap: 0.5rem; }

.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 100px; }
.lang {
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
  transition: color 0.25s, background 0.25s;
}
.lang:hover { color: var(--text); }
.lang.is-current { background: var(--accent); color: var(--accent-ink); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-2);
  transition: color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.theme-btn .moon { display: none; }
:root[data-theme='light'] .theme-btn .rays,
:root[data-theme='light'] .theme-btn circle { display: none; }
:root[data-theme='light'] .theme-btn .moon { display: block; fill: currentColor; stroke: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-btn .rays,
  :root:not([data-theme]) .theme-btn circle { display: none; }
  :root:not([data-theme]) .theme-btn .moon { display: block; fill: currentColor; stroke: none; }
}

.burger {
  display: none;
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 14px;
  background: color-mix(in oklab, var(--text) 4%, var(--bg));
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.burger span {
  position: absolute;
  left: 11px;
  top: 20px;
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s;
}
.burger span:first-child { transform: translateY(-4px); }
.burger span:last-child { transform: translateY(4px); }
.burger[aria-expanded='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.burger[aria-expanded='true'] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded='true'] span:last-child { transform: rotate(-45deg); }

/* mobile nav */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 79;
  display: grid;
  align-content: center;
  gap: 2rem;
  padding: 6rem var(--gut) 3rem;
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { display: grid; gap: 0.2rem; }
.mobile-nav li {
  opacity: 0;
  transform: translateY(18px);
  animation: mnIn 0.5s var(--ease) forwards;
  animation-delay: calc(var(--i) * 60ms + 60ms);
}
.mobile-nav li > a {
  display: block;
  padding: 0.5rem 0;
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line);
}
.mobile-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mobile-foot .mail { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-2); }
@keyframes mnIn { to { opacity: 1; transform: none; } }

@media (max-width: 940px) {
  /* Keep Safari's top-edge colour sampling free of the decorative fixed layer. */
  body::after { display: none; }
  .site-head::before {
    content: '';
    position: absolute;
    inset: auto 0 100%;
    height: env(safe-area-inset-top, 0px);
    background: var(--bg);
    pointer-events: none;
  }
  .site-head,
  .site-head.is-stuck {
    min-height: calc(68px + env(safe-area-inset-top, 0px));
    padding: calc(12px + env(safe-area-inset-top, 0px))
      max(var(--gut), env(safe-area-inset-right, 0px)) 12px
      max(var(--gut), env(safe-area-inset-left, 0px));
    gap: 12px;
    background: var(--bg);
    border-bottom-color: var(--line);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: background 0.25s, border-color 0.25s;
  }
  .site-head .brand { min-width: 0; }
  .site-head .brand-mark { flex-shrink: 0; }
  .head-tools { margin-left: auto; flex-shrink: 0; }
  .site-head .theme-btn { width: 44px; height: 44px; }
  .nav { display: none; }
  .site-head .langs { display: none; }
  .burger { display: flex; }
  .mobile-nav {
    background: var(--bg);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: calc(92px + env(safe-area-inset-top, 0px));
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 940px) and (max-height: 600px) {
  .mobile-nav { align-content: start; gap: 1.25rem; }
  .mobile-nav li > a { font-size: 1.5rem; padding-block: 0.3rem; }
}
@media (max-width: 560px) {
  .brand-txt em { display: none; }
  .brand-txt b { font-size: 0.9rem; }
}

/* ================================================================= intro */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--navy-950);
  overflow: hidden;
}
.intro-inner { display: grid; justify-items: center; gap: 1.6rem; padding: 2rem; }

.intro-mark { width: clamp(84px, 15vw, 148px); height: auto; overflow: visible; }
.intro-mark .im-line {
  fill: none;
  stroke: var(--blue-300);
  stroke-width: 0.7;
  stroke-linejoin: round;
  stroke-dasharray: var(--len, 900);
  stroke-dashoffset: var(--len, 900);
  animation: draw 0.9s var(--ease-io) 0.1s both;
}
/* The fill wipes in behind the tail of the outline draw. "both" matters:
   without it the mark is solid during the delay and nothing appears to draw. */
.intro-mark .im-fill {
  fill: #fff;
  animation: wipe 0.62s var(--ease) 0.72s both;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes wipe {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.intro-words {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.6vw, 0.78rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: #8fb4e8;
}
.intro-words .iw {
  opacity: 0;
  transform: translateY(10px);
  animation: iwIn 0.55s var(--ease) forwards;
  animation-delay: calc(1.25s + var(--i) * 0.16s);
}
@keyframes iwIn { to { opacity: 1; transform: none; } }

.intro-rule {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 0;
  background: linear-gradient(180deg, transparent, var(--blue-400));
  animation: ruleUp 0.9s var(--ease) 1.35s forwards;
}
@keyframes ruleUp { to { height: 34vh; } }

.intro-skip {
  position: absolute;
  right: var(--gut);
  bottom: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5f7ba3;
  opacity: 0;
  animation: iwIn 0.4s var(--ease) 0.9s forwards;
  transition: color 0.25s;
}
.intro-skip:hover { color: var(--blue-200); }

/* Curtain lift. */
.intro.is-out {
  animation: curtain 0.9s var(--ease-io) forwards;
  pointer-events: none;
}
.intro.is-out .intro-inner { animation: introOut 0.5s var(--ease) forwards; }
@keyframes curtain { to { clip-path: inset(0 0 100% 0); } }
@keyframes introOut { to { opacity: 0; transform: translateY(-24px); } }

body.intro-lock { overflow: hidden; }
html:not(.js) .intro { display: none; }
.intro.is-done { display: none; }

/* ================================================================== hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding: clamp(7rem, 14vh, 10rem) 0 clamp(4rem, 8vh, 7rem);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}
.o1 {
  width: 46vw; height: 46vw; min-width: 380px; min-height: 380px;
  left: -10vw; top: -14vh;
  background: radial-gradient(circle, var(--blue-500), transparent 68%);
  animation: float1 22s ease-in-out infinite;
}
.o2 {
  width: 38vw; height: 38vw; min-width: 320px; min-height: 320px;
  right: -6vw; top: 8vh;
  background: radial-gradient(circle, var(--blue-600), transparent 66%);
  opacity: 0.38;
  animation: float2 27s ease-in-out infinite;
}
.o3 {
  width: 30vw; height: 30vw; min-width: 260px; min-height: 260px;
  left: 38%; bottom: -18vh;
  background: radial-gradient(circle, #2a7fd4, transparent 70%);
  opacity: 0.24;
  animation: float1 32s ease-in-out infinite reverse;
}
:root[data-theme='light'] .orb { opacity: 0.2; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .orb { opacity: 0.2; } }

@keyframes float1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(4vw, 5vh, 0) scale(1.12); }
}
@keyframes float2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
  50% { transform: translate3d(-5vw, 6vh, 0) scale(0.94); }
}

.grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: clamp(48px, 6vw, 84px) clamp(48px, 6vw, 84px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 20%, transparent 78%);
  opacity: 0.6;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-2);
}
.status i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgb(52 211 153 / 0.6);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgb(52 211 153 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(52 211 153 / 0); }
}

.hero-h1 { font-weight: 620; letter-spacing: -0.025em; }
.hero-name {
  display: block;
  font-size: clamp(3.1rem, 9.2vw, 7.4rem);
  font-weight: 680;
  line-height: 0.93;
  letter-spacing: -0.045em;
  margin-bottom: 1.1rem;
}
.hero-name .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero-name .line-in {
  display: block;
  transform: translateY(105%);
  animation: lineUp 1.05s var(--ease) forwards;
}
.hero-name .line:nth-child(2) .line-in { animation-delay: 0.1s; }
@keyframes lineUp { to { transform: none; } }

/* Hold the hero entrance until the intro curtain has lifted. */
html.js .hero-name .line-in,
html.js .hero-role .w i { animation-play-state: paused; }
html.js body.hero-go .hero-name .line-in,
html.js body.hero-go .hero-role .w i { animation-play-state: running; }

.hero-name .line:nth-child(2) .line-in {
  background: linear-gradient(100deg, var(--text) 30%, var(--accent) 78%, var(--text) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  display: block;
  font-weight: 400;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3.1vw, 2.15rem);
  line-height: 1.16;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 1.35rem;
  max-width: 24ch;
}
.hero-role .w {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  vertical-align: bottom;
}
.hero-role .w i {
  display: inline-block;
  font-style: normal;
  transform: translateY(100%);
  animation: lineUp 0.8s var(--ease) forwards;
  animation-delay: calc(0.35s + var(--wi, 0) * 45ms);
}

.hero-lead {
  max-width: 54ch;
  color: var(--text-2);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  margin-bottom: 2.1rem;
}

.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2rem; }

.btn {
  --bg-btn: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 100px;
  font-weight: 560;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--glow); }
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 0.45), transparent 80%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn-primary:hover { box-shadow: 0 16px 40px -12px var(--glow); }
.btn-primary:hover::before { transform: translateX(120%); }
.btn-primary.big { padding: 1.05rem 1.8rem; font-size: 1.02rem; }

.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.hero-loc {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.hero-loc svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }

/* portrait */
.hero-portrait { display: grid; gap: 0.9rem; justify-items: end; }
.portrait-frame {
  position: relative;
  width: min(100%, 400px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-3);
  box-shadow: var(--shadow-3);
}
/* Grade the studio grey into the navy palette so the photo belongs here. */
.portrait-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(155deg, color-mix(in oklab, var(--navy-700) 62%, transparent), transparent 58%);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.portrait-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(170deg, transparent 44%, color-mix(in oklab, var(--bg) 88%, transparent)),
    linear-gradient(255deg, transparent 55%, color-mix(in oklab, var(--bg) 55%, transparent));
  pointer-events: none;
}
.portrait-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06) brightness(0.96);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease);
}
.frame-line { z-index: 3; }
/* On light the photo needs almost none of that grading. */
:root[data-theme='light'] .portrait-frame::before { opacity: 0.3; }
:root[data-theme='light'] .portrait-frame img { filter: saturate(0.9) contrast(1.02); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .portrait-frame::before { opacity: 0.3; }
  :root:not([data-theme]) .portrait-frame img { filter: saturate(0.9) contrast(1.02); }
}
.hero-portrait:hover .portrait-frame img { transform: scale(1.055); }
.frame-line { position: absolute; width: 34px; height: 34px; border: 1px solid var(--accent); opacity: 0.75; }
.frame-line.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.frame-line.br { right: 14px; bottom: 14px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }
.portrait-cap {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-3);
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}
.scroll-hint i {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, var(--accent), transparent);
  animation: scrollLine 2.2s var(--ease-io) infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(42px); opacity: 0; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { justify-items: start; order: -1; }
  .portrait-frame { width: min(62%, 280px); }
  .portrait-cap { display: none; }
  .scroll-hint { display: none; }
}

/* ================================================================= stats */

.stats { position: relative; padding-block: clamp(2.5rem, 6vw, 4rem); border-block: 1px solid var(--line); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.stat { display: grid; gap: 0.3rem; align-content: start; }
@supports (grid-template-rows: subgrid) {
  .stat { grid-row: span 3; grid-template-rows: subgrid; }
}
.stat-v {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 660;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.stat-l { font-weight: 560; font-size: 0.98rem; letter-spacing: -0.01em; }
.stat-n { font-size: 0.82rem; color: var(--text-3); line-height: 1.45; }

@media (max-width: 780px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1.2rem; }
}

.marquee {
  margin-top: clamp(2rem, 5vw, 3rem);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
/* Two identical sets scrolling by exactly one set width: no seam, no end. */
.marquee-in {
  display: flex;
  width: max-content;
  animation: slide 40s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mq-set { display: flex; align-items: center; }
.mq-set span { padding-inline: 1.1rem; white-space: nowrap; }
.mq-set i { color: var(--accent); opacity: 0.5; font-style: normal; }
.marquee:hover .marquee-in { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

/* =============================================================== section */

.sec { padding-block: var(--sec-y); position: relative; }

.sec-head { max-width: 62ch; margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.sec-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.sec-title .w { display: inline-block; overflow: hidden; }
.sec-title .w i { display: inline-block; font-style: normal; }

.sec-lead {
  margin-top: 1.2rem;
  color: var(--text-2);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  max-width: 58ch;
}

.sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-bottom: 0.9rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

/* ============================================================== services */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.9rem, 1.8vw, 1.35rem);
}

.card {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.35s, background 0.35s;
}
.card:hover, .card:focus-visible {
  transform: translateY(-5px);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.card-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.35s;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 62%);
  pointer-events: none;
}
.card:hover .card-glow { opacity: 1; }

.svc { display: grid; gap: 0.75rem; align-content: start; }
.svc-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.svc h3 { font-size: 1.28rem; letter-spacing: -0.02em; }
@media (max-width: 760px) { .svc-grid { grid-template-columns: 1fr; } }
.svc p { color: var(--text-2); font-size: 0.95rem; }
.svc .tags { margin-top: 0.35rem; }

/* ================================================================== work */

.cases { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }

.case {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 2fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.6rem, 3.4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(160deg, var(--surface), transparent 60%);
  transition: border-color 0.4s, background 0.4s;
}
.case:hover { border-color: var(--line-2); }

.case-side { position: relative; }
.case-idx {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 0.85;
  color: var(--accent);
  opacity: 0.35;
  margin-bottom: 0.8rem;
}
.case-client { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.015em; margin-bottom: 0.35rem; }
.case-meta { font-size: 0.85rem; color: var(--text-3); margin-bottom: 1.4rem; }

.case-facts { display: grid; gap: 0.85rem; }
.case-facts dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.2rem;
}
.case-facts dd { margin: 0; font-size: 0.88rem; color: var(--text-2); }

.case-title {
  font-size: clamp(1.35rem, 2.6vw, 1.95rem);
  letter-spacing: -0.028em;
  margin-bottom: 1.5rem;
  max-width: 26ch;
}

.case-block { margin-bottom: 1.2rem; }
.case-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}
.case-block p:not(.case-label) { color: var(--text-2); font-size: 0.96rem; }

.metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 1.1rem;
}
.metrics li {
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.metrics b {
  font-size: 1.4rem;
  font-weight: 660;
  letter-spacing: -0.035em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.metrics span { font-size: 0.76rem; color: var(--text-3); }

@media (max-width: 860px) {
  .case { grid-template-columns: 1fr; gap: 1.5rem; }
  .case-facts { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================ references */

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.quote {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1.4rem;
  padding: clamp(1.8rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
}
.qmark {
  display: block;
  font-family: var(--font-serif);
  font-size: 4.2rem;
  line-height: 0.55;
  height: 0.5em;
  color: var(--accent);
  opacity: 0.45;
}
.quote blockquote p {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.quote figcaption { display: grid; gap: 0.12rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.q-name { font-weight: 600; letter-spacing: -0.012em; }
.q-role { font-size: 0.86rem; color: var(--text-2); }
.q-org { font-size: 0.8rem; color: var(--text-3); }

.q-orig { margin-top: 0.7rem; }
.q-orig summary {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  list-style: none;
}
.q-orig summary::-webkit-details-marker { display: none; }
.q-orig summary::before { content: '+ '; color: var(--accent); }
.q-orig[open] summary::before { content: '– '; }
.q-orig summary:hover { color: var(--text-2); }
.q-orig p {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.55;
}

/* Closing recommendation, wider and quieter than the quote cards. */
.rec {
  margin-top: clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1.5rem, 3vw, 2.4rem) clamp(1.5rem, 3vw, 3rem);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-md);
  background: linear-gradient(100deg, color-mix(in oklab, var(--accent) 8%, transparent), transparent 55%);
}
.rec blockquote p {
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  color: var(--text);
  max-width: 88ch;
}
.rec figcaption {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.rec .dot { margin-inline: 0.6rem; color: var(--accent); }

/* Fifth service card fills the row. */
.svc-wide { grid-column: 1 / -1; }
.svc-wide p { max-width: 68ch; }

/* ============================================================ experience */

.timeline { position: relative; display: grid; gap: clamp(1.6rem, 3vw, 2.6rem); padding-left: 0; }

.tl-track {
  position: absolute;
  left: clamp(88px, 11vw, 172px);
  top: 0.6rem;
  bottom: 0.6rem;
  width: 1px;
  background: var(--line);
}
.tl-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transform-origin: 50% 0;
  transform: scaleY(var(--tp, 0));
  box-shadow: 0 0 12px var(--glow);
}

.job {
  position: relative;
  display: grid;
  grid-template-columns: clamp(88px, 11vw, 172px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.job-when span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-3);
  padding-top: 0.28rem;
  display: block;
}
.job-node {
  position: absolute;
  left: clamp(88px, 11vw, 172px);
  top: 0.62rem;
  width: 9px;
  height: 9px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--line-2);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.job.in .job-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px var(--glow); }

.job-what { padding-left: clamp(1rem, 2vw, 1.6rem); }
.job-what h3 { font-size: clamp(1.1rem, 1.9vw, 1.35rem); letter-spacing: -0.022em; }
.job-org { margin: 0.25rem 0 0.85rem; color: var(--text-2); font-size: 0.92rem; }
.job-org .dot { margin-inline: 0.5rem; color: var(--text-3); }
.job-place { color: var(--text-3); }
.job-what ul { display: grid; gap: 0.45rem; }
.job-what ul li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-2);
  font-size: 0.93rem;
}
.job-what ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 1px;
  background: var(--accent);
}

.volunteer {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding: clamp(1.3rem, 2.4vw, 1.8rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.volunteer .kicker { margin-bottom: 0.5rem; }

@media (max-width: 720px) {
  .tl-track { left: 4px; }
  .job { grid-template-columns: 1fr; gap: 0.4rem; }
  .job-node { left: 4px; top: 0.45rem; }
  .job-when { padding-left: 1.6rem; }
  .job-what { padding-left: 1.6rem; }
}

/* =========================================================== credentials */

.creds-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
@media (max-width: 900px) { .creds-grid { grid-template-columns: 1fr; } }

.cert-list, .edu-list { display: grid; gap: 0.8rem; }
@media (min-width: 901px) {
  .creds-grid > div:last-child { position: sticky; top: 6.5rem; align-self: start; }
}

.cert, .edu {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.35s var(--ease);
}
.cert:hover, .edu:hover { border-color: var(--line-2); transform: translateX(3px); }

.cert-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.cert-year, .edu-when {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.cert-verify {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.25s;
}
.cert-verify svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cert-verify:hover { color: var(--accent); }

.cert h3, .edu h3 { font-size: 1rem; letter-spacing: -0.015em; line-height: 1.3; }
.cert-issuer, .edu-school { font-size: 0.84rem; color: var(--text-2); margin-top: 0.2rem; }
.cert-desc { font-size: 0.84rem; color: var(--text-3); margin-top: 0.5rem; line-height: 1.5; }
.cert-ref {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.edu-when { display: block; margin-bottom: 0.45rem; }
.thesis {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-2);
  font-style: italic;
}
.thesis span {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}

/* ============================================================= languages */

.lang-list { display: grid; gap: 0.15rem; max-width: 820px; }
.lang-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.62fr) minmax(0, 1.7fr) minmax(168px, 0.78fr);
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.lang-name { font-weight: 560; letter-spacing: -0.012em; }
.lang-bar { height: 3px; border-radius: 100px; background: var(--surface-2); overflow: hidden; }
.lang-bar i {
  display: block;
  height: 100%;
  width: var(--p);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease);
}
.lang-row.in .lang-bar i { transform: scaleX(1); }
.lang-lvl { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; color: var(--text-3); text-align: right; }

@media (max-width: 620px) {
  .lang-row { grid-template-columns: 1fr auto; gap: 0.4rem 1rem; }
  .lang-bar { grid-column: 1 / -1; order: 3; }
  .lang-lvl { text-align: right; }
}

/* =============================================================== contact */

.contact { padding-bottom: clamp(4rem, 8vw, 7rem); }

.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 55%),
    var(--surface);
  overflow: hidden;
}
.contact-card::after {
  content: '';
  position: absolute;
  right: -12%;
  bottom: -55%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
}
.contact-copy .sec-title { margin-top: 0; }
.contact-copy .sec-lead { margin-bottom: 2rem; }

.contact-list { display: grid; gap: 1.35rem; align-content: start; position: relative; }
.contact-list dt {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.3rem;
}
.contact-list dd { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 0.98rem; }
.contact-list a { border-bottom: 1px solid transparent; transition: border-color 0.25s, color 0.25s; }
.contact-list a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.copy {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text-3);
  transition: color 0.25s, border-color 0.25s;
  position: relative;
}
.copy svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.copy:hover { color: var(--accent); border-color: var(--accent); }
.copy.is-done::after {
  content: attr(data-copied);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translateX(-50%);
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }

/* ================================================================ footer */

.site-foot { position: relative; padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; border-top: 1px solid var(--line); }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.foot-mark { width: 30px; margin-bottom: 0.9rem; color: var(--text-2); }
.foot-brand p { font-size: 0.9rem; }
.foot-brand .dim { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 0.2rem; }
.foot-langs, .foot-contact { display: grid; gap: 0.35rem; align-content: start; }
.foot-langs .kicker, .foot-contact .kicker { margin-bottom: 0.5rem; color: var(--text-3); }
.foot-langs a, .foot-contact a { font-size: 0.88rem; color: var(--text-2); width: fit-content; border-bottom: 1px solid transparent; transition: color 0.25s, border-color 0.25s; }
.foot-langs a:hover, .foot-contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.foot-langs a[aria-current] { color: var(--text); }
.foot-legal { grid-column: 1 / -1; padding-top: 1.6rem; margin-top: 0.6rem; border-top: 1px solid var(--line); font-size: 0.8rem; }

@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

.to-top {
  position: absolute;
  right: var(--gut);
  bottom: 2rem;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-2);
  transition: transform 0.3s var(--ease), color 0.25s, border-color 0.25s;
}
.to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { transform: translateY(-3px); color: var(--accent); border-color: var(--accent); }

/* ============================================================== reveals */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.75s var(--ease) calc(var(--d, 0) * 85ms),
    transform 0.75s var(--ease) calc(var(--d, 0) * 85ms);
}
.reveal.in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

.sec-title .w i {
  transform: translateY(102%);
  transition: transform 0.8s var(--ease) calc(var(--wi, 0) * 40ms);
}
.reveal.in .w i, .sec-title.in .w i { transform: none; }
html:not(.js) .sec-title .w i,
html:not(.js) .hero-role .w i { transform: none; animation: none; }

/* ======================================================= reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .mobile-nav li { opacity: 1; transform: none; animation: none; }
  .hero-name .line-in, .hero-role .w i, .sec-title .w i { transform: none; }
  .intro { display: none; }
  .orb { animation: none; }
}
