/* Irazoqui Lab site styles. Brand values from the UMass Chan Style Guide 3.0 (pp. 18-19, 24-25). */
:root {
  --blue: #000F9F;        /* PMS 072C, primary */
  --blue-25: #000B77;     /* 072C + K25 */
  --navy: #00074F;        /* 072C + K50 */
  --ink: #000429;         /* 072C + K75 */
  --teal: #84DADE;        /* PMS 318C accent, used on dark grounds only */
  --text: #1A1A2E;
  --muted: #4D4D4D;
  --line: #DADCE8;
  --soft: #F4F5FA;
  --white: #FFFFFF;
  --radius: 14px;
  --sans: "Montserrat", Arial, sans-serif;
  --serif: Georgia, "Sabon", serif;
}
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-header :focus-visible, .site-footer :focus-visible, .skip:focus-visible { outline-color: #FFC629; }
.to-top:focus-visible { outline-color: #FFC629; box-shadow: 0 0 0 6px var(--ink); }
main:focus { outline: none; }
p, li, td, dd { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
html { scroll-behavior: smooth; scroll-padding-top: 140px; scroll-padding-bottom: 96px; }

.site { container-type: inline-size; container-name: site; width: 100%; min-height: 100%; display: flex; flex-direction: column; background: var(--white); position: relative; }
.site > main { flex-grow: 1; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* Skip link */
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: #FFC629; color: var(--ink); padding: 12px 18px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* Header */
.site-header { background: var(--ink); color: var(--white); position: sticky; top: 0; z-index: 20; }
.topbar { background: var(--navy); font-size: 13px; letter-spacing: .02em; }
.topbar .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 4px 24px; padding-top: 8px; padding-bottom: 8px; }
.topbar-center { justify-self: center; text-align: center; }
.topbar-right { justify-self: end; text-align: right; }
.topbar a { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; min-height: 24px; }
.topbar a:hover { text-decoration: underline; color: var(--white); }
.nav-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 18px; color: var(--white); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--white); }
.brand-logo { width: 230px; height: auto; }
.brand-divider { width: 1px; height: 34px; background: rgba(255,255,255,.35); }
.brand-lab { font-weight: 700; font-size: 20px; letter-spacing: .01em; white-space: nowrap; }
.menu-btn { display: none; align-items: center; gap: 8px; background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.6); border-radius: 10px; padding: 10px 14px; font: 600 15px var(--sans); cursor: pointer; min-height: 44px; }
.menu-btn svg { width: 20px; height: 20px; }
.nav-links { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-links a { display: block; color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; padding: 12px 14px; border-radius: 10px; }
.nav-links a:hover { background: rgba(255,255,255,.1); color: var(--white); }
.nav-links a[aria-current="page"] { background: var(--white); color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 2px solid transparent; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--white); color: var(--ink); }
.btn-primary:hover { background: var(--teal); color: var(--ink); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: var(--navy); color: var(--white); }

/* Type */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); margin: 0 0 14px; }
.on-dark .eyebrow { color: var(--teal); }
h1, h2, h3, h4 { font-family: var(--sans); margin: 0; line-height: 1.15; color: var(--ink); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }
h1 { font-size: 54px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 38px; font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 22px; font-weight: 700; }
h4 { font-size: 17px; font-weight: 700; }
p { margin: 0; line-height: 1.7; font-size: 17px; }
.lead { font-size: 20px; line-height: 1.65; color: #33364A; }
.on-dark .lead, .on-dark p { color: #E6E8F5; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.55; }
.draft { display: inline-block; background: #FFF4D1; color: #5C4300; border: 1px dashed #B58900; border-radius: 6px; padding: 2px 8px; font-size: 13px; font-weight: 600; }

/* Sections */
.section { padding: 96px 0; }
.section-soft { background: var(--soft); }
.section-dark { background: var(--ink); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin-bottom: 48px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* Hero */
.hero { background: var(--ink); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.hero-figure { margin: 0; }
.hero-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 22px; }
.hero-figure figcaption { font-size: 12.5px; color: #C9CCE0; margin-top: 10px; line-height: 1.5; }
.hero-figure figcaption a { color: #FFFFFF; }
.models { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; color: var(--white); }
.chip-light { border-color: var(--line); color: var(--ink); background: var(--white); }

/* Page hero (inner pages) */
.page-hero { background: var(--ink); color: var(--white); padding: 72px 0 64px; }
.page-hero .wrap { display: flex; flex-direction: column; gap: 18px; }
.page-hero .lead { max-width: 820px; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--blue); box-shadow: 0 10px 30px rgba(0, 7, 79, .12); color: inherit; }
.card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #0b0b1a; }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 26px; flex-grow: 1; }
.card-body p { font-size: 16px; }
.card-link { margin-top: auto; font-weight: 700; color: var(--blue); display: inline-flex; align-items: center; gap: 8px; padding-top: 6px; }
.card-link svg { width: 16px; height: 16px; }
.credit { font-size: 12px; color: var(--muted); line-height: 1.45; padding: 0 24px 16px; }
.credit a { color: var(--muted); }

/* Paper list */
.paper { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 26px 0; border-top: 1px solid var(--line); }
.paper:last-child { border-bottom: 1px solid var(--line); }
.paper-year { font-weight: 800; font-size: 15px; color: var(--blue); }
.paper-title { font-weight: 700; font-size: 18px; line-height: 1.4; color: var(--ink); margin: 0 0 6px; }
.paper-meta { font-size: 15px; line-height: 1.6; color: #3A3D52; }
.paper-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.paper-links a { display: inline-flex; align-items: center; min-height: 24px; }
.pi { font-weight: 700; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue-25); background: #E8EAFB; border-radius: 6px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }

.early { margin-top: 32px; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 24px; }
.early summary { cursor: pointer; font-weight: 700; color: var(--blue); padding: 20px 0; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.early[open] summary { border-bottom: 1px solid var(--line); }
.early .paper:first-child { border-top: 0; }

/* Quote / mission */
.quote { font-family: var(--serif); font-size: 30px; line-height: 1.45; color: var(--white); margin: 0; font-style: italic; }
.mission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.mission-item { border-top: 2px solid var(--teal); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }

/* Split feature */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.split img { width: 100%; border-radius: 20px; aspect-ratio: 3 / 2; object-fit: cover; }
.split figure { margin: 0; }
.split figcaption { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* Research themes */
.theme { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; padding: 72px 0; border-top: 1px solid var(--line); align-items: start; }
.theme:first-of-type { border-top: 0; }
.theme figure { margin: 0; position: sticky; top: 110px; }
.theme img { width: 100%; border-radius: 18px; aspect-ratio: 4 / 3; object-fit: cover; background: #0b0b1a; }
.theme img.contain { object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); }
.theme figcaption { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.theme-num { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.findings { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.findings li { position: relative; padding-left: 28px; line-height: 1.65; font-size: 16px; }
.findings li::before { content: ""; position: absolute; left: 0; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); }
.ref { font-size: 13px; font-weight: 700; white-space: nowrap; }
.toc { display: flex; flex-wrap: wrap; gap: 10px; }
.toc a { text-decoration: none; }

/* People */
.pi-card { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }
.portrait { width: 100%; aspect-ratio: 4 / 5; border-radius: 20px; background: linear-gradient(160deg, #000F9F, #000429); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 56px; letter-spacing: .04em; }
.portrait span { font-size: 13px; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.portrait-photo { display: block; height: auto; object-fit: cover; object-position: center top; background: #e8ebf5; }
.portrait .silhouette { width: 45%; height: auto; }
.portrait-sm { aspect-ratio: 1 / 1; font-size: 40px; border-radius: 16px; }
.links-row { display: flex; flex-wrap: wrap; gap: 10px; }
.member { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 28px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.alumni { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.alum { padding: 18px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.alum strong { font-size: 17px; color: var(--ink); }

/* Join */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { counter-increment: step; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.steps li::before { content: counter(step); width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: var(--white); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: start; }
.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.info-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.icon-dot { width: 44px; height: 44px; border-radius: 12px; background: #E8EAFB; color: var(--blue); display: flex; align-items: center; justify-content: center; }
.icon-dot svg { width: 22px; height: 22px; }
.table-scroll { overflow-x: auto; position: relative; }
.table-scroll:focus-visible { outline-offset: 2px; }
table.credits { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; }
table.credits caption { text-align: left; font-weight: 700; padding-bottom: 12px; color: var(--ink); }
table.credits th, table.credits td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-top: 1px solid var(--line); line-height: 1.5; }
table.credits th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #DDE0F0; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 48px; }
.site-footer h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 16px; }
.site-footer p, .site-footer li { font-size: 15px; line-height: 1.7; color: #DDE0F0; }
.site-footer a { color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-logo { width: 250px; margin-bottom: 18px; }
.footer-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.18); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13.5px; color: #C9CCE0; }

/* Back to top */
.to-top { position: fixed; right: 24px; bottom: 24px; z-index: 30; width: 52px; height: 52px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 4, 41, .35); border: 2px solid var(--white); text-decoration: none; }
.to-top:hover { background: var(--navy); color: var(--white); }
.to-top svg { width: 22px; height: 22px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Responsive (container queries: the page reacts to its own width) ---------- */
@container site (max-width: 1080px) {
  .nav-links a { padding: 10px 10px; font-size: 14px; }
  .brand-logo { width: 190px; }
  h1 { font-size: 46px; }
}
@container site (max-width: 900px) {
  .wrap { padding: 0 24px; }
  .menu-btn { display: inline-flex; }
  .nav-row { flex-wrap: wrap; gap: 12px; min-height: 68px; }
  #site-nav { display: none; width: 100%; padding-bottom: 14px; }
  #site-nav.open { display: block; }
  .nav-links { flex-direction: column; gap: 2px; }
  .nav-links a { font-size: 17px; padding: 14px 12px; }
  .hero-grid, .split, .contact-grid, .theme, .pi-card { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .theme figure { position: static; }
  .grid-3, .mission-grid, .steps, .alumni { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 72px 0; }
  .pi-card .portrait { max-width: 280px; }
}
@container site (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .topbar .wrap { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .topbar-center, .topbar-right { justify-self: start; text-align: left; }
  .brand-logo { width: 150px; }
  .brand-divider { display: none; }
  .brand { gap: 10px; flex-direction: column; align-items: flex-start; }
  .brand-lab { font-size: 17px; }
  h1 { font-size: 34px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .lead { font-size: 18px; }
  p { font-size: 16px; }
  .quote { font-size: 22px; }
  .hero-grid { padding-top: 48px; padding-bottom: 56px; }
  .section { padding: 56px 0; }
  .page-hero { padding: 48px 0 44px; }
  .grid-3, .grid-2, .mission-grid, .steps, .alumni, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .paper { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .member { grid-template-columns: minmax(0, 1fr); }
  .member .portrait-sm { max-width: 140px; }
  .theme { padding: 48px 0; }
  .btn { width: 100%; justify-content: center; }
  .to-top { right: 16px; bottom: 16px; }
}
