/* ===========================
   UCSB Political Communication
   Working Group — Site Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300&display=swap');

:root {
  --navy:     #002060;
  --navy-mid: #1a3a6e;
  --gold:     #c4a044;
  --cream:    #faf8f3;
  --warm-white: #ffffff;
  --text:     #1a1a2e;
  --text-mid: #444466;
  --text-light: #7a7a96;
  --border:   #ddd8cc;
  --shadow:   0 2px 24px rgba(0,32,96,0.07);
  --transition: 0.25s ease;

  --max-width: 960px;
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  background: var(--cream);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ─────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.nav-inner {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-brand-text .line1 {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

.nav-brand-text .line2 {
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  font-family: 'Source Serif 4', serif;
  font-size: 0.82rem;
  font-weight: 400;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 3px;
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-links a.active {
  color: var(--gold);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── PAGE HERO ───────────────── */
.page-hero {
  background: var(--navy);
  padding: 3.5rem 2rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(196,160,68,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: #fff;
  position: relative;
}

.page-hero p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  position: relative;
}

/* ── MAIN LAYOUT ─────────────── */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── HOME PAGE ───────────────── */
.home-hero {
  background: var(--navy);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, rgba(196,160,68,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  position: relative;
}

.home-hero-seal {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  filter: invert(1);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.home-hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.home-hero-text p {
  margin-top: 0.35rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-hero-text {
  text-align: left;
}

.home-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 4rem;
}

@media (max-width: 760px) {
  .home-content { grid-template-columns: 1fr; gap: 3rem; }
}

/* About block */
.about-block h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
}

.about-block p { margin-bottom: 1rem; color: var(--text); }

.about-block .affiliations {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.about-block .affiliations h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.affil-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.affil-links a {
  font-size: 0.82rem;
  color: var(--navy);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: 2px;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  background: var(--warm-white);
}

.affil-links a:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

/* Schedule sidebar */
.schedule-sidebar h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold);
}

.schedule-term {
  margin-bottom: 2rem;
}

.schedule-term h3 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.schedule-entry {
  display: flex;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  animation: fadeUp 0.4s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entry-date {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-light);
  min-width: 52px;
  padding-top: 0.15rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.entry-speaker {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.4;
}

.past-toggle {
  margin-top: 0.5rem;
  background: none;
  border: none;
  font-family: 'Source Serif 4', serif;
  font-size: 0.78rem;
  color: var(--navy-mid);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── PEOPLE PAGE ─────────────── */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 0.5rem;
}

.person-card {
  text-align: left;
  animation: fadeUp 0.5s ease both;
}

.person-card-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  border-radius: 3px;
  background: var(--border);
  display: block;
  margin-bottom: 0.9rem;
  filter: grayscale(15%);
  transition: filter var(--transition);
}

.person-card:hover .person-card-photo {
  filter: grayscale(0%);
}

.person-card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #dde3ee 0%, #c8d0e0 100%);
  border-radius: 3px;
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.person-card-placeholder svg {
  width: 40%;
  opacity: 0.3;
}

.person-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.person-card .research-area {
  font-size: 0.8rem;
  color: var(--text-mid);
  line-height: 1.5;
  font-style: italic;
}

.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: 3rem 0 1.5rem;
  font-weight: 400;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.alums-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem 2rem;
}

.alums-list li {
  font-size: 0.9rem;
  color: var(--text-mid);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.alums-list li span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ── RESEARCH PAGE ───────────── */
.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeUp 0.4s ease both;
}

.pub-item:first-child { border-top: 1px solid var(--border); }

.pub-authors {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.pub-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.3rem;
}

.pub-journal {
  font-size: 0.83rem;
  color: var(--text-mid);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pub-doi {
  font-size: 0.78rem;
}

.pub-doi a {
  color: var(--navy-mid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.pub-doi a:hover { border-bottom-color: var(--navy-mid); }

/* ── COURSES PAGE ────────────── */
.courses-intro {
  font-size: 1.05rem;
  color: var(--text);
  max-width: 660px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

.course-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}

.course-card:hover {
  box-shadow: 0 4px 32px rgba(0,32,96,0.11);
  transform: translateY(-2px);
}

.course-code {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.course-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.course-card p {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.65;
}

.emphasis-block {
  background: var(--navy);
  color: rgba(255,255,255,0.88);
  border-radius: 4px;
  padding: 2rem 2.25rem;
  margin-top: 2.5rem;
}

.emphasis-block h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.emphasis-block p { font-size: 0.92rem; line-height: 1.75; }

.emphasis-block a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(196,160,68,0.4);
  transition: border-color var(--transition);
}
.emphasis-block a:hover { border-color: var(--gold); }

/* ── FOOTER ──────────────────── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2.5rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.8;
}

footer a { color: rgba(255,255,255,0.65); text-decoration: none; }
footer a:hover { color: #fff; }
footer .footer-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  display: block;
  margin-bottom: 0.3rem;
}

/* ── RESPONSIVE ──────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--navy); padding: 1rem; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; border-radius: 0; width: 100%; }
  .nav-toggle { display: flex; }
  .home-content { padding: 2.5rem 1.25rem 4rem; }
  main { padding: 2rem 1.25rem 4rem; }
}

/* ── UTILS ───────────────────── */
.gold-rule {
  border: none;
  border-top: 2px solid var(--gold);
  width: 48px;
  margin: 0 0 1.5rem;
}

.text-muted { color: var(--text-light); }

/* Stagger animation delays for grids */
.person-card:nth-child(1) { animation-delay: 0.05s; }
.person-card:nth-child(2) { animation-delay: 0.10s; }
.person-card:nth-child(3) { animation-delay: 0.15s; }
.person-card:nth-child(4) { animation-delay: 0.20s; }
.person-card:nth-child(5) { animation-delay: 0.25s; }
.person-card:nth-child(6) { animation-delay: 0.30s; }
.person-card:nth-child(7) { animation-delay: 0.35s; }
.person-card:nth-child(8) { animation-delay: 0.40s; }
.person-card:nth-child(9) { animation-delay: 0.45s; }
.person-card:nth-child(10) { animation-delay: 0.50s; }

.pub-item:nth-child(1) { animation-delay: 0.05s; }
.pub-item:nth-child(2) { animation-delay: 0.12s; }
.pub-item:nth-child(3) { animation-delay: 0.19s; }
.pub-item:nth-child(4) { animation-delay: 0.26s; }
.pub-item:nth-child(5) { animation-delay: 0.33s; }
.pub-item:nth-child(6) { animation-delay: 0.40s; }
