/* AI Safety at UCSB — editorial stylesheet
   Palette driven by the existing logo. UCSB identity: navy ink, warm cream
   paper, restrained gold, single brick red for emphasis. */

:root {
  --paper: #faf8f3;
  --paper-soft: #f2ede0;
  --paper-deep: #e8e0ce;
  --ink: #003660;
  --ink-soft: #2c4f73;
  --ink-mute: #6b7a8d;
  --rule: #d8d0bd;
  --rule-soft: #e5dcc5;

  --navy: #003660;
  --navy-deep: #00223f;
  --gold: #febc11;
  --gold-warm: #d99c00;
  --brick: #8b2c2c;

  --serif: "Newsreader", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --page-pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 1.55;
  font-feature-settings: "onum" 1, "liga" 1, "dlig" 1;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(198,150,52,0.045), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(26,54,89,0.04), transparent 60%);
  mix-blend-mode: multiply;
}
main, nav, header, footer, section { position: relative; z-index: 1; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule);
    text-underline-offset: 3px; text-decoration-thickness: 1px;
    transition: color 0.15s, text-decoration-color 0.15s; }
a:hover { color: var(--brick); text-decoration-color: var(--brick); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin: 0; }
h1 { font-size: clamp(44px, 7vw, 92px); line-height: 1.02; font-weight: 500; letter-spacing: -0.03em; }
h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; }
h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; font-weight: 600; }

em, .italic { font-style: italic; }
.drop-red { color: var(--brick); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}
.eyebrow .dot { color: var(--gold-warm); margin: 0 6px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--page-pad); }

hr.hair { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ========== Top strip — UCSB coordinates ========== */
.topstrip {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.topstrip-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(245,241,232,0.78);
}
.topstrip-inner .dot { color: var(--gold); margin: 0 8px; }

/* ========== Navigation ========== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 68px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.nav-brand:hover { color: var(--ink); text-decoration: none; }
.nav-brand img { width: 38px; height: 38px; border-radius: 6px; display: block; }
.nav-brand .amp { color: var(--gold-warm); font-style: italic; font-weight: 400; }

.nav-links { display: flex; gap: 24px; margin-left: auto; align-items: center; }
.nav-links a {
  font-family: var(--sans); font-size: 13.5px; font-weight: 500;
  color: var(--ink-soft); text-decoration: none; letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--brick); }
.nav-cta {
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  padding: 9px 16px; background: var(--ink); color: var(--paper) !important;
  border-radius: 2px; letter-spacing: 0.02em;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--brick); text-decoration: none; }

@media (max-width: 760px) {
  .nav-links { gap: 14px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ========== Hero ========== */
.hero { padding: 96px 0 96px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 72px; align-items: center;
}
.hero .eyebrow { margin-bottom: 28px; display: block; }
.hero h1 em { font-style: italic; color: var(--brick); }
.hero-lead {
  font-family: var(--serif); font-size: 20px; line-height: 1.55;
  color: var(--ink-soft); margin: 36px 0 0;
  max-width: 54ch;
}
.hero-actions { margin-top: 40px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  padding: 14px 22px; text-decoration: none; border-radius: 2px;
  letter-spacing: 0.02em; transition: all 0.15s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--brick); border-color: var(--brick); color: var(--paper); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); text-decoration: none; }
.btn .arrow { transition: transform 0.15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* UCSB portrait — Storke Tower silhouette card on the right of hero */
.hero-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 6px 6px 0 var(--paper-deep);
}
.hero-portrait svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-portrait .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 20px;
  background: linear-gradient(to top, rgba(14,31,54,0.85), transparent);
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(245,241,232,0.9);
}
.hero-portrait .caption strong { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--paper); }
.hero-portrait .corner {
  position: absolute; top: 14px; left: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold);
}
.hero-portrait .corner-r {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(245,241,232,0.55);
}

/* Typographic hero panel (replaces Storke Tower illustration) */
.hero-portrait .portrait-inner {
  position: absolute; inset: 0;
  padding: 56px 32px 32px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  color: var(--paper);
}
.hero-portrait .portrait-mono {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold);
  padding-bottom: 14px; border-bottom: 1px solid rgba(198,150,52,0.35);
}
.hero-portrait .portrait-quote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 23px; line-height: 1.35; letter-spacing: -0.005em;
  color: var(--paper);
  margin: 22px 0 14px;
  padding: 0; text-wrap: pretty;
}
.hero-portrait .portrait-quote .open-quote,
.hero-portrait .portrait-quote .close-quote {
  font-family: var(--serif); font-style: normal; color: var(--gold);
  font-size: 32px; line-height: 0; vertical-align: -4px;
}
.hero-portrait .portrait-attrib {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.15em;
  text-transform: uppercase; color: rgba(245,241,232,0.65);
}
.hero-portrait .portrait-rule {
  height: 1px; background: rgba(245,241,232,0.18); margin: 20px 0 16px;
}
.hero-portrait .portrait-foot {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.hero-portrait .portrait-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.22em;
  text-transform: uppercase; color: rgba(245,241,232,0.5);
  margin-bottom: 4px;
}
.hero-portrait .portrait-val {
  font-family: var(--serif); font-size: 18px; font-weight: 500;
  color: var(--paper);
}

@media (max-width: 920px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-portrait { max-width: 360px; margin: 0 auto; }
  .hero-portrait .portrait-quote { font-size: 20px; }
}

/* ========== COVER (front-page hero) ========== */
.cover {
  position: relative;
  padding: clamp(72px, 12vh, 140px) 0 clamp(72px, 12vh, 140px);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.cover-wrap { max-width: 920px; }
.cover-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
}
.cover-h {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.cover-h em {
  font-style: italic;
  color: var(--ink);
}
.cover-sub {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 28px 0 0;
  max-width: 58ch;
  text-wrap: pretty;
}
.cover-links {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
  font-family: var(--serif);
  font-size: 17px;
}
.cover-links a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.cover-links a:hover {
  color: var(--ink);
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
}
.cover-primary {
  font-weight: 600;
  text-decoration-color: var(--gold) !important;
  text-decoration-thickness: 2px !important;
}
.cover-sep { color: var(--ink-mute); }

@media (max-width: 760px) {
  .cover { padding: 56px 0 64px; }
  .cover-sub { font-size: 17px; }
}

/* ========== Generic section ========== */
.section { padding: 96px 0; border-top: 1px solid var(--rule); }
.section-head {
  display: grid; grid-template-columns: 1fr 2.4fr; gap: 48px;
  margin-bottom: 56px; align-items: baseline;
}
.section-head .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-mute); }
.section-head h2 { margin: 0; }
.section-head .lede { font-style: italic; color: var(--ink-soft); font-size: 18px; margin-top: 14px; max-width: 56ch; line-height: 1.5; }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .section { padding: 64px 0; }
}
