/* ============================================================
   Caltech's Science Policy Initiative (SPIN)
   IMMERSIVE BROADSHEET
   - Fixed navy masthead rail (left), no top nav
   - Full-bleed photographic hero, headline overlaid
   - Oversized numbered broadsheet body (I–V)
   Serif: Newsreader · Sans: Archivo
   ============================================================ */

:root {
  --paper:    #ffffff;   /* white canvas */
  --paper-2:  #f2f3f8;
  --card:     #f6f7fb;
  --ink:      #031927;   /* blue — headings & body text */
  --ink-soft: #3a4d5c;
  --muted:    #6f7d89;
  --navy:     #031927;   /* rail / footer / skyline */
  --navy-2:   #0a3247;
  --orange:   #fe5d26;   /* Tiger Flame — the one orange, used everywhere */
  --orange-dk:#fe5d26;
  --gold:     #fe5d26;
  --line:     #e4e6ef;   /* light indigo-gray hairlines */
  --line-2:   #d5d8e6;
  --rail: 216px;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgba(19,29,51,.05), 0 12px 44px rgba(19,29,51,.08);
  --shadow-lg: 0 8px 24px rgba(19,29,51,.12), 0 40px 90px rgba(19,29,51,.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.7;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-dk); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--orange); }
.prose a, .lede a, .callout a, .news-item a {
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 1.15em;
  transition: background-size .2s ease, color .15s ease;
}
.prose a:hover, .lede a:hover, .callout a:hover, .news-item a:hover { background-size: 100% 2px; color: var(--orange); }

h1, h2, h3, h4 {
  font-family: var(--serif); color: var(--ink); font-weight: 500; line-height: 1.06;
  margin: 0 0 .5em; letter-spacing: -.015em; font-optical-sizing: auto;
}
p { margin: 0 0 1.15em; }
strong { font-weight: 700; }

/* ============================================================
   Masthead rail
   ============================================================ */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail); z-index: 60;
  background: var(--navy); color: #c7d1e4;
  display: flex; flex-direction: column; padding: 26px 22px 24px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.rail-brand { display: flex; flex-direction: column; gap: 13px; color: inherit; }
.rail-brand:hover { color: inherit; }
.rail-logo { width: 100%; max-width: 132px; height: auto; }
.rail-name { font-family: var(--serif); font-size: 1.22rem; font-weight: 500; line-height: 1.05; color: #fff; letter-spacing: -.01em; }
.rail-name small { display: block; font-family: var(--sans); font-weight: 600; font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; color: #adbbd6; margin-top: 9px; }

.rail-nav { margin-top: 40px; display: flex; flex-direction: column; flex: 1; }
.rail-nav ol { list-style: none; margin: 0; padding: 0; }
.rail-nav li { margin: 0; }
.rail-nav ol a {
  display: flex; align-items: baseline; gap: 12px; padding: 9px 0;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 400; color: #dbe2f0;
  border-bottom: 1px solid rgba(255,255,255,.07); transition: color .15s ease, padding-left .18s ease;
}
.rail-nav ol a .num {
  font-family: var(--sans); font-size: .64rem; font-weight: 700; letter-spacing: .1em;
  color: #adbbd6; min-width: 22px;
}
.rail-nav ol a:hover { color: #fff; padding-left: 6px; }
.rail-nav ol a.active { color: var(--orange); }
.rail-nav ol a.active .num { color: var(--orange); }

.rail-social { display: flex; gap: 12px; list-style: none; margin: auto 0 0; padding: 0; }
.rail-social a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.07); color: #c7d1e4; transition: background .18s, color .18s, transform .18s;
}
.rail-social a:hover { background: var(--orange); color: #fff; transform: translateY(-2px); }
.rail-social svg { width: 19px; height: 19px; fill: currentColor; }
.rail-foot { font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: #6b769a; margin: 18px 0 0; }

.rail-toggle { display: none; }

/* ============================================================
   Content column
   ============================================================ */
.content { margin-left: var(--rail); background: var(--paper); min-height: 100vh; display: flex; flex-direction: column; }
.content > main { flex: 1 0 auto; }
.content > .site-footer { margin-top: auto; }
.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: clamp(26px, 5vw, 76px); }

/* ============================================================
   Immersive hero
   ============================================================ */
.hero {
  position: relative; min-height: 640px; height: 92vh; max-height: 940px;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--navy);
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.07) saturate(1.04); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(3,25,39,.55);
}
.hero-inner { position: relative; z-index: 2; padding: 0 clamp(28px, 6vw, 72px); width: 100%; text-align: center; }
.hero-logo { width: clamp(60px, 6.5vw, 88px); margin: 0 auto 18px; }
.hero-logo svg { width: 100%; height: auto; }
.hero-eyebrow {
  font-family: var(--sans); text-transform: uppercase; letter-spacing: .3em; font-size: .74rem;
  font-weight: 600; color: var(--orange); margin: 0 0 18px; display: flex; align-items: center; gap: 14px;
}
.hero-eyebrow::before { content: ""; width: 40px; height: 2px; background: var(--orange); }
.hero h1 {
  font-family: var(--serif); font-weight: 400; color: #fff;
  font-size: clamp(2.5rem, 5.6vw, 5.2rem); line-height: 1.0; letter-spacing: -.02em;
  margin: 0 auto; max-width: 22ch; text-shadow: 0 2px 30px rgba(0,0,0,.38);
}
.hero h1 .lead { font-size: .5em; font-weight: 400; letter-spacing: .01em; color: #fff; }
.hero-caltech {
  display: block; height: clamp(58px, 7.5vw, 108px); width: auto; margin: 0 auto 22px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 16px rgba(0,0,0,.4));
}
.hero h1 .accent { font-style: italic; font-weight: 500; color: var(--orange); }
.hero-scroll {
  position: absolute; right: clamp(26px,5vw,76px); bottom: clamp(38px,6vw,72px); z-index: 2;
  font-family: var(--sans); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase;
  color: #cdd6e6; display: flex; align-items: center; gap: 10px; writing-mode: vertical-rl;
}
.hero-scroll::after { content: ""; width: 1px; height: 46px; background: linear-gradient(#cdd6e6, transparent); }

/* ============================================================
   Broadsheet folio head (numbered I–V)
   ============================================================ */
.folio {
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: clamp(18px, 3vw, 40px);
  border-top: 3px solid var(--ink); padding-top: 22px; margin: 0 0 clamp(28px,4vw,52px);
}
.folio-num {
  font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--orange-dk);
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: .8;
}
.folio h1, .folio h2 {
  font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: .92; letter-spacing: -.02em;
}
.folio .lede { grid-column: 2; color: var(--ink-soft); font-style: italic; font-family: var(--serif); font-size: 1.2rem; margin: .6rem 0 0; max-width: 60ch; }

/* ============================================================
   Content blocks
   ============================================================ */
main { display: block; padding-bottom: 96px; }
.section { padding: clamp(48px, 6vw, 92px) 0 0; }
.kicker { font-family: var(--sans); text-transform: uppercase; letter-spacing: .22em; font-size: .72rem; font-weight: 600; color: var(--orange-dk); margin: 0 0 1rem; }
.rule { width: 60px; height: 3px; border: 0; border-radius: 3px; margin: 0 0 1.6rem; background: linear-gradient(90deg, var(--orange), var(--gold)); }

.prose { max-width: 780px; font-size: 1.08rem; }
.prose > p:first-of-type strong { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.prose h3 { margin-top: 1.9em; font-size: 1.5rem; font-weight: 600; }
.prose ol, .prose ul { padding-left: 1.3em; margin: 0 0 1.3em; }
.prose li { margin-bottom: .6em; }
.prose ol { counter-reset: item; list-style: none; padding-left: 0; }
.prose ol > li { position: relative; padding-left: 3.1rem; margin-bottom: 1.2rem; counter-increment: item; }
.prose ol > li::before {
  content: counter(item, decimal-leading-zero); position: absolute; left: 0; top: .02em;
  font-family: var(--serif); font-weight: 500; font-size: 1.2rem; font-style: italic; color: var(--orange-dk);
}

.callout { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--gold); padding: 24px 28px; border-radius: 3px; box-shadow: var(--shadow); margin: 30px 0; font-size: 1.03rem; }

.split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.split .figure { margin: 0; }
.split .figure img { border-radius: 3px; box-shadow: var(--shadow-lg); }

/* Board — ruled broadsheet entries */
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 48px; border-top: 2px solid var(--ink); }
.member { padding: 28px 0 34px; }
.member .role { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; font-weight: 700; color: var(--orange-dk); margin: 0 0 10px; }
.member .name { font-family: var(--serif); font-size: 1.9rem; color: var(--ink); margin: 0 0 12px; font-weight: 500; letter-spacing: -.01em; }
.member .bio { color: var(--ink-soft); font-size: .96rem; margin: 0; }

/* Resources — editorial ruled list */
.opp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.opp { padding: 32px 0; border-top: 1px solid var(--line-2); }
.opp h3 { font-size: 1.6rem; margin: 0 0 14px; color: var(--ink); font-weight: 500; }
.opp .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag { font-family: var(--sans); font-size: .66rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; background: transparent; color: var(--ink-soft); border: 1px solid var(--line-2); }
.tag.loc { color: var(--orange); border-color: rgba(237,109,13,.5); }
.tag.due { color: var(--orange); border-color: rgba(237,109,13,.5); }
.opp p { font-size: .96rem; color: var(--ink-soft); margin: 0; }

/* News timeline */
.news-list { max-width: 860px; }
.news-item { position: relative; padding: 36px 0 36px 36px; border-left: 2px solid var(--line-2); }
.news-item::before { content: ""; position: absolute; left: -8px; top: 42px; width: 13px; height: 13px; border-radius: 50%; background: var(--orange); border: 3px solid var(--paper); }
.news-item:last-child { border-left-color: transparent; }
.news-item .date { font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; color: var(--orange-dk); margin: 0 0 8px; }
.news-item h3 { font-size: 1.7rem; margin: 0 0 12px; color: var(--ink); font-weight: 500; }
.news-item p { margin: 0; color: var(--ink); font-size: 1.05rem; }

/* Calendar */
.coming-soon { font-family: var(--serif); color: var(--ink); font-size: clamp(1.7rem, 3vw, 2.4rem); font-style: italic; text-align: center; padding: 96px 24px; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); }

/* ============================================================
   Footer — DC skyline
   ============================================================ */
.site-footer { position: relative; margin-top: 30px; }
.skyline { display: block; width: 100%; height: auto; margin-bottom: -1px; }
.footer-body { background: var(--navy); color: #b3c0da; text-align: center; padding: 12px 0 40px; }
.copyright { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; margin: 0; }
.copyright a { color: #c9d3e6; }

/* ---- Launch animation ---- */
@media (prefers-reduced-motion: no-preference) {
  .anim .hero-logo svg .p-base, .anim .hero-logo svg .p-beam,
  .anim .hero-logo svg .p-roof, .anim .hero-logo svg .col { opacity: 0; }
  .anim .hero-logo svg .p-base { animation: riseUp .7s ease-out .1s forwards; }
  .anim .hero-logo svg .col.c1 { animation: colUp .7s cubic-bezier(.2,.7,.3,1) .3s forwards; }
  .anim .hero-logo svg .col.c2 { animation: colUp .7s cubic-bezier(.2,.7,.3,1) .42s forwards; }
  .anim .hero-logo svg .col.c3 { animation: colUp .7s cubic-bezier(.2,.7,.3,1) .54s forwards; }
  .anim .hero-logo svg .p-beam { animation: fadeIn .5s ease-out .8s forwards; }
  .anim .hero-logo svg .p-roof { animation: roofDrop .6s cubic-bezier(.2,.8,.3,1) .9s forwards; }
  .anim .hero-eyebrow { opacity: 0; animation: fadeUp .8s ease-out 1.1s forwards; }
  .anim .hero h1 { opacity: 0; animation: fadeUp 1s ease-out .35s forwards; }
  .anim .hero-media img { animation: kenburns 14s ease-out forwards; }
  .anim .hero-scroll { opacity: 0; animation: fadeIn 1s ease-out 1s forwards; }
}
@keyframes riseUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes colUp   { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes roofDrop{ from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { to { opacity: 1; } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes kenburns{ from { transform: scale(1.08); } to { transform: scale(1); } }
.hero-logo svg .col   { transform-box: fill-box; transform-origin: 50% 100%; }
.hero-logo svg .p-roof{ transform-box: fill-box; transform-origin: 50% 0; }

/* ============================================================
   Home page: rail hidden until you scroll past the hero (desktop)
   — avoids showing the sidebar title and hero title at once
   ============================================================ */
@media (min-width: 981px) {
  .home .hero { width: calc(100% + var(--rail)); margin-left: calc(-1 * var(--rail)); }
  .home .rail { transform: translateX(-100%); transition: transform .5s cubic-bezier(.4,0,.2,1); }
  .home.rail-in .rail { transform: none; }
}

/* ============================================================
   Responsive — rail collapses to a top bar
   ============================================================ */
@media (max-width: 980px) {
  .rail {
    top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 62px;
    flex-direction: row; align-items: center; justify-content: space-between; padding: 0 20px;
  }
  .rail-brand { flex-direction: row; align-items: center; gap: 12px; }
  .rail-logo { width: 30px; }
  .rail-name { font-size: 1.12rem; }
  .rail-name small { display: none; }
  .rail-toggle { display: inline-flex; background: none; border: 0; cursor: pointer; padding: 8px; color: #fff; }
  .rail-toggle svg { width: 26px; height: 26px; }
  .rail-nav {
    position: absolute; top: 62px; left: 0; right: 0; margin: 0; display: none;
    background: var(--navy); padding: 8px 20px 22px; border-top: 1px solid rgba(255,255,255,.08);
  }
  .rail-nav.open { display: flex; }
  .rail-nav ol a { font-size: 1.25rem; }
  .rail-social { margin-top: 20px; }
  .rail-foot { display: none; }
  .content { margin-left: 0; margin-top: 62px; }
  .hero { height: 82vh; min-height: 500px; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split .figure { max-width: 360px; }
  .opp-grid { grid-template-columns: 1fr; gap: 0; }
}
