/* Still Coding Hanji Editorial Design System — Harmonized with https://still-coding.com/ */
:root {
  --hanji: #f5e9d6;
  --hanji-soft: #f0e2cc;
  --hanji-bright: #fbf1e1;
  --hanji-hover: #e9d7bc;
  --hanji-ticker: #e8d6b9;

  --ink: #302923;
  --ink-muted: #655347;
  --line: rgba(103, 70, 45, 0.24);
  --line-strong: #916d53;

  /* Brand & Semantic Ink Palette on Hanji Paper */
  --accent: #873f2d;        /* Vermilion / Terracotta Seal (Negative / Primary CTA) */
  --accent-hover: #703527;
  --accent-tint: rgba(135, 63, 45, 0.07);
  --on-accent: #fff9ee;

  --olive: #425533;         /* Pine Olive Ink (Positive / Correct / Live) */
  --olive-soft: #576940;
  --indigo: #2b4c6f;        /* Indigo Ink (Origin 0 / Axis / Equation) */
  --ochre: #b4741e;         /* Warm Ochre (Vertex / Highlight) */

  /* Zen Dark Mode exclusively for 10s Brain Imprint */
  --zen-bg: #1d1916;
  --zen-ink: #f5e9d6;
  --zen-muted: #cbbba6;

  --serif: 'Noto Serif KR', Georgia, serif;
  --sans: 'Manrope', 'Pretendard', 'Apple SD Gothic Neo', -apple-system, BlinkMacSystemFont, 'Noto Sans KR', sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;

  --page-max: 1220px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--hanji);
  background-image:
    radial-gradient(circle at 50% 0%, #fcf3e4 0%, transparent 62%),
    linear-gradient(to right, rgba(103, 70, 45, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(103, 70, 45, 0.055) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.mono {
  font-family: var(--mono);
}

.text-mint { color: var(--olive); }
.text-coral { color: var(--accent); }
.text-gold { color: var(--ochre); }
.text-cyan { color: var(--indigo); }
.text-slate { color: var(--ink-muted); }

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header — Still Coding Editorial Style */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(245, 233, 214, 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 10px rgba(48, 41, 35, 0.22);
}

.brand-slash {
  color: #bba984;
  font-weight: 300;
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--ink);
}

.brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-pill {
  padding: 9px 15px;
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.nav-pill:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--accent-tint);
}

.nav-pill.primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

.nav-pill.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

/* Hero — Editorial Typography */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--olive-soft);
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: clamp(32px, 4.8vw, 56px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.24;
  color: var(--ink);
  word-break: keep-all;
}

.hero-title em,
.hero-title .text-cyan {
  font-style: normal;
  color: var(--accent);
}

.hero-subtitle {
  max-width: 680px;
  margin: 0 0 38px;
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--ink-muted);
  word-break: keep-all;
}

.pillar-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.pillar-card {
  padding: 4px 0;
  text-align: left;
}

.pillar-card .pillar-label {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pillar-card p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  word-break: keep-all;
}

/* Filter Bar & Episode Editorial Grid */
.catalog-section {
  padding: 52px 0 88px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-btn {
  padding: 6px 2px 8px;
  border: none;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 800;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 34px;
}

/* Borderless Editorial Card with 1px Top Hairline */
.ep-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  background: transparent;
  border-radius: 0;
  transition: border-color 0.28s ease;
}

.ep-card.available:hover {
  border-top-color: var(--line-strong);
}

.ep-card.coming-soon {
  opacity: 0.62;
  cursor: default;
}

.ep-thumb {
  height: 164px;
  padding: 16px 18px;
  background: var(--hanji-bright);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  margin-bottom: 16px;
  transition: background-color 0.28s ease, border-color 0.28s ease;
}

.ep-card.available:hover .ep-thumb {
  background: #fff8ec;
  border-color: var(--line-strong);
}

.ep-thumb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ep-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.ep-status {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.ep-status.ready {
  background: rgba(87, 105, 64, 0.12);
  border: 1px solid rgba(87, 105, 64, 0.45);
  color: var(--olive);
}

.ep-status.done {
  background: rgba(135, 63, 45, 0.12);
  border: 1px solid rgba(135, 63, 45, 0.45);
  color: var(--accent);
}

.ep-status.soon {
  background: rgba(101, 83, 71, 0.1);
  border: 1px solid var(--line);
  color: var(--ink-muted);
}

.ep-visual-formula {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  text-align: center;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.ep-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.ep-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.ep-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.38;
  color: var(--ink);
  word-break: keep-all;
}

.ep-card.available:hover .ep-title {
  color: var(--accent);
}

.ep-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  word-break: keep-all;
  flex: 1;
}

.ep-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
}

.ep-cta {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ep-card.available:hover .ep-cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--hanji-soft);
  padding: 36px 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Editorial Sharp Rectangular Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 0;
  border: 1px solid var(--line-strong);
  background: var(--hanji-bright);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: all 0.18s ease;
}

.btn:hover {
  background: var(--hanji-hover);
  border-color: var(--ink);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary,
.btn-gold {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover,
.btn-gold:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn-coral {
  background: rgba(135, 63, 45, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-coral:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-mint {
  background: rgba(66, 85, 51, 0.1);
  border-color: var(--olive);
  color: var(--olive);
}

.btn-mint:hover {
  background: var(--olive);
  color: var(--on-accent);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-muted);
}

.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--accent-tint);
}

@media (max-width: 980px) {
  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 20px;
  }

  .pillar-row,
  .episode-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 44px 0 36px;
  }

  .brand-tagline {
    display: none;
  }
}
