/* ═══════════════════════════════════════════════
   STYLE B — "Clearday"
   Bright white, clean lines, bold blue accent,
   friendly serif + geometric mono
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,300;1,9..144,400&family=Space+Mono:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

:root {
  --slate: #1A2744;
  --ink: #111827;
  --paper: #FFFFFF;
  --parchment: #F4F6FA;
  --warm: #6B7994;
  --accent: #2563EB;
  --accent-soft: rgba(37,99,235,0.07);
  --muted: #7C8698;
  --rule: #E2E6ED;
  --text: #374151;
  --link: #2563EB;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, Helvetica, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 56px);
  height: 56px;
  transition: box-shadow 0.3s;
}

nav.scrolled { box-shadow: 0 1px 16px rgba(0,0,0,0.05); }

.nav-name {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ─── HERO ─── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  padding-top: 56px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px clamp(40px, 5vw, 80px);
  border-right: 1px solid var(--rule);
}

.hero-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  font-weight: 400;
}

h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 6px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}

.hero-title {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 32px;
  line-height: 1.9;
}

.hero-bio {
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-bio a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(37,99,235,0.25);
  transition: border-color 0.2s;
}
.hero-bio a:hover { border-color: var(--accent); }

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 22px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  border-radius: 6px;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent);
  color: #fff;
}

.hero-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 72px clamp(40px, 4vw, 64px);
  position: relative;
  overflow: hidden;
  background: var(--parchment);
}

.hero-right::before {
  content: '';
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.headshot-frame {
  position: relative;
  width: 250px;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
}

.headshot-frame::before {
  display: none;
}

.headshot-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── SECTIONS ─── */
section {
  padding: 88px clamp(24px, 5vw, 72px);
}

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

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  font-weight: 400;
}

h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 300;
  color: var(--ink);
  margin-bottom: 44px;
  line-height: 1.2;
}

/* ─── RESEARCH ─── */
.research-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  border: none;
}

.research-item {
  padding: 32px 28px;
  border: none;
  border-radius: 10px;
  background: var(--parchment);
  transition: background 0.25s, box-shadow 0.25s;
}

.research-item:hover {
  background: var(--accent-soft);
  box-shadow: 0 2px 12px rgba(37,99,235,0.06);
}

.research-num {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  font-weight: 700;
}

.research-item h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.research-item p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.62;
}

/* ─── OPEN SCIENCE ─── */
#open-science {
  background: var(--slate);
  color: #E8ECF2;
}

#open-science .section-label { color: #7EB0FF; }
#open-science h2 { color: #fff; }

.os-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.os-text p {
  font-size: 16.5px;
  line-height: 1.76;
  color: rgba(232,236,242,0.75);
  margin-bottom: 18px;
}

.os-text a {
  color: #7EB0FF;
  text-decoration: none;
  border-bottom: 1px solid rgba(126,176,255,0.3);
}
.os-text a:hover { border-color: #7EB0FF; }

.os-pillars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: none;
}

.pillar {
  background: rgba(255,255,255,0.05);
  padding: 22px 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: background 0.2s;
  border-radius: 8px;
}

.pillar:hover { background: rgba(255,255,255,0.08); }

.pillar-icon {
  font-family: 'Space Mono', monospace;
  font-size: 20px;
  color: #7EB0FF;
  min-width: 28px;
  line-height: 1;
}

.pillar-text h4 {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232,236,242,0.65);
  margin-bottom: 4px;
}

.pillar-text p {
  font-size: 14px;
  color: rgba(232,236,242,0.45);
  line-height: 1.55;
}

/* ─── LAB ─── */
.lab-layout {
  max-width: 720px;
}

.lab-description {
  font-size: 17px;
  line-height: 1.78;
  margin-bottom: 28px;
}

.lab-description a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(37,99,235,0.25);
}
.lab-description a:hover { border-color: var(--accent); }

/* ─── PUBLICATIONS ─── */
#publications {
  background: var(--parchment);
}

.pub-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.pub-filter {
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border: 1.5px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 6px;
}

.pub-filter.active,
.pub-filter:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.pub-list {
  display: flex;
  flex-direction: column;
}

.pub-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.2s;
}

.pub-item:first-child { border-top: 1px solid var(--rule); }

.pub-year {
  font-family: 'Space Mono', monospace;
  font-size: 11.5px;
  color: var(--accent);
  padding-top: 3px;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.pub-authors {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 3px;
  line-height: 1.5;
}

.pub-authors strong {
  color: var(--text);
  font-weight: 500;
}

.pub-title {
  font-family: 'DM Sans', Helvetica, sans-serif;
  font-size: 15.5px;
  color: var(--ink);
  font-weight: 400;
  line-height: 1.45;
  margin-bottom: 5px;
}

.pub-journal {
  font-size: 13.5px;
  color: var(--muted);
  font-style: italic;
}

.pub-journal span { font-style: normal; }

.pub-links {
  display: flex;
  gap: 12px;
  margin-top: 7px;
}

.pub-link {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1.5px solid rgba(37,99,235,0.25);
  transition: border-color 0.2s;
}

.pub-link:hover { border-color: var(--accent); }

.pub-item.hidden { display: none; }

.pub-note {
  margin-top: 18px;
  font-family: 'Space Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ─── TEACHING ─── */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  background: none;
  border: none;
  margin-bottom: 40px;
}

.course-item {
  background: var(--parchment);
  padding: 26px 24px;
  border-radius: 8px;
  border: 1px solid var(--rule);
  transition: border-color 0.2s;
}

.course-item:hover {
  border-color: rgba(37,99,235,0.3);
}

.course-level {
  font-family: 'Space Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 400;
}

.course-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.32;
  font-weight: 400;
}

/* ─── FOOTER ─── */
footer {
  background: var(--ink);
  color: rgba(232,236,242,0.5);
  padding: 56px clamp(24px, 5vw, 72px) 40px;
}

.footer-grid {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

footer h4 {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232,236,242,0.3);
  margin-bottom: 16px;
}

footer p {
  font-size: 14.5px;
  line-height: 1.7;
}

footer a {
  color: rgba(232,236,242,0.5);
  text-decoration: none;
  display: block;
  font-size: 14.5px;
  line-height: 2;
  transition: color 0.2s;
}

footer a:hover { color: #7EB0FF; }

.footer-bottom {
  max-width: 1060px;
  margin: 0 auto;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(232,236,242,0.25);
}

/* ─── ANIMATIONS ─── */
.fade-up {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js-ready .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  #hero { grid-template-columns: 1fr; }
  .hero-left { border-right: none; border-bottom: 1px solid var(--rule); padding: 56px 32px 48px; }
  .hero-right { padding: 48px 32px; }
  .os-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 4px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 600px) {
  .nav-links a { font-size: 9.5px; }
  .nav-name { font-size: 10px; }
  section { padding: 64px 20px; }
}
