:root {
  color-scheme: light;
  --bg: #f5efe4;
  --bg-2: #e7f0ea;
  --panel: rgba(255, 252, 247, 0.82);
  --panel-border: rgba(38, 48, 41, 0.1);
  --text: #15201a;
  --muted: #5d6b63;
  --accent: #164e3f;
  --accent-2: #8b5e3c;
  --shadow: 0 18px 50px rgba(18, 27, 22, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(24, 85, 66, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(139, 94, 60, 0.15), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #f8f5ee 42%, #f3f7f2 100%);
  padding-top: 5.75rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(21, 32, 26, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 32, 26, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 70%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(16px);
  background: rgba(249, 246, 239, 0.82);
  border-bottom: 1px solid rgba(21, 32, 26, 0.08);
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.social-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.icon-button,
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(21, 32, 26, 0.12);
  background: rgba(255, 255, 255, 0.72);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.icon-button {
  padding: 0.58rem 0.8rem;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--muted);
}

.icon-button svg,
.chip-link svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.icon-button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #206651);
  border-color: transparent;
}

.icon-button:hover,
.icon-button:focus-visible,
.chip-link:hover,
.chip-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(21, 32, 26, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(21, 32, 26, 0.12);
  outline: none;
}

.icon-button.primary:hover,
.icon-button.primary:focus-visible {
  background: linear-gradient(135deg, #1c624e, #2d735f);
}

.page-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto 4rem;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.portrait {
  width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(21, 32, 26, 0.1);
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
}

.hero-copy h1,
.bio-section h2,
.section-head h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.subtitle {
  max-width: 55ch;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.bio-section,
.papers-section {
  margin-top: 1.5rem;
}

.bio-section {
  padding: 1.6rem 1.6rem 1.4rem;
}

.bio-section h2,
.section-head h2 {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  margin-bottom: 0.8rem;
}

.bio-section p,
.section-head p,
.paper-abstract {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.bio-section p + p {
  margin-top: 0.8rem;
}

.section-head {
  padding: 0 0.2rem 1rem;
}

.papers-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.paper-card {
  overflow: hidden;
}

.paper-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(135deg, rgba(232, 239, 233, 0.95), rgba(247, 234, 220, 0.95));
  padding: 0.75rem;
  border-bottom: 1px solid rgba(21, 32, 26, 0.08);
}

.paper-body {
  padding: 1.1rem 1.1rem 1.2rem;
}

.paper-body h3 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
}

.paper-venue {
  margin: 0.4rem 0 0.85rem;
  color: var(--accent-2);
  font-size: 0.95rem;
  font-weight: 500;
}

.paper-abstract {
  font-size: 0.97rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.chip-link {
  padding: 0.52rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .papers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-top: 7.25rem;
  }

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

  .social-nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .portrait {
    width: 150px;
  }

  .papers-grid {
    grid-template-columns: 1fr;
  }
}
