:root {
  --bg: #0b0f14;
  --bg-elev: #111821;
  --bg-card: #121a23;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e8edf2;
  --muted: #9aa7b3;
  --faint: #6b7784;
  --accent: #34d399;
  --accent-ink: #04130d;
  --accent-soft: rgba(52, 211, 153, 0.12);
  --radius: 14px;
  --wrap: 1120px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip {
  position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600;
}
.skip:focus { left: 8px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 15, 20, 0.8);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; letter-spacing: -0.01em; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: block; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav .btn { color: var(--accent-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #5eeab4; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* Hero */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.13), transparent 65%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; position: relative; }
h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 700; }
h1 .accent { color: var(--accent); }
.lede { margin-top: 24px; font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 580px; }
.lede strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 14px; color: var(--faint); font-family: var(--mono); }

.portrait {
  position: relative; justify-self: end; width: min(100%, 360px); aspect-ratio: 1;
  border-radius: 24px; overflow: hidden; border: 1px solid var(--line-strong);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.portrait-tag {
  position: absolute; left: 14px; bottom: 14px; background: rgba(11,15,20,.82); backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.35;
}
.portrait-tag b { display: block; font-weight: 600; }
.portrait-tag span { color: var(--muted); font-size: 12px; }

/* Stats strip */
.stats { border-block: 1px solid var(--line); background: var(--bg-elev); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b { display: block; font-size: 34px; letter-spacing: -0.02em; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }

/* Sections */
section.block { padding: 96px 0; }
.sec-head { max-width: 640px; margin-bottom: 48px; }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
h2 { font-size: clamp(30px, 4vw, 42px); letter-spacing: -0.03em; line-height: 1.12; font-weight: 700; }
.sec-head p { margin-top: 14px; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; }
.about-grid p { color: var(--muted); }
.about-grid p + p { margin-top: 18px; }
.about-grid p strong { color: var(--text); font-weight: 600; }
.principles { display: grid; gap: 14px; }
.principle { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.principle h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.principle p { font-size: 15px; color: var(--muted); margin: 0; }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(52, 211, 153, 0.45); transform: translateY(-3px); }
.card-top { display: flex; align-items: center; gap: 16px; }
.card-media { width: calc(100% + 56px); max-width: none; margin: -28px -28px 22px; height: auto; aspect-ratio: 920 / 430; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .card-media { width: calc(100% + 44px); margin: -22px -22px 20px; } }
.icon {
  width: 56px; height: 56px; border-radius: 13px; flex: none; position: relative; overflow: hidden;
  background: var(--accent-soft); border: 1px solid var(--line-strong); display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; color: var(--accent); font-size: 17px;
}
.icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.card .role { font-size: 13px; color: var(--faint); font-family: var(--mono); margin-top: 2px; }
.card p { margin-top: 16px; color: var(--muted); font-size: 16px; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag { font-size: 12px; font-family: var(--mono); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.links a { color: var(--text); }
.links a:hover { color: var(--accent); }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.skill-col { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.skill-col h3 { font-size: 13px; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 14px; }
.skill-col ul { list-style: none; display: grid; gap: 9px; }
.skill-col li { font-size: 16px; color: var(--text); }

/* Contact */
.contact-box {
  background: linear-gradient(135deg, #12201d, #111821 60%); border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 22px; padding: clamp(32px, 6vw, 64px); display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.contact-box p { margin-top: 14px; color: var(--muted); max-width: 460px; }
.contact-links { display: grid; gap: 12px; }
.contact-links a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 18px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line);
  font-size: 15px; transition: border-color .15s, background .15s;
}
.contact-links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-links small { display: block; font-family: var(--mono); font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.contact-links .arrow { color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--faint); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn { transition: none; }
}

@media (max-width: 920px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid, .about-grid, .contact-box { grid-template-columns: 1fr; gap: 40px; }
  .portrait { justify-self: start; width: 220px; order: -1; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  section.block { padding: 72px 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav a:not(.btn) { display: none; }
  .work-grid, .skills-grid { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}

/* Work groups */
.work-grid + .family { margin-top: 72px; }
.family { max-width: 640px; margin-bottom: 28px; }
.family h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.25; font-weight: 700; }
.family p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.work-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .work-grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid.three { grid-template-columns: 1fr; } }

/* Earlier work chips */
.family p a.inline { color: var(--accent); }
.family p a.inline:hover { text-decoration: underline; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { font-size: 15px; padding: 8px 14px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--line-strong); color: var(--text); }
.work-grid + .family, .chips + .family { margin-top: 72px; }

/* Experience */
.timeline { list-style: none; display: grid; gap: 0; border-left: 1px solid var(--line-strong); margin-left: 6px; }
.role-item { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 28px; padding: 0 0 40px 32px; }
.role-item:last-child { padding-bottom: 0; }
.role-item::before { content: ""; position: absolute; left: -6px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.role-meta { display: grid; gap: 2px; align-content: start; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.role-meta span:first-child { color: var(--accent); }
.role-item h3 { font-size: 20px; letter-spacing: -0.015em; line-height: 1.25; }
.role-item .org { color: var(--muted); margin-top: 2px; }
.role-item ul { margin-top: 12px; padding-left: 18px; color: var(--muted); font-size: 16px; display: grid; gap: 6px; }
.sec-head p .btn { margin-top: 4px; }
@media (max-width: 720px) { .role-item { grid-template-columns: 1fr; gap: 6px; padding-left: 22px; } .role-meta { display: flex; gap: 12px; flex-wrap: wrap; } }
