:root {
  --black: #111110;
  --gray-1: #222220;
  --gray-2: #314039;
  --gray-3: #4a5550;
  --gray-5: #7a8580;
  --gray-7: #c8c7c0;
  --gray-8: #e4e2da;
  --gray-9: #f4f2ea;
  --white: #ffffff;
  --accent: #185FA5;
  --accent-bg: #E6F1FB;
  --warn: #854F0B;
  --warn-bg: #FAEEDA;
  --max: 820px;
  --radius: 5px;
}

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

html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 80px; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 0.06em; text-underline-offset: 0.2em; }

/* ── Skip link ── */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-140%);
  padding: 0.6rem 1rem;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 max(1rem, calc((100vw - var(--max)) / 2));
  height: 60px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 0.5px solid var(--gray-7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  text-decoration: none;
  color: var(--black);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-3);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--black); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0.5px solid var(--gray-7);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--black);
}

/* ── Layout ── */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Hero ── */
.hero {
  padding: 4rem 0 3.5rem;
  border-bottom: 0.5px solid var(--gray-7);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 3rem;
  align-items: start;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.hero-bio {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-2);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 0.5px solid var(--gray-7);
  color: var(--gray-1);
  background: var(--white);
  letter-spacing: 0.02em;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.btn:hover { border-color: var(--gray-5); background: var(--gray-9); }

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}
.btn-primary:hover { background: var(--gray-1); border-color: var(--gray-1); }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 0.5px solid var(--gray-7);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-cell {
  padding: 0.85rem 1rem;
  text-align: center;
  border-right: 0.5px solid var(--gray-7);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.1;
}
.stat-lbl {
  display: block;
  font-size: 11px;
  color: var(--gray-5);
  margin-top: 2px;
}

.hero-photo {
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: center 18%;
  border-radius: var(--radius);
  margin-top: 1.75rem;
}

/* ── Sections ── */
.section {
  padding: 3.25rem 0;
  border-bottom: 0.5px solid var(--gray-7);
}
.section:last-of-type { border-bottom: none; }

.sec-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-5);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

/* ── Research ── */
.featured-paper {
  background: var(--gray-9);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.feat-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-5);
  margin-bottom: 0.5rem;
}
.paper-title {
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
.paper-abstract {
  font-size: 13px;
  line-height: 1.75;
  color: var(--gray-2);
}

.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--gray-7);
  border: 0.5px solid var(--gray-7);
  border-radius: var(--radius);
  overflow: hidden;
}
.research-cell { background: var(--white); padding: 1.2rem; }
.research-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-5);
  margin-bottom: 0.4rem;
}
.research-desc { font-size: 13px; line-height: 1.55; color: var(--black); }

/* ── Publications ── */
.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 0.5px solid var(--gray-8);
  align-items: start;
}
.pub-item:last-child { border-bottom: none; padding-bottom: 0; }
.pub-year {
  font-size: 12px;
  color: var(--gray-5);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.pub-title {
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}
.pub-authors { font-size: 12px; color: var(--gray-3); line-height: 1.5; margin-bottom: 0.15rem; }
.pub-journal { font-size: 12px; color: var(--gray-3); font-style: italic; margin-bottom: 0.35rem; }
.pub-doi { font-size: 11px; color: var(--accent); text-decoration: none; }
.pub-doi:hover { text-decoration: underline; }

/* ── Work in progress ── */
.wip-item {
  padding: 1.1rem 0;
  border-bottom: 0.5px solid var(--gray-8);
}
.wip-item:last-child { border-bottom: none; padding-bottom: 0; }

.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}
.badge-rr { color: var(--warn); background: var(--warn-bg); }
.badge-progress { color: #185FA5; background: var(--accent-bg); }

.wip-title {
  font-family: 'EB Garamond', ui-serif, Georgia, serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}
.wip-venue { font-size: 12px; color: var(--gray-5); font-style: italic; }

/* ── Skills ── */
.skills-group { margin-bottom: 1.25rem; }
.skills-group:last-child { margin-bottom: 0; }
.skills-group-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 3px;
  border: 0.5px solid var(--gray-7);
  color: var(--gray-3);
}
.tag-strong {
  background: var(--gray-9);
  border-color: var(--gray-8);
  color: var(--black);
  font-weight: 500;
}

/* ── Experience ── */
.exp-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 0.5px solid var(--gray-8);
  align-items: start;
}
.exp-item:last-child { border-bottom: none; padding-bottom: 0; }
.exp-period { font-size: 12px; color: var(--gray-5); padding-top: 3px; }
.exp-role { font-size: 14px; font-weight: 500; margin-bottom: 0.2rem; }
.exp-org { font-size: 13px; color: var(--gray-3); margin-bottom: 0.4rem; }
.exp-detail { font-size: 12px; color: var(--gray-5); line-height: 1.65; }

.grant-callout {
  margin-top: 1.5rem;
  padding: 1.2rem;
  border: 0.5px solid var(--gray-7);
  border-radius: var(--radius);
  background: var(--gray-9);
}
.grant-lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-5);
  margin-bottom: 0.4rem;
}
.grant-desc { font-size: 13px; color: var(--gray-3); line-height: 1.65; }

/* ── Service ── */
.reviewer-para { font-size: 14px; line-height: 1.8; color: var(--gray-3); margin-bottom: 0.75rem; }
.reviewer-para em { color: var(--black); font-style: italic; }
.membership-para { font-size: 13px; color: var(--gray-5); }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
}
.contact-lbl {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.contact-val { font-size: 14px; color: var(--black); line-height: 1.65; }
.contact-val a { color: var(--accent); text-decoration: none; }
.contact-val a:hover { text-decoration: underline; }

/* ── Footer ── */
.site-footer {
  padding: 1.75rem 0 2.5rem;
  border-top: 0.5px solid var(--gray-7);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-text { font-size: 12px; color: var(--gray-5); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-photo { width: 110px; height: 138px; margin-top: 0; order: -1; }
  .hero-name { font-size: 36px; }
  .research-grid { grid-template-columns: 1fr; }
  .pub-item, .exp-item { grid-template-columns: 1fr; gap: 0.35rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat-cell { border-right: none; border-bottom: 0.5px solid var(--gray-7); }
  .stat-cell:last-child { border-bottom: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 61px;
    right: 1rem;
    left: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    border: 0.5px solid var(--gray-7);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    gap: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.65rem 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
