/* ============================================================
   Patrick Quintero — Academic site
   Recreated from the Claude Design handoff (Home.dc.html).
   Palette: warm "desert" paper + CREAR Lab petal stripe.
   Fonts: Poppins (display) + Nunito Sans (body) via Google Fonts.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700&display=swap');

:root {
  --ink: #0c2a38;
  --paper: #fbf9ef;
  --paper-card: #ffffff;
  --hairline: #e5dfd2;
  --text-body: #4a4642;
  --text-muted: #8b857e;
  --accent: #bd4a1f;
  --accent-tint: #f7e7d6;
  --focus-ring: #bd4a1f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

/* ---- Header ---------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 247, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav a {
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--text-body);
  padding: 8px 15px;
  border-radius: 999px;
  transition: color .12s, background .12s;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
}

.palette-stripe {
  display: flex;
  height: 8px;
  width: 100%;
}
.palette-stripe span { flex: 1; }

/* ---- Main / layout -------------------------------------------- */
.main {
  flex: 1;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: clamp(36px, 5vw, 64px) 28px clamp(56px, 7vw, 88px);
}

.layout {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ---- Left rail (sticky) --------------------------------------- */
.rail {
  flex: 0 0 360px;
  max-width: 400px;
  min-width: 280px;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.headshot {
  border-radius: 30px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  box-shadow: 9px 9px 0 0 var(--ink);
  background: var(--paper-card);
}
.headshot img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.04;
  object-fit: cover;
}

.connect-card {
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--paper-card);
  padding: 22px 24px;
}
.connect-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.connect-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}
.connect-row .label {
  font-size: 15px;
  color: var(--text-muted);
}
.connect-row a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  text-align: right;
}
.connect-row a:hover { text-decoration: underline; }
.divider { height: 1px; background: var(--hairline); }

.btn-cv {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper-card);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 15px 22px;
  box-shadow: 4px 4px 0 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn-cv:hover {
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 0 var(--ink);
}
.btn-cv:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--ink);
}

/* ---- Right content -------------------------------------------- */
.content {
  flex: 1 1 380px;
  min-width: 300px;
}

.eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 16px;
}

.hero-sub {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.4;
  color: var(--text-body);
  margin: 0 0 clamp(36px, 4vw, 52px);
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  margin: 0 0 22px;
}
.section-title.spaced { margin-top: clamp(36px, 4vw, 52px); }

.prose {
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.75;
  color: var(--text-body);
  max-width: 64ch;
  text-wrap: pretty;
}
.prose:first-of-type { margin: 0 0 20px; }
.prose + .prose { margin: 0 0 30px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(44px, 5vw, 64px);
}
.chip {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
}
.chip--red    { color: #fff; background: #c0392b; }
.chip--teal   { color: #fff; background: #178f95; }
.chip--gold   { color: var(--ink); background: #efa310; }
.chip--orange { color: #fff; background: #cf6f12; }

/* ---- Presentations -------------------------------------------- */
.entry {
  border-top: 2px solid var(--ink);
  padding-top: 22px;
  margin-bottom: 18px;
}
.entry .cite {
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.65;
  color: var(--text-body);
  margin: 0 0 6px;
}
.entry .title-line {
  font-size: clamp(16px, 1.7vw, 18px);
  line-height: 1.6;
  margin: 0 0 14px;
}
.entry .title-line strong { color: var(--ink); font-weight: 700; }
.entry .title-line em { color: var(--text-muted); }
.tag {
  display: inline-block;
  vertical-align: middle;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: #efa310;
  padding: 3px 12px;
  border-radius: 999px;
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
}
.link-arrow:hover { text-decoration: underline; }

/* ---- Gallery -------------------------------------------------- */
.gallery {
  border: 2px solid var(--ink);
  border-radius: 22px;
  padding: 14px;
  background: var(--paper-card);
  box-shadow: 6px 6px 0 0 #178f95;
  max-width: 560px;
}
.gallery-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2eee1;
  border-radius: 14px;
  border: 1.5px dashed rgba(12, 42, 56, 0.25);
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}
.gallery-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.gallery-caption {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 12px 6px 4px;
}

/* ---- Footer --------------------------------------------------- */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 28px;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-about { flex: 1 1 280px; min-width: 240px; }
.footer-about .name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 14px;
}
.footer-about p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
  max-width: 34ch;
}
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col .col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col .links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col .links a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: color .12s;
}
.footer-col .links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--hairline); }
.footer-bottom div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 28px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   Shared section primitives (Research / Publications / CV)
   ============================================================ */
.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.narrow { max-width: 820px; margin: 0 auto; }
.wide { max-width: 1120px; margin: 0 auto; }

/* The interior pages use a slightly narrower gutter than Home. */
.site-header.compact .header-inner,
.main.compact,
.site-footer.compact .footer-inner,
.site-footer.compact .footer-bottom div { max-width: 1120px; padding-left: 24px; padding-right: 24px; }

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 15px;
}

/* ---- Research --------------------------------------------------- */
.research-statement { padding: clamp(44px, 6vw, 84px) 24px clamp(36px, 4vw, 52px); }
.research-statement h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  text-wrap: balance;
}
.research-statement p {
  font-size: clamp(17px, 1.9vw, 19px);
  line-height: 1.75;
  color: var(--text-body);
  margin: 0 0 20px;
  text-wrap: pretty;
}
.research-statement p:last-child { margin-bottom: 0; }
.research-statement strong { color: var(--ink); font-weight: 700; }

.focus-band {
  background: #f2eee1;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.focus-band .inner { padding: clamp(48px, 6vw, 72px) 24px; }
.focus-band h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.focus-card {
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 2px 8px rgba(20, 17, 15, 0.06);
}
.focus-card .num {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 14px;
}
.focus-card h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.28;
  margin: 0 0 10px;
  text-wrap: pretty;
}
.focus-card p { font-size: 15px; line-height: 1.65; color: var(--text-body); margin: 0; }
.focus-card--red    { border-top: 5px solid #c0392b; }
.focus-card--red .num    { color: #c0392b; }
.focus-card--teal   { border-top: 5px solid #178f95; }
.focus-card--teal .num   { color: #178f95; }
.focus-card--gold   { border-top: 5px solid #efa310; }
.focus-card--gold .num   { color: #cf6f12; }
.focus-card--deep   { border-top: 5px solid #0a5a6e; }
.focus-card--deep .num   { color: #0a5a6e; }

.callout {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--accent-tint);
  border: 1px solid #ecccb1;
  border-radius: 18px;
  padding: 20px 24px;
}
.callout .icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  flex: none;
}
.callout p { font-size: 15px; line-height: 1.6; color: #5a2a18; margin: 0; }
.callout strong { color: var(--accent); }

.lab-section { padding: clamp(48px, 6vw, 72px) 24px; }
.lab-cols { display: flex; gap: clamp(28px, 4vw, 48px); align-items: stretch; flex-wrap: wrap; }
.lab-dark {
  flex: 1 1 340px;
  min-width: 280px;
  background: var(--ink);
  border-radius: 26px;
  padding: clamp(30px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lab-dark .eyebrow-mint {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #8fccb9; margin-bottom: 14px;
}
.lab-dark h2 {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(24px, 3vw, 30px); line-height: 1.18;
  letter-spacing: -0.02em; margin: 0 0 12px; color: var(--paper); text-wrap: pretty;
}
.lab-dark .line1 { font-size: 15px; line-height: 1.7; color: #d8d2ca; margin: 0 0 8px; }
.lab-dark .line2 { font-size: 15px; line-height: 1.7; color: #a8a29a; margin: 0 0 24px; }
.lab-dark a {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none; font-family: 'Poppins', sans-serif; font-weight: 600;
  font-size: 15px; color: var(--ink); background: var(--paper);
  padding: 13px 22px; border-radius: 999px; transition: filter .12s;
}
.lab-dark a:hover { filter: brightness(0.94); }
.lab-quote {
  flex: 1 1 340px;
  min-width: 280px;
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: 26px;
  padding: clamp(30px, 4vw, 44px);
  box-shadow: 0 2px 8px rgba(20, 17, 15, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.lab-quote .q {
  font-size: clamp(17px, 1.9vw, 19px); line-height: 1.7; color: var(--ink);
  margin: 0 0 18px; font-family: 'Poppins', sans-serif; font-weight: 500; text-wrap: pretty;
}
.lab-quote p { font-size: 15px; line-height: 1.7; color: var(--text-body); margin: 0; }

/* ---- Publications ----------------------------------------------- */
.pub-hero { padding: clamp(44px, 6vw, 80px) 24px clamp(24px, 3vw, 36px); }
.pub-hero h1 {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.06;
  letter-spacing: -0.025em; margin: 0 0 16px; text-wrap: balance;
}
.pub-hero p { font-size: clamp(16px, 1.8vw, 18px); line-height: 1.7; color: var(--text-body); margin: 0; max-width: 58ch; }

.pub-section { padding: clamp(20px, 2vw, 28px) 24px; }
.pub-section.last { padding: clamp(40px, 5vw, 64px) 24px clamp(56px, 7vw, 88px); }
.pub-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 22px; border-bottom: 2px solid var(--ink); padding-bottom: 14px;
}
.pub-head h2 {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.01em; margin: 0;
}
.count-badge {
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--accent); background: var(--accent-tint);
  padding: 3px 11px; border-radius: 999px;
}
.pub-article { display: flex; gap: clamp(24px, 4vw, 44px); align-items: flex-start; flex-wrap: wrap; }
.pub-cite { flex: 1 1 380px; min-width: 300px; }
.pub-kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent);
  background: var(--accent-tint); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.pub-cite .ref { font-size: clamp(16px, 1.7vw, 18px); line-height: 1.7; color: var(--ink); margin: 0 0 22px; text-wrap: pretty; }
.pub-cite .ref em { color: var(--text-body); }
.pub-meta { display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; }
.pub-meta .row { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-body); }
.pub-meta .ic {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 9px; background: #f2eee1; color: var(--accent); flex: none;
}
.pub-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pub-tag { font-size: 13px; font-weight: 700; color: #fff; padding: 7px 14px; border-radius: 999px; }
.pub-tag--teal { background: #178f95; }
.pub-tag--orange { background: #cf6f12; }
.pub-tag--red { background: #c0392b; }
.pub-tag--deep { background: #0a5a6e; }

.pub-poster { flex: 0 0 360px; max-width: 100%; min-width: 280px; }
.pub-poster .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.pub-poster .frame-wrap {
  border: 1px solid var(--hairline); border-radius: 20px; padding: 14px;
  background: var(--paper-card); box-shadow: 0 8px 24px rgba(20, 17, 15, 0.09);
}
.poster-slot {
  width: 100%; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  background: #f2eee1; border-radius: 12px; color: var(--text-muted); text-align: center; padding: 16px;
}
.pub-poster .cap { font-size: 12.5px; line-height: 1.55; color: var(--text-muted); margin: 12px 4px 4px; text-align: center; }

.empty-panel {
  background: #f2eee1; border: 1px dashed #cfc6b8; border-radius: 22px;
  padding: clamp(36px, 5vw, 56px); text-align: center;
}
.empty-panel .badge {
  display: inline-grid; place-items: center; width: 52px; height: 52px;
  border-radius: 14px; background: var(--paper-card); border: 1px solid var(--hairline);
  color: var(--accent); margin-bottom: 18px;
}
.empty-panel h3 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: clamp(18px, 2vw, 21px); margin: 0 0 10px; }
.empty-panel p { font-size: 15px; line-height: 1.65; color: var(--text-body); margin: 0 auto; max-width: 46ch; }
.empty-panel a.link-arrow { margin-top: 22px; font-size: 14px; }

/* ---- CV --------------------------------------------------------- */
.cv-hero-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 40px);
}
.cv-hero-row h1 {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: clamp(34px, 5vw, 52px); line-height: 1.06;
  letter-spacing: -0.025em; margin: 0 0 14px;
}
.cv-hero-row .lead { font-size: clamp(16px, 1.8vw, 18px); line-height: 1.7; color: var(--text-body); margin: 0; max-width: 50ch; }
.btn-download {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px; color: #fff;
  background: var(--accent); padding: 14px 24px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(189, 74, 31, 0.25); transition: filter .12s; flex: none;
}
.btn-download:hover { filter: brightness(1.12); }

.cv-cols { display: flex; gap: clamp(24px, 3vw, 36px); align-items: flex-start; flex-wrap: wrap; }
.cv-side { flex: 0 0 280px; max-width: 320px; min-width: 240px; position: sticky; top: 96px; display: flex; flex-direction: column; gap: 16px; }
.glance-card {
  background: var(--paper-card); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 24px; box-shadow: 0 2px 8px rgba(20, 17, 15, 0.06);
}
.glance-card .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; }
.glance-list { display: flex; flex-direction: column; gap: 18px; }
.glance-list .k { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; margin-bottom: 4px; }
.glance-list .v { font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.glance-list .k.red { color: #c0392b; }
.glance-list .k.teal { color: #178f95; }
.glance-list .k.orange { color: #cf6f12; }

.contact-dark { background: var(--ink); border-radius: 20px; padding: 24px; }
.contact-dark .label { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #8fccb9; margin-bottom: 16px; }
.contact-dark .links { display: flex; flex-direction: column; gap: 12px; }
.contact-dark .links a {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--paper); font-size: 14px; font-weight: 600; transition: color .12s;
}
.contact-dark .links a:hover { color: #8fccb9; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  text-decoration: none; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--ink); background: var(--paper-card); border: 1.5px solid var(--ink);
  padding: 13px 22px; border-radius: 999px; transition: background .12s;
}
.btn-outline:hover { background: #f2eee1; }

.cv-viewer { flex: 1 1 480px; min-width: 300px; }
.cv-frame {
  border: 1px solid var(--hairline); border-radius: 22px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(20, 17, 15, 0.12); background: var(--paper-card);
}
.cv-frame .bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; background: #f2eee1; border-bottom: 1px solid var(--hairline);
}
.cv-frame .bar .name {
  display: flex; align-items: center; gap: 9px; font-family: 'Poppins', sans-serif;
  font-weight: 600; font-size: 13.5px; color: var(--ink);
}
.cv-frame .bar a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--accent); }
.cv-frame .bar a:hover { text-decoration: underline; }
.cv-frame iframe { display: block; width: 100%; height: clamp(560px, 88vh, 1180px); border: 0; background: var(--paper-card); }
.cv-note { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 14px 4px 0; }
.cv-note strong { color: var(--text-body); }

/* ============================================================
   Mobile / responsive
   ============================================================ */
@media (max-width: 760px) {
  /* Header: let it grow when the nav wraps, tighten spacing */
  .header-inner { min-height: 64px; padding: 9px 18px; gap: 6px 10px; }
  .nav { gap: 2px; justify-content: flex-start; }
  .nav a { padding: 7px 11px; font-size: 14px; }

  /* Home: stack the rail above the content, allow shrink (no overflow) */
  .main { padding: clamp(26px, 5vw, 40px) 18px 56px; }
  .layout { gap: 26px; }
  .rail { position: static; top: auto; flex: 1 1 100%; max-width: 100%; min-width: 0; }
  .content { flex: 1 1 100%; min-width: 0; }
  .headshot { box-shadow: 6px 6px 0 0 var(--ink); }

  /* Interior page gutters */
  .research-statement,
  .focus-band .inner,
  .lab-section,
  .pub-hero,
  .pub-section,
  .pub-section.last { padding-left: 18px; padding-right: 18px; }
  .main.compact { padding-left: 18px; padding-right: 18px; }

  /* Research: lab affiliation columns stack */
  .lab-cols { gap: 20px; }

  /* Publications: citation + poster stack full width */
  .pub-article { gap: 22px; }
  .pub-cite { flex: 1 1 100%; min-width: 0; }
  .pub-poster { flex: 1 1 100%; min-width: 0; }

  /* CV: sidebar and viewer stack; sidebar no longer sticky */
  .cv-side { position: static; top: auto; flex: 1 1 100%; max-width: 100%; min-width: 0; }
  .cv-viewer { flex: 1 1 100%; min-width: 0; }
  .cv-frame iframe { height: clamp(420px, 70vh, 760px); }

  /* Footer */
  .footer-inner { padding-left: 18px; padding-right: 18px; gap: 28px; }
  .footer-cols { gap: 32px; }
  .footer-bottom div { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 460px) {
  /* Even tighter on small phones */
  .nav a { padding: 6px 9px; font-size: 13px; }
  .focus-grid { grid-template-columns: 1fr; }
  .lab-dark, .lab-quote { padding: 26px 22px; }
  .headshot { border-radius: 24px; }
}
