:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #171a1f;
  --muted: #667085;
  --line: #dfe3e6;
  --accent: #1f5f56;
  --accent-soft: #e9f0ee;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header {
  background: rgba(247, 248, 246, 0.93);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,.035);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1rem;
}
.brand:hover { color: var(--accent); text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: #40464f; font-size: .82rem; font-weight: 500; white-space: nowrap; }
.nav-links a.active,
.nav-links a:hover { color: var(--accent); text-decoration: none; }

.menu-button {
  display: none;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 9px;
  padding: 7px 10px;
  font: inherit;
  color: var(--text);
}

/* ---------- Home intro ---------- */
.hero {
  min-height: calc(88vh - 74px);
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 76px;
  align-items: center;
  padding-block: 76px 90px;
}

.eyebrow,
.section-kicker,
.project-type {
  margin: 0 0 10px;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.3rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.hero-role {
  margin: 24px 0 14px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #343941;
  font-weight: 500;
}

.hero-text {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.03rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
}
.contact-row a { font-size: .92rem; font-weight: 600; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.contact-link i { width: 1.05rem; text-align: center; }

.hero-photo-wrap {
  width: min(100%, 370px);
  aspect-ratio: 4/5;
  justify-self: end;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #dfe7e3, #f2f4f2);
  box-shadow: 0 24px 70px rgba(31,95,86,.10);
}
.hero-photo { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder::after {
  content: "Add profile.jpg to assets/images/";
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: .88rem;
}

/* ---------- Shared section styles ---------- */
.section {
  padding-block: 92px;
  border-top: 1px solid var(--line);
}
.section h2 {
  margin: 0 0 22px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.section-lead {
  max-width: 800px;
  margin: 0 0 24px;
  color: #4f5660;
  font-size: 1.03rem;
}
.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: end;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 9px; }
.tag-list span {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: .83rem;
  font-weight: 600;
}
.research-tags { margin-bottom: 46px; }

/* ---------- Publications ---------- */
.publications-section h3 {
  margin: 42px 0 18px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #4d545e;
}
.publication-list { margin: 0; padding-left: 24px; }
.publication-list li {
  padding: 0 0 22px 8px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.publication-list li:last-child { margin-bottom: 0; }
.pub-title { margin: 0 0 5px; font-weight: 700; color: var(--text); line-height: 1.5; }
.pub-authors,
.pub-venue { margin: 3px 0; color: #555d67; font-size: .94rem; }
.pub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: .72rem;
  vertical-align: middle;
}
.pub-link:hover { background: var(--accent-soft); text-decoration: none; }
.placeholder-pub-link,
.placeholder-result-link { opacity: .38; }

/* ---------- Timelines ---------- */
.timeline-list { border-top: 1px solid var(--line); margin-top: 38px; }
.timeline-item {
  display: grid;
  grid-template-columns: 205px 1fr;
  gap: 38px;
  padding: 31px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-date { color: var(--muted); font-size: .88rem; font-weight: 600; }
.timeline-item h3,
.timeline-item h2 { margin: 0 0 4px; font-size: 1.26rem; letter-spacing: -.02em; }
.timeline-item p { color: #555d67; margin: 8px 0 0; }
.meta { margin: 0 !important; color: var(--accent) !important; font-weight: 600; }

.timeline-details {
  margin: 0.6rem 0 0;
  padding-left: 1.1rem;
}

.timeline-details li {
  margin-bottom: 0.3rem;
  line-height: 1.5;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--muted);
}

.timeline-details li:last-child {
  margin-bottom: 0;
}

/* ---------- Projects ---------- */
.project-list { border-top: 1px solid var(--line); margin-top: 38px; }
.project-item { padding: 30px 0; border-bottom: 1px solid var(--line); }
.project-item h3,
.project-item h2 { margin: 0 0 9px; font-size: 1.33rem; letter-spacing: -.025em; }
.project-item p:not(.project-type) { max-width: 860px; color: #555d67; margin: 8px 0; }
.project-link,
.result-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  font-size: .88rem;
  font-weight: 600;
}
.compact-projects { margin-top: 0; }

/* ---------- Interior pages ---------- */
.page-main { padding-block: 72px 110px; min-height: calc(100vh - 150px); }
.page-heading { max-width: 820px; margin-bottom: 64px; }
.page-heading h1 {
  margin: 0 0 20px;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.page-intro { font-size: 1.04rem; color: var(--muted); max-width: 760px; }
.section-block { margin-top: 76px; }
.first-block { margin-top: 0; }
.section-block > h2 { font-size: 1.58rem; margin: 0 0 24px; letter-spacing: -.025em; }

.simple-list { border-top: 1px solid var(--line); }
.simple-list > div { padding: 22px 0; border-bottom: 1px solid var(--line); }
.simple-list h3 { margin: 0 0 4px; font-size: 1.06rem; }
.simple-list p { margin: 0; color: var(--muted); }

.ranked-list > div {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 28px;
  align-items: start;
}
.list-year { color: var(--muted); font-size: .86rem; font-weight: 600; }

/* ---------- News ---------- */
.news-simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.news-simple-list li {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 28px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.news-simple-list time {
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
}
.news-simple-list span {
  color: #3f4650;
  font-size: .94rem;
}

/* ---------- Stills ---------- */

.stills-grid {
  columns: 3;
  column-gap: 26px;
}

.still-card {
  margin: 0 0 34px;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
}

.still-image-wrap {
  overflow: hidden;
  background: #ecefed;
  border-radius: 14px;

  /* Remove fixed aspect ratio */
  /* aspect-ratio: 4/3; */
}

.still-image-wrap img {
  width: 100%;
  height: auto;          /* keeps original image ratio */
  display: block;
  transition: transform .3s ease;
}

.still-card:hover img {
  transform: scale(1.015);
}

.still-placeholder {
  min-height: 250px;
}

.still-placeholder::after {
  content: "Add image here";
  min-height: 250px;
  display: grid;
  place-items: center;
  color: #89908f;
  font-size: .85rem;
}

.still-card figcaption {
  margin-top: 13px;
}

.still-card figcaption h2 {
  margin: 0 0 5px;
  font-size: 1rem;
  letter-spacing: -.015em;
}

.still-card figcaption p {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.55;
}

/* Mobile */
@media (max-width: 700px) {
  .stills-grid {
    columns: 1;
  }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-wrap {
  min-height: 104px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: .84rem;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--muted); font-size: 1rem; }

@media (max-width: 1040px) {
  .menu-button { display: block; }
  .nav-links {
    position: absolute;
    top: 66px;
    left: 20px;
    right: 20px;
    padding: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 16px 50px rgba(0,0,0,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 9px; }

  .hero { grid-template-columns: 1fr; min-height: auto; gap: 42px; padding-block: 68px 80px; }
  .hero-photo-wrap { justify-self: start; width: min(100%, 325px); }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .ranked-list > div { grid-template-columns: 125px 1fr; gap: 22px; }
}

@media (max-width: 600px) {
  .container { width: min(calc(100% - 28px), var(--max-width)); }
  .nav-wrap { min-height: 66px; }
  .hero { padding-block: 48px 66px; }
  .hero h1 { font-size: clamp(3rem, 17vw, 4.8rem); }
  .hero-photo-wrap { width: 100%; max-width: 310px; }
  .section { padding-block: 68px; }
  .page-main { padding-block: 52px 82px; }
  .page-heading { margin-bottom: 46px; }
  .ranked-list > div,
  .news-simple-list li { grid-template-columns: 1fr; gap: 4px; }
  .stills-grid { grid-template-columns: 1fr; }
  .footer-wrap { padding-block: 28px; flex-direction: column; align-items: flex-start; }
}
