/* The Taylor Lab — site styles */
:root {
  --navy: #0b2e6b;
  --navy-700: #0a2558;
  --navy-50: #eef2fa;
  --gold: #e3a919;
  --lilac: #b98fd6;
  --ink: #18202e;
  --ink-2: #44506a;
  --muted: #6b7690;
  --line: #e2e6ef;
  --bg: #ffffff;
  --tint: #f5f7fb;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--sans); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-700); }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand picture { display: block; line-height: 0; }
.brand img { width: auto; height: 60px; }
@media (max-width: 420px) { .brand img { height: 42px; } .brand-name { font-size: 1rem; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--navy); }
.brand-sub { font-size: .75rem; color: var(--muted); }
.site-nav { display: flex; gap: 2px; }
.site-nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; position: relative; }
.site-nav a:hover { background: var(--navy-50); color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 3px; background: var(--gold); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .brand-sub { display: none; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; font-size: 1rem; }
  .site-nav a[aria-current="page"]::after { left: 0; right: auto; top: 12px; bottom: 12px; width: 3px; height: auto; }
}

/* Buttons & bits */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--navy); background: #fff; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-small { padding: 6px 12px; font-size: .85rem; border-radius: 8px; background: var(--navy-50); color: var(--navy); }
.btn-small:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--gold); margin-bottom: .6em; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--navy); background: var(--navy-50); padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: " →"; }
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* Sections */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.page-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); background: linear-gradient(180deg, var(--navy-50), #fff); border-bottom: 1px solid var(--line); }
.page-hero p:not(.eyebrow) { max-width: 860px; color: var(--ink-2); }

/* Home hero */
.hero { padding: clamp(40px, 7vw, 96px) 0; background: radial-gradient(1200px 400px at 85% -10%, rgba(185,143,214,.18), transparent 60%), radial-gradient(900px 400px at -10% 110%, rgba(11,46,107,.08), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-tag { font-family: var(--serif); font-size: clamp(1.25rem, 2.2vw, 1.6rem); color: var(--navy); font-style: italic; margin-bottom: .8em; }
.hero-lead { color: var(--ink-2); max-width: 560px; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { width: 100%; border-radius: 20px; box-shadow: 0 20px 50px rgba(11,46,107,.18); }
.hero-photo::before { content: ""; position: absolute; inset: 18px -14px -14px 18px; border: 2px solid var(--gold); border-radius: 22px; z-index: -1; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo::before { display: none; } }

.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }
.focus-card { display: block; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden; }
.focus-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--navy); }
.focus-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfd6e6; color: var(--ink); }
.focus-card p { color: var(--ink-2); margin: 0; }
.focus-k { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--gold); display: block; margin-bottom: 6px; }
.pub-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.pub-card-img { aspect-ratio: 16 / 9; background: #fff; border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 10px; }
.pub-card-img img { max-height: 100%; width: auto; object-fit: contain; }
.pub-card-body { padding: 18px 20px 22px; }
.pub-card h3 { font-size: 1.05rem; margin: 0; }
.pub-card h3 a { text-decoration: none; color: var(--ink); }
.pub-card h3 a:hover { color: var(--navy); text-decoration: underline; }

/* Research */
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.subnav a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-weight: 600; font-size: .9rem; }
.subnav a:hover { border-color: var(--navy); }
.research-block { scroll-margin-top: 80px; }
.media-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.media-split > div p { color: var(--ink-2); }
@media (max-width: 860px) { .media-split { grid-template-columns: 1fr; } }
.media-card { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); position: sticky; top: 96px; }
.media-card video { width: 100%; border-radius: 8px; background: #fff; }
.media-card figcaption { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.sub-h { font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 32px 0 16px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tech { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tech img { width: 100%; height: 170px; object-fit: contain; padding: 10px; background: #fff; }
.tech figcaption { padding: 10px 14px 14px; font-size: .88rem; font-weight: 600; color: var(--ink-2); border-top: 1px solid var(--line); }
.zoom { all: unset; box-sizing: border-box; display: block; cursor: zoom-in; width: 100%; }
.zoom:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

/* People */
.group-h { margin-bottom: 24px; }
.faculty { display: grid; gap: 24px; }
.faculty-card { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.faculty-card img { width: 220px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; }
.faculty-card p:not(.role) { color: var(--ink-2); }
@media (max-width: 680px) { .faculty-card { grid-template-columns: 1fr; } .faculty-card img { width: 160px; } }
.role { color: var(--gold); font-weight: 600; font-size: .9rem; margin-bottom: .8em; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; align-items: start; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.person img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 25%; background: var(--tint); }
.person img[src$="placeholder.webp"] { object-position: center; }
.person-body { padding: 16px 18px 18px; }
.person h3 { margin-bottom: 2px; font-size: 1.05rem; }
.person .role { margin-bottom: 8px; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: .9rem; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--navy-50); font-size: .8rem; }
details[open] summary::before { content: "–"; }
details p { font-size: .92rem; color: var(--ink-2); margin-top: .8em; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tabs button { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.tabs .count { font-size: .75rem; opacity: .7; margin-left: 4px; }

/* Publications */
.pub-tools { display: grid; gap: 14px; margin-top: 18px; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; max-width: 640px; color: var(--muted); }
.search:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-50); }
.search input { border: 0; outline: 0; font: inherit; padding: 12px 0; width: 100%; background: transparent; color: var(--ink); }
.year-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.year-chips a { font-size: .85rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; }
.year-chips a:hover { border-color: var(--navy); }
.pubs .section, .pubs { padding-top: 32px; }
.year-block { scroll-margin-top: 90px; margin-bottom: 28px; }
.year-h { font-size: 1.6rem; color: var(--navy); border-bottom: 2px solid var(--navy-50); padding-bottom: 8px; margin-bottom: 8px; }
.pub { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.pub:not(:has(.pub-fig)) { grid-template-columns: 1fr; }
.pub-fig { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 8px; align-self: start; }
.pub-fig img { width: 100%; max-height: 200px; object-fit: contain; }
.pub h3 { font-size: 1.12rem; margin-bottom: 6px; }
.cite { color: var(--ink-2); font-size: .93rem; margin-bottom: 10px; overflow-wrap: anywhere; }
.cite strong { color: var(--ink); }
.pub-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.abstract { flex-basis: 100%; }
.abstract summary { padding: 5px 0; }
.highlights { margin: 10px 0 0; padding-left: 18px; font-size: .85rem; color: var(--muted); }
.highlights li { margin-bottom: 4px; }
.pub-line { display: block; padding: 12px 0; }
.pub-line .cite { margin: 0; }
.pm-link { font-weight: 600; font-size: .85rem; white-space: nowrap; }
@media (max-width: 720px) { .pub { grid-template-columns: 1fr; } .pub-fig { max-width: 360px; } }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.masonry { columns: 3 280px; column-gap: 18px; }
.shot { break-inside: avoid; margin: 0 0 18px; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); }
.shot img { width: 100%; transition: transform .3s; }
.shot:hover img { transform: scale(1.02); }
.shot figcaption { padding: 12px 14px; font-weight: 600; font-size: .92rem; display: flex; flex-direction: column; }
.shot figcaption span { font-weight: 500; font-size: .78rem; color: var(--muted); }
.shot[hidden] { display: none; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: stretch; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-card address { font-size: 1.05rem; line-height: 1.8; margin-bottom: 18px; color: var(--ink-2); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 360px; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1100px, 94vw); max-height: 92vh; }
.lightbox::backdrop { background: rgba(8, 14, 28, .82); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 10px; background: #fff; }
.lightbox p { color: #fff; text-align: center; margin: 12px 0 0; font-weight: 600; }
.lightbox button { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.4rem; cursor: pointer; }

/* Footer */
.site-footer { background: #0a1e45; color: #b9c5de; padding: 56px 0 24px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-name { font-family: var(--serif); font-size: 1.3rem; color: #fff; font-weight: 700; margin-bottom: 6px; }
.footer-h { color: #fff; font-weight: 600; margin-bottom: 8px; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .muted { color: #8d9bbb; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: .85rem; color: #8d9bbb; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
.person-links { margin: -4px 0 8px; font-size: .85rem; font-weight: 600; }
/* Lab members highlighted in author lists */
mark.lab-member, mark.lab-pi { background: linear-gradient(transparent 58%, rgba(227,169,25,.38) 58%); color: var(--ink); font-weight: 600; padding: 0 1px; border-radius: 2px; }
mark.lab-pi { color: var(--navy); font-weight: 700; }
.lab-key { font-size: .88rem; color: var(--muted); margin: 4px 0 0; }
