/* ---------------------------------------------------
   Base / tokens
--------------------------------------------------- */
:root {
  --ink: #1c1f22;
  --ink-soft: #4a5157;
  --paper: #faf8f4;
  --paper-alt: #f1ede4;
  --line: #ddd6c8;
  --accent: #1f4a44;
  --accent-soft: #ded9c8;
  --accent-bright: #3d7a6f;
  --max-w: 1080px;
  --font-serif: "Source Serif 4", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  margin: 0 0 0.4em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--accent); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------
   Header / nav
--------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.9);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.15rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
  border-color: var(--accent-bright);
}

.site-nav a.active {
  color: var(--ink);
  border-color: var(--accent-bright);
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 34px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

/* ---------------------------------------------------
   Hero
--------------------------------------------------- */
.hero {
  padding: 7rem 1.5rem 5.5rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 80% at 78% 12%, rgba(61, 122, 111, 0.18), transparent 60%),
    radial-gradient(45% 60% at 12% 90%, rgba(222, 217, 200, 0.55), transparent 65%);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.9;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-photo { flex-shrink: 0; }

.hero-photo img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--paper);
  box-shadow: 0 16px 34px -16px rgba(28, 31, 34, 0.4);
}

.hero-chips {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.hero-chips li {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(61, 122, 111, 0.08);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 0.3em 0.85em;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  margin-top: 0.9rem;
  margin-bottom: 0;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 16ch;
  line-height: 1.08;
}

.hero-role {
  font-size: 1.15rem;
  max-width: 46ch;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

.hero-links {
  display: flex;
  gap: 0.9rem;
  margin-top: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.hero-social {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.icon-btn svg { width: 19px; height: 19px; display: block; }
.icon-btn--logo {
  width: auto;
  border-radius: 8px;
  padding: 0.32rem 0.5rem;
  background: #00365f;
  border-color: #00365f;
}
.icon-btn--logo img {
  height: 26px;
  width: auto;
  display: block;
  margin-right: -0.4rem;
}
.icon-btn--logo:hover {
  background: #002846;
  border-color: #002846;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(0, 54, 95, 0.7);
}

/* Brand colors */
.icon-btn--scholar { color: #4285f4; border-color: rgba(66, 133, 244, 0.4); }
.icon-btn--scholar:hover { background: #4285f4; border-color: #4285f4; color: #fff; }
.icon-btn--linkedin { color: #0a66c2; border-color: rgba(10, 102, 194, 0.4); }
.icon-btn--linkedin:hover { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.icon-btn:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -12px rgba(31, 74, 68, 0.7);
}
.btn {
  display: inline-block;
  padding: 0.65em 1.3em;
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn:active { transform: translateY(1px); }

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

/* ---------------------------------------------------
   Photo & banner images
--------------------------------------------------- */
.section-banner {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  object-position: center 8%;
  border-radius: 6px;
  margin-bottom: 1.6rem;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px -14px rgba(28, 31, 34, 0.3);
}

.section-photo {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 1.6rem;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px -14px rgba(28, 31, 34, 0.3);
}

/* ---------------------------------------------------
   Sections
--------------------------------------------------- */
.section { padding: 4.5rem 1.5rem; border-bottom: 1px solid var(--line); }
.section.alt { background: var(--paper-alt); }

.section-inner { max-width: var(--max-w); margin: 0 auto; }

.two-col {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
}

.col-label { position: sticky; top: 5.5rem; align-self: start; }

.tag {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--accent-bright);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 0.15em 0.7em;
  margin-bottom: 0.8rem;
}

.col-label h2 { font-size: 1.6rem; }

.col-body { max-width: 66ch; }

.lede { font-size: 1.08rem; color: var(--ink); }

.quick-facts {
  display: flex;
  gap: 2.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.quick-facts > div { display: flex; flex-direction: column; }
.fact-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--accent);
  font-weight: 600;
  line-height: 1;
}
.fact-label { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.35rem; max-width: 14ch; }

/* Research grid */
.research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 1.8rem;
}
.research-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 1.3rem 1.4rem;
  border-radius: 3px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.research-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-bright);
  box-shadow: 0 14px 30px -18px rgba(28, 31, 34, 0.4);
}
.research-card h3 {
  font-size: 1.02rem;
  margin-bottom: 0.4em;
}
.research-card p { font-size: 0.93rem; margin-bottom: 0; }
.lab-callout {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-bright);
  background: var(--paper);
  border-radius: 3px;
}
.lab-callout img.lab-logo {
  width: 200px;
  height: auto;
}
.lab-callout h3 { font-size: 1.05rem; margin-bottom: 0.4em; }
.lab-callout p { font-size: 0.93rem; margin-bottom: 0; }

/* Publications */
.pub-list { list-style: none; margin: 1.8rem 0; padding: 0; }
.pub-list li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.pub-list li:last-child { border-bottom: 1px solid var(--line); }
.pub-year {
  font-family: var(--font-serif);
  color: var(--accent-bright);
  font-size: 0.95rem;
  padding-top: 0.1rem;
}
.pub-title { font-weight: 600; margin: 0 0 0.3em; color: var(--ink); }
.pub-meta { font-size: 0.88rem; margin: 0; color: var(--ink-soft); }
.subsection .pub-list { margin: 0.7rem 0 0; }
.mooc-card {
  display: block;
  max-width: 520px;
  margin-top: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.mooc-card img { display: block; width: 100%; height: auto; }
.mooc-caption { display: block; padding: 0.9rem 1.1rem; font-size: 0.92rem; color: var(--ink-soft); }
.mooc-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-bright);
  box-shadow: 0 16px 34px -18px rgba(28, 31, 34, 0.45);
}

/* Plain list (recognition) */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  position: relative;
  padding-left: 1.4rem;
}
.plain-list li:last-child { border-bottom: 1px solid var(--line); }
.plain-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent-bright);
}

/* Subsections & timeline */
.subsection { margin-top: 2.2rem; }
.subsection-title {
  font-family: "Inter", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin: 0 0 1rem;
}
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline-year {
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-bright);
  white-space: nowrap;
  padding-top: 0.1rem;
}
.timeline-body { display: flex; flex-direction: column; gap: 0.15rem; color: var(--ink); }
.timeline-body strong { color: var(--ink); }
.timeline-body span { font-size: 0.9rem; color: var(--ink-soft); }
@media (max-width: 700px) {
  .timeline li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* Footer */
.site-footer {
  padding: 2.2rem 1.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Back to top */
.to-top {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fdfcf8;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease, visibility 0.25s;
  z-index: 90;
  box-shadow: 0 10px 24px -10px rgba(28, 31, 34, 0.5);
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--accent-bright); border-color: var(--accent-bright); }

/* ---------------------------------------------------
   Contact form
--------------------------------------------------- */
.contact-form {
  margin-top: 2.2rem;
  padding: 1.8rem 1.8rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  max-width: 620px;
}
.contact-form h3 { font-size: 1.15rem; margin-bottom: 0.3em; }
.form-sub { font-size: 0.9rem; margin-bottom: 1.4rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.6em 0.75em;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(61, 122, 111, 0.15);
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.contact-form .btn { margin-top: 0.2rem; cursor: pointer; }
.form-status {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  min-height: 1.2em;
}
.form-status-success { color: var(--accent); font-weight: 600; }
.form-status-error { color: #a33b3b; font-weight: 600; }

/* ---------------------------------------------------
   Scroll reveal
--------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 1rem; }
  .col-label { position: static; display: flex; align-items: center; gap: 0.7rem; }
  .col-label h2 { font-size: 1.4rem; }
  .research-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-inner { flex-direction: column-reverse; text-align: center; gap: 1.8rem; }
  .hero-photo img { width: 220px; height: 220px; }
  .hero-role { margin-left: auto; margin-right: auto; }
  .hero-chips { justify-content: center; }
  .hero-links { justify-content: center; }
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 460px; }
  .site-nav a {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-toggle { display: flex; }
}

@media (max-width: 700px) {
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .pub-list li { grid-template-columns: 1fr; gap: 0.2rem; }
}
