/* ==========================================================================
   Surya Yogananthan — portfolio
   Plain CSS, no build step. Colors live in tokens below; dark mode redefines them.
   ========================================================================== */

:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --text: #15171c;
  --text-2: #4a505c;
  --muted: #6b7280;
  --border: #e4e4df;
  --accent: #2456e8;
  --accent-ink: #ffffff;
  --accent-soft: #e8eefe;
  --good: #0f7b52;
  --shadow: 0 1px 2px rgba(20, 23, 28, .04), 0 8px 24px rgba(20, 23, 28, .06);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 32px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f13;
    --surface: #15181e;
    --surface-2: #1b1f27;
    --text: #eceef2;
    --text-2: #b7bdc8;
    --muted: #8b93a1;
    --border: #262b35;
    --accent: #7d9bff;
    --accent-ink: #0d0f13;
    --accent-soft: #1b2440;
    --good: #4cc795;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d0f13;
  --surface: #15181e;
  --surface-2: #1b1f27;
  --text: #eceef2;
  --text-2: #b7bdc8;
  --muted: #8b93a1;
  --border: #262b35;
  --accent: #7d9bff;
  --accent-ink: #0d0f13;
  --accent-soft: #1b2440;
  --good: #4cc795;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 600 14.5px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--text-2); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(1.07); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-weight: 600; text-decoration: none; font-size: 15px;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg { width: 15px; height: 15px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center;
  font: 700 12px/1 var(--mono);
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--text-2); font-size: 14.5px; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--text-2); }
.icon-btn svg { width: 17px; height: 17px; }

.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.menu-toggle { display: none; }

@media (max-width: 820px) {
  .menu-toggle { display: grid; }
  .nav-resume { display: none; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: var(--radius-sm); font-size: 16px; }
}
@media (min-width: 821px) { .nav-links .mobile-only { display: none; } }

/* ---------- Sections ---------- */

section { padding: clamp(56px, 9vw, 96px) 0; }
section + section { border-top: 1px solid var(--border); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 700; margin-top: 8px; }
.section-head p { color: var(--text-2); max-width: 520px; }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 8vw, 88px) 0 clamp(48px, 7vw, 72px); border-top: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 6vw, 72px); align-items: center; }

.hero h1 {
  font-size: clamp(36px, 6.2vw, 62px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero-lede { font-size: clamp(17px, 2vw, 19px); color: var(--text-2); max-width: 600px; text-wrap: pretty; }
.hero-meta { margin-top: 10px; color: var(--muted); font-size: 15px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.portrait {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 180px; order: -1; border-radius: 16px; }
}

/* ---------- Impact strip ---------- */

.impact { padding: 0 0 clamp(56px, 9vw, 96px); border-top: 0; }
.impact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.impact-item { padding: 24px 22px; }
.impact-item + .impact-item { border-left: 1px solid var(--border); }
.impact-value {
  font: 700 clamp(26px, 3.2vw, 34px)/1.1 var(--font);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.impact-value .arrow { color: var(--muted); font-weight: 500; }
.impact-label { margin-top: 8px; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }
.impact-source { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 900px) {
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .impact-item:nth-child(3) { border-left: 0; }
  .impact-item:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 460px) {
  .impact-grid { grid-template-columns: 1fr; }
  .impact-item + .impact-item { border-left: 0; border-top: 1px solid var(--border); }
}

/* ---------- Work ---------- */

.feature {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
.feature + .feature { margin-top: 20px; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.feature-media {
  background: var(--surface-2);
  padding: clamp(14px, 2.4vw, 28px);
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--border);
}
.feature-media img { border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 6px 20px rgba(0,0,0,.08); background: #fff; }
.feature-body { padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; }
.feature-body h3 { font-size: clamp(21px, 2.4vw, 26px); font-weight: 700; margin: 10px 0 12px; }
.feature-body p { color: var(--text-2); }
.feature-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 22px 0; }
.feature-stat strong { display: block; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.feature-stat span { font-size: 13.5px; color: var(--muted); line-height: 1.4; display: block; margin-top: 2px; }
.feature-body .text-link { margin-top: auto; }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature-media { border-right: 0; border-bottom: 1px solid var(--border); }
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font: 500 12px/1 var(--mono);
  padding: 6px 9px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s;
}
a.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: var(--shadow); }
.card-metric {
  font: 700 34px/1 var(--font); letter-spacing: -0.035em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.card-metric-label { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.card h3 { font-size: 19px; font-weight: 700; margin: 20px 0 8px; }
.card p { color: var(--text-2); font-size: 15px; }
.card .tags { margin: 18px 0 20px; }
.card .text-link { margin-top: auto; }

.more-head { margin: 56px 0 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.more-head h3 { font-size: 18px; font-weight: 700; }

.mini-list { list-style: none; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.mini-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; flex-wrap: wrap; }
.mini-item + .mini-item { border-top: 1px solid var(--border); }
.mini-item h4 { font-size: 16px; font-weight: 650; }
.mini-item p { color: var(--text-2); font-size: 14.5px; margin-top: 2px; max-width: 640px; }
.mini-links { display: flex; gap: 16px; flex-wrap: wrap; }
.pill {
  display: inline-block; margin-left: 8px; vertical-align: 2px;
  font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 7px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Experience ---------- */

.exp-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); }
@media (max-width: 900px) { .exp-layout { grid-template-columns: 1fr; } }

.timeline { list-style: none; }
.role { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding: 26px 0; }
.role + .role { border-top: 1px solid var(--border); }
.role:first-child { padding-top: 0; }
.role-when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.role-when span { display: block; margin-top: 4px; font-family: var(--font); font-size: 13.5px; }
.role h3 { font-size: 19px; font-weight: 700; }
.role-org { color: var(--text-2); margin-top: 2px; }
.role ul { margin: 12px 0 0; padding-left: 18px; color: var(--text-2); }
.role li + li { margin-top: 6px; }
.role li::marker { color: var(--muted); }
.role li strong { color: var(--text); font-weight: 600; }
@media (max-width: 560px) { .role { grid-template-columns: 1fr; gap: 6px; } }

.side-block { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px; }
.side-block + .side-block { margin-top: 20px; }
.side-block h3 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.edu-item + .edu-item { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.edu-item strong { display: block; font-size: 15.5px; }
.edu-item span { display: block; color: var(--text-2); font-size: 14.5px; }
.edu-item small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.cert-list { list-style: none; }
.cert-list li { font-size: 14.5px; padding: 8px 0; display: flex; justify-content: space-between; gap: 12px; }
.cert-list li + li { border-top: 1px solid var(--border); }
.cert-list li span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.cert-list a { text-decoration: none; }
.cert-list a:hover { color: var(--accent); }

/* ---------- Skills ---------- */

.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .skills-grid { grid-template-columns: 1fr; } }
.skill-group { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 22px 24px; }
.skill-group h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.skill-group > p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.skill-group .tag { font-size: 12.5px; padding: 7px 10px; }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-copy p { color: var(--text-2); font-size: 17px; }
.about-copy p + p { margin-top: 16px; }
.about-copy p strong { color: var(--text); }
.traits { list-style: none; }
.traits li { padding: 16px 0; }
.traits li + li { border-top: 1px solid var(--border); }
.traits strong { display: block; font-size: 16px; }
.traits span { color: var(--text-2); font-size: 15px; }

/* ---------- Contact ---------- */

.contact-card {
  border-radius: 20px;
  background: var(--text); color: var(--bg);
  padding: clamp(28px, 5vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 56px);
}
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }
.contact-card h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 750; letter-spacing: -0.03em; }
.contact-card > div > p { margin-top: 14px; opacity: .78; font-size: 17px; max-width: 460px; }
.contact-links { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-weight: 500; font-size: 16px; width: fit-content;
}
.contact-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-links svg { width: 18px; height: 18px; opacity: .7; }

.form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form label { display: grid; gap: 6px; font-size: 13.5px; opacity: .85; }
.form input, .form textarea {
  width: 100%;
  font: 400 15px/1.4 var(--font);
  color: var(--bg);
  background: color-mix(in srgb, var(--bg) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 22%, transparent);
  border-radius: 10px;
  padding: 12px 14px;
}
.form input::placeholder, .form textarea::placeholder { color: color-mix(in srgb, var(--bg) 50%, transparent); }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form textarea { resize: vertical; min-height: 120px; }
.form .btn { justify-self: start; background: var(--bg); color: var(--text); border-color: var(--bg); }
.form .btn:disabled { opacity: .6; cursor: default; }
.form-status { font-size: 14.5px; min-height: 1.4em; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */

.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 18px; }

/* ==========================================================================
   Case study pages
   ========================================================================== */

.cs-hero { padding: clamp(32px, 6vw, 64px) 0 clamp(32px, 5vw, 48px); border-top: 0; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14.5px; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 15px; height: 15px; }
.cs-hero h1 { font-size: clamp(32px, 5.4vw, 52px); font-weight: 750; letter-spacing: -0.035em; margin: 18px 0 16px; max-width: 900px; text-wrap: balance; }
.cs-hero .lede { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 760px; text-wrap: pretty; }

.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.cs-meta dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cs-meta dd { margin: 6px 0 0; font-size: 15px; }
@media (max-width: 760px) { .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cs-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.cs-figure { margin: 0; }
.cs-figure .frame {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
  padding: clamp(10px, 2vw, 24px);
}
.cs-figure img { border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 20px rgba(0,0,0,.08); }
.cs-figure figcaption { color: var(--muted); font-size: 14px; margin-top: 12px; }

.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.result { padding: 22px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 0 -1px -1px 0; }
.result strong { display: block; font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.result span { display: block; margin-top: 6px; color: var(--text-2); font-size: 14.5px; line-height: 1.45; }

.prose-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); }
@media (max-width: 860px) { .prose-wrap { grid-template-columns: 1fr; } .toc { display: none; } }
.toc { position: sticky; top: 96px; align-self: start; list-style: none; font-size: 14px; }
.toc a { display: block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--text); }

.prose { max-width: 720px; }
.prose h2 { font-size: clamp(22px, 2.6vw, 27px); font-weight: 700; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 17px; }
.prose p + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 12px 0; }
.prose li + li { margin-top: 8px; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose .cs-figure { margin: 28px 0; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}
.callout p { color: var(--text); font-size: 16.5px; }

.table-wrap { overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.prose td { color: var(--text-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }

.embed {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.embed-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.embed-bar strong { font-size: 15px; }
.embed-frame { position: relative; height: 760px; background: var(--surface-2); }
.embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.embed-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.embed-placeholder p { color: var(--text-2); margin-bottom: 16px; }
@media (max-width: 760px) { .embed-frame { height: 520px; } }
.embed + .embed { margin-top: 24px; }

.next-project { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.next-project a { text-decoration: none; }
.next-project .next-title { font-size: clamp(20px, 3vw, 28px); font-weight: 700; letter-spacing: -0.02em; display: block; margin-top: 6px; }
.next-project a:hover .next-title { color: var(--accent); }

/* ---------- Reveal (progressive enhancement) ---------- */

.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Print ---------- */

@media print {
  .site-header, .contact-card form, .theme-toggle, .menu-toggle { display: none !important; }
  section { padding: 24px 0; }
}

@media (max-width: 520px) {
  .feature-stat strong { font-size: 18px; }
  .card-metric { font-size: 30px; }
}
