:root {
  --bg: #f4ece1;
  --surface: #efe3d2;
  --paper: #faf6ef;
  --fg: #2c1b12;
  --muted: #6d5648;
  --primary: #5c2e1a;
  --accent: #b56a32;
  --nav: #3a2118;
  --nav-fg: #f4ece1;
  --border: #d7c4ae;
  --shadow:
    0 0 0 1px rgb(44 27 18 / 0.08),
    0 1px 2px -1px rgb(44 27 18 / 0.08),
    0 8px 24px -12px rgb(44 27 18 / 0.18);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-sans: "Source Sans 3", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
  outline: 1px solid rgb(44 27 18 / 0.1);
  outline-offset: -1px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  text-wrap: balance;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

p { text-wrap: pretty; margin: 0; }

a { color: inherit; }

button:not(:disabled),
[role="button"]:not(:disabled) { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--nav);
  color: var(--nav-fg);
}

.nav-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
}

.brand {
  margin-right: auto;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--nav-fg);
}

.nav-desktop { display: none; gap: 0.15rem; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  text-decoration: none;
  color: rgb(250 246 239 / 0.72);
  font-size: 0.95rem;
}
.nav-link:hover,
.nav-link.is-current { color: var(--nav-fg); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--nav-fg);
}

.nav-mobile {
  border-top: 1px solid rgb(250 246 239 / 0.1);
  padding: 0.75rem 1.25rem 1rem;
}
.nav-mobile .nav-link { display: flex; color: var(--nav-fg); }

@media (min-width: 800px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
}

main { flex: 1; }

.wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.kicker-accent { color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 72vh;
  background: var(--nav);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--nav), rgb(58 33 24 / 0.45), rgb(58 33 24 / 0.15));
}
.hero-copy {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 7rem 1.25rem 4rem;
  color: var(--paper);
  width: 100%;
}
.hero h1 { font-size: clamp(2.8rem, 8vw, 4.6rem); margin-top: 0.6rem; }
.hero .lede { margin-top: 1rem; max-width: 36rem; font-size: 1.15rem; color: rgb(250 246 239 / 0.9); }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 0.4rem;
  background: var(--primary);
  color: var(--paper);
  font: 600 0.95rem var(--font-sans);
  text-decoration: none;
}
.btn:hover { background: var(--accent); }
.btn-invert { background: var(--paper); color: var(--primary); }
.btn-invert:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--nav-fg); }
.btn-ghost:hover { background: rgb(250 246 239 / 0.1); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  box-shadow: var(--shadow);
}
.btn-outline:hover { background: var(--surface); }

.grid-3 {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@media (min-width: 800px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  overflow: hidden;
  border-radius: 0.7rem;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 1.25rem; }
.card h3 { font-size: 1.45rem; margin-top: 0.4rem; }
.card p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
}
.split img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; border-radius: 0.7rem; }

.band { background: var(--surface); }
.band-primary { background: var(--primary); color: var(--paper); text-align: center; }
.band-primary .muted { color: rgb(250 246 239 / 0.8); }

.team { text-align: center; }
.avatar {
  width: 10rem;
  height: 10rem;
  margin: 0 auto;
  border-radius: 999px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.team h3 { margin-top: 1rem; font-size: 1.25rem; }
.role { color: var(--accent); font-size: 0.9rem; }
.bio { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

.muted { color: var(--muted); }
.page-title { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-top: 0.4rem; }
.lede { margin-top: 1rem; max-width: 40rem; color: var(--muted); }

.research-block { display: grid; gap: 2rem; align-items: center; margin-top: 4rem; }
@media (min-width: 900px) {
  .research-block { grid-template-columns: 1fr 1fr; }
  .research-block.flip .copy { order: -1; }
}
.research-block img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.7rem; }

.papers { margin-top: 3rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.paper { border-bottom: 1px solid var(--border); }
.paper:last-child { border-bottom: 0; }
.paper > button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
  background: none;
  border: 0;
  padding: 1.25rem 0.25rem;
  color: inherit;
  font: inherit;
}
@media (min-width: 640px) {
  .paper > button { flex-direction: row; align-items: baseline; gap: 1.5rem; }
}
.year { width: 4rem; flex-shrink: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.paper h2 { font-size: 1.25rem; }
.meta { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.9rem; }
.abstract { display: none; padding: 0 0 1.5rem; color: var(--muted); font-size: 0.95rem; }
.paper.is-open .abstract { display: block; }

.form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--paper);
  padding: 1.75rem;
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
}
label { display: flex; flex-direction: column; gap: 0.45rem; font-size: 0.95rem; font-weight: 600; }
input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  min-height: 44px;
  border: 0;
  border-radius: 0.4rem;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem var(--font-sans);
  padding: 0.6rem 0.75rem;
  box-shadow: var(--shadow);
}
textarea { min-height: 7rem; }
.check { flex-direction: row; align-items: flex-start; gap: 0.75rem; font-weight: 400; color: var(--muted); }
.check input { margin-top: 0.3rem; accent-color: var(--primary); }
.range { width: 100%; height: 44px; accent-color: var(--primary); }
.row { display: flex; justify-content: space-between; }
.success {
  margin-top: 2.5rem;
  background: var(--paper);
  padding: 2rem;
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
}

.result {
  margin-top: 2.5rem;
  background: var(--surface);
  padding: 2rem;
  border-radius: 0.7rem;
}
.score { font-family: var(--font-display); font-size: 3rem; color: var(--primary); font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 0.6rem; margin-top: 1.5rem; }
.bar-row { display: grid; grid-template-columns: 5rem 1fr; gap: 0.75rem; align-items: center; font-size: 0.85rem; }
.bar-track { height: 10px; background: var(--paper); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 99px; }

.site-footer {
  margin-top: auto;
  background: var(--nav);
  color: var(--nav-fg);
  padding: 2.5rem 1.25rem;
}
.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
@media (min-width: 700px) {
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-end; }
}
.brand-foot { font-family: var(--font-display); font-size: 1.25rem; }
.muted-foot, .footer-meta { color: rgb(250 246 239 / 0.7); font-size: 0.9rem; }
.footer-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-meta .btn { margin-top: 0.5rem; width: fit-content; }

.sfx-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
