/* =============================================
   DEAD OR ALIVE 2 WIKI — CYBERPUNK DARK THEME
   ============================================= */


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

:root {
  --primary: #8000ff;
  --secondary: #ff00ff;
  --ink: #0d0d0d;
  --bg: #0d0d0d;
  --bg2: #111118;
  --bg3: #1a1a2e;
  --text: #e8e8f0;
  --text-muted: #888899;
  --border: #8000ff44;
  --border-bright: #8000ff99;
  --glow-purple: 0 0 8px #8000ff, 0 0 20px #8000ff66;
  --glow-pink: 0 0 8px #ff00ff, 0 0 20px #ff00ff66;
  --font: 'Noto Sans KR', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Courier New', Courier, monospace;
  --max-w: 1200px;
  --col-content: 1fr;
  --col-sidebar: 280px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- SCANLINES GLOBAL OVERLAY ---- */
body::before {
  content: '';
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  mix-blend-mode: multiply;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); color: #fff; }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); color: var(--secondary); margin: 2rem 0 0.75rem; }
h3 { font-size: clamp(1rem, 2vw, 1.3rem); color: var(--primary); margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; color: var(--text); margin: 1rem 0 0.4rem; }

h2 > span, h3 > span { display: inline; }

p { margin-bottom: 1rem; }
a { color: var(--secondary); text-decoration: underline; transition: color 0.2s, text-shadow 0.2s; }
a:hover { color: var(--primary); text-shadow: var(--glow-purple); }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.3rem; }

table { border-collapse: collapse; width: 100%; margin-bottom: 1.5rem; font-size: 0.95rem; }
th { background: var(--bg3); color: var(--secondary); border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; }
td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; }
tr:nth-child(even) td { background: #16162a; }

blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: var(--bg3);
  color: var(--text-muted);
  font-style: italic;
}

code, pre {
  font-family: var(--mono);
  background: var(--bg3);
  color: #00ff9d;
  padding: 0.15em 0.4em;
  font-size: 0.88em;
}
pre { padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--ink);
  border-bottom: 1px solid var(--border-bright);
  box-shadow: 0 2px 20px rgba(128,0,255,0.25);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand-wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  text-shadow: var(--glow-purple);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand-wordmark:hover { color: var(--secondary); text-shadow: var(--glow-pink); }

.header-cta-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* ---- CTA BUTTONS ---- */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.cta-signup {
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  box-shadow: var(--glow-purple);
}
.cta-signup:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
  box-shadow: var(--glow-pink);
  text-shadow: none;
}
.cta-login {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}
.cta-login:hover {
  background: var(--secondary);
  color: var(--ink);
  box-shadow: var(--glow-pink);
  text-shadow: none;
}

/* ---- NAV TOGGLE (mobile) ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-bright);
  cursor: pointer;
  border-radius: 2px;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- HEADER NAV ROW ---- */
.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
}

/* ---- DETAILS/SUMMARY NAV ---- */
#main-nav details { position: relative; }
#main-nav details[open] summary { color: var(--secondary); }

.nav-summary {
  display: none; /* desktop: hide toggle, show menu inline */
  cursor: pointer;
  list-style: none;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.55rem 0.8rem;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--border);
  letter-spacing: 0.06em;
}
.nav-summary::-webkit-details-marker { display: none; }

#main-nav menu, #main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  padding: 0.4rem 0;
}

#main-nav menu li a, #main-nav ul li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
#main-nav menu li a:hover, #main-nav ul li a:hover {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}

/* ---- HEADER SEARCH ---- */
.header-search {
  flex-shrink: 0;
}
.header-search input {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.8rem;
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
  width: 180px;
  min-height: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: var(--glow-purple);
}
.header-search input::placeholder { color: var(--text-muted); }

/* ---- BREADCRUMB ---- */
.breadcrumb-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumb-bar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-height: 44px;
  gap: 0 0.1rem;
}
.breadcrumb-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb-bar a:hover { color: var(--secondary); }
.breadcrumb-bar span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.2rem;
  color: var(--text-muted);
}

/* ---- HERO ---- */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(128,0,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 40%, rgba(255,0,255,0.12) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(128,0,255,0.05) 28px, rgba(128,0,255,0.05) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(128,0,255,0.03) 28px, rgba(128,0,255,0.03) 29px),
    var(--bg);
}
.hero-section .scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.12) 3px,
    rgba(0,0,0,0.12) 6px
  );
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 2rem;
  width: 100%;
}
.hero-copy { max-width: 540px; }
.hero-h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(128,0,255,0.6);
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 1.6rem;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  border: 2px solid var(--primary);
  border-radius: 999px;
  box-shadow: var(--glow-purple);
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: var(--glow-pink);
  color: #fff;
  text-shadow: none;
}
.hero-collage {
  position: relative;
  height: 380px;
}
.hero-img-a {
  position: absolute;
  top: 0;
  left: 0;
  width: 65%;
  height: auto;
  border: 2px solid var(--primary);
  box-shadow: var(--glow-purple);
  object-fit: cover;
  z-index: 2;
}
.hero-img-b {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: auto;
  border: 2px solid var(--secondary);
  box-shadow: var(--glow-pink);
  object-fit: cover;
  z-index: 1;
}

/* ---- MAIN CONTENT STRUCTURE ---- */
main {
  padding: 2rem 0 3rem;
}
article.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
section.content-section {
  display: grid;
  grid-template-columns: 1fr var(--col-sidebar);
  gap: 2.5rem;
  align-items: start;
}

div.page-article {
  min-width: 0;
}

.article-header { margin-bottom: 2rem; }
.article-header h1 { margin-bottom: 0.5rem; }
.article-hero { margin-bottom: 1.5rem; }
.article-hero img { width: 100%; height: auto; border: 1px solid var(--border); }

.article-body {
  font-size: 1rem;
  line-height: 1.8;
}
.article-body a { color: var(--secondary); text-decoration: underline; }
.article-body a:hover { color: var(--primary); }
.article-body h2 { margin-top: 2.5rem; }
.article-body h3 { margin-top: 1.75rem; }
.article-body img { max-width: 100%; height: auto; border: 1px solid var(--border); margin: 1rem 0; }

/* ---- BYLINE ---- */
.byline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  font-family: var(--mono);
}
.byline time { color: var(--primary); }

/* ---- STAGE BADGE ---- */
.stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--secondary);
  border: 1px solid var(--secondary);
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.75rem;
}

/* ---- SIDEBAR ---- */
.sidebar {
  min-width: 0;
}
.sidebar-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 1.25rem;
  position: sticky;
  top: 130px;
}
.sidebar-heading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin: 1rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-heading:first-child { margin-top: 0; }
.sidebar-inner ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.sidebar-inner ul li { border-bottom: 1px solid var(--border); }
.sidebar-inner ul li a {
  display: flex;
  align-items: center;
  padding: 0.45rem 0.2rem;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  transition: color 0.2s, padding-left 0.2s;
}
.sidebar-inner ul li a:hover { color: var(--secondary); padding-left: 0.4rem; }
.trust-link {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  padding: 0.3rem 0;
  min-height: 44px;
  transition: color 0.2s;
}
.trust-link:hover { color: var(--secondary); }
.sidebar-stage { margin-top: 0.75rem; }

/* ---- CHILD BLOCKS (home / category) ---- */
.child-blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}
a.child-block {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
a.child-block:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 12px rgba(255,0,255,0.2);
  transform: translateX(4px);
}
a.child-block > strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.35rem;
}
a.child-block > span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- SIBLING LINKS (div) ---- */
.article-siblings {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.article-siblings h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}
.sibling-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.sibling-links > a {
  display: block;
  padding: 0.6rem 1rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  text-decoration: none;
  min-height: 44px;
  transition: border-color 0.2s;
}
.sibling-links > a > strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 600;
}
.sibling-links > a:hover { border-color: var(--secondary); }
.sibling-links > a:hover > strong { color: var(--secondary); }

/* ---- ABOUT / AUTHOR ---- */
.author-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.author-section h2 { margin-top: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.author-name { font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 0.25rem; }
.author-credentials { font-size: 0.8rem; color: var(--primary); font-family: var(--mono); margin-bottom: 0.75rem; }
.author-bio { font-size: 0.9rem; color: var(--text-muted); }

/* ---- GLITCH EFFECT ---- */
@keyframes glitch-skew {
  0%   { transform: skewX(0deg); }
  5%   { transform: skewX(-2deg); }
  10%  { transform: skewX(2deg); }
  15%  { transform: skewX(0deg); }
  100% { transform: skewX(0deg); }
}
@keyframes glitch-offset {
  0%   { clip-path: inset(0 0 100% 0); transform: translateX(0); }
  20%  { clip-path: inset(20% 0 60% 0); transform: translateX(-3px); }
  40%  { clip-path: inset(50% 0 30% 0); transform: translateX(3px); }
  60%  { clip-path: inset(10% 0 80% 0); transform: translateX(-2px); }
  80%  { clip-path: inset(80% 0 5% 0); transform: translateX(2px); }
  100% { clip-path: inset(0 0 100% 0); transform: translateX(0); }
}

.glitch {
  position: relative;
  animation: glitch-skew 4s infinite linear;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.7;
}
.glitch::before {
  color: var(--secondary);
  animation: glitch-offset 4s 0.3s infinite linear;
  text-shadow: none;
}
.glitch::after {
  color: var(--primary);
  animation: glitch-offset 4s 0.6s infinite linear;
  text-shadow: none;
}

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border-bright);
  background: var(--ink);
  padding: 0;
}
footer > section { padding: 1.5rem 2rem; }
footer > section + section { border-top: 1px solid var(--border); }

.footer-brand-section {
  text-align: center;
}
.footer-wordmark {
  display: block;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--primary);
  text-shadow: var(--glow-purple);
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}
.footer-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

.footer-links-section {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
.footer-links-section nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
}
.footer-links-section nav a {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s;
}
.footer-links-section nav a:hover { color: var(--secondary); }
.footer-rg {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.footer-copy-section { text-align: center; }
.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ---- SCROLL REVEAL ---- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE — MOBILE ≤768px ---- */
@media (max-width: 768px) {
  /* Header */
  .nav-toggle { display: flex; }
  .header-nav-row { padding: 0; }
  .header-search { display: none; }

  /* Nav collapses behind details/summary */
  .nav-summary { display: flex; }

  #main-nav details:not([open]) menu,
  #main-nav details:not([open]) ul { display: none; }

  #main-nav details[open] menu,
  #main-nav details[open] ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ink);
    border: 1px solid var(--border-bright);
    z-index: 300;
    padding: 0.5rem 0;
  }

  #main-nav menu li a, #main-nav ul li a {
    padding: 0.75rem 1.25rem;
    width: 100%;
  }

  #main-nav details { width: 100%; }
  .nav-summary {
    width: calc(100% - 2.5rem);
    margin: 0.5rem 1.25rem;
  }
  .header-nav-row { position: relative; }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.25rem;
    min-height: 60vh;
  }
  .hero-collage { height: 220px; }
  .hero-img-a { width: 60%; }
  .hero-img-b { width: 55%; }

  /* Layout: single column */
  section.content-section {
    grid-template-columns: 1fr;
  }
  .sidebar { order: 2; }
  .sidebar-inner { position: static; }

  /* Footer */
  footer > section { padding: 1.25rem 1rem; }
  .footer-wordmark { font-size: 1.4rem; }

  /* CTA spacing */
  .cta { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
}

/* ---- SMALL MOBILE ≤480px ---- */
@media (max-width: 480px) {
  .hero-copy h1 { font-size: 1.5rem; }
  .header-brand-row { gap: 0.5rem; padding: 0.5rem 0.75rem; }
  .brand-wordmark { font-size: 0.9rem; }
  article.wrap { padding: 0 0.75rem; }
  footer > section { padding: 1rem 0.75rem; }
  .child-blocks { gap: 0.75rem; }
}

/* ---- HOVER MICRO-INTERACTIONS ---- */
a.child-block,
.sibling-links > a,
.cta,
.btn-primary {
  will-change: transform;
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .glitch::before, .glitch::after { display: none; }
}

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

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}