/* ---------- Design tokens ---------- */
:root {
  --navy-950: #0b1220;
  --navy-900: #101a2c;
  --navy-800: #172642;
  --navy-700: #22355c;
  --paper: #f7f5f0;
  --paper-dim: #efece3;
  --ink: #1b1f27;
  --ink-soft: #4b5261;
  --accent: #c98a3b;
  --accent-soft: #e9c894;
  --line: #e2ddd0;
  --radius: 14px;
  --font-head: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy-900);
}
.brand-logo { height: 44px; width: auto; }
.brand-mark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.brand-dot { color: var(--accent); }

.main-nav ul {
  display: flex;
  gap: 32px;
}
.main-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--navy-900); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(201, 138, 59, 0.35), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12), transparent 35%),
    repeating-linear-gradient(120deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(60deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 64px);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
  gap: 48px;
  padding: 96px 24px 76px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent-soft);
  margin-bottom: 18px;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero-lede {
  font-size: 1.08rem;
  color: rgba(255,255,255,0.82);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 30px;
}
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #1b1200; }
.btn-primary:hover { background: var(--accent-soft); }
.btn-ghost { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* For light backgrounds — btn-ghost is white-on-white there */
.btn-dark {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(16, 26, 44, 0.18);
}
.btn-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #1b1200;
  box-shadow: 0 10px 22px rgba(201, 138, 59, 0.32);
}
.btn-dark svg { width: 16px; height: 16px; }

.hero-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid transparent;
}
.hero-links a:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

.hero-portrait { display: flex; justify-content: center; }
.portrait-frame {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,0.15));
}
.portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--navy-800);
}

/* ---------- Stats bar ---------- */
.stats-bar {
  background: var(--navy-900);
  color: #fff;
  border-bottom: 4px solid var(--accent);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  max-width: 420px;
  margin: 0 auto;
  padding: 26px 24px;
  gap: 16px;
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent-soft);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-dim); }
.section-title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 14px;
  color: var(--navy-900);
}
.section-kicker {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
}
.section-sub {
  color: var(--ink-soft);
  max-width: 65ch;
  margin-bottom: 36px;
}
.section-sub a { color: var(--navy-800); text-decoration: underline; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.about-text p { font-size: 1.08rem; color: var(--ink-soft); }
.timeline h3 { margin-bottom: 18px; font-size: 1.2rem; }
.timeline ul { border-left: 2px solid var(--line); }
.timeline li {
  position: relative;
  padding: 0 0 24px 24px;
  display: flex;
  flex-direction: column;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-degree { font-weight: 600; color: var(--navy-900); }
.timeline-inst { color: var(--ink-soft); font-size: 0.95rem; }
.timeline-meta { color: var(--accent); font-size: 0.85rem; margin-top: 2px; }

/* Research cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(23, 38, 66, 0.08); }
.card-icon { color: var(--accent); font-size: 0.9rem; letter-spacing: 4px; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; margin-bottom: 10px; color: var(--navy-900); }
.card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Publications */
.pub-list { display: flex; flex-direction: column; gap: 18px; }
.pub-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.pub-main { flex: 1 1 420px; }
.pub-title { font-weight: 600; font-size: 1.05rem; color: var(--navy-900); margin-bottom: 6px; }
.pub-title a { color: inherit; text-decoration: none; }
.pub-title a:hover { text-decoration: underline; }
.pub-authors { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 4px; }
.pub-venue { color: var(--ink-soft); font-size: 0.88rem; font-style: italic; }
.pub-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  min-width: 90px;
}
.pub-year { font-weight: 600; color: var(--navy-800); }
.pub-cites { font-size: 0.82rem; color: var(--accent); }
.pub-loading, .pub-error { color: var(--ink-soft); }

/* Achievements */
.achievements-list { max-width: 70ch; margin-bottom: 32px; }
.achievements-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.achievements-list li::before {
  content: "\2726";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.achievements-list li:last-child { border-bottom: none; }

/* Contact */
.contact-section { background: var(--navy-950); color: #fff; }
.contact-section .section-title { color: #fff; }
.contact-section .section-sub { color: rgba(255,255,255,0.7); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-list { display: flex; flex-direction: column; gap: 18px; }
.contact-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-soft);
  margin-bottom: 3px;
}
.contact-list a { text-decoration: none; color: #fff; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }

/* Footer */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.6); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 24px;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-inner a { text-decoration: none; color: rgba(255,255,255,0.7); }
.footer-inner a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-portrait { order: -1; }
  .portrait-frame { width: 160px; height: 160px; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .brand-logo { height: 28px; }
  .brand-mark { font-size: 1.15rem; padding-left: 10px; }
  .brand { gap: 10px; }
  .nav-toggle { display: flex; }
  .main-nav ul {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 20px;
    gap: 14px;
    display: none;
  }
  .main-nav ul.open { display: flex; }
}
