:root {
  --bg: #f4f2ec;
  --panel: rgba(255, 255, 255, 0.78);
  --text: #171612;
  --muted: #5f5a4d;
  --line: rgba(23, 22, 18, 0.1);
  --accent: #2f5f4f;
  --accent-soft: rgba(47, 95, 79, 0.12);
  --radius-lg: 24px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(215, 222, 203, 0.65), transparent 34%),
    radial-gradient(circle at 78% 0%, rgba(223, 216, 198, 0.72), transparent 36%),
    var(--bg);
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 75% 30%, rgba(47, 95, 79, 0.09), transparent 45%),
    radial-gradient(circle at 23% 64%, rgba(18, 52, 69, 0.08), transparent 42%);
  z-index: -1;
}

.site-header {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 1.5rem auto 0;
  padding: 0.95rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #315b4f, #5b7d72);
}

.brand-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: nowrap;
}

.tab-nav {
  display: inline-flex;
  gap: 0.35rem;
}

.tab-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 180ms ease;
}

.tab-button:hover {
  border-color: var(--line);
  color: var(--text);
}

.tab-button.is-active {
  color: var(--text);
  background: #ffffff;
  border-color: rgba(23, 22, 18, 0.12);
}

main {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 1rem auto 3rem;
}

.tab-panel {
  animation: reveal 420ms ease;
}

.hero {
  padding: 0.35rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
  gap: clamp(1rem, 3vw, 3rem);
}

.hero-copy {
  max-width: 45rem;
  position: relative;
  z-index: 3;
  margin-top: clamp(1.4rem, 3vw, 2.4rem);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1,
h2 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  line-height: 1.05;
}

h1 {
  margin-top: 0.6rem;
  max-width: 14ch;
  font-size: clamp(2rem, 5.8vw, 4.3rem);
  font-weight: 500;
}

.hero-lead,
.section-lead,
.overview-copy p {
  margin: 1rem 0 0;
  max-width: 66ch;
  color: rgba(23, 22, 18, 0.84);
  font-size: clamp(1rem, 1.9vw, 1.12rem);
}

.hero-summary {
  width: min(1080px, calc(100% - 1rem));
  margin: clamp(-17rem, -26vh, -12.8rem) auto 0;
  position: relative;
  z-index: 3;
}

.hero-lead-main {
  max-width: 100%;
}

.hero-invite {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-weight: 500;
}

.hero-invite a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.hero-invite a:hover {
  color: #24493d;
}

.hero-visual {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  min-height: min(78vh, 700px);
}

#fitnessLandscape {
  display: block;
  width: 100%;
  height: min(78vh, 700px);
  background: transparent;
}

.overview-copy {
  margin-top: 1.45rem;
}

.papers,
.content-block {
  padding: 1.45rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(8px);
}

.papers {
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.content-block {
  margin-top: 2.8rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  font-weight: 500;
}

.paper-grid,
.team-grid,
.contact-grid {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.paper-card,
.member-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
}

.paper-card {
  grid-column: span 4;
}

.member-card,
.contact-card {
  grid-column: span 6;
}

.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "email location"
    "opportunities location";
  align-items: start;
}

.contact-grid .contact-card {
  grid-column: auto;
}

.contact-grid .contact-card:nth-child(1) {
  grid-area: email;
  padding-top: 0.85rem;
  padding-bottom: 0.8rem;
}

.contact-grid .contact-card:nth-child(1) > a {
  margin-top: 0.55rem;
}

.contact-grid .contact-card:nth-child(2) {
  grid-area: location;
}

.contact-grid .contact-card:nth-child(3) {
  grid-area: opportunities;
}

h3 {
  font-size: 1.01rem;
  font-weight: 600;
}

.paper-card p,
.member-card p,
.contact-card p {
  margin: 0.45rem 0 0;
  color: rgba(23, 22, 18, 0.82);
}

.team-collaborators {
  margin-top: 1.25rem;
}

.team-collaborators p {
  margin: 0.45rem 0 0;
  max-width: 72ch;
  color: rgba(23, 22, 18, 0.84);
}

.team-collaborators a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.team-collaborators a:hover {
  color: #24493d;
}

.team-note {
  margin: 1rem 0 0;
  max-width: 72ch;
  color: rgba(23, 22, 18, 0.88);
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-weight: 500;
}

.paper-link,
.contact-card > a {
  display: inline-flex;
  margin-top: 0.9rem;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text);
  border-radius: 999px;
  border: 1px solid rgba(23, 22, 18, 0.16);
  background: #fff;
  padding: 0.42rem 0.8rem;
  font-size: 0.9rem;
  transition: transform 180ms ease, border-color 180ms ease;
}

.paper-link:hover,
.contact-card > a:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 22, 18, 0.35);
}

.contact-card > a {
  color: var(--accent);
}

.contact-card p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.contact-card p a:hover {
  color: #24493d;
}

.contact-map {
  margin-top: 0.72rem;
  width: min(100%, 320px);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 170px;
  border: 0;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 50;
}

.pdf-modal[hidden] {
  display: none;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 17, 13, 0.35);
  backdrop-filter: blur(2px);
}

.pdf-modal-panel {
  position: relative;
  width: min(1220px, calc(100% - 2.2rem));
  height: min(90vh, 920px);
  border-radius: 18px;
  border: 1px solid rgba(23, 22, 18, 0.15);
  background: #f8f7f2;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.95rem;
  border-bottom: 1px solid rgba(23, 22, 18, 0.1);
}

.pdf-modal-header h3 {
  font-family: "Fraunces", "Iowan Old Style", serif;
  font-size: 1.05rem;
  font-weight: 500;
}

.pdf-modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.pdf-modal-open-new,
.pdf-modal-close {
  border: 1px solid rgba(23, 22, 18, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  padding: 0.38rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.pdf-modal-open-new:hover,
.pdf-modal-close:hover {
  border-color: rgba(23, 22, 18, 0.34);
  transform: translateY(-1px);
}

.pdf-modal-frame {
  width: 100%;
  flex: 1;
  border: 0;
  background: #fff;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .paper-card,
  .member-card,
  .contact-card {
    grid-column: span 12;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .contact-grid .contact-card,
  .contact-grid .contact-card:nth-child(1),
  .contact-grid .contact-card:nth-child(2),
  .contact-grid .contact-card:nth-child(3) {
    grid-area: auto;
  }

  .contact-grid .contact-card:nth-child(1) {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .contact-grid .contact-card:nth-child(1) > a {
    margin-top: 0.9rem;
  }

  .site-header {
    width: min(1120px, calc(100% - 1.3rem));
    margin-top: 0.85rem;
    border-radius: 18px;
    flex-wrap: wrap;
  }

  main {
    width: min(1120px, calc(100% - 1.3rem));
    margin-top: 1rem;
  }

  .tab-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .hero-copy {
    margin-top: 0;
  }

  .hero-lead-main {
    max-width: 66ch;
  }

  .hero-summary {
    margin-top: 0;
    position: static;
  }

  .hero-visual {
    min-height: 0;
    margin-top: 0.2rem;
  }

  #fitnessLandscape {
    height: clamp(220px, 42vh, 320px);
  }

  .papers {
    margin-top: 0.9rem;
  }

  .contact-map {
    width: 100%;
    max-width: 100%;
  }

  .pdf-modal-panel {
    width: calc(100% - 1rem);
    height: 92vh;
    border-radius: 14px;
  }

  .pdf-modal-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
