@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Source+Serif+4:ital,wght@0,300;0,400;0,600;1,300&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;
  -webkit-text-size-adjust: 100%;
}

body.body-root {
  background-color: #26171f;
  color: #f0e6ec;
  font-family: 'Source Serif 4', 'Georgia', serif;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Aurora Background ── */
.aurora-canvas {
  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.55;
  animation: aurora-flow 18s ease-in-out infinite alternate;
}

.aurora-1 {
  width: 70vw;
  height: 70vw;
  top: -20vw;
  left: -15vw;
  background: radial-gradient(ellipse at center, #ff0080 0%, transparent 70%);
  animation-duration: 20s;
  animation-delay: 0s;
}

.aurora-2 {
  width: 60vw;
  height: 60vw;
  bottom: -10vw;
  right: -10vw;
  background: radial-gradient(ellipse at center, #ff00ff 0%, transparent 70%);
  animation-duration: 25s;
  animation-delay: -8s;
}

.aurora-3 {
  width: 50vw;
  height: 50vw;
  top: 30vh;
  left: 40vw;
  background: radial-gradient(ellipse at center, #c4006a 0%, #ff00ff 40%, transparent 70%);
  animation-duration: 22s;
  animation-delay: -14s;
}

.aurora-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  animation: hue-spin 30s linear infinite;
}

@keyframes aurora-flow {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(5vw, 8vh) scale(1.08); }
  66% { transform: translate(-3vw, 4vh) scale(0.95); }
  100% { transform: translate(3vw, -6vh) scale(1.05); }
}

@keyframes hue-spin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ── Navigation ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 24px;
  background: rgba(38, 23, 31, 0.72);
  backdrop-filter: blur(18px) saturate(1.8);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  border-right: 1px solid rgba(255, 0, 128, 0.18);
  overflow-y: auto;
  gap: 20px;
}

.nav-logo {
  display: flex;
  justify-content: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 0, 255, 0.2);
}

.nav-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0080, #ff00ff);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(255, 0, 128, 0.5);
  flex-shrink: 0;
}

.site-logo-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.site-logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: #fff;
  line-height: 1;
}

.nav-search {
  position: relative;
}

.nav-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 0, 128, 0.25);
  border-radius: 40px;
  padding: 10px 16px;
  color: #f0e6ec;
  font-family: 'Source Serif 4', serif;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.nav-search-input::placeholder { color: rgba(240, 230, 236, 0.4); }
.nav-search-input:focus {
  border-color: rgba(255, 0, 128, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.12);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 40px;
  text-decoration: none;
  color: rgba(240, 230, 236, 0.78);
  font-family: 'Source Serif 4', serif;
  font-size: 0.85rem;
  line-height: 1.3;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.nav-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(255,0,128,0.15), rgba(255,0,255,0.1));
  opacity: 0;
  transition: opacity 0.2s;
}

.nav-pill:hover::before,
.nav-pill:focus::before { opacity: 1; }
.nav-pill:hover, .nav-pill:focus {
  color: #fff;
  outline: none;
  box-shadow: 0 0 12px rgba(255, 0, 128, 0.25);
}

.nav-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: #ff0080;
  opacity: 0.8;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.nav-label { flex: 1; }

/* ── Page Wrapper ── */
.page-wrapper {
  position: relative;
  z-index: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Hero ── */
.site-header {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 0, 128, 0.15);
}

.hero-inner {
  position: relative;
  width: 100%;
  padding: 48px 56px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.hero-deco-num {
  position: absolute;
  bottom: -0.15em;
  right: 48px;
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 1;
  background: linear-gradient(135deg, rgba(255,0,128,0.18) 0%, rgba(255,0,255,0.12) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: #ff0080;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.9;
}

.hero-h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 40px rgba(255, 0, 128, 0.35);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(240, 230, 236, 0.75);
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.65;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0 32px;
  border-radius: 40px;
  background: linear-gradient(135deg, #ff0080, #ff00ff);
  color: #fff;
  font-family: 'Source Serif 4', serif;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(255, 0, 128, 0.45);
  transition: box-shadow 0.25s, transform 0.2s;
  min-height: 48px;
  line-height: 1;
}

.hero-cta:hover, .hero-cta:focus {
  box-shadow: 0 6px 32px rgba(255, 0, 255, 0.55);
  transform: translateY(-1px);
  outline: none;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
}

/* ── Content Layout ── */
.content-layout {
  display: flex;
  flex: 1;
  align-items: flex-start;
  gap: 0;
}

/* ── Aside ── */
.content-aside {
  position: sticky;
  top: 0;
  width: 200px;
  min-width: 200px;
  min-height: 100px;
  align-self: flex-start;
  padding: 36px 20px 36px 40px;
}

.aside-inner {
  position: relative;
  background: rgba(38, 23, 31, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 0, 128, 0.15);
  border-radius: 20px;
  padding: 24px 18px;
  overflow: hidden;
}

.aside-heading {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: #ff00ff;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.aside-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: rgba(240, 230, 236, 0.6);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 5px 6px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  min-height: 32px;
}

.aside-link:hover, .aside-link:focus {
  color: #ff0080;
  background: rgba(255, 0, 128, 0.08);
  outline: none;
}

.aside-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: rgba(255, 0, 128, 0.5);
  flex-shrink: 0;
}

.aside-shimmer {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,255,0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: shimmer-pulse 4s ease-in-out infinite alternate;
}

@keyframes shimmer-pulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* ── Main Content ── */
.content-main {
  flex: 1;
  min-width: 0;
  padding: 40px 56px 60px 32px;
}

.content-article {
  max-width: 780px;
}

.content-section {
  position: relative;
}

/* ── Injected Content Styles ── */
.content-section h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  color: #fff;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: 56px;
  margin-bottom: 10px;
}

.content-section h2 + hr,
.content-section h3 + hr {
  border: none;
  border-top: 1px solid rgba(255, 0, 128, 0.35);
  margin: 0 0 20px;
}

.content-section h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  color: rgba(240, 230, 236, 0.92);
  margin-top: 36px;
  margin-bottom: 8px;
  line-height: 1.3;
}

.content-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(240, 230, 236, 0.82);
  margin-bottom: 18px;
}

.content-section a {
  color: #ff0080;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 128, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.content-section a:hover {
  color: #ff00ff;
  text-decoration-color: #ff00ff;
}

.content-section ul,
.content-section ol {
  padding-left: 1.4em;
  margin-bottom: 18px;
  color: rgba(240, 230, 236, 0.82);
  font-size: 1.02rem;
  line-height: 1.75;
}

.content-section li { margin-bottom: 6px; }

.content-section blockquote {
  border-left: 3px solid #ff0080;
  padding: 14px 20px;
  margin: 24px 0;
  background: rgba(255, 0, 128, 0.06);
  border-radius: 0 12px 12px 0;
  color: rgba(240, 230, 236, 0.85);
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

.content-section article {
  scroll-margin-top: 88px;
  padding-top: 8px;
}

/* Glass card for any .card inside content */
.content-section .card,
.glass-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid rgba(255, 0, 128, 0.18);
  border-radius: 28px;
  padding: 28px 32px;
  margin-bottom: 24px;
  transition: box-shadow 0.25s, transform 0.2s;
}

.content-section .card:hover,
.glass-card:hover {
  box-shadow: 0 8px 32px rgba(255, 0, 128, 0.18);
  transform: translateY(-2px);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Footer ── */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgba(20, 10, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 0, 128, 0.18);
  overflow: hidden;
}

.footer-brand-section {
  padding: 48px 56px 0 56px;
  overflow: hidden;
}

.footer-mega-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 8rem);
  line-height: 0.9;
  background: linear-gradient(135deg, rgba(255,0,128,0.35) 0%, rgba(255,0,255,0.25) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  user-select: none;
  pointer-events: none;
}

.footer-cols-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px 56px;
}

.footer-col h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 10px;
}

.footer-col hr {
  border: none;
  border-top: 1px solid rgba(255, 0, 128, 0.3);
  margin-bottom: 16px;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(240, 230, 236, 0.6);
  line-height: 1.65;
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 0, 128, 0.85);
  text-decoration: none;
}

.footer-col a:hover { color: #ff00ff; }

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-nav-list a {
  font-size: 0.88rem;
  color: rgba(240, 230, 236, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav-list a:hover { color: #ff0080; }

.footer-bottom-section {
  border-top: 1px solid rgba(255, 0, 128, 0.12);
  padding: 20px 56px;
  text-align: center;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(240, 230, 236, 0.4);
  line-height: 1.5;
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Mobile Nav Toggle ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: #f0e6ec;
  flex-shrink: 0;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .site-nav {
    width: 200px;
  }
  .page-wrapper {
    margin-left: 200px;
  }
  .content-aside {
    width: 160px;
    min-width: 160px;
    padding: 28px 12px 28px 24px;
  }
  .content-main {
    padding: 32px 28px 48px 20px;
  }
  .hero-inner {
    padding: 40px 32px 32px;
  }
  .footer-cols-section {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    padding: 32px 32px;
  }
  .footer-brand-section {
    padding: 36px 32px 0;
  }
  .footer-bottom-section {
    padding: 16px 32px;
  }
}

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

  .site-nav {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    max-height: 60px;
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    border-right: none;
    border-top: 1px solid rgba(255, 0, 128, 0.2);
    overflow: hidden;
    transition: max-height 0.35s ease;
  }

  .site-nav.nav-open {
    max-height: 100vh;
    flex-direction: column;
    align-items: stretch;
    padding: 16px 16px 24px;
    overflow-y: auto;
  }

  .nav-logo {
    border-bottom: none;
    padding-bottom: 0;
    flex-shrink: 0;
  }

  .site-nav:not(.nav-open) .nav-search { display: none; }
  .site-nav.nav-open .nav-search { display: block; }

  .site-nav:not(.nav-open) .nav-list { display: none; }
  .site-nav.nav-open .nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 4px;
  }

  /* Ensure all nav pills have sufficient tap target */
  .nav-pill {
    min-height: 48px;
    padding: 12px 16px;
  }

  .page-wrapper { margin-left: 0; padding-bottom: 64px; }

  .content-layout { flex-direction: column; }

  .content-aside {
    position: static;
    width: 100%;
    min-width: unset;
    padding: 20px 20px 0;
  }

  .aside-toc { flex-direction: row; flex-wrap: wrap; gap: 4px; }

  .aside-link {
    font-size: 0.72rem;
    padding: 8px 10px;
    min-height: 40px;
    align-items: center;
  }

  .content-main {
    padding: 24px 20px 48px;
  }

  .hero-inner { padding: 32px 20px 28px; }

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

  .hero-deco-num {
    font-size: 4.5rem;
    right: 16px;
  }

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

  .footer-brand-section { padding: 28px 20px 0; }
  .footer-bottom-section { padding: 14px 20px; }

  .content-section h2 { margin-top: 40px; }

  .content-section article { scroll-margin-top: 72px; }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
