:root {
  --ink: #211a1a;
  --muted: #716667;
  --paper: #f7f3ee;
  --white: #fffdf9;
  --red: #c52b32;
  --red-bright: #ef4c45;
  --red-dark: #65151d;
  --wine: #280d12;
  --line: #ded5ce;
  --cyan: #8ddbd8;
  --stsci-blue: #318fd1;
  --pad: clamp(1.4rem, 5vw, 5rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, sans-serif; line-height: 1.65; }
a { color: inherit; }
em { font-family: Georgia, serif; font-weight: 400; }
button, a { -webkit-tap-highlight-color: transparent; }
.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; }
.skip-link { position: fixed; z-index: 100; left: 1rem; top: -5rem; background: #fff; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }

/* Horizontal site header */
.sidebar { position: fixed; z-index: 30; top: 1rem; left: 50%; transform: translateX(-50%); width: min(94%, 1180px); height: 4.5rem; padding: 0 1.5rem; display: flex; align-items: center; gap: 2rem; color: #fff; background: rgba(35, 10, 14, .84); border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; box-shadow: 0 18px 50px rgba(26, 3, 8, .22); backdrop-filter: blur(18px); }
.identity { display: flex; align-items: center; gap: .7rem; margin-right: auto; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; line-height: 1.2; }
.identity img { width: 5.4rem; height: 3rem; object-fit: contain; }
.identity span { padding-left: .75rem; border-left: 1px solid rgba(255,255,255,.25); color: #d8cacc; font-size: .55rem; letter-spacing: .11em; line-height: 1.45; }
.sidebar nav { display: flex; align-items: center; gap: 1.8rem; }
.sidebar nav a { text-decoration: none; color: #cbbfc0; text-transform: uppercase; letter-spacing: .13em; font-size: .61rem; font-weight: 700; transition: color .2s; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; }
.sidebar nav span { display: none; }
.sidebar-note { display: none; }
.menu-toggle { display: none; }

.panel { position: relative; overflow: hidden; }
.section-inner { position: relative; z-index: 2; width: min(100%, 1280px); margin: auto; padding: clamp(5rem, 9vw, 9rem) var(--pad); }
.kicker { margin: 0 0 1.5rem; color: var(--red); font: 500 .68rem 'DM Mono'; text-transform: uppercase; letter-spacing: .2em; }
.kicker:before { content: ""; display: inline-block; width: 2.5rem; height: 2px; margin-right: .9rem; background: currentColor; vertical-align: middle; }
.panel h2 { margin: 0; font-size: clamp(2.8rem, 5vw, 5.8rem); line-height: 1.02; letter-spacing: -.05em; }

/* Editorial hero */
.hero { min-height: 94vh; display: flex; align-items: center; color: #fff; background-image: linear-gradient(90deg, rgba(24,5,9,.94) 0%, rgba(30,7,11,.82) 38%, rgba(46,9,14,.26) 72%, rgba(20,3,7,.12) 100%), url('assets/hero-lensed-transients.png'); background-color: var(--wine); background-size: cover; background-position: center; }
.hero:after { content: "TRANSIENT"; position: absolute; right: -2vw; bottom: -7vw; color: rgba(255,255,255,.025); font-size: 17vw; font-weight: 800; letter-spacing: -.08em; line-height: 1; }
.hero .section-inner { width: min(100%, 1180px); padding-top: 10rem; padding-bottom: 8rem; }
.hero-brand { width: 12.5rem; height: 8.5rem; margin-bottom: 1.5rem; }
.hero-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.hero h1 { position: relative; z-index: 2; max-width: 850px; margin: 0; font-size: clamp(3.4rem, 7.5vw, 7.6rem); line-height: .96; letter-spacing: -.065em; }
.hero h1 em { color: var(--red-bright); }
.hero h1 .stsci-link { color: var(--stsci-blue); text-decoration: none; text-decoration-thickness: .04em; text-underline-offset: .12em; transition: color .2s ease, text-shadow .2s ease; }
.hero h1 .stsci-link:hover { color: #62b6ec; text-decoration: underline; text-shadow: 0 0 1.5rem rgba(49,143,209,.35); }
.hero h1 .stsci-link:focus-visible { outline: .08em solid currentColor; outline-offset: .08em; border-radius: .04em; }
.lede { max-width: 43rem; margin: 2rem 0; color: #cfbfc1; font-size: clamp(1rem, 1.5vw, 1.25rem); }
.actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 2.5rem; }
.button { display: inline-flex; align-items: center; gap: 1.8rem; padding: 1rem 1.25rem; text-decoration: none; text-transform: uppercase; font-size: .66rem; font-weight: 800; letter-spacing: .12em; border-radius: .35rem; transition: transform .2s, background .2s; }
.button span { font-size: 1rem; }
.button.primary { color: #fff; background: var(--red); }
.button.primary:hover { background: var(--red-bright); transform: translateY(-2px); }
.button.text-button { color: #fff; border: 1px solid rgba(255,255,255,.25); }
.scroll-cue { position: absolute; z-index: 3; left: 50%; bottom: 2rem; display: flex; align-items: center; gap: .8rem; color: #9f8c8f; text-decoration: none; text-transform: uppercase; font-size: .56rem; letter-spacing: .16em; }
.scroll-cue i { color: var(--red-bright); font-style: normal; }

/* Light narrative sections */
.mission { background: var(--paper); }
.statement-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(3rem, 8vw, 9rem); align-items: start; }
.mission h2 em { color: var(--red); }
.large-copy { margin-top: .2rem; color: var(--ink); font-size: clamp(1.2rem, 2vw, 1.65rem); line-height: 1.45; }
.statement-grid div > p:not(.large-copy) { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 5rem; }
.stats div { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: .6rem; }
.stats strong { display: block; color: var(--red); font: 500 1.4rem 'DM Mono'; }
.stats span { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }

/* Research cards */
.projects { color: #fff; background: #201417; }
.projects:before { content: ""; position: absolute; inset: 0; background: linear-gradient(125deg, rgba(197,43,50,.12), transparent 45%); }
.section-heading { display: grid; grid-template-columns: 1.3fr .7fr; gap: 4rem; align-items: end; margin-bottom: 4rem; }
.section-heading h2 em { color: var(--red-bright); }
.section-heading > p { max-width: 30rem; color: #aa999c; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.2rem; }
.project-card { grid-column: span 6; overflow: hidden; min-height: 27rem; display: flex; flex-direction: column; background: #2a1c20; border: 1px solid #493137; border-radius: .75rem; }
.project-card.featured { grid-column: span 12; min-height: 28rem; display: grid; grid-template-columns: 1.1fr .9fr; }
.project-art { position: relative; overflow: hidden; min-height: 12rem; height: 12rem; }
.project-art img { display: block; width: 100%; height: 100%; min-height: 12rem; object-fit: cover; object-position: center; transition: transform .5s ease; }
.project-card:hover .project-art img { transform: scale(1.025); }
.project-art:before, .project-art:after, .project-art span { content: ""; position: absolute; border-radius: 50%; }
.art-nuts { background: radial-gradient(circle at 45% 48%, #fff 0 1%, #ffb2aa 2%, #c52b32 7%, transparent 20%), radial-gradient(circle at center, #5b1820, #170d10 68%); }
.art-nuts:before { inset: 17%; border: 1px solid rgba(255,160,150,.4); }
.art-nuts:after { inset: 29% 2%; border: 1px solid rgba(141,219,216,.5); transform: rotate(-22deg); }
.art-lens { background: radial-gradient(circle at 47% 48%, #fff 0 2%, #ef4c45 3%, transparent 9%), linear-gradient(145deg, #190e11, #6b1a24); }
.art-lens:before { width: 75%; height: 28%; left: 10%; top: 35%; border: 2px solid rgba(141,219,216,.55); transform: rotate(-25deg); }
.art-dust { background: radial-gradient(circle at 60% 42%, #ffd1a2, #ef4c45 9%, #681522 22%, transparent 50%), #180d10; }
.art-dust:before { inset: 20%; border: 1px solid rgba(255,184,117,.35); }
.art-ml { background: linear-gradient(140deg, #152e34, #4b111b); }
.art-ml:before { width: 8px; height: 8px; left: 24%; top: 25%; background: var(--cyan); box-shadow: 80px 25px #ef4c45, 130px 110px #a72831, 30px 130px #fff, 170px 50px #fff, 210px 150px #8ddbd8; }
.art-ml:after { inset: 15%; border: 1px dashed rgba(141,219,216,.45); border-radius: 0; transform: rotate(12deg); }
.project-copy { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(1.35rem, 2.2vw, 2.1rem); }
.project-number { color: var(--red-bright); font: 400 .61rem 'DM Mono'; text-transform: uppercase; letter-spacing: .13em; }
.project-copy h3 { margin: .5rem 0; font-size: clamp(1.35rem, 2vw, 2.1rem); line-height: 1.2; }
.block-title { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; font: inherit; text-align: left; }
.block-title span { display: inline-block; margin-left: .25rem; color: var(--red-bright); font: 400 1rem 'DM Mono'; transition: transform .2s ease; }
.block-title:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red-bright); text-underline-offset: .2em; }
.block-title:hover span { transform: translate(.15rem,-.15rem); }
.block-title:focus-visible { outline: 2px solid var(--red-bright); outline-offset: .3rem; }
.project-copy > p:last-of-type { color: #b6a5a8; font-size: .86rem; }
.project-leads { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: auto; padding-top: 1.25rem; }
.project-leads p { margin: 0; padding: .8rem; background: rgba(255,255,255,.045); border: 1px solid #52373d; border-radius: .35rem; }
.project-leads small, .project-leads strong { display: block; }
.project-leads small { color: var(--red-bright); font: 500 .52rem 'DM Mono'; text-transform: uppercase; letter-spacing: .1em; }
.project-leads strong { margin-top: .25rem; color: #c9babc; font-size: .7rem; font-weight: 500; }
.tag { align-self: flex-start; margin-top: .8rem; padding: .35rem .6rem; border: 1px solid #65444b; font: 400 .57rem 'DM Mono'; text-transform: uppercase; }
.inline-link { display: inline-block; margin-top: 2.5rem; padding-bottom: .35rem; color: #fff; border-bottom: 1px solid #62434a; text-decoration: none; font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; }
.inline-link span { color: var(--red-bright); margin-left: .6rem; }
.beyond-heading { display: grid; grid-template-columns: .7fr 1.3fr 1fr; gap: 2rem; align-items: end; margin: clamp(5rem,9vw,8rem) 0 2rem; padding-top: 3rem; border-top: 1px solid #493137; }
.beyond-heading .kicker { align-self: start; }
.beyond-heading h2 { font-size: clamp(2.2rem,4vw,4.4rem); }
.beyond-heading h2 em { color: var(--red-bright); }
.beyond-heading > p:last-child { color: #aa999c; }
.beyond-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.beyond-grid article { overflow: hidden; min-height: 22rem; background: #2a1c20; border: 1px solid #493137; border-radius: .65rem; }
.beyond-art { height: 10rem; padding: .75rem; background: #150f11; border-bottom: 1px solid #493137; }
.beyond-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.beyond-copy { padding: 1.4rem 1.6rem 1.6rem; }
.beyond-grid h3 { margin: 1.2rem 0 .7rem; font-size: 1.15rem; line-height: 1.25; }
.beyond-grid p { margin: 0; color: #b6a5a8; font-size: .78rem; }
.block-dialog { width: min(90vw,56rem); max-height: 86vh; padding: clamp(2rem,5vw,4rem); color: var(--ink); background: var(--paper); border: 0; border-top: .4rem solid var(--red); border-radius: .75rem; box-shadow: 0 2rem 6rem rgba(0,0,0,.5); }
.block-dialog::backdrop { background: rgba(24,5,9,.82); backdrop-filter: blur(6px); }
.block-dialog .dialog-close { position: absolute; top: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--white); cursor: pointer; font-size: 1.5rem; line-height: 1; }
.block-dialog > h2 { max-width: 44rem; margin: .5rem 3rem 1.5rem 0; font-size: clamp(2rem,5vw,4.25rem); }
.dialog-intro { max-width: 44rem; color: var(--red-dark); font: 400 clamp(1.05rem,2vw,1.4rem)/1.45 Georgia,serif; }
.dialog-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.dialog-columns h3 { margin-top: 0; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.dialog-columns p, .dialog-columns li { color: var(--muted); font-size: .83rem; }
.dialog-columns ul { margin: 0; padding-left: 1.2rem; }
.dialog-columns li + li { margin-top: .55rem; }

/* Team */
.team { background: var(--white); }
.team h2 em { color: var(--red); }
.team-directory { margin: 4rem 0 2rem; }
.team-tabs { display: flex; gap: .6rem; padding: .5rem; overflow-x: auto; background: #eee7e1; border-radius: .75rem; }
.team-tabs button { flex: 1; min-width: 8rem; padding: .9rem 1rem; border: 0; border-radius: .45rem; background: transparent; color: var(--muted); cursor: pointer; font: 700 .68rem 'DM Mono'; letter-spacing: .1em; text-transform: uppercase; }
.team-tabs button[aria-selected="true"] { color: #fff; background: var(--red); box-shadow: 0 5px 15px rgba(197,43,50,.2); }
.team-tabs button:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.team-tabs button span { margin-left: .35rem; opacity: .6; font-size: .54rem; }
.team-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.team-panel[hidden] { display: none; }
.team-panel article { display: flex; gap: 1.2rem; min-height: 9rem; padding: 1.6rem; background: var(--paper); border: 1px solid var(--line); border-radius: .65rem; }
.team-panel article > div { display: flex; flex-direction: column; }
.avatar { flex: 0 0 4.2rem; width: 4.2rem; height: 4.2rem; display: block; object-fit: cover; object-position: center top; background: var(--red-dark); border: 2px solid #fff; border-radius: .45rem; box-shadow: 0 5px 15px rgba(56,20,24,.12); }
.avatar-initials { display: grid; place-items: center; color: #fff; font: 500 .9rem 'DM Mono'; }
.team-panel small { order: 2; color: var(--red); font: 500 .54rem 'DM Mono'; text-transform: uppercase; letter-spacing: .08em; }
.team-panel h3 { order: 1; margin: .1rem 0 .25rem; font-size: 1.05rem; }
.team-panel h3 a { text-decoration-color: rgba(197,43,50,.35); text-underline-offset: .2em; }
.team-panel h3 a:hover { color: var(--red); text-decoration-color: var(--red); }
.team-panel p { order: 3; margin: .45rem 0 0; color: var(--muted); font-size: .7rem; }
.button.outline { border: 1px solid #bfb2aa; }

/* Publications */
.publications { background: #eee8e1; }
.publications h2 em { color: var(--red); }
.sync-status { margin-top: 1rem; color: var(--red-dark); font: 500 .6rem 'DM Mono'; text-transform: uppercase; letter-spacing: .08em; }
.publication-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.publication-author { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: .75rem; }
.publication-author-header { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); }
.publication-author-header img { width: 3.1rem; height: 3.1rem; object-fit: cover; object-position: center top; border-radius: .35rem; }
.publication-author-header h3 { margin: 0; font-size: 1rem; }
.publication-author-header p { margin: .1rem 0 0; color: var(--red); font: 500 .53rem 'DM Mono'; text-transform: uppercase; letter-spacing: .08em; }
.paper-list { margin: 0; padding: 0; list-style: none; }
.paper-list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .8rem; padding: 1rem 1.4rem; border-bottom: 1px solid #ebe4de; }
.paper-list li:last-child { border: 0; }
.paper-rank { color: #b8aba6; font: 400 .7rem 'DM Mono'; }
.paper-list a { text-decoration: none; font-size: .82rem; font-weight: 700; line-height: 1.35; }
.paper-list a:hover { color: var(--red); }
.paper-meta { margin: .3rem 0 0; color: var(--muted); font-size: .65rem; }
.paper-citations { color: var(--red); font-weight: 700; }
.publication-empty { padding: 1.4rem; color: var(--muted); font-size: .75rem; }
.publication-note { margin: 2rem 0 0; color: var(--muted); font-size: .68rem; }
.publication-note a { color: var(--red); }

/* Closing section */
.connect { min-height: 72vh; display: flex; align-items: center; color: #fff; background: var(--red-dark); }
.connect:before { content: ""; position: absolute; right: -8%; top: -25%; width: 45vw; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 7vw rgba(255,255,255,.04), 0 0 0 14vw rgba(255,255,255,.025); }
.connect h2 em { color: #ffaaa3; }
.connect .lede { color: #e1c6c8; }
.connect-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 58rem; margin-top: 3rem; }
.connect-grid article { display: flex; flex-direction: column; min-height: 18rem; padding: clamp(1.5rem,3vw,2.3rem); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: .7rem; backdrop-filter: blur(8px); }
.connect-grid .connect-label { margin: 0 0 1.5rem; color: #ffaaa3; font: 500 .58rem 'DM Mono'; letter-spacing: .14em; text-transform: uppercase; }
.connect-grid h3 { margin: 0; font-size: clamp(1.6rem,3vw,2.4rem); }
.connect-grid article > p:not(.connect-label) { color: #d8bfc1; font-size: .82rem; }
.connect-action { align-self: flex-start; margin-top: auto; padding-bottom: .25rem; color: #fff; border-bottom: 1px solid rgba(255,255,255,.45); text-decoration: none; font-size: .67rem; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.connect-action span { margin-left: .5rem; color: #ffaaa3; }
.connect-action:hover { border-color: #fff; }
.button.light { color: var(--red-dark); background: #fff; }
.connect footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.3); color: #d8bfc1; font-size: .63rem; text-transform: uppercase; letter-spacing: .12em; }
.connect footer img { width: 7rem; height: 4.75rem; object-fit: contain; }
.connect footer p { margin: 0; }
.footer-notes { text-align: right; }
.connect footer .site-credit { margin-top: .35rem; color: #aa9296; font-size: .5rem; letter-spacing: .08em; text-transform: none; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s, transform .65s; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .sidebar { top: 0; left: 0; transform: none; width: 100%; height: 4.5rem; border: 0; border-radius: 0; }
  .sidebar nav { position: fixed; inset: 4.5rem 0 auto 0; display: none; padding: 1rem 1.5rem 1.5rem; background: var(--wine); }
  .sidebar.open nav { display: grid; }
  .sidebar nav a { padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
  .menu-toggle { position: fixed; z-index: 40; right: 1rem; top: .75rem; display: block; width: 3rem; height: 3rem; padding: .8rem; border: 0; border-radius: .35rem; background: var(--red); }
  .menu-toggle span:not(.sr-only) { display: block; height: 1px; margin: .3rem; background: #fff; }
  .statement-grid, .section-heading, .beyond-heading { grid-template-columns: 1fr; gap: 2rem; }
  .project-card, .project-card.featured { grid-column: span 12; }
  .team-panel { grid-template-columns: 1fr; }
  .publication-grid { grid-template-columns: 1fr; }
  .beyond-grid { grid-template-columns: repeat(2,1fr); }
  .hero { background-position: 58% center; }
}

@media (max-width: 650px) {
  .section-inner { padding: 5rem 1.4rem; }
  .hero .section-inner { padding-top: 8.5rem; }
  .hero h1, .panel h2 { letter-spacing: -.04em; }
  .actions { align-items: flex-start; flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr; }
  .project-card.featured { display: flex; }
  .project-art { min-height: 14rem; }
  .team-panel article { padding: 1.3rem; }
  .team-tabs button { min-width: 7rem; }
  .project-leads { grid-template-columns: 1fr; }
  .beyond-grid, .dialog-columns { grid-template-columns: 1fr; }
  .connect-grid { grid-template-columns: 1fr; }
  .connect footer { display: block; }
  .connect footer > p { margin: 1rem 0; }
  .footer-notes { margin-top: 1rem; text-align: left; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
