:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #121826;
  --muted: #5c667a;
  --line: #dfe5ef;
  --accent: #2557d6;
  --accent-2: #6d8ff0;
  --accent-soft: #e8efff;
  --dark: #111827;
  --dark-2: #182235;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(27, 42, 74, 0.10);
  --radius: 24px;
  --max: 1180px;
}

html[data-theme="dark"] {
  --bg: #0d1119;
  --surface: #131923;
  --surface-2: #171f2c;
  --text: #eef3fb;
  --muted: #a7b1c2;
  --line: #293346;
  --accent: #87a8ff;
  --accent-2: #6689eb;
  --accent-soft: #1c2949;
  --dark: #090d14;
  --dark-2: #111927;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { background: var(--accent); color: white; }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.section-pad { padding: 118px 0; }
.compact-pad { padding-top: 48px; }
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 999; background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { left: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -0.02em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--text); color: var(--bg); font-size: 12px; letter-spacing: -0.03em; }
.site-nav { display: flex; align-items: center; gap: 25px; font-size: 13px; color: var(--muted); font-weight: 650; }
.site-nav > a { transition: color .2s ease; }
.site-nav > a:hover { color: var(--text); }
.nav-cta { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--text) !important; }
.theme-toggle { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; padding: 5px; }
.menu-toggle { display: none; width: 38px; height: 38px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.menu-toggle span { display: block; height: 1.5px; background: var(--text); margin: 4px 0; }

.hero { min-height: 760px; display: flex; align-items: center; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; width: 700px; height: 700px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 12%, transparent), transparent 68%); right: -170px; top: -210px; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; gap: 74px; }
.eyebrow, .kicker { text-transform: uppercase; letter-spacing: .15em; font-size: 11px; font-weight: 800; color: var(--accent); }
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 24px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.hero h1 { margin: 0; font-size: clamp(50px, 5.8vw, 78px); line-height: .98; letter-spacing: -0.055em; font-weight: 780; max-width: 780px; }
.hero h1 span { color: var(--muted); font-weight: 620; }
.hero-lede { max-width: 720px; margin: 31px 0 0; font-size: 18px; line-height: 1.72; color: var(--muted); }
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; font-weight: 720; font-size: 13px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--text); color: var(--bg); box-shadow: 0 10px 30px color-mix(in srgb, var(--text) 14%, transparent); }
.btn.ghost { background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.social-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; margin-top: 29px; }
.social-row a:hover { color: var(--accent); }

.hero-visual { min-height: 470px; display: grid; place-items: center; position: relative; }
.monogram-card { width: 310px; height: 390px; border-radius: 34px; background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent-soft) 48%, var(--surface))); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; z-index: 3; transform: rotate(2.5deg); }
.monogram-card::after { content: ""; position: absolute; inset: 14px; border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent); border-radius: 25px; pointer-events: none; }
.mono-kicker { position: absolute; top: 31px; font-size: 9px; letter-spacing: .22em; font-weight: 800; color: var(--muted); }
.monogram-card strong { font-family: Georgia, "Times New Roman", serif; font-size: 126px; letter-spacing: -0.11em; line-height: 1; color: var(--text); transform: translateX(-7px); }
.mono-lines { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin-top: 20px; }
.mono-lines i { display: block; width: 12px; height: 1px; background: var(--accent); }
.visual-orbit { position: absolute; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.orbit-one { width: 430px; height: 430px; }
.orbit-two { width: 520px; height: 300px; transform: rotate(-28deg); }
.floating-chip { position: absolute; z-index: 5; padding: 9px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 25px rgba(20,30,50,.08); font-size: 11px; font-weight: 800; color: var(--accent); }
.chip-a { top: 65px; right: 19px; }
.chip-b { bottom: 72px; left: 5px; }
.chip-c { top: 142px; left: 12px; }

.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-grid > div { padding: 25px 22px; border-right: 1px solid var(--line); }
.stat-grid > div:first-child { padding-left: 0; }
.stat-grid > div:last-child { border-right: 0; }
.stat-grid strong { display: block; font-size: 13px; }
.stat-grid span { color: var(--muted); font-size: 12px; }

.two-col { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.section-heading { position: relative; }
.section-heading .section-index { display: block; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; margin-bottom: 18px; }
.section-heading .kicker { margin: 0 0 15px; }
.section-heading h2 { margin: 0; font-size: clamp(36px, 4vw, 58px); line-height: 1.05; letter-spacing: -0.045em; }
.section-heading.wide { max-width: 800px; margin-bottom: 55px; }
.section-heading.wide > p:last-child { color: var(--muted); max-width: 650px; font-size: 16px; }
.prose { font-size: 17px; color: var(--muted); }
.prose p { margin: 0 0 24px; }
.prose strong { color: var(--text); }
.inline-links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 31px; font-size: 13px; font-weight: 750; color: var(--text); }
.inline-links a:hover { color: var(--accent); }

.soft-section { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.research-card { position: relative; min-height: 440px; padding: 29px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .25s ease, box-shadow .25s ease; overflow: hidden; }
.research-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.research-card.featured { background: var(--dark); color: white; border-color: transparent; }
.research-card.featured p, .research-card.featured .card-number { color: #aebbd0; }
.research-card.featured .tag-list li { border-color: #344057; color: #dce5f5; }
.card-number { position: absolute; top: 27px; right: 28px; font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); }
.research-icon { width: 68px; height: 68px; margin: 19px 0 63px; position: relative; }
.graph-icon span { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); position: absolute; box-shadow: 0 0 0 5px var(--accent-soft); }
.graph-icon span:nth-child(1) { left: 5px; top: 28px; }
.graph-icon span:nth-child(2) { left: 30px; top: 5px; }
.graph-icon span:nth-child(3) { right: 1px; top: 29px; }
.graph-icon span:nth-child(4) { left: 25px; bottom: 1px; }
.graph-icon span:nth-child(5) { left: 31px; top: 29px; background: var(--text); }
.graph-icon::before, .graph-icon::after { content: ""; position: absolute; width: 56px; height: 1px; background: var(--line); top: 34px; left: 4px; transform: rotate(42deg); }
.graph-icon::after { transform: rotate(-42deg); }
.fm-icon { display: grid; place-items: center; border-radius: 20px; background: #22345a; color: #bcd0ff; font-family: Georgia, serif; font-size: 25px; font-weight: 800; }
.forecast-icon { display: flex; align-items: end; gap: 5px; padding: 10px 5px; }
.forecast-icon i { flex: 1; border-radius: 4px 4px 1px 1px; background: var(--accent); }
.forecast-icon i:nth-child(1) { height: 25%; opacity: .45; }
.forecast-icon i:nth-child(2) { height: 52%; opacity: .6; }
.forecast-icon i:nth-child(3) { height: 37%; opacity: .72; }
.forecast-icon i:nth-child(4) { height: 77%; opacity: .87; }
.forecast-icon i:nth-child(5) { height: 100%; }
.research-card h3 { margin: 0 0 15px; font-size: 22px; line-height: 1.2; letter-spacing: -0.025em; }
.research-card p { color: var(--muted); font-size: 14px; }
.tag-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.tag-list li { border: 1px solid var(--line); border-radius: 999px; padding: 5px 9px; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

.pub-list { border-top: 1px solid var(--line); }
.pub-item { display: grid; grid-template-columns: 95px 1fr; gap: 28px; padding: 34px 0; border-bottom: 1px solid var(--line); }
.pub-year { font-family: ui-monospace, monospace; color: var(--muted); font-size: 12px; padding-top: 5px; }
.pub-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; }
.accent-pill { padding: 4px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pub-body h3 { margin: 10px 0 8px; font-size: 20px; line-height: 1.35; letter-spacing: -0.02em; }
.pub-body p { margin: 0; color: var(--muted); font-size: 13px; }
.pub-body strong { color: var(--text); }
.pub-links { display: flex; gap: 17px; margin-top: 14px; font-size: 12px; font-weight: 750; color: var(--accent); }
.pub-links a:hover { text-decoration: underline; }
.section-action { display: flex; align-items: center; gap: 24px; margin-top: 35px; }
.text-link { font-size: 13px; font-weight: 750; color: var(--muted); }
.text-link:hover { color: var(--accent); }

.dark-section { background: var(--dark); color: white; }
.section-heading.light .section-index, .section-heading.light .kicker { color: #9ab6ff; }
.section-heading.light > p:last-child { color: #9ba9bf; }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.project-card { min-height: 300px; border: 1px solid #2a3549; border-radius: var(--radius); padding: 29px; background: var(--dark-2); display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.project-card:hover { transform: translateY(-4px); border-color: #53698d; }
.project-top { display: flex; justify-content: space-between; gap: 12px; color: #91a1b9; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }
.project-type { color: #9ab6ff; }
.project-card h3 { margin: 48px 0 15px; max-width: 520px; font-size: 23px; line-height: 1.25; letter-spacing: -0.025em; }
.project-card p { color: #9ba9bf; font-size: 13px; max-width: 550px; }
.project-foot { margin-top: auto; color: #cbd5e5; font-size: 12px; font-weight: 700; }
.project-foot a { color: #9ab6ff; }

.experience-grid { align-items: start; }
.timeline { position: relative; border-left: 1px solid var(--line); padding-left: 37px; }
.timeline-item { position: relative; padding: 0 0 52px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot { position: absolute; width: 11px; height: 11px; border: 2px solid var(--bg); background: var(--accent); border-radius: 50%; left: -43px; top: 5px; box-shadow: 0 0 0 1px var(--accent); }
.timeline-date { font-family: ui-monospace, monospace; font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.timeline h3 { margin: 8px 0 2px; font-size: 22px; letter-spacing: -0.025em; }
.timeline-role { margin: 0 0 12px !important; font-weight: 700; color: var(--muted); }
.timeline p, .timeline li { color: var(--muted); font-size: 14px; }
.timeline ul { margin: 10px 0 0; padding-left: 18px; }

.recognition-grid { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 15px; }
.recognition-panel { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); padding: 28px; min-height: 360px; }
.recognition-panel h3 { margin: 0 0 28px; font-size: 17px; }
.compact-list > div { display: grid; grid-template-columns: 55px 1fr; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.compact-list > div:first-child { border-top: 0; padding-top: 0; }
.compact-list span { font-family: ui-monospace, monospace; font-size: 10px; color: var(--accent); }
.compact-list p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.compact-list strong { color: var(--text); }
.compact-list.no-year > div { grid-template-columns: 1fr; }
.journal-stack { display: flex; flex-direction: column; gap: 10px; }
.journal-stack span { padding: 11px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 11px; }

.contact-section { background: var(--bg); }
.contact-card { position: relative; padding: 70px; border-radius: 32px; overflow: hidden; background: var(--accent); color: white; }
.contact-card::after { content: "KS"; position: absolute; right: -20px; bottom: -95px; font-family: Georgia, serif; font-size: 300px; font-weight: 800; color: rgba(255,255,255,.07); letter-spacing: -.12em; pointer-events: none; }
.contact-card .kicker { color: #dbe5ff; }
.contact-card h2 { margin: 10px 0 18px; font-size: clamp(40px, 5vw, 64px); line-height: 1.03; letter-spacing: -0.045em; position: relative; z-index: 2; }
.contact-card > p:not(.kicker) { color: #dce5ff; position: relative; z-index: 2; }
.contact-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; position: relative; z-index: 2; }
.light-btn { background: white !important; color: #1d47ad !important; }
.contact-email { font-size: 13px; font-weight: 700; color: #eef3ff; }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-wrap { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-wrap > div:first-child { display: flex; flex-direction: column; }
.footer-wrap strong { font-size: 13px; }
.footer-wrap span { font-size: 11px; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 21px; color: var(--muted); font-size: 11px; font-weight: 700; }
.footer-links a:hover { color: var(--accent); }

/* Publications page */
.compact-header { position: sticky; }
.pub-page { min-height: 80vh; }
.publication-hero { padding-bottom: 45px; }
.publication-hero .section-heading { margin-bottom: 0; }
.publication-hero h1 { margin: 8px 0 20px; font-size: clamp(52px, 7vw, 88px); line-height: .95; letter-spacing: -0.055em; }
.publication-hero .btn { margin-top: 20px; }
.pub-group { margin: 0 0 75px; }
.pub-group > h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 17px; }
.full-pub-list { border-top: 1px solid var(--line); }
.full-pub-list article { display: grid; grid-template-columns: 80px 1fr; gap: 25px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.full-year { font-family: ui-monospace, monospace; color: var(--accent); font-size: 11px; }
.full-pub-list h3 { margin: 0 0 7px; font-size: 17px; line-height: 1.4; }
.full-pub-list h3 a:hover { color: var(--accent); }
.full-pub-list p { margin: 0; color: var(--muted); font-size: 12px; }
.page-back { padding-top: 5px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .research-card, .project-card { transition: none; }
}

@media (max-width: 980px) {
  .site-nav:not(.static-nav) { display: none; position: absolute; top: 68px; left: 20px; right: 20px; flex-direction: column; align-items: stretch; gap: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav:not(.static-nav) a { padding: 11px 9px; }
  .site-nav:not(.static-nav) .theme-toggle { align-self: flex-start; margin: 7px; }
  .menu-toggle { display: block; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 35px; }
  .hero-visual { min-height: 400px; }
  .section-pad { padding: 92px 0; }
  .two-col { grid-template-columns: 1fr; gap: 44px; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { min-height: 330px; }
  .research-icon { margin-bottom: 45px; }
  .recognition-grid { grid-template-columns: 1fr 1fr; }
  .recognition-panel:last-child { grid-column: 1 / -1; min-height: auto; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .nav-wrap { min-height: 66px; }
  .hero { padding-top: 80px; }
  .hero-grid { gap: 20px; }
  .hero h1 { font-size: clamp(43px, 13vw, 62px); }
  .hero-lede { font-size: 16px; }
  .hero-visual { min-height: 360px; transform: scale(.88); margin: -20px 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid > div { border-bottom: 1px solid var(--line); }
  .stat-grid > div:nth-child(2) { border-right: 0; }
  .stat-grid > div:nth-child(3), .stat-grid > div:nth-child(4) { border-bottom: 0; }
  .stat-grid > div:first-child { padding-left: 22px; }
  .section-pad { padding: 76px 0; }
  .section-heading.wide { margin-bottom: 38px; }
  .project-grid, .recognition-grid { grid-template-columns: 1fr; }
  .recognition-panel:last-child { grid-column: auto; }
  .pub-item { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
  .pub-year { padding: 0; }
  .contact-card { padding: 42px 25px; border-radius: 24px; }
  .contact-actions { align-items: flex-start; flex-direction: column; }
  .contact-email { overflow-wrap: anywhere; }
  .footer-wrap { padding: 30px 0; align-items: flex-start; flex-direction: column; }
  .footer-links { flex-wrap: wrap; }
  .static-nav a:not(.nav-cta) { display: none; }
  .full-pub-list article { grid-template-columns: 1fr; gap: 5px; }
}
