@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body.dark-root {
  background-color: #1a0f0f;
  color: #f0e0e0;
  font-family: 'Public Sans', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: #ff6b6b;
  text-decoration: none;
}

a:hover, a:focus {
  color: #ff1493;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== AURORA BACKGROUND ===== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  opacity: 0.25;
}

.aurora-layer.a1 {
  width: 80vw;
  height: 80vw;
  top: -20%;
  left: -10%;
  background: radial-gradient(ellipse at center, #ff0000 0%, transparent 70%);
  animation: aurora-drift1 10s ease-in-out infinite alternate;
}

.aurora-layer.a2 {
  width: 70vw;
  height: 70vw;
  top: 30%;
  right: -20%;
  background: radial-gradient(ellipse at center, #ff1493 0%, transparent 70%);
  animation: aurora-drift2 12s ease-in-out infinite alternate;
}

.aurora-layer.a3 {
  width: 60vw;
  height: 60vw;
  bottom: -10%;
  left: 20%;
  background: conic-gradient(from 180deg, #ff1493, #ff0000, transparent);
  animation: aurora-drift3 9s ease-in-out infinite alternate;
  mix-blend-mode: multiply;
  opacity: 0.18;
}

@keyframes aurora-drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8vw, 6vh) scale(1.15); }
}

@keyframes aurora-drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6vw, -8vh) scale(1.2); }
}

@keyframes aurora-drift3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-4vw, 4vh) rotate(30deg); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-layer { animation: none; }
}

/* ===== SIDENAV ===== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: rgba(38, 23, 23, 0.92);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(255, 0, 0, 0.25);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 24px 0 24px;
  overflow-y: auto;
}

.sidenav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px 16px;
  border-bottom: 1px solid rgba(255, 20, 147, 0.2);
  margin-bottom: 12px;
}

.site-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}

.logo-text {
  font-family: 'Lexend Mega', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ff0000, #ff1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.sidenav-slogan {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 20, 147, 0.7);
  text-align: center;
  padding: 0 12px 12px;
  font-family: 'Lexend Mega', sans-serif;
  text-transform: uppercase;
}

.sidenav-dl {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 12px;
  gap: 2px;
}

.nav-num {
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.6rem;
  font-weight: 900;
  color: rgba(255, 0, 0, 0.45);
  letter-spacing: 0.15em;
  padding: 8px 8px 0;
  line-height: 1;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-item a {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  min-height: 44px;
  font-size: 0.82rem;
  font-family: 'Public Sans', sans-serif;
  font-weight: 600;
  color: #f0d8d8;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.3;
}

.nav-item a:hover,
.nav-item a:focus {
  background: rgba(255, 0, 0, 0.15);
  color: #ff1493;
  text-decoration: none;
}

/* ===== PAGE WRAP ===== */
.page-wrap {
  margin-left: 220px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== HERO / HEADER ===== */
.site-header {
  min-height: 45vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(38,23,23,0.97) 0%, rgba(60,10,30,0.9) 100%);
  border-bottom: 2px solid rgba(255, 0, 0, 0.3);
}

.hero-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
  align-items: center;
  position: relative;
}

.hero-deco {
  position: absolute;
  bottom: -20px;
  left: -20px;
  pointer-events: none;
  z-index: 0;
}

.hero-bg-num {
  font-family: 'Lexend Mega', sans-serif;
  font-size: clamp(120px, 18vw, 240px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 0, 0, 0.12);
  line-height: 1;
  user-select: none;
}

.hero-tiles {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.hero-tile {
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255, 0, 0, 0.4);
  flex: 1;
}

.hero-tile.tile-a {
  margin-top: 0;
}

.hero-tile.tile-b {
  margin-top: 32px;
}

.hero-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.hero-placeholder {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, #ff0000 0%, #ff1493 50%, #261717 100%);
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

.hero-placeholder-b {
  background: linear-gradient(225deg, #ff1493 0%, #ff0000 50%, #261717 100%);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-copy {
  grid-column: 2;
  text-align: right;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #ff1493;
  text-transform: uppercase;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 20, 147, 0.4);
  padding: 4px 12px;
  border-radius: 4px;
}

.hero-h1 {
  font-family: 'Lexend Mega', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #ff6b6b 50%, #ff1493 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1rem;
  color: rgba(240, 224, 224, 0.8);
  line-height: 1.6;
  max-width: 420px;
  margin-left: auto;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  padding: 0 0 60px;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 40px;
  display: grid;
  grid-template-columns: 200px 80px 1fr;
  grid-template-rows: auto;
  gap: 32px;
  align-items: start;
}

/* ===== ASIDE ===== */
.content-aside {
  grid-column: 1;
  position: sticky;
  top: 80px;
}

.aside-inner {
  background: rgba(38, 23, 23, 0.7);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 16px;
  padding: 20px 16px;
  backdrop-filter: blur(8px);
}

.aside-label {
  display: block;
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 20, 147, 0.7);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-link {
  display: flex;
  align-items: center;
  padding: 10px 10px;
  font-size: 0.82rem;
  color: #f0d0d0;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
  min-height: 44px;
}

.aside-link:hover,
.aside-link:focus {
  background: rgba(255, 0, 0, 0.15);
  color: #ff1493;
  text-decoration: none;
}

/* ===== FIGURE DECORATION ===== */
.content-figure {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.figure-geo {
  border-radius: 28px;
  flex: 1;
}

.geo-a {
  width: 60px;
  height: 120px;
  background: linear-gradient(180deg, #ff0000, transparent);
  border: 2px solid rgba(255, 0, 0, 0.5);
  animation: geo-pulse 8s ease-in-out infinite alternate;
}

.geo-b {
  width: 60px;
  height: 80px;
  background: linear-gradient(180deg, #ff1493, transparent);
  border: 2px solid rgba(255, 20, 147, 0.5);
  animation: geo-pulse 10s ease-in-out infinite alternate-reverse;
  margin-top: 12px;
}

@keyframes geo-pulse {
  0% { opacity: 0.5; transform: scaleY(0.9); }
  100% { opacity: 1; transform: scaleY(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .geo-a, .geo-b { animation: none; }
}

/* ===== CONTENT BODY ===== */
.content-body {
  grid-column: 3;
}

.section-eyebrow {
  display: block;
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 20, 147, 0.8);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-h2 {
  font-family: 'Lexend Mega', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 28px;
  line-height: 1.15;
  border-left: 4px solid #ff0000;
  padding-left: 16px;
}

/* ===== PAGE CONTENT STYLES ===== */
.content-body h2,
.content-body h3 {
  font-family: 'Lexend Mega', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  margin: 32px 0 14px;
  color: #fff;
}

.content-body h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  padding-bottom: 10px;
}

.content-body h3 {
  font-size: clamp(1rem, 2vw, 1.35rem);
  color: #ff6b6b;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(240, 224, 224, 0.9);
  margin-bottom: 16px;
  max-width: 72ch;
}

.content-body ul,
.content-body ol {
  padding-left: 1.4em;
  margin-bottom: 16px;
  color: rgba(240, 224, 224, 0.85);
}

.content-body li {
  margin-bottom: 8px;
  line-height: 1.65;
  font-size: 1rem;
}

.content-body a {
  color: #ff6b6b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover {
  color: #ff1493;
}

.content-body article {
  scroll-margin-top: 80px;
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 0, 0, 0.1);
}

.content-body article:last-child {
  border-bottom: none;
}

.content-body article h2 {
  position: relative;
}

.content-body strong {
  color: #ff6b6b;
  font-weight: 700;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.content-body th {
  background: rgba(255, 0, 0, 0.15);
  color: #ff6b6b;
  padding: 10px 14px;
  text-align: left;
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.content-body td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 0, 0, 0.1);
  color: rgba(240, 224, 224, 0.85);
}

.content-body blockquote {
  border-left: 3px solid #ff1493;
  padding: 12px 20px;
  margin: 20px 0;
  background: rgba(255, 20, 147, 0.06);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: rgba(240, 224, 224, 0.8);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ===== FOOTER ===== */
.site-footer {
  background: rgba(20, 10, 10, 0.97);
  border-top: 2px solid rgba(255, 0, 0, 0.25);
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  padding: 48px 40px 0;
  gap: 0;
}

.footer-brand {
  grid-column: 1;
  padding: 0 40px 40px 0;
  border-right: 1px solid rgba(255, 0, 0, 0.15);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand-name {
  font-family: 'Lexend Mega', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ff0000, #ff1493);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-desc {
  font-size: 0.88rem;
  color: rgba(240, 224, 224, 0.55);
  line-height: 1.65;
  max-width: 320px;
}

.footer-nav-section {
  grid-column: 2;
  padding: 0 0 40px 40px;
}

.footer-nav {
  width: 100%;
}

.footer-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
}

.footer-dl .nav-num {
  font-family: 'Lexend Mega', sans-serif;
  font-size: 0.55rem;
  font-weight: 900;
  color: rgba(255, 0, 0, 0.35);
  letter-spacing: 0.12em;
  padding: 0;
}

.footer-dl .nav-item a {
  font-size: 0.85rem;
  color: rgba(240, 224, 224, 0.65);
  padding: 10px 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.2s;
  line-height: 1.3;
}

.footer-dl .nav-item a:hover,
.footer-dl .nav-item a:focus {
  color: #ff1493;
  background: rgba(255, 20, 147, 0.08);
  text-decoration: none;
}

.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 0, 0, 0.15);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(240, 224, 224, 0.35);
  text-align: center;
  letter-spacing: 0.03em;
}

/* ===== SCROLL-MARGIN FOR SECTIONS ===== */
article[id] {
  scroll-margin-top: 80px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .sidenav {
    width: 180px;
  }

  .page-wrap {
    margin-left: 180px;
  }

  .hero-inner {
    padding: 32px 24px;
  }

  .content-section {
    padding: 40px 24px;
    grid-template-columns: 180px 60px 1fr;
  }
}

@media (max-width: 768px) {
  .sidenav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border-right: none;
    border-top: 1px solid rgba(255, 0, 0, 0.3);
    z-index: 200;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .sidenav-brand {
    padding: 10px 12px;
    border-bottom: none;
    border-right: 1px solid rgba(255, 20, 147, 0.2);
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .sidenav-slogan {
    display: none;
  }

  .sidenav-dl {
    flex-direction: row;
    flex: 1;
    padding: 0;
    gap: 0;
    overflow-x: auto;
    align-items: stretch;
  }

  .nav-num {
    display: none;
  }

  .nav-item {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .nav-item a {
    padding: 12px 14px;
    font-size: 0.75rem;
    white-space: nowrap;
    min-height: 48px;
    border-radius: 0;
  }

  .page-wrap {
    margin-left: 0;
    padding-bottom: 60px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 20px;
  }

  .hero-tiles {
    grid-column: 1;
    grid-row: 2;
    gap: 10px;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    text-align: left;
  }

  .hero-desc {
    margin-left: 0;
  }

  .hero-bg-num {
    font-size: 80px;
  }

  .content-section {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    gap: 24px;
  }

  .content-aside {
    grid-column: 1;
    grid-row: 3;
    position: static;
  }

  .content-figure {
    display: none;
  }

  .content-body {
    grid-column: 1;
    grid-row: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
    padding: 36px 20px 0;
  }

  .footer-brand {
    grid-column: 1;
    padding: 0 0 28px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 0, 0, 0.15);
  }

  .footer-nav-section {
    grid-column: 1;
    padding: 28px 0 28px 0;
  }

  .footer-bottom {
    grid-column: 1;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 60px;
  }

  .hero-h1 {
    font-size: 1.6rem;
  }

  .hero-img {
    height: 160px;
  }

  .hero-placeholder {
    height: 160px;
  }

  .section-h2 {
    font-size: 1.3rem;
  }

  .content-body p {
    font-size: 1rem;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
