/* Design tokens — from design_handoff_personal_website (Yale Navy theme) */
:root {
  --bg:          #0b1221;
  --bg-nav:      #080e1b;
  --bg-hero:     #0d1828;
  --hi:          #f0f4f8;
  --body-text:   rgba(215, 228, 245, 0.70);
  --hero-text:   rgba(220, 232, 255, 0.78);
  --role-text:   rgba(155, 185, 220, 0.70);
  --link-text:   rgba(155, 185, 220, 0.72);
  --muted:       rgba(155, 185, 220, 0.68);
  --accent:      #9bddff;
  --accent-dim:  rgba(155, 221, 255, 0.45); /* borders only — fails AA as text */
  --label:       rgba(155, 221, 255, 0.62);
  --rule:        rgba(155, 200, 240, 0.08);
  --hero-border: rgba(155, 221, 255, 0.08);
}

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

html, body { min-height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--hi);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { text-decoration: none; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 30;
  background: var(--bg-nav);
  color: var(--accent);
  padding: 10px 16px;
  font-size: 13px;
}

.skip-link:focus-visible {
  left: 8px;
  top: 8px;
}

main { flex: 1; }

/* ---- Nav ---- */
nav {
  background: var(--bg-nav);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 50px;
}

.nav-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--hi);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links { display: flex; gap: 28px; }

.nav-links a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  padding: 14px 2px;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--hi); }

.nav-links a.active {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--accent);
}

/* ---- About hero ---- */
.hero {
  background: var(--bg-hero);
  border-bottom: 1px solid var(--hero-border);
}

.hero-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 52px 40px 48px;
}

.hero-id {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 36px;
}

.hero-photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 2px solid var(--accent-dim);
  box-shadow: 0 0 0 4px var(--bg-hero);
}

.hero-name {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--hi);
  margin-bottom: 5px;
}

.hero-role { font-size: 13.5px; color: var(--role-text); }

.bio { max-width: 660px; margin-bottom: 32px; }

.bio p {
  font-size: 16px;
  line-height: 1.88;
  color: var(--hero-text);
  margin-bottom: 16px;
  text-wrap: pretty;
}

.bio p:last-child { margin-bottom: 0; }

.bio a {
  color: var(--accent);
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(155, 221, 255, 0.4);
  text-underline-offset: 3px;
}

.bio a:hover { color: var(--hi); }

.links-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
}

.links-row a {
  font-size: 13px;
  color: var(--link-text);
  transition: color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.links-row a:hover { color: var(--hi); }

/* ---- Content pages (Research, Miscellaneous) ---- */
.page { max-width: 820px; margin: 0 auto; padding: 0 40px; }

.page-header {
  background: var(--bg-hero);
  margin: 0 -40px;
  padding: 40px 40px 36px;
  border-bottom: 1px solid var(--hero-border);
}

.page-header h1 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--hi);
}

.page-body { padding-bottom: 80px; }

.section { margin-top: 40px; margin-bottom: 8px; }
.section:first-child { margin-top: 0; padding-top: 36px; }

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--label);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.paper {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 20px;
  align-items: start;
}

.paper + .paper { border-top: 1px solid var(--rule); }

.paper h3 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.44;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.paper h3 a { color: var(--hi); transition: color 0.15s; }
.paper h3 a:hover { color: var(--accent); }

.paper .coauthors { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.paper .venue { font-size: 13px; color: var(--accent); }
.paper .desc { font-size: 13px; color: var(--body-text); line-height: 1.6; }
.paper .coverage { font-size: 12px; color: var(--muted); margin-top: 5px; }
.paper .coverage a {
  color: var(--label);
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(155, 221, 255, 0.4);
  text-underline-offset: 3px;
}
.paper .coverage a:hover { color: var(--hi); }

.badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-dim);
  padding: 3px 9px;
  border-radius: 2px;
  white-space: nowrap;
  margin-top: 2px;
}

.wip { padding: 24px 0; }
.wip + .wip { border-top: 1px solid var(--rule); }

.wip h3 {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.44;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  color: var(--body-text);
}

.wip .note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 4px; }

/* ---- 404 ---- */
.desc-404 { font-size: 15px; color: var(--body-text); line-height: 1.7; }

.desc-404 a {
  color: var(--accent);
  transition: color 0.15s;
  text-decoration: underline;
  text-decoration-color: rgba(155, 221, 255, 0.4);
  text-underline-offset: 3px;
}

.desc-404 a:hover { color: var(--hi); }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--rule);
  padding: 20px 40px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

footer p { font-size: 12px; color: var(--muted); }

@media (max-width: 600px) {
  .nav-inner, .hero-inner, .page, footer { padding-left: 24px; padding-right: 24px; }
  .page-header { margin: 0 -24px; padding-left: 24px; padding-right: 24px; }
  .nav-links { gap: 20px; }
  .paper { grid-template-columns: 1fr; }
  .badge { justify-self: start; margin-top: 10px; }
}
