:root {
  --ink: #1d2528;
  --muted: #647173;
  --line: #d9e0dd;
  --paper: #fffdf8;
  --soft: #f1f5f1;
  --accent: #8a3f2b;
  --accent-2: #1f6b75;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 14px;
}

.links a {
  color: var(--ink);
  text-decoration: none;
}

.hero {
  min-height: 20vh;
  display: grid;
  align-items: center;
  padding: 24px max(24px, calc((100vw - 1180px) / 2));
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  color: white;
}

.hero > div { max-width: 760px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow { color: #f8d9c8; }

h1, h2, h3, p { overflow-wrap: anywhere; }

h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(28px, 6vw, 72px);
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 24px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.lead {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: 21px;
}

.lead.small { font-size: 18px; }

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.section.alt {
  width: 100%;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: var(--soft);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tile {
  display: grid;
  grid-template-rows: 220px auto;
  min-width: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  text-decoration: none;
}

.tile span {
  padding: 16px;
  font-weight: 700;
}

.paper-list {
  display: grid;
  gap: 14px;
}

.paper-list article,
.note,
.about-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.paper-year {
  margin: 0 0 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.paper-list p,
.publication-list,
.two-col p,
.about-card p { margin-top: 0; }

.publication-list {
  display: grid;
  gap: 12px;
  padding-left: 0;
  list-style: none;
}

.pub {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pub:hover {
  border-color: var(--accent-2);
  box-shadow: 0 4px 14px rgba(31, 107, 117, 0.12);
}

.pub-year {
  padding-top: 2px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.pub-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.pub-title a {
  color: var(--ink);
  text-decoration: none;
}

.pub-title a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.pub-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 620px) {
  .pub {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.note { margin-top: 28px; }

.cv-embed {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.cv-embed iframe {
  display: block;
  width: 100%;
  height: 85vh;
  border: 0;
}

.map-block {
  margin-top: 28px;
}

.map-block h3 {
  margin-bottom: 12px;
}

.map-block iframe {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.book-col {
  grid-template-columns: 200px 1fr 1fr;
  align-items: start;
}

.book-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(29, 37, 40, 0.12);
}

@media (max-width: 860px) {
  .book-col {
    grid-template-columns: 1fr;
  }

  .book-cover {
    max-width: 220px;
  }
}

.mini-gallery,
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.mini-gallery img {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.resources,
.timeline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}

.resources a,
.resources span,
.timeline span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font-size: 14px;
}

.gallery {
  grid-template-columns: repeat(3, 1fr);
}

.gallery img {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
}

footer {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer p { margin: 4px 0; }

@media (max-width: 860px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .links {
    justify-content: flex-start;
    gap: 12px;
  }

  .hero {
    min-height: 18vh;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .content-grid,
  .two-col,
  .gallery {
    grid-template-columns: 1fr;
  }

  .tile {
    grid-template-rows: 180px auto;
  }
}
