:root {
  --ink: #071824;
  --ink-soft: #233845;
  --paper: #f7faf9;
  --white: #ffffff;
  --line: #ccd8d8;
  --teal: #0a6d69;
  --mint: #6ee7d7;
  --blue: #2f6bf0;
  --display: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  color: var(--white);
  background: var(--blue);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 76px;
  padding: .75rem clamp(1.25rem, 4vw, 4.5rem);
  border-bottom: 1px solid rgba(7, 24, 36, .12);
  background: rgba(247, 250, 249, .94);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 750;
  text-decoration: none;
}

.monogram {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 11px;
  color: var(--mint);
  background: var(--ink);
  font-size: .8rem;
  letter-spacing: .08em;
}

nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
nav a { font-size: .9rem; font-weight: 680; text-decoration: none; }
nav a:hover, nav a:focus-visible { color: var(--teal); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .65fr);
  grid-template-rows: auto auto;
  column-gap: clamp(3rem, 7vw, 8rem);
  row-gap: 1.1rem;
  align-items: start;
  min-height: calc(100vh - 76px);
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 7vw, 8rem);
  background: radial-gradient(circle at 78% 30%, rgba(110,231,215,.18), transparent 30%), var(--paper);
}

.hero-intro, .hero-details { grid-column: 1; max-width: 860px; }
.hero-intro { grid-row: 1; }
.hero-details { grid-row: 2; }
.hero-intro h1 { margin-bottom: 2.15rem; }

.eyebrow, .section-number, .card-kicker {
  margin: 0 0 1.15rem;
  color: var(--teal);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 900px;
  margin-bottom: 1.75rem;
  font-family: var(--display);
  font-size: clamp(3.1rem, 6.5vw, 6.9rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: .98;
}

h1 em { color: var(--teal); font-weight: 500; }

.hero h1 {
  font-size: clamp(2.5rem, 4.8vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.lede {
  max-width: 760px;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  line-height: 1.65;
}

.hero .lede { font-size: clamp(1.02rem, 1.5vw, 1.2rem); }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.profile-links a { display: inline-flex; align-items: center; gap: .65rem; min-height: 48px; padding: .5rem .85rem .5rem .55rem; border: 1px solid rgba(7, 24, 36, .14); border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(7,24,36,.08); font-size: .92rem; font-weight: 760; line-height: 1; text-decoration: none; transition: background .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.profile-logo { display: grid; width: 2rem; height: 2rem; flex: 0 0 2rem; place-items: center; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(7,24,36,.06); }
.profile-logo svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.profile-logo-scholar { color: #4285f4; background: #edf4ff; }
.profile-logo-scholar circle { fill: currentColor; opacity: .16; }
.profile-logo-rg {
  position: relative;
  color: #00796f;
  background: #e5faf7;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.04em;
}

.profile-logo-rg sup {
  position: absolute;
  top: .3rem;
  right: .3rem;
  font-family: inherit;
  font-size: .48rem;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
}
.profile-logo-linkedin { color: #0a66c2; background: #e8f2fb; }
.profile-arrow { margin-left: .05rem; color: var(--teal); font-size: .82rem; }
.profile-links a:hover, .profile-links a:focus-visible { border-color: rgba(10,109,105,.55); color: var(--ink); background: var(--white); box-shadow: 0 12px 28px rgba(7,24,36,.13); transform: translateY(-2px); }
.hero-intro .lede { margin-bottom: 0; }
.hero-details .lede { margin-bottom: 1.8rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.15rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.button:hover, .button:focus-visible { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--ink); }
.button-primary:hover, .button-primary:focus-visible { background: var(--teal); border-color: var(--teal); }
.button-secondary { background: transparent; }
.button-secondary:hover, .button-secondary:focus-visible { color: var(--white); background: var(--ink); }

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: clamp(3rem, 7vw, 5.25rem) 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.quick-facts div { min-width: 0; }
.quick-facts dt { margin-bottom: .35rem; color: #60747d; font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.quick-facts dd { margin: 0; font-size: .9rem; font-weight: 680; line-height: 1.4; }
.quick-facts a { text-underline-offset: .2em; }

.portrait-wrap { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: min(100%, 410px); margin: 0 auto; transform: translateY(-4rem); }
.portrait-frame { position: relative; padding: .75rem; border: 1px solid var(--line); background: var(--white); box-shadow: 24px 28px 0 var(--mint); transform: rotate(1.2deg); }
.portrait-frame::after { content: ""; position: absolute; inset: .75rem; border: 1px solid rgba(255,255,255,.55); pointer-events: none; }
.portrait-frame img { display: block; width: 100%; height: auto; aspect-ratio: .92; object-fit: cover; object-position: center top; filter: saturate(.78) contrast(1.04); }

.section { padding: clamp(5.5rem, 10vw, 9rem) clamp(1.25rem, 7vw, 8rem); }
.section-heading { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr); gap: 2rem; align-items: start; margin-bottom: clamp(3rem, 6vw, 5rem); }
.section-heading.compact { grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr); }
.section-heading h2 { max-width: 850px; margin-bottom: 0; font-family: var(--display); font-size: clamp(2.4rem, 4.6vw, 4.8rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.section-intro { max-width: 720px; margin: 1rem 0 0; color: #60747d; font-size: 1.02rem; }
.research .section-intro { color: #b9cdd3; }

.research { color: var(--white); background: var(--ink); }
.research .section-number { color: var(--mint); }
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.16); }
.research-card { min-height: 390px; padding: clamp(1.7rem, 3vw, 2.7rem); background: #0d2230; }
.research-card.featured { background: var(--teal); }
.research-card h3 { margin-bottom: 1.2rem; font-family: var(--display); font-size: clamp(1.85rem, 2.6vw, 2.7rem); font-weight: 500; line-height: 1.1; }
.research-card p:not(.card-kicker) { color: #c8d7db; }
.research-card.featured p:not(.card-kicker) { color: #edfdfb; }
.research-card .card-kicker { color: var(--mint); }
.research-card.featured .card-kicker { color: #c5fff7; }
.topic-list { display: flex; flex-wrap: wrap; gap: .55rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.topic-list li { padding: .4rem .7rem; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; font-size: .82rem; font-weight: 700; }

.publications { background: var(--white); }
.publication { display: grid; grid-template-columns: minmax(180px, .55fr) minmax(0, 1.45fr); gap: 2rem; padding: 2rem 0; border-top: 1px solid var(--line); }
.lead-publication { padding: clamp(2rem, 4vw, 3.5rem); border: 0; color: var(--white); background: var(--teal); }
.pub-meta { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pub-meta span:first-child { font-size: .88rem; }
.pub-meta span:last-child { opacity: .66; }
.pub-body h3 { max-width: 900px; margin-bottom: .7rem; font-family: var(--display); font-size: clamp(1.18rem, 1.85vw, 1.8rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.pub-body p { margin-bottom: 0; color: #58707b; }
.lead-publication .pub-body p { color: #d9f5f2; }
.text-link { display: inline-block; margin-top: 1.2rem; font-size: .9rem; font-weight: 800; text-decoration-thickness: 1px; text-underline-offset: .3rem; }
.award-note { display: inline-flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 1rem 0 0 !important; padding: .5rem .7rem; border-left: 3px solid var(--teal); color: var(--ink) !important; background: #e9f8f5; font-size: .88rem; font-weight: 750; }
.award-note span { color: var(--teal); font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }

.cv-page-main { padding: clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 7vw, 8rem) clamp(4rem, 8vw, 7rem); }
.cv-page-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: end; max-width: 1400px; margin: 0 auto 2.5rem; }
.cv-page-hero h1 { margin-bottom: .8rem; font-size: clamp(2.8rem, 6vw, 5.8rem); }
.cv-page-hero .lede { margin-bottom: 0; }
.cv-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .75rem; }
.cv-viewer-shell { max-width: 1400px; margin: 0 auto; padding: .75rem; border: 1px solid var(--line); background: var(--white); box-shadow: 0 24px 60px rgba(7,24,36,.1); }
.cv-viewer { display: block; width: 100%; height: min(78vh, 1050px); min-height: 680px; border: 0; background: #e7ecec; }
.nav-current { color: var(--teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35rem; }

.experience { background: #eaf1f0; }
.background-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); gap: clamp(3rem, 7vw, 7rem); }
.timeline article { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 1.25rem; padding: 1.75rem 0; border-top: 1px solid #bacbcb; }
.timeline time { color: var(--teal); font-size: .86rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.timeline h3 { margin-bottom: .3rem; font-size: 1.12rem; }
.timeline p { margin-bottom: 0; color: #58707b; }
.timeline .experience-label { margin: .7rem 0 .15rem; color: var(--teal); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.timeline .experience-detail { margin: .12rem 0 0; color: var(--ink-soft); }
.timeline .experience-department { margin: .7rem 0 0; color: #58707b; }
.timeline .experience-institution { margin: .45rem 0 0; color: #58707b; font-weight: 700; }
.education-card { align-self: start; padding: clamp(1.6rem, 3vw, 2.5rem); color: var(--white); background: var(--ink); }
.education-card .card-kicker { color: var(--mint); }
.education-card > div { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem 0; border-top: 1px solid rgba(255,255,255,.18); }
.education-card > div span:last-child { color: #a9bdc5; font-size: .86rem; }
.degree { font-family: var(--display); font-size: 1.25rem; line-height: 1.25; }

.contact { padding: clamp(5.5rem, 12vw, 10rem) clamp(1.25rem, 12vw, 13rem); text-align: center; color: var(--ink); background: var(--mint); }
.contact .section-number { color: var(--teal); }
.contact h2 { max-width: 900px; margin: 0 auto 1.25rem; font-family: var(--display); font-size: clamp(2.4rem, 5.4vw, 5.4rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.03; }
.contact p:not(.section-number) { max-width: 650px; margin: 0 auto 2rem; }
.button-light { background: var(--white); border-color: var(--white); }
.button-light:hover, .button-light:focus-visible { color: var(--white); background: var(--ink); border-color: var(--ink); }

footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 7vw, 8rem); color: #b5c7ce; background: var(--ink); font-size: .82rem; }
footer p { margin: 0; }
footer div { display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer a { text-underline-offset: .25rem; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

@media (min-width: 981px) {
  .hero h1 { font-size: clamp(2.4rem, 4.35vw, 4.5rem); }
}

@media (max-width: 980px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .6rem; }
  nav { width: 100%; padding-bottom: .15rem; overflow-x: auto; white-space: nowrap; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 2.25rem; min-height: 0; }
  .hero-intro { grid-column: 1; grid-row: 1; }
  .portrait-wrap { grid-column: 1; grid-row: 2; width: min(76vw, 430px); margin: 0 auto .9rem; transform: none; }
  .hero-details { grid-column: 1; grid-row: 3; }
  .quick-facts { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
  .research-card { min-height: 0; }
  .background-grid { grid-template-columns: 1fr; }
  .cv-page-hero { grid-template-columns: 1fr; align-items: start; }
  .cv-page-actions { justify-content: flex-start; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 9rem; }
  .wordmark { font-size: .95rem; }
  .site-header { padding-block: .65rem; }
  nav { gap: 1.1rem; }
  .portrait-wrap { margin-bottom: 1.7rem; }
  nav a { font-size: .82rem; }
  .hero { padding-top: 3.5rem; }
  h1 { font-size: clamp(2.85rem, 14vw, 4.25rem); }
  .section-heading, .section-heading.compact, .publication, .timeline article { grid-template-columns: 1fr; gap: .6rem; }
  .publication { padding: 1.5rem 0; }
  .lead-publication { padding: 1.6rem; }
  .pub-meta { flex-direction: row; justify-content: space-between; }
  footer { flex-direction: column; }
  .cv-viewer { min-height: 560px; }
}

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