/* ==========================================================================
   Tokens — "Tech blue": deep navy, electric-blue accent, Space Grotesk + Inter
   ========================================================================== */
:root {
  --bg: #f6f8f9;
  --bg-2: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --ink: #1f2433;
  --ink-2: #3a4154;
  --muted: #667085;
  --line: rgba(31, 36, 51, 0.09);
  --line-strong: rgba(31, 36, 51, 0.18);
  --accent: #0e7c90;
  --accent-2: #3aa6b9;
  --accent-soft: rgba(14, 124, 144, 0.1);
  --on-accent: #ffffff;
  --glow: rgba(14, 124, 144, 0.07);
  --plate: #e2eff1;
  --sq-light: #e4eef0;
  --sq-dark: #6f9aa3;
  --chess-bg: #1e272e;
  --chess-ink: #e4e7ee;
  --chess-muted: #a3a9ba;
  --chess-accent: #7fd0de;
  --shadow: 0 1px 2px rgba(31, 36, 51, 0.04), 0 16px 40px -22px rgba(31, 36, 51, 0.22);

  --display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a2027;
    --bg-2: #1e252d;
    --surface: #212931;
    --surface-2: #28313a;
    --ink: #e4e7ee;
    --ink-2: #c4c9d6;
    --muted: #9299ab;
    --line: rgba(228, 231, 238, 0.08);
    --line-strong: rgba(228, 231, 238, 0.16);
    --accent: #63c6d6;
    --accent-2: #9adbe6;
    --accent-soft: rgba(99, 198, 214, 0.12);
    --on-accent: #0f1d22;
    --glow: rgba(99, 198, 214, 0.06);
    --plate: #24333c;
    --chess-bg: #151b21;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 20px 44px -24px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a2027;
  --bg-2: #1e252d;
  --surface: #212931;
  --surface-2: #28313a;
  --ink: #e4e7ee;
  --ink-2: #c4c9d6;
  --muted: #9299ab;
  --line: rgba(228, 231, 238, 0.08);
  --line-strong: rgba(228, 231, 238, 0.16);
  --accent: #63c6d6;
  --accent-2: #9adbe6;
  --accent-soft: rgba(99, 198, 214, 0.12);
  --on-accent: #0f1d22;
  --glow: rgba(99, 198, 214, 0.06);
  --plate: #24333c;
  --chess-bg: #151b21;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 20px 44px -24px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.mono-label, .eyebrow, .section__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: 14px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -14px var(--accent); }
.btn--accent:hover { box-shadow: 0 12px 28px -14px var(--accent); }
.btn--accent:disabled { opacity: .6; cursor: progress; transform: none; }
.btn--ink { background: var(--ink); color: var(--bg); }
.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { padding: 10px 18px; font-size: 14px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--wrap); margin-inline: auto; padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand__mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #14a0b5, #0a5868); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.03em;
}
.nav__links { display: flex; gap: 2px; margin-left: auto; }
.nav__links a {
  padding: 8px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: var(--surface-2); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__burger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav__burger span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .3s; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 960px) {
  .brand__name { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__links {
    position: fixed; inset: 68px 12px auto 12px; flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease);
  }
  .nav__links.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__actions { margin-left: auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding-top: 140px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -25% -15% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 55% 50% at 75% 40%, #000 5%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 55% 50% at 75% 40%, #000 5%, transparent 75%);
}
.hero__inner {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: clamp(36px, 7vw, 100px); align-items: center;
  padding-bottom: 88px;
}

.hello {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; font-weight: 600; letter-spacing: .42em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.hello::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--line-strong); }
.hero__name {
  font-size: clamp(44px, 6.6vw, 84px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em;
}
.hero__name em { color: var(--accent); }
.hero__dot { color: var(--accent); }
.hero__role {
  margin-top: 16px; font-family: var(--display); font-weight: 600; font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-2); letter-spacing: -0.01em;
}
.hero__tagline {
  margin-top: 26px; font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.02em; max-width: 24ch; text-wrap: balance;
}
.hero__tagline em { color: var(--accent); }
.hero__intro { margin-top: 18px; max-width: 60ch; color: var(--muted); font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.75; }

.invite {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 28px;
  padding: 10px 14px 10px 14px; border-radius: 14px;
  background: var(--accent-soft); color: var(--ink);
  font-size: 14.5px; font-weight: 500; line-height: 1.45;
  transition: background-color .25s, transform .25s var(--ease);
}
.invite:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.invite__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #3ccf8e; box-shadow: 0 0 0 4px rgba(60, 207, 142, .18); }
.invite.is-busy .invite__dot { background: var(--muted); box-shadow: none; }
.invite__arrow { color: var(--accent); font-weight: 700; transition: transform .25s var(--ease); }
.invite:hover .invite__arrow { transform: translateX(3px); }

.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn__icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }

.socials { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; }
.socials a {
  font-size: 14px; font-weight: 500; color: var(--muted);
  border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.socials a:hover { color: var(--ink); border-color: var(--accent); }

/* Portrait in an offset outline frame with a dot grid */
.hero__card { position: relative; justify-self: end; width: min(100%, 410px); }
.hero__frame { position: relative; padding: 0 22px 22px 0; }
.hero__frame::before {
  content: ""; position: absolute; inset: 22px 0 0 22px; border-radius: 26px;
  border: 2px solid var(--accent); opacity: .5;
}
.hero__frame::after {
  content: ""; position: absolute; left: -20px; top: -20px; width: 120px; height: 120px;
  background-image: radial-gradient(var(--accent) 1.6px, transparent 1.9px); background-size: 14px 14px; opacity: .4;
}
.portrait {
  position: relative; z-index: 1; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--plate)), var(--plate) 65%);
  box-shadow: var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait__mono {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; letter-spacing: -0.05em;
  font-size: clamp(76px, 10vw, 136px); color: var(--accent);
}
.hero__meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  margin-top: 6px; padding: 0 22px 0 0; font-size: 14px; color: var(--ink-2);
}
.hero__loc { display: inline-flex; align-items: center; gap: 6px; }
.hero__loc svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.afm-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; white-space: nowrap;
}
.afm-chip b { color: var(--accent); }
.afm-chip__icon { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }

@media (max-width: 860px) {
  .hero { padding-top: 112px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__card { justify-self: start; width: min(100%, 360px); }
}

/* Marquee */
.marquee {
  position: relative; border-block: 1px solid var(--line); padding: 20px 0; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 55s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-family: var(--display); font-weight: 500; font-size: clamp(18px, 2vw, 24px); letter-spacing: -0.02em;
  padding-inline: 20px; display: inline-flex; align-items: center; gap: 40px; white-space: nowrap; color: var(--ink-2);
}
.marquee__track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Stats — open layout, no boxes
   ========================================================================== */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin-block: clamp(56px, 8vw, 96px);
}
.stat { border-top: 2px solid var(--line); padding-top: 22px; position: relative; }
.stat::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--accent); }
.stat__value { font-family: var(--display); font-weight: 700; font-size: clamp(42px, 4.6vw, 60px); line-height: 1; letter-spacing: -0.03em; }
.stat__value b { color: var(--accent); font-weight: 600; }
.stat__label { margin-top: 10px; font-size: 14.5px; color: var(--muted); max-width: 24ch; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding-block: clamp(56px, 8vw, 110px); }
.section__head { margin-bottom: clamp(32px, 5vw, 56px); display: grid; gap: 16px; }
.section__head--row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section__head--row > div:first-child { display: grid; gap: 16px; flex: 1 1 380px; }
.section__num { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.section__num::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.section__title {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.05; letter-spacing: -0.025em; max-width: 20ch; text-wrap: balance;
}
.section__title em {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__lede { color: var(--muted); max-width: 52ch; }

/* About */
.about__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px 48px; }
.about__body p { color: var(--ink-2); font-size: 17px; }

/* Services — numbered rows instead of boxed cards */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; border-top: 1px solid var(--line); }
.service {
  position: relative; padding: 30px 0 32px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 48px 1fr; column-gap: 8px;
}
.service > * { grid-column: 2; }
.service__idx { grid-column: 1; grid-row: 1 / span 3; font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 6px; }
.service h3 { font-size: 24px; line-height: 1.2; margin-bottom: 10px; transition: color .2s; }
.service:hover h3 { color: var(--accent); }
.service p { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
  font-family: var(--mono); font-size: 11.5px; padding: 5px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink-2);
}
@media (max-width: 760px) { .services { grid-template-columns: 1fr; } }

/* Work */
.filters { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 0 auto; max-width: 100%; }
.filter {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  font-size: 14px; font-weight: 500; cursor: pointer; color: var(--muted); transition: all .2s;
}
.filter:hover { color: var(--ink); border-color: var(--line-strong); }
.filter[aria-selected="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

.projects { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.project {
  grid-column: span 2; display: flex; flex-direction: column;
  border-radius: var(--radius); background: transparent; border: 0;
  overflow: visible; cursor: pointer; text-align: left; padding: 0;
  transition: transform .4s var(--ease);
}
.project--featured { grid-column: span 3; }
.project:hover { transform: translateY(-6px); }
.project.is-hidden { display: none; }
.project__cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius); background: #262d40; box-shadow: var(--shadow); }
.project--featured .project__cover { aspect-ratio: 16 / 9; }
.project__cover img, .project__cover svg { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.project:hover .project__cover svg, .project:hover .project__cover img { transform: scale(1.04); }
.project__cover-label { display: none; }
.project__badge {
  position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0b1020;
}
.project__body { padding: 18px 4px 6px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.project__meta { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.project__title { font-size: 22px; line-height: 1.2; }
.project__summary { color: var(--muted); font-size: 15px; }
.project__more { margin-top: auto; padding-top: 4px; font-weight: 600; font-size: 14px; color: var(--accent); display: inline-flex; gap: 6px; }
.project__outcome { font-size: 14px; font-weight: 500; color: var(--ink-2); padding-left: 12px; border-left: 2px solid var(--accent); }
@media (max-width: 960px) { .project, .project--featured { grid-column: span 3; } }
@media (max-width: 640px) { .projects { grid-template-columns: 1fr; } .project, .project--featured { grid-column: auto; } }

/* Modal */
.modal {
  width: min(860px, calc(100% - 24px)); max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--line); border-radius: 22px;
  background: var(--surface); color: var(--ink); box-shadow: 0 40px 120px -20px rgba(0,0,0,.5);
}
.modal::backdrop { background: rgba(5, 8, 18, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .35s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal__inner { position: relative; }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; background: var(--surface); }
.case__cover { aspect-ratio: 21 / 8; background: #262d40; overflow: hidden; }
.case__cover svg, .case__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case { padding: clamp(22px, 4vw, 40px); display: grid; gap: 26px; }
.case h2 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.05; letter-spacing: -0.025em; }
.case__lede { color: var(--muted); font-size: 17.5px; }
.case__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.case__block h3 { font-family: var(--mono); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: 8px; }
.case__block p { color: var(--ink-2); }
.case__list { display: grid; gap: 8px; }
.case__list li { position: relative; padding-left: 20px; color: var(--ink-2); }
.case__list li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.case__outcomes { display: flex; flex-wrap: wrap; gap: 10px; }
.case__outcomes li { padding: 12px 16px; border-radius: 12px; background: var(--accent-soft); font-weight: 600; }
.case__links { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) { .case__grid { grid-template-columns: 1fr; } }

/* Experience */
.timeline { border-top: 1px solid var(--line); }
.job {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 24px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
}
.job__period { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 6px; }
.job__role { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; }
.job__company { margin-top: 6px; font-weight: 600; color: var(--accent); }
.job__company span { color: var(--muted); font-weight: 400; }
.job__summary { margin-top: 12px; color: var(--muted); max-width: 64ch; }
.job__bullets { margin-top: 14px; display: grid; gap: 8px; max-width: 70ch; }
.job__bullets li { position: relative; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.job__bullets li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.job__current { align-self: start; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) { .job { grid-template-columns: 1fr; gap: 8px; } .job__current { justify-self: start; order: -1; } }
.education { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 40px; margin-top: 36px; }
.edu { padding-left: 16px; border-left: 2px solid var(--accent); }
.edu b { display: block; font-weight: 600; }
.edu span { color: var(--muted); font-size: 14px; }

/* Certifications — clean list */
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 40px; border-top: 1px solid var(--line); }
.cert { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cert__icon {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--muted);
}
.cert--hl .cert__icon { background: var(--accent); color: var(--on-accent); }
.cert b { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.cert span { color: var(--muted); font-size: 13px; }

/* ==========================================================================
   Chess
   ========================================================================== */
.chess {
  background: var(--chess-bg); color: var(--chess-ink);
  padding-block: clamp(72px, 10vw, 130px); margin-block: clamp(40px, 6vw, 80px);
  position: relative; overflow: hidden;
}
.chess::before {
  content: ""; position: absolute; left: -10%; bottom: -40%; width: 70%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(99, 198, 214, .1), transparent 70%);
}
.chess__inner { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 500px); gap: clamp(36px, 6vw, 90px); align-items: center; }
.section__num--light { color: var(--chess-accent); margin-bottom: 26px; }
.afm-badge {
  display: inline-flex; align-items: stretch; border-radius: 999px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16); margin-bottom: 26px; font-size: 14px;
}
.afm-badge__abbr { background: var(--chess-accent); color: #0f1d22; padding: 8px 14px; font-family: var(--mono); font-weight: 500; letter-spacing: .08em; }
.afm-badge__title { padding: 8px 16px; font-weight: 600; }
.chess__tagline { font-size: clamp(32px, 4.4vw, 54px); line-height: 1.05; letter-spacing: -0.025em; text-wrap: balance; }
.chess__blurb { margin-top: 20px; color: var(--chess-muted); max-width: 54ch; }
.chess__lessons { margin-top: 32px; display: grid; border-top: 1px solid rgba(255,255,255,.1); }
.chess__lessons li { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.chess__lessons b { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--chess-accent); padding-top: 3px; }
.chess__ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px 24px; margin-top: 30px; }
.chess__ratings:empty { display: none; }
.rating { border-top: 2px solid rgba(255,255,255,.12); padding-top: 12px; position: relative; }
.rating::before { content: ""; position: absolute; top: -2px; left: 0; width: 28px; height: 2px; background: var(--chess-accent); }
.rating small { display: block; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--chess-muted); }
.rating b { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -0.03em; }
.chess__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chess__links .btn--ghost { border-color: rgba(255,255,255,.22); color: var(--chess-ink); }
.chess__links .btn--ghost:hover { border-color: var(--chess-accent); color: var(--chess-accent); }

.board-wrap { margin: 0; }
.board {
  display: grid; grid-template-columns: repeat(8, 1fr); aspect-ratio: 1;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
}
.sq { position: relative; display: grid; place-items: center; background: var(--sq-light); container-type: inline-size; }
.sq.dark { background: var(--sq-dark); }
.sq .pc { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", "Apple Symbols", serif; font-variant-emoji: text; font-size: 92cqi; line-height: 1; user-select: none; transition: transform .25s var(--ease); }
.sq .pc.w { color: #fff; text-shadow: 0 0 1px #000, 0 0 1px #000, 0 2px 3px rgba(0,0,0,.45); -webkit-text-stroke: .6px #0b1020; }
.sq .pc.b { color: #0b1020; text-shadow: 0 2px 3px rgba(0,0,0,.25); }
.sq:hover .pc { transform: translateY(-6%) scale(1.06); }
.sq .coord { position: absolute; font-family: var(--mono); font-size: 18cqi; opacity: .75; }
.sq .coord.file { right: 6%; bottom: 2%; }
.sq .coord.rank { left: 6%; top: 2%; }
.sq.dark .coord { color: var(--sq-light); }
.sq:not(.dark) .coord { color: var(--sq-dark); }
.board-wrap figcaption { margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--chess-muted); text-align: center; }
@media (max-width: 900px) { .chess__inner { grid-template-columns: 1fr; } .board-wrap { max-width: 460px; } }
@media (max-width: 480px) { .chess__lessons li { grid-template-columns: 1fr; gap: 4px; } }

/* ==========================================================================
   Writing & video
   ========================================================================== */
.posts { border-top: 1px solid var(--line); }
.post a {
  display: grid; grid-template-columns: 130px 1fr auto; gap: 24px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line); transition: padding .35s var(--ease);
}
.post a:hover { padding-left: 12px; }
.post a:hover h3 { color: var(--accent); }
.post time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.post h3 { font-size: clamp(19px, 2vw, 24px); line-height: 1.25; transition: color .2s; }
.post p { color: var(--muted); margin-top: 6px; font-size: 15px; }
.post__arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  transition: background-color .25s, color .25s, transform .35s var(--ease), border-color .25s;
}
.post a:hover .post__arrow { background: var(--accent); color: var(--on-accent); border-color: var(--accent); transform: rotate(-45deg); }
@media (max-width: 640px) { .post a { grid-template-columns: 1fr auto; gap: 6px 16px; } .post time { grid-column: 1 / -1; } }

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 22px; }
.video__frame { position: relative; aspect-ratio: 16 / 9; background: #262d40; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__facade {
  position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0; width: 100%;
  background: radial-gradient(circle at 30% 20%, rgba(99,198,214,.3), transparent 55%), linear-gradient(135deg, #24353e, #192027);
  color: #fff;
}
.video__facade span {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--chess-accent); color: #0f1d22; font-size: 24px; padding-left: 5px; transition: transform .3s var(--ease);
  box-shadow: 0 10px 30px -12px var(--chess-accent);
}
.video__facade:hover span { transform: scale(1.08); }
.video__facade small { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; opacity: .7; }
.video__body { padding: 16px 4px; }
.video__body h3 { font-size: 19px; }
.video__body p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* Speaking & community */
.talk-stats { display: flex; gap: 32px; }
.talk-stats div { display: grid; }
.talk-stats b { font-family: var(--display); font-size: clamp(36px, 4vw, 48px); font-weight: 800; line-height: 1; color: var(--accent); letter-spacing: -0.03em; }
.talk-stats span { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.talks { border-top: 1px solid var(--line); }
.talk__row {
  display: grid; grid-template-columns: 170px 1fr 32px; gap: 24px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding .3s var(--ease);
}
a.talk__row:hover { padding-left: 10px; }
a.talk__row:hover h3 { color: var(--accent); }
.talk__when time { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding-top: 3px; }
.talk__type {
  display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600;
}
.talk__what h3 { font-size: 19px; line-height: 1.3; transition: color .2s; }
.talk__event { margin-top: 5px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.talk__event span { font-weight: 400; color: var(--muted); }
.talk__detail { margin-top: 6px; font-size: 14.5px; color: var(--muted); max-width: 70ch; }
.talk__arrow { color: var(--accent); font-size: 18px; justify-self: end; padding-top: 2px; }
@media (max-width: 700px) {
  .talk__row { grid-template-columns: 1fr 24px; gap: 8px 12px; }
  .talk__when { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
  .talk__type { margin-top: 0; }
}

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px 40px; }
.quote { margin: 0; border-left: 2px solid var(--accent); padding-left: 22px; }
.quote blockquote { margin: 0; font-family: var(--display); font-weight: 500; font-size: 21px; line-height: 1.4; letter-spacing: -0.015em; }
.quote figcaption { margin-top: 16px; font-size: 14px; }
.quote figcaption span { color: var(--muted); }

/* ==========================================================================
   Contact — photo + form
   ========================================================================== */
.contact { padding-block: clamp(80px, 11vw, 140px); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.contact::before {
  content: ""; position: absolute; right: -15%; top: -20%; width: 60%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.contact__grid { position: relative; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 7vw, 100px); align-items: center; }
.contact__visual { position: relative; padding: 0 0 36px 36px; }
.contact__photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--plate)), var(--plate) 65%);
}
.contact__photo img { width: 100%; height: 100%; object-fit: cover; }
.contact__photo .portrait__mono { font-size: clamp(64px, 8vw, 110px); }
.contact__badge {
  position: absolute; left: 0; bottom: 0; width: 112px; height: 112px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 18px 40px -16px var(--accent);
  animation: wave 2.6s ease-in-out infinite;
}
.contact__badge svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(-12deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-6deg); } }

.contact__body .section__num { margin-bottom: 18px; }
.contact__title { font-size: clamp(36px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.contact__text { color: var(--muted); max-width: 54ch; margin-top: 18px; font-size: 17px; }

.cf { margin-top: 34px; display: grid; gap: 18px; }
.cf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cf__field { display: grid; gap: 8px; }
.cf__field > span { font-size: 14px; font-weight: 600; color: var(--accent); }
.cf__field input, .cf__field select, .cf__field textarea {
  width: 100%; padding: 14px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.cf__field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.cf__field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d98b6' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.cf__field select:invalid { color: var(--muted); }
.cf__field ::placeholder { color: var(--muted); opacity: .8; }
.cf__field input:focus, .cf__field select:focus, .cf__field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
}
.cf__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cf__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.cf__actions .btn { min-width: 180px; }
.cf-status { font-size: 14.5px; font-weight: 500; }
.cf-status.is-ok { color: #22c55e; }
.cf-status.is-err { color: #ef4444; }
.contact__alt { margin-top: 26px; color: var(--muted); font-size: 15px; }
.contact__alt a { color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--accent); }
.contact__phone { margin-top: 6px; color: var(--muted); }
.contact .socials { margin-top: 18px; }

@media (max-width: 900px) {
  .contact__grid { grid-template-columns: 1fr; }
  .contact__visual { max-width: 380px; }
}
@media (max-width: 560px) {
  .cf__row { grid-template-columns: 1fr; }
  .contact__badge { width: 84px; height: 84px; }
  .contact__badge svg { width: 34px; height: 34px; }
  .contact__visual { padding: 0 0 26px 26px; }
}

.footer { border-top: 1px solid var(--line); padding-block: 26px; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer a:hover { color: var(--accent); }

/* ==========================================================================
   Motion
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
/* Hero animates on load with pure CSS so it never depends on scroll observers */
.hero .reveal { opacity: 1; transform: none; animation: rise .9s var(--ease) both; }
.hero__copy > .reveal:nth-child(2) { animation-delay: .06s; }
.hero__copy > .reveal:nth-child(3) { animation-delay: .12s; }
.hero__copy > .reveal:nth-child(4) { animation-delay: .2s; }
.hero__copy > .reveal:nth-child(5) { animation-delay: .28s; }
.hero__copy > .reveal:nth-child(6) { animation-delay: .34s; }
.hero__card.reveal { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero .reveal { animation: none; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

.talk-filters { margin-bottom: 18px; }
.talks__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 22px; }
.talks__more { color: var(--muted); font-size: 15px; font-style: italic; }
.talks__foot .btn { margin-left: auto; }
