:root {
  --bg: #f8f3e9;
  --paper: #fffdf8;
  --ink: #1e2726;
  --muted: #5b6663;
  --line: #d7d1c2;
  --accent: #0a7a72;
  --accent-strong: #07534f;
  --sand: #d18f42;
  --shadow: 0 14px 40px rgba(18, 38, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #fff7e8 0, transparent 45%),
    radial-gradient(circle at 85% 20%, #ebf8f6 0, transparent 40%),
    var(--bg);
  line-height: 1.55;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 100%);
}

.container {
  width: min(1060px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(30, 39, 38, 0.09);
  background: rgba(248, 243, 233, 0.78);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 1.1rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.93rem;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-strong);
}

.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.65fr 0.85fr;
  gap: 1.1rem;
  align-items: stretch;
  padding: 2.4rem 0 1.2rem;
}

.hero-text,
.hero-panel {
  height: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-text {
  padding: 2rem;
}

.hero-panel {
  width: 100%;
  max-width: 440px;
  justify-self: end;
  padding: 1.2rem;
}

.headshot {
  margin: 0 auto 0.8rem;
  max-width: 360px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.headshot img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "IBM Plex Serif", serif;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin-top: 0.5rem;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
}

h3 {
  font-size: 1.1rem;
}

.subtitle {
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.summary {
  margin: 1.05rem 0 0;
  max-width: 55ch;
}

.hero-links {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 0.45rem;
  padding: 0.62rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.btn span {
  display: inline-block;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--accent);
}

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

.meta-list {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.meta-list li {
  color: var(--muted);
}

.meta-list span {
  display: inline-block;
  width: 80px;
  color: var(--ink);
  font-weight: 600;
}

.chips {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.chips span {
  background: #e4f4f2;
  color: #0b5d57;
  border: 1px solid #cce9e5;
  border-radius: 999px;
  font-size: 0.8rem;
  padding: 0.35rem 0.62rem;
  width: fit-content;
}

.panel-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.95rem;
}

.hero-edu {
  margin-top: 1.2rem;
}

.edu-compact {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px dashed var(--line);
}

.edu-compact h3 {
  font-size: 1rem;
  margin: 0;
}

.edu-compact ul {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.edu-compact li strong {
  white-space: nowrap;
}

.section {
  padding: 1.8rem 0;
}

.section-head {
  margin-bottom: 1.2rem;
}

.timeline {
  display: grid;
  gap: 0.85rem;
}

.timeline-item,
.pub-card,
.exp-card,
.contact-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.timeline-item,
.exp-card {
  padding: 1.1rem 1.2rem;
}

.time {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.pub-note {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.pub-card {
  padding: 1rem 1.1rem;
}

.pub-card h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.pub-card h3 a:hover {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.pub-card p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.pub-card .venue,
.pub-row .venue {
  margin-top: 0.45rem;
  color: var(--accent-strong);
  font-weight: 600;
}

.exp-list {
  display: grid;
  gap: 0.9rem;
}

.exp-card p:last-child {
  margin-bottom: 0;
}

.contact-box {
  padding: 1.5rem;
  text-align: center;
}

.footer {
  padding: 1.6rem 0 2.2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.pub-page-hero {
  padding-top: 2.7rem;
  padding-bottom: 0.8rem;
}

.pub-full-list {
  display: grid;
  gap: 1rem;
}

.year-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}

.year-title {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  color: var(--accent-strong);
}

.year-items {
  display: grid;
  gap: 0.75rem;
}

.pub-row {
  padding: 0.8rem 0.1rem;
  border-top: 1px dashed var(--line);
}

.pub-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.pub-row h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.pub-row h3 a:hover {
  color: var(--accent-strong);
  border-color: var(--accent-strong);
}

.pub-row .authors {
  margin-top: 0.42rem;
  color: var(--muted);
}

.pub-row .insight {
  margin-top: 0.58rem;
  padding-top: 0.58rem;
  border-top: 1px dashed var(--line);
  color: var(--ink);
  font-size: 0.92rem;
}

.pub-row .insight strong {
  color: var(--accent-strong);
}

/* Hard override to keep icon buttons in one line across browsers/cached variants */
.hero-links .btn {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  min-height: 44px;
}

.hero-links .btn > span {
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1.1;
}

.hero-links .btn svg {
  flex: 0 0 auto !important;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3.2rem;
  }

  .hero-panel {
    max-width: none;
    justify-self: stretch;
  }

  .headshot {
    max-width: none;
  }

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

@media (max-width: 760px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 0;
  }

  .nav {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.25rem;
  }

  .hero-text,
  .hero-panel {
    border-radius: 16px;
    padding: 1.25rem;
  }
}
