/* ============================================
   UTA IEEE: A New Arc — Campaign Site
   by Leah Franklin

   Typography:  Playfair Display (headings)
                Source Serif 4 (body)
   Palette:     Off-white / near-black / UTA blue accent
   ============================================ */

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

/* --- Custom Properties --- */
:root {
  --bg: #FAF9F6;
  --bg-warm: #F5F0EB;
  --text: #1a1a1a;
  --text-light: #5a5a5a;
  --text-faint: #8a8a8a;
  --accent: #0038A8;
  --electric: rgba(0, 86, 210, 1);
  --electric-glow: rgba(0, 86, 210, 0.35);
  --electric-faint: rgba(0, 86, 210, 0.08);
  --rule: #d4d0c8;
  --rule-light: #e8e4de;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --content-width: 740px;
  --content-narrow: 620px;
  --nav-height: 60px;

  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle noise texture for paper-like depth */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.025;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Links --- */
a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

a:hover {
  color: var(--accent);
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  z-index: 100;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-light);
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  position: relative;
  padding: 0.25rem 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.4s var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after {
  width: 100%;
}

.site-nav a.active {
  color: var(--text);
}

.site-nav a.active::after {
  width: 100%;
}

/* ============================================
   SHARED LAYOUT
   ============================================ */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 4rem) 2rem 6rem;
}

/* ============================================
   HOME — HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 1.5rem) 2rem 2rem;
  position: relative;
}

/* --- Dual logos (UTA + IEEE) --- */
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.hero-logos img {
  height: 64px;
  width: auto;
  display: block;
  opacity: 0.88;
}

.hero-logos .logo-uta {
  height: 70px;
}

.hero-logos .logo-ieee {
  height: 54px;
}

.hero-overline {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.hero-title em {
  font-style: italic;
}

/* ============================================
   ELECTRIC TEXT EFFECT — "Arc"
   ============================================ */
.electric-text {
  position: relative;
  display: inline-block;
  font-style: italic;
  overflow: visible;
  animation: electricPulse 2s ease-in-out infinite;
  animation-delay: 1.2s;
  animation-fill-mode: backwards;
}

@keyframes electricPulse {
  0%, 100% {
    text-shadow:
      0 0 4px rgba(0, 86, 210, 0.0),
      0 0 12px rgba(0, 86, 210, 0.0);
  }
  8% {
    text-shadow:
      0 0 8px rgba(0, 86, 210, 0.35),
      0 0 25px rgba(0, 86, 210, 0.15),
      0 0 50px rgba(0, 86, 210, 0.05);
  }
  10% {
    text-shadow:
      0 0 3px rgba(0, 86, 210, 0.08),
      0 0 8px rgba(0, 86, 210, 0.03);
  }
  35% {
    text-shadow:
      0 0 6px rgba(0, 86, 210, 0.22),
      0 0 18px rgba(0, 86, 210, 0.09);
  }
  50% {
    text-shadow:
      0 0 10px rgba(0, 86, 210, 0.4),
      0 0 30px rgba(0, 86, 210, 0.18),
      0 0 60px rgba(0, 86, 210, 0.06);
  }
  52% {
    text-shadow:
      0 0 2px rgba(0, 86, 210, 0.06),
      0 0 6px rgba(0, 86, 210, 0.02);
  }
  75% {
    text-shadow:
      0 0 5px rgba(0, 86, 210, 0.18),
      0 0 15px rgba(0, 86, 210, 0.07);
  }
}

/* Spark particles generated by JS */
.electric-text .spark {
  position: absolute;
  height: 1.5px;
  pointer-events: none;
  border-radius: 1px;
  animation: sparkLife 0.25s ease-out forwards;
}

@keyframes sparkLife {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Decorative arc under title */
.hero-arc {
  width: 120px;
  height: auto;
  margin: 0.75rem auto 1.5rem;
  opacity: 0.25;
  display: block;
}

.hero-byline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-light);
  margin-bottom: 3rem;
}

.hero-intro {
  max-width: var(--content-narrow);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text-light);
  margin-bottom: 3.5rem;
}

.hero-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.4s var(--ease-out), color 0.3s var(--ease-out);
}

.hero-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.25;
  animation: scrollPulse 2.5s var(--ease-in-out) infinite;
}

.scroll-indicator span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-indicator .arrow {
  width: 1px;
  height: 20px;
  background: var(--text-faint);
  position: relative;
}

.scroll-indicator .arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid var(--text-faint);
  border-bottom: 1px solid var(--text-faint);
  transform: rotate(45deg);
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.4; transform: translateX(-50%) translateY(5px); }
}

/* ============================================
   PLAN SECTION (on Home page, below hero)
   ============================================ */
.plan-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.plan-transition {
  text-align: center;
  padding: 2rem 0 4rem;
  opacity: 0.2;
}

.plan-transition svg {
  width: 80px;
  height: auto;
}

.plan-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.plan-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.plan-header p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
  font-weight: 400;
}

/* ============================================
   PAGE HEADER (Bio)
   ============================================ */
.page-header {
  text-align: center;
  margin-bottom: 4.5rem;
  padding-top: 1.5rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.page-header .subtitle {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
  font-weight: 400;
}

/* ============================================
   HORIZONTAL RULE
   ============================================ */
.section-rule {
  border: none;
  height: 1px;
  background: var(--rule);
  margin: 0;
}

/* ============================================
   INITIATIVES
   ============================================ */
.initiative {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--rule-light);
}

.initiative:last-of-type {
  border-bottom: none;
}

.initiative-number {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 400;
  color: var(--rule);
  line-height: 1;
  display: block;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.initiative h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.initiative p {
  color: var(--text-light);
  line-height: 1.85;
  max-width: var(--content-narrow);
}

.initiative p + p {
  margin-top: 1rem;
}

/* Plan preamble — manifesto text above initiatives */
.plan-preamble {
  margin-bottom: 3.5rem;
}

.plan-preamble p {
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 1.35rem;
}

.plan-preamble p:last-child {
  margin-bottom: 0;
}

.plan-preamble .highlight {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  text-align: center;
  margin: 2.5rem auto;
}

.plan-preamble .plan-transition-text {
  font-family: var(--font-display);
  font-style: italic;
  text-align: center;
  color: var(--text-light);
  font-size: 1.1rem;
  margin-top: 2.5rem;
}

/* Initiative subtitle — the italic policy statement */
.initiative-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 1.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
}

/* Extended initiative body */
.initiative-body {
  margin-top: 0.25rem;
}

.initiative-body p {
  color: var(--text-light);
  line-height: 1.85;
  margin-bottom: 1.1rem;
}

.initiative-body p:last-child {
  margin-bottom: 0;
}

.initiative-body strong {
  color: var(--text);
  font-weight: 600;
}

/* Example lists within initiatives */
.initiative-examples {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
}

.initiative-examples li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: var(--text-light);
  line-height: 1.75;
}

.initiative-examples li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--rule);
}

/* Reference links within initiatives */
.initiative-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.initiative-links li {
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.initiative-body a,
.initiative-links a {
  color: var(--text-light);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  word-break: break-word;
}

.initiative-body a:hover,
.initiative-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Closing statement */
.plan-closing {
  text-align: center;
  padding: 4.5rem 0 2rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.7;
}

/* ============================================
   BIO PAGE
   ============================================ */
.bio-header {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule-light);
}

.bio-photo {
  width: 200px;
  height: 250px;
  flex-shrink: 0;
  background: var(--bg-warm);
  border: 1px solid var(--rule-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-photo-placeholder {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bio-intro h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.bio-intro .role {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.bio-intro .statement {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.85;
}

.bio-section {
  margin-bottom: 3rem;
}

.bio-section h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.bio-section p,
.bio-section li {
  color: var(--text-light);
  line-height: 1.85;
}

.bio-section ul {
  list-style: none;
  padding: 0;
}

.bio-section li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
}

.bio-section li::before {
  content: '\2014';
  position: absolute;
  left: 0;
  color: var(--rule);
}

.bio-section a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.bio-section a:hover {
  border-color: var(--accent);
}

/* ============================================
   SCROLL IMAGES — editorial photos in margins
   ============================================ */
.scroll-image {
  width: 240px;
  float: right;
  margin: 0.25rem 0 1.5rem 2rem;
  shape-outside: margin-box;
}

.scroll-image.left {
  float: left;
  margin: 0.25rem 2rem 1.5rem 0;
}

.scroll-image img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(100%);
  mix-blend-mode: multiply;
}

/* Override generic data-animate for scroll images */
.scroll-image[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.3s var(--ease-out), transform 1.3s var(--ease-out);
}

.scroll-image[data-animate].is-visible {
  opacity: 0.5;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .scroll-image {
    width: 160px;
    margin: 0.25rem 0 1rem 1.25rem;
  }
  .scroll-image.left {
    margin: 0.25rem 1.25rem 1rem 0;
  }
}

@media (max-width: 520px) {
  .scroll-image {
    display: none;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  text-align: center;
  padding: 3.5rem 2rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  border-top: 1px solid var(--rule-light);
  margin-top: 2rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Scroll-triggered elements */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
[data-animate-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-animate-stagger].is-visible > *:nth-child(1) { transition-delay: 0.0s; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
[data-animate-stagger].is-visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* Hero load sequence */
.hero [data-load] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.hero.loaded [data-load] {
  opacity: 1;
  transform: translateY(0);
}

.hero.loaded [data-load="1"] { transition-delay: 0.15s; }
.hero.loaded [data-load="2"] { transition-delay: 0.3s; }
.hero.loaded [data-load="3"] { transition-delay: 0.45s; }
.hero.loaded [data-load="4"] { transition-delay: 0.6s; }
.hero.loaded [data-load="5"] { transition-delay: 0.75s; }
.hero.loaded [data-load="6"] { transition-delay: 0.9s; }
.hero.loaded [data-load="7"] { transition-delay: 1.05s; }

/* Page content load sequence */
.page-content [data-load] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}

.page-content.loaded [data-load] {
  opacity: 1;
  transform: translateY(0);
}

.page-content.loaded [data-load="1"] { transition-delay: 0.1s; }
.page-content.loaded [data-load="2"] { transition-delay: 0.2s; }
.page-content.loaded [data-load="3"] { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  :root {
    --nav-height: 52px;
  }

  body {
    font-size: 1rem;
  }

  .site-nav {
    gap: 2rem;
  }

  .site-nav a {
    font-size: 0.78rem;
  }

  .hero-title {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
  }

  .hero-logos {
    gap: 1.25rem;
  }

  .hero-logos .logo-uta {
    height: 55px;
  }

  .hero-logos .logo-ieee {
    height: 42px;
  }

  .page-content {
    padding: calc(var(--nav-height) + 3rem) 1.5rem 4rem;
  }

  .plan-section {
    padding: 3rem 1.5rem 4rem;
  }

  .page-header {
    margin-bottom: 3rem;
  }

  .initiative {
    padding: 2.5rem 0;
  }

  .initiative-number {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .initiative h2 {
    font-size: 1.35rem;
  }

  .bio-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }

  .bio-photo {
    width: 160px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .site-nav {
    gap: 1.5rem;
  }

  .hero-links {
    flex-direction: column;
    gap: 1.25rem;
  }

  .hero-logos .logo-uta {
    height: 46px;
  }

  .hero-logos .logo-ieee {
    height: 35px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .hero-byline {
    margin-bottom: 2rem;
  }

  .hero-intro {
    margin-bottom: 2.5rem;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  body::after { display: none; }
  .site-nav, .scroll-indicator { display: none; }
  .hero { min-height: auto; padding: 2rem; }
  .electric-text { animation: none !important; }
  .electric-text .spark { display: none; }
  [data-animate], [data-load], .hero [data-load] {
    opacity: 1 !important;
    transform: none !important;
  }
}
