/* === Tokens === */
:root {
  --bg: oklch(0.14 0.008 250);
  --bg-2: oklch(0.18 0.012 250);
  --bg-3: oklch(0.22 0.014 250);
  --fg: oklch(0.96 0.005 80);
  --fg-2: oklch(0.78 0.008 80);
  --fg-3: oklch(0.55 0.01 80);
  --line: oklch(0.32 0.012 250 / 0.6);
  --line-2: oklch(0.32 0.012 250 / 0.25);
  --accent: oklch(0.82 0.13 78);
  --accent-2: oklch(0.82 0.13 78);
  --halo-a: oklch(0.55 0.14 80 / 0.35);
  --halo-b: oklch(0.4 0.1 260 / 0.25);

  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --density: 1;
  --radius: 14px;
  --maxw: 1240px;
  --nav-h: 64px;
  --status-h: 38px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
}

body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}

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

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

.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 calc(32px * var(--density));
}

/* === Top nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--line-2);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 calc(32px * var(--density));
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: var(--bg);
  font-weight: 700;
  font-family: var(--sans);
  font-size: 12px;
}
.brand-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
.nav-links {
  display: flex; gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
}
.nav-links button {
  background: none; border: 0;
  color: var(--fg-3);
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: color .2s, background .2s;
  letter-spacing: 0.02em;
}
.nav-links button:hover { color: var(--fg); background: var(--bg-2); }
.nav-links button[aria-current="true"] { color: var(--fg); }
.nav-links button[aria-current="true"]::before {
  content: "\2192 ";
  color: var(--accent);
}
.nav-cta {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--fg);
  transition: all .2s;
  display: inline-block;
}
.nav-cta:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* === Status bar === */
.status-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  z-index: 49;
  height: var(--status-h);
  background: color-mix(in oklab, var(--bg-2) 85%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line-2);
}
.status-bar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 calc(32px * var(--density));
  height: 100%;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  display: flex; gap: 14px; align-items: center;
  white-space: nowrap;
  overflow: hidden;
}
.status-bar-inner > * { flex-shrink: 0; white-space: nowrap; }
.status-bar-inner .live {
  color: var(--fg-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.status-bar-inner .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.16 145);
  box-shadow: 0 0 8px oklch(0.78 0.16 145);
  animation: pulse 1.6s ease-in-out infinite;
}

.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
}
.lang-btn {
  background: none; border: 0; color: var(--fg-3);
  font: inherit; cursor: pointer;
  padding: 2px 4px; border-radius: 4px;
  transition: color .2s, background .2s;
  letter-spacing: inherit;
}
.lang-btn:hover { color: var(--fg); }
.lang-btn.active { color: var(--fg); background: var(--bg-3); }

/* === Page transitions === */
.page {
  display: none;
  padding-top: calc(var(--nav-h) + var(--status-h) + 32px);
  animation: page-in .5s cubic-bezier(.2,.7,.2,1);
}
.page.active { display: block; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Section header === */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 5.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 18px 0 0;
  text-wrap: pretty;
}
.section-title em {
  font-style: italic;
  color: var(--fg-2);
}

/* === Hero === */
.hero {
  position: relative;
  min-height: calc(94vh - var(--nav-h) - var(--status-h));
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(40px * var(--density)) 0 calc(48px * var(--density));
}
.hero-inner {
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  position: relative; z-index: 1;
}
.hero-halo {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 90%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(50% 50% at 25% 30%, var(--halo-a), transparent 70%),
    radial-gradient(45% 45% at 80% 60%, var(--halo-b), transparent 70%);
  filter: blur(40px);
  opacity: 0.85;
}

.hero-illo {
  position: relative;
  margin: 0 auto !important;
  max-width: 480px;
  width: 100%;
  display: block;
  text-align: center;
}
.hero-illo img {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: auto;
  filter: invert(0.92) sepia(0.35) saturate(0.5) hue-rotate(-20deg) brightness(1.05) contrast(0.92);
  mix-blend-mode: screen;
  opacity: 0.92;
}
.hero-illo::after {
  content: "";
  position: absolute;
  inset: -5%;
  background: radial-gradient(45% 55% at 50% 60%, var(--halo-a), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  opacity: 0.6;
  pointer-events: none;
}
@media (max-width: 700px) { .hero-illo { max-width: 92%; } }

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin: 28px 0 0;
  text-align: center;
  text-wrap: balance;
}
.hero-name .first {
  display: block;
  color: var(--fg-2);
  font-style: italic;
  font-size: 0.7em;
  letter-spacing: -0.025em;
}
.hero-name .last {
  display: block;
  color: var(--fg);
  margin-top: -0.05em;
}

.hero-blurb {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--fg-2);
  max-width: 720px;
  text-wrap: pretty;
  letter-spacing: -0.005em;
  text-align: center;
  margin: 36px auto 0;
}
.hero-blurb .accent { color: var(--accent); font-style: italic; }

.hero-role {
  margin-top: 44px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.6;
  width: 100%;
  max-width: 640px;
  text-align: left;
}
.hero-role b { color: var(--fg); font-weight: 500; }
.hero-role .row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-2);
  align-items: baseline;
}
.hero-role .row:last-child { border: 0; }
.hero-role .k { color: var(--fg-3); }

.hero-cta-row {
  margin-top: 48px;
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  transition: all .2s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--fg); color: var(--bg); border-color: var(--fg);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-text {
  background: none;
  border: 0;
  color: var(--fg-3);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  padding: 14px 8px;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: color .2s, text-decoration-color .2s;
}
.btn-text:hover { color: var(--fg); text-decoration-color: var(--accent); }

.hero-marquee {
  margin-top: 80px;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  overflow: hidden;
  position: relative;
}
.hero-marquee-track {
  display: flex; gap: 56px;
  padding: 18px 0;
  width: max-content;
  animation: marq 40s linear infinite;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.hero-marquee-track span {
  display: inline-flex; align-items: center; gap: 18px; white-space: nowrap;
}
.hero-marquee-track span::after {
  content: "\2726";
  color: var(--accent);
  font-size: 10px;
}
@keyframes marq { to { transform: translateX(-50%); } }

/* === Stats strip === */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-2);
  border-bottom: 1px solid var(--line-2);
  margin: calc(80px * var(--density)) 0;
}
.stat {
  padding: calc(36px * var(--density)) 28px;
  border-right: 1px solid var(--line-2);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(40px, 4vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.stat-num em { color: var(--accent); font-style: normal; }
.stat-label {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
}
@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}

/* === Pull quote === */
.pull {
  margin: calc(96px * var(--density)) 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 22ch;
  color: var(--fg);
}
.pull em { color: var(--accent); font-style: italic; }

/* === About === */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  margin-top: calc(64px * var(--density));
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }
.about-prose p {
  font-family: var(--serif);
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.5;
  color: var(--fg-2);
  margin: 0 0 24px;
  text-wrap: pretty;
}
.about-prose p strong { color: var(--fg); font-weight: 500; }
.about-side {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--fg-2);
  border-left: 1px solid var(--line);
  padding-left: 28px;
}
.about-side h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 14px;
  font-weight: 500;
}
.about-side ul { list-style: none; padding: 0; margin: 0 0 32px; }
.about-side li {
  padding: 8px 0;
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 24px;
  border-bottom: 1px dashed var(--line-2);
  align-items: baseline;
}
.about-side li:last-child { border: 0; }
.about-side li > :first-child { color: var(--fg-3); }
.about-side li .v { color: var(--fg); text-align: right; text-wrap: pretty; }

.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  white-space: nowrap;
  transition: all .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

.europe-illo {
  margin: 28px 0 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 20px 16px;
  background: linear-gradient(180deg, var(--bg-2), transparent);
}
.europe-illo img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(0.92) sepia(0.18) saturate(0.5) hue-rotate(-20deg) brightness(1.02) contrast(0.92);
  mix-blend-mode: screen;
  opacity: 0.85;
}
.europe-illo .cap {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: center;
}

/* === Work === */
.work-list {
  margin-top: calc(48px * var(--density));
  border-top: 1px solid var(--line);
}
.work-item {
  display: grid;
  grid-template-columns: 60px 1.2fr 2fr auto;
  gap: 32px;
  padding: calc(32px * var(--density)) 8px;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: pointer;
  transition: background .3s, padding .3s;
  align-items: baseline;
}
.work-item:hover {
  background: var(--bg-2);
  padding-left: 24px;
}
.work-item .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}
.work-item h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.work-item p {
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--fg-2);
  margin: 0;
  line-height: 1.55;
  max-width: 56ch;
}
.work-item .arrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  transition: transform .3s, color .3s;
}
.work-item:hover .arrow { transform: translateX(6px); color: var(--accent); }
.work-item .tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 10px;
}
.work-item .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.work-item .tag::before { content: "\25CF "; color: var(--accent); font-size: 8px; }
@media (max-width: 820px) {
  .work-item { grid-template-columns: 40px 1fr; }
  .work-item p, .work-item .arrow { grid-column: 2; }
}

/* === Resume === */
.resume {
  margin-top: calc(48px * var(--density));
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 64px;
}
@media (max-width: 820px) { .resume { grid-template-columns: 1fr; gap: 24px; } }
.resume-side {
  position: sticky; top: 100px;
  align-self: start;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
}
.resume-entry {
  padding: 28px 0 28px 32px;
  border-left: 1px solid var(--line);
  position: relative;
  margin-left: -1px;
}
.resume-entry::before {
  content: "";
  position: absolute;
  left: -5px; top: 36px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
}
.resume-entry:hover::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.resume-entry .when {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fg-3);
}
.resume-entry h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  margin: 8px 0 4px;
  letter-spacing: -0.01em;
}
.resume-entry .org {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.resume-entry p {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--fg-2);
  margin: 14px 0 0;
  line-height: 1.55;
  max-width: 64ch;
}
.resume-entry ul { margin: 14px 0 0; padding-left: 0; list-style: none; max-width: 64ch; }
.resume-entry li {
  padding: 4px 0 4px 18px;
  font-size: 14px;
  color: var(--fg-2);
  position: relative;
}
.resume-entry li::before {
  content: "\2192";
  position: absolute; left: 0;
  color: var(--accent);
  font-family: var(--mono);
}

/* === Contact === */
.contact {
  margin: calc(48px * var(--density)) 0 calc(96px * var(--density));
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
  align-items: start;
}
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; gap: 40px; } }
.contact-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.contact-h em { color: var(--accent); font-style: italic; }
.contact-sub {
  margin-top: 28px;
  font-size: 16px;
  color: var(--fg-2);
  max-width: 44ch;
  line-height: 1.6;
}
.contact-primary {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 6px 24px;
  margin-top: 36px;
  padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 8%, transparent),
    transparent 60%);
  text-decoration: none;
  color: var(--fg);
  transition: border-color .25s, transform .25s, background .25s;
}
.contact-primary:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 14%, transparent),
    transparent 60%);
}
.contact-primary-label {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.contact-primary-handle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-3);
  grid-column: 1;
}
.contact-primary-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 32px;
  color: var(--accent);
  align-self: center;
  transition: transform .25s;
}
.contact-primary:hover .contact-primary-arrow { transform: translate(4px, -4px); }
.contact-links { border-top: 1px solid var(--line); }
.contact-links-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.contact-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 14px;
  transition: padding .25s, color .25s;
}
.contact-link:hover { padding-left: 18px; color: var(--accent); }
.contact-link .label { color: var(--fg-3); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.contact-link .v { color: var(--fg); display: flex; align-items: center; gap: 12px; }

/* === Footer === */
.footer {
  border-top: 1px solid var(--line-2);
  padding: 32px 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-3);
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: 0.04em;
  flex-wrap: wrap; gap: 16px;
}
.footer .cc { display: inline-flex; align-items: center; gap: 8px; }

.section { padding-block: calc(80px * var(--density)) calc(64px * var(--density)); }

.ulink {
  position: relative;
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.ulink:hover { color: var(--accent); border-color: var(--accent); }

/* === Mobile === */
@media (max-width: 700px) {
  .nav-inner { justify-content: center; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .status-bar-inner { font-size: 10px; gap: 8px; }
  .status-bar-inner span:last-child { display: none; }
  .hero-role .row { grid-template-columns: 80px 1fr; gap: 8px; font-size: 12px; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .hero-cta-row .btn, .hero-cta-row .btn-text { text-align: center; justify-content: center; }
  .about-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .resume-side { position: static; }
}
