@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syncopate:wght@400;700&display=swap');

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --c-primary: #ff0080;
  --c-secondary: #ff00ff;
  --c-bg: #26171f;
  --c-bg-soft: #1e1018;
  --c-bg-card: #2f1a26;
  --c-text: #f0d6e8;
  --c-text-muted: #a07088;
  --c-border: rgba(255, 0, 128, 0.2);
  --c-border-bright: rgba(255, 0, 255, 0.4);

  --font-display: 'Syncopate', 'Arial Narrow', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-body: 'Space Mono', system-ui, -apple-system, sans-serif;

  --radius: 0px;
  --shadow-card: 0 4px 32px rgba(255, 0, 128, 0.18), 0 1px 8px rgba(255, 0, 255, 0.1);
  --shadow-glow: 0 0 32px rgba(255, 0, 128, 0.4);

  --nav-h: 64px;
  --section-mt: 80px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font-family: inherit; }
input { font-family: inherit; }
address { font-style: normal; }
h1, h2, h3, h4 { line-height: 1.2; }

/* ===== SCREEN READER ONLY ===== */
.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;
}

/* ===== AURORA CANVAS BG ===== */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#aurora-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.prism-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(255,0,128,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(255,0,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 10%, rgba(255,0,200,0.1) 0%, transparent 50%);
  mix-blend-mode: screen;
  animation: prism-shift 12s ease-in-out infinite alternate;
}
@keyframes prism-shift {
  0%   { filter: hue-rotate(0deg) brightness(1); }
  50%  { filter: hue-rotate(20deg) brightness(1.1); }
  100% { filter: hue-rotate(-15deg) brightness(0.95); }
}

/* ===== LAYOUT STACKING ===== */
.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(38, 23, 31, 0.88);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid var(--c-border-bright);
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.brand-link:hover { opacity: 0.8; }
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--c-border-bright);
  background: rgba(255,0,128,0.06);
  overflow: hidden;
}
.search-input {
  background: none;
  border: none;
  outline: none;
  color: var(--c-text);
  font-size: 0.875rem;
  padding: 8px 12px;
  width: 160px;
  transition: width 0.3s;
}
.search-input::placeholder { color: var(--c-text-muted); }
.search-input:focus { width: 220px; }
.search-btn {
  color: var(--c-primary);
  padding: 8px 12px;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}
.search-btn:hover { color: var(--c-secondary); }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 8px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.burger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-primary);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Site nav */
.site-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  border-top: 1px solid var(--c-border);
}
.nav-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.nav-item { flex-shrink: 0; }
.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--c-text-muted);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
  transform: scaleX(0);
  transition: transform 0.25s;
}
.nav-link:hover { color: var(--c-text); }
.nav-link:hover::after { transform: scaleX(1); }

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 48px 24px;
}
.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(5rem, 18vw, 16rem);
  letter-spacing: 0.3em;
  background: linear-gradient(135deg, rgba(255,0,128,0.08), rgba(255,0,255,0.06));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  user-select: none;
  white-space: nowrap;
  pointer-events: none;
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-figure {
  position: relative;
  overflow: hidden;
}
.hero-figure::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,0,128,0.25), rgba(255,0,255,0.15));
  mix-blend-mode: overlay;
  z-index: 1;
  pointer-events: none;
}
.hero-figure::after {
  content: '';
  position: absolute;
  inset: -2px;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  pointer-events: none;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.2) brightness(0.9);
}
.hero-placeholder {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, var(--c-bg-card), rgba(255,0,128,0.12), rgba(255,0,255,0.1));
  position: relative;
  overflow: hidden;
}
.hero-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 20px,
    rgba(255,0,128,0.06) 20px,
    rgba(255,0,128,0.06) 40px
  );
  animation: shimmer-move 4s linear infinite;
}
@keyframes shimmer-move {
  from { background-position: 0 0; }
  to   { background-position: 80px 80px; }
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--c-primary);
  text-transform: uppercase;
}
.hero-h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  letter-spacing: 0.08em;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 24px rgba(255,0,128,0.5));
}
.hero-desc {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--c-text-muted);
  max-width: 400px;
}
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,0,128,0.4);
}
.btn--primary:hover {
  box-shadow: 0 6px 30px rgba(255,0,128,0.6);
  filter: brightness(1.1);
}
.btn--ghost {
  background: transparent;
  color: var(--c-primary);
  border: 1px solid var(--c-border-bright);
  box-shadow: inset 0 0 16px rgba(255,0,128,0.05);
}
.btn--ghost:hover {
  border-color: var(--c-primary);
  box-shadow: 0 0 16px rgba(255,0,128,0.25);
}
.btn--lg {
  padding: 16px 48px;
  font-size: 0.9rem;
}

/* ===== CONTENT SECTION ===== */
.content-section {
  padding: 64px 24px;
}
.content-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.content-body {
  min-width: 0;
}

/* Content body typography */
.content-body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: 0.08em;
  margin-top: 56px;
  margin-bottom: 0;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.content-body h2:first-child { margin-top: 0; }
.content-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary), transparent);
  margin: 12px 0 28px;
}
.content-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.06em;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--c-secondary);
}
.content-body p {
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}
.content-body ul, .content-body ol {
  margin: 16px 0 20px 20px;
  list-style: disc;
}
.content-body li {
  margin-bottom: 8px;
  line-height: 1.7;
}
.content-body a {
  color: var(--c-primary);
  text-decoration: underline;
  text-decoration-color: rgba(255,0,128,0.4);
  transition: text-decoration-color 0.2s, color 0.2s;
}
.content-body a:hover {
  color: var(--c-secondary);
  text-decoration-color: var(--c-secondary);
}
.content-body figure {
  margin: 32px 0;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.content-body aside {
  background: var(--c-bg-card);
  border-left: 3px solid var(--c-primary);
  padding: 20px 24px;
  margin: 32px 0;
  box-shadow: var(--shadow-card);
}
.content-body time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.content-body article {
  margin-bottom: 48px;
}

/* ===== ASIDE ===== */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.aside-inner {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border-bright);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.aside-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
}
.aside-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-primary);
  margin-bottom: 0;
}
.aside-hr {
  border: none;
  height: 1px;
  background: var(--c-border-bright);
  margin: 12px 0 20px;
}
.aside-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.aside-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-muted);
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  letter-spacing: 0.04em;
}
.aside-link:hover {
  color: var(--c-primary);
  border-color: var(--c-border);
  background: rgba(255,0,128,0.06);
}
.aside-badge {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: var(--c-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--c-primary);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}
.badge-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--c-text-muted);
  letter-spacing: 0.1em;
}

/* ===== FOOTER CTA ===== */
.footer-cta {
  background: linear-gradient(135deg, rgba(255,0,128,0.15), rgba(255,0,255,0.1));
  border-top: 1px solid var(--c-border-bright);
  border-bottom: 1px solid var(--c-border-bright);
  padding: 60px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.footer-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255,0,128,0.12), transparent);
  animation: cta-glow 6s ease-in-out infinite alternate;
}
@keyframes cta-glow {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}
.footer-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.footer-cta-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  letter-spacing: 0.1em;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-cta-sub {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-bottom: 8px;
}

/* ===== FOOTER MAIN ===== */
.footer-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
}
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--c-primary), var(--c-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-host {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text-muted);
}

.footer-nav { flex: 1; }
.footer-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.footer-nav-link {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text-muted);
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer-nav-link:hover { color: var(--c-primary); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-link {
  display: flex;
  align-items: center;
  padding: 8px 0;
  min-height: 40px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text-muted);
  transition: color 0.2s;
}
.footer-link:hover { color: var(--c-secondary); }

.footer-bottom {
  border-top: 1px solid var(--c-border);
  padding: 20px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-copy, .footer-icp {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
}

/* ===== SECTION SCROLL MARGIN ===== */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

/* ===== STAGGER ANIMATION ===== */
@keyframes stagger-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.content-body > article {
  animation: stagger-in 0.5s ease both;
}
.content-body > article:nth-child(1) { animation-delay: 0.05s; }
.content-body > article:nth-child(2) { animation-delay: 0.1s; }
.content-body > article:nth-child(3) { animation-delay: 0.15s; }
.content-body > article:nth-child(4) { animation-delay: 0.2s; }
.content-body > article:nth-child(5) { animation-delay: 0.25s; }
.content-body > article:nth-child(6) { animation-delay: 0.3s; }
.content-body > article:nth-child(7) { animation-delay: 0.35s; }

/* ===== PREFERS 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; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr 240px;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .search-input { width: 120px; }
  .search-input:focus { width: 160px; }

  .nav-toggle { display: flex; }

  .site-nav {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 24px;
    border-top: none;
  }
  .site-nav.is-open {
    max-height: 400px;
    border-top: 1px solid var(--c-border);
    padding-bottom: 12px;
  }
  .nav-dl { flex-direction: column; }
  .nav-link { padding: 10px 4px; }
  .nav-link::after { left: 0; right: 0; }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero-figure { order: -1; }
  .hero-section { min-height: auto; padding: 40px 20px; }

  .content-layout {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    order: -1;
  }

  .footer-main {
    flex-direction: column;
    gap: 24px;
  }
  .footer-dl { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; justify-content: center; }
  .hero-bg-text { font-size: 4rem; }
  .hero-section { padding: 32px 16px; }
  .content-section { padding: 40px 16px; }
  .footer-cta { padding: 40px 16px; }
  .search-wrap { display: none; }
}
