@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'VT323', 'Courier New', monospace;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #26171a;
  background: #fff8f9;
  overflow-x: hidden;
}

/* ============================================================
   COLOR TOKENS
   ============================================================ */
:root {
  --clr-primary: #eb879c;
  --clr-secondary: #ffb6c1;
  --clr-ink: #26171a;
  --clr-bg: #fff8f9;
  --clr-bg2: #fff0f3;
  --clr-white: #ffffff;
  --clr-border: #f2c4cc;
  --clr-shadow-a: rgba(235,135,156,0.18);
  --clr-shadow-b: rgba(38,23,26,0.08);
  --radius-card: 0px;
  --radius-ui: 10px;
  --nav-h: 64px;
  --sticky-h: 44px;
  --scroll-offset: 108px;
  --transition: 220ms ease;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Press Start 2P', 'Courier New', monospace;
  line-height: 1.35;
  color: var(--clr-ink);
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(1rem, 3vw + 0.5rem, 1.6rem); }
h2 { font-size: clamp(0.85rem, 2vw + 0.4rem, 1.15rem); margin-bottom: 1rem; }
h3 { font-size: clamp(0.75rem, 1.5vw + 0.3rem, 0.95rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1em; }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #c45f77; }
a:focus-visible {
  outline: 2px solid var(--clr-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; margin-bottom: 1em; }
li { margin-bottom: 0.35em; }

small {
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-primary);
  display: block;
  margin-bottom: 0.4em;
}

/* ============================================================
   SCROLL MARGIN
   ============================================================ */
div[id] {
  scroll-margin-top: var(--scroll-offset);
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-ink);
}

/* Top nav */
.top-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--clr-ink);
  box-shadow: 0 2px 8px var(--clr-shadow-b);
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.nav-inner a {
  color: var(--clr-secondary);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  padding: 0.6rem 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.05em;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-inner a:hover {
  color: var(--clr-primary);
  background: rgba(235,135,156,0.08);
}

.nav-brand {
  margin: 0 1.2rem;
  flex-shrink: 0;
}

.brand-text {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--clr-primary);
  letter-spacing: 0.05em;
  line-height: 1.2;
  display: block;
  text-align: center;
  padding: 0.3em 0.5em;
  border: 2px solid var(--clr-primary);
}

.site-logo {
  max-height: 40px;
  width: auto;
}

/* Sticky anchor nav */
.sticky-nav {
  background: var(--clr-primary);
  height: var(--sticky-h);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-shadow: 0 2px 6px var(--clr-shadow-a);
}

.sticky-nav::-webkit-scrollbar { display: none; }

.sticky-nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 1rem;
  gap: 0;
  white-space: nowrap;
  min-width: max-content;
  margin: 0 auto;
}

.sticky-nav-inner a {
  color: #fff;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  padding: 0 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition);
}

.sticky-nav-inner a:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 70vh;
  background: linear-gradient(135deg, var(--clr-ink) 0%, #3d1f27 60%, #5a2535 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 4rem 2rem 6rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  text-align: right;
  max-width: 640px;
}

.hero-text h1 {
  color: var(--clr-secondary);
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(235,135,156,0.4), 0 2px 4px rgba(0,0,0,0.4);
}

.hero-desc {
  color: rgba(255,182,193,0.85);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 0;
  font-family: 'VT323', monospace;
}

.hero-media {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  max-height: 100%;
  z-index: 1;
  pointer-events: none;
}

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

/* Slash divider */
.hero-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--clr-bg);
  clip-path: polygon(0 40%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 3;
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.site-main {
  padding: 3rem 1rem 4rem;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* aside on left */
.side-nav {
  position: sticky;
  top: var(--scroll-offset);
  background: var(--clr-white);
  border-radius: var(--radius-ui);
  box-shadow:
    0 2px 4px var(--clr-shadow-b),
    0 6px 20px var(--clr-shadow-a);
  padding: 1.5rem 1.25rem;
  border-left: 4px solid var(--clr-primary);
}

.aside-eyebrow {
  color: var(--clr-primary);
  font-size: 0.7rem;
  margin-bottom: 1rem;
}

.aside-link {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  color: var(--clr-ink);
  padding: 0.55rem 0.6rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--clr-border);
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
}

.aside-link:last-child { border-bottom: none; }

.aside-link:hover {
  color: var(--clr-primary);
  background: var(--clr-bg2);
  padding-left: 1rem;
}

/* ============================================================
   MAIN SECTION / ARTICLE
   ============================================================ */
.main-section {
  min-width: 0;
}

.main-article {
  background: var(--clr-white);
  border-radius: var(--radius-ui);
  box-shadow:
    0 2px 4px var(--clr-shadow-b),
    0 8px 24px var(--clr-shadow-a);
  padding: 2.5rem 2rem;
}

/* ============================================================
   CONTENT SECTIONS (from page.content)
   ============================================================ */
.main-article div {
  margin-bottom: 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 2px solid var(--clr-border);
}

.main-article div:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.main-article h2 {
  font-size: clamp(0.75rem, 2vw, 1rem);
  color: var(--clr-ink);
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 3px solid var(--clr-primary);
  display: inline-block;
}

.main-article h3 {
  font-size: clamp(0.65rem, 1.5vw, 0.85rem);
  color: #5a2535;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.main-article p {
  color: #3a1f26;
  font-size: 1.1rem;
  line-height: 1.75;
}

.main-article ul,
.main-article ol {
  color: #3a1f26;
  font-size: 1.05rem;
}

.main-article a {
  color: var(--clr-primary);
  border-bottom: 1px solid var(--clr-secondary);
  transition: border-color var(--transition), color var(--transition);
}

.main-article a:hover {
  border-color: var(--clr-primary);
  color: #c45f77;
}

/* Card-like blocks inside content */
.main-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.main-article th {
  background: var(--clr-primary);
  color: #fff;
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  font-weight: normal;
}

.main-article td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--clr-border);
  vertical-align: top;
}

.main-article tr:nth-child(even) td {
  background: var(--clr-bg2);
}

/* ============================================================
   SCROLL REVEAL ANIMATION
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 260ms ease, transform 260ms ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: none;
  }
  .stagger .reveal:nth-child(1) { transition-delay: 0ms; }
  .stagger .reveal:nth-child(2) { transition-delay: 60ms; }
  .stagger .reveal:nth-child(3) { transition-delay: 120ms; }
  .stagger .reveal:nth-child(4) { transition-delay: 180ms; }
  .stagger .reveal:nth-child(5) { transition-delay: 240ms; }
  .stagger .reveal:nth-child(6) { transition-delay: 300ms; }
  .stagger .reveal:nth-child(7) { transition-delay: 360ms; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--clr-ink);
  color: var(--clr-secondary);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  text-align: center;
  padding: 1.5rem 1rem;
}

.site-footer div {
  padding: 0.4rem 0;
}

.site-footer p {
  margin: 0;
  letter-spacing: 0.05em;
  color: rgba(255,182,193,0.75);
  font-size: 1rem;
}

.site-footer div:first-child p {
  color: var(--clr-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 1rem;
  }

  .aside-eyebrow { width: 100%; }

  .aside-link {
    border-bottom: none;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.95rem;
    min-height: 40px;
  }

  .aside-link:hover {
    padding-left: 0.75rem;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 56px;
    --scroll-offset: 100px;
  }

  .nav-inner {
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
  }

  .nav-inner::-webkit-scrollbar { display: none; }

  .nav-inner a {
    font-size: 0.85rem;
    padding: 0.5rem 0.65rem;
  }

  .nav-brand {
    margin: 0 0.6rem;
  }

  .hero-content {
    padding: 2.5rem 1.25rem 5rem;
    align-items: flex-end;
  }

  .hero-text h1 {
    font-size: 0.85rem;
  }

  .hero-desc {
    font-size: 1.1rem;
  }

  .hero-media {
    width: 55%;
    opacity: 0.5;
  }

  .main-article {
    padding: 1.5rem 1rem;
  }

  .main-article h2 {
    font-size: 0.65rem;
  }
}

@media (max-width: 375px) {
  .hero-text h1 { font-size: 0.75rem; }
  .sticky-nav-inner a { padding: 0 0.6rem; font-size: 0.9rem; }
}
