@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --c-green: #00ff80;
  --c-blue: #0000ff;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-gray: #111111;
  --c-gray2: #222222;
  --c-gray3: #333333;
  --c-border: #00ff80;
  --nav-w: 220px;
  --font: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
}

html {
  font-size: 16px;
  line-height: 1.6;
  background: var(--c-black);
  color: var(--c-white);
  font-family: var(--font);
  font-weight: 400;
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--c-green);
  text-decoration: none;
}

a:hover {
  color: var(--c-white);
  background: var(--c-blue);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ol, ul {
  list-style: none;
}

/* ===== SITE SHELL ===== */
.site-shell {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDE NAV ===== */
.side-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-black);
  border-right: 3px solid var(--c-green);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 0;
  overflow-y: auto;
}

.side-nav__brand {
  padding: 20px 16px;
  border-bottom: 2px solid var(--c-green);
}

.brand-mark {
  display: inline-block;
  width: 36px;
  height: 36px;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  line-height: 36px;
}

.side-nav > ol {
  flex: 1;
  padding: 12px 0;
}

.side-nav > ol > li > a {
  display: block;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-white);
  border-bottom: 1px solid var(--c-gray2);
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}

.side-nav > ol > li > a:hover,
.side-nav > ol > li > a.active {
  background: var(--c-green);
  color: var(--c-black);
}

.nav-cta {
  display: block;
  margin: 16px;
  padding: 12px 8px;
  background: var(--c-blue);
  color: var(--c-white);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  border: 2px solid var(--c-green);
  min-height: 44px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-cta:hover {
  background: var(--c-green);
  color: var(--c-black);
}

/* ===== PAGE AREA ===== */
.page-area {
  margin-left: var(--nav-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  border-bottom: 3px solid var(--c-green);
}

.hero-text {
  flex: 1;
  padding: 80px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 3px solid var(--c-green);
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-green);
  text-transform: uppercase;
  margin-bottom: 24px;
  border-left: 4px solid var(--c-green);
  padding-left: 12px;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: 24px;
}

.hero-lead {
  font-size: 18px;
  color: #cccccc;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-media {
  width: 40%;
  background: var(--c-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media--empty {
  font-size: 3rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: -0.04em;
}

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

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--c-green);
  min-height: 44px;
}

.btn-primary:hover {
  background: var(--c-black);
  color: var(--c-green);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 14px 24px;
  background: transparent;
  color: var(--c-green);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid var(--c-green);
  min-height: 44px;
}

.btn-outline:hover {
  background: var(--c-green);
  color: var(--c-black);
}

/* ===== MAIN WRAP ===== */
main > article.wrap {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  gap: 0;
  align-items: flex-start;
}

/* ===== ASIDE ===== */
aside {
  width: 220px;
  flex-shrink: 0;
  margin-right: 0;
  border-right: 2px solid var(--c-green);
  padding-right: 24px;
  position: sticky;
  top: 24px;
  align-self: flex-start;
}

.aside-block {
  margin-bottom: 32px;
}

.aside-block b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-green);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-gray3);
}

.aside-link {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: #aaaaaa;
  border-bottom: 1px solid var(--c-gray2);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  color: var(--c-green);
  background: none;
}

.aside-link--highlight {
  color: var(--c-green);
  font-weight: 600;
}

/* ===== SECTIONS ===== */
section {
  flex: 1;
  min-width: 0;
  padding-left: 40px;
}

/* ===== CHANNEL GRID ===== */
.section-channels {
  padding: 48px 24px;
  border-bottom: 2px solid var(--c-gray2);
}

.section-channels h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0;
  margin-top: 24px;
}

.channel-card {
  display: block;
  padding: 24px;
  border: 2px solid var(--c-green);
  margin: -1px -1px 0 0;
  color: var(--c-white);
}

.channel-card:hover {
  background: var(--c-blue);
  color: var(--c-white);
  z-index: 1;
  position: relative;
}

.channel-card strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--c-green);
}

.channel-card span {
  font-size: 13px;
  color: #aaaaaa;
  line-height: 1.5;
}

.channel-card:hover strong,
.channel-card:hover span {
  color: var(--c-white);
}

/* ===== ARTICLE LIST ===== */
.section-articles {
  padding: 48px 24px;
}

.section-articles h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.article-list {
  margin-top: 24px;
}

.article-item {
  border-bottom: 1px solid var(--c-gray2);
}

.article-item a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  color: var(--c-white);
  flex-wrap: wrap;
}

.article-item a:hover {
  background: none;
  color: var(--c-green);
}

.article-item strong {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 200px;
}

.article-item time {
  font-size: 12px;
  color: #666666;
  white-space: nowrap;
}

.article-desc {
  font-size: 13px;
  color: #888888;
  width: 100%;
}

/* ===== PROSE ===== */
.prose {
  font-size: 16px;
  line-height: 1.8;
  color: #dddddd;
  max-width: 720px;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
  margin: 40px 0 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--c-green);
}

.prose h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-green);
  margin: 32px 0 8px;
}

.prose p {
  margin-bottom: 20px;
}

.prose ul, .prose ol {
  margin: 16px 0 20px 0;
  padding-left: 0;
}

.prose ul li, .prose ol li {
  padding: 6px 0 6px 20px;
  position: relative;
  border-bottom: 1px solid var(--c-gray2);
  list-style: none;
}

.prose ul li::before {
  content: '■';
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-size: 10px;
  top: 10px;
}

.prose ol {
  counter-reset: list-counter;
}

.prose ol li {
  counter-increment: list-counter;
}

.prose ol li::before {
  content: counter(list-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--c-green);
  font-size: 12px;
  font-weight: 700;
  top: 8px;
}

.prose a {
  color: var(--c-green);
  border-bottom: 1px solid var(--c-green);
}

.prose a:hover {
  background: var(--c-green);
  color: var(--c-black);
}

.prose strong {
  color: var(--c-white);
  font-weight: 700;
}

.prose blockquote {
  border-left: 4px solid var(--c-blue);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--c-gray);
  color: #cccccc;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.prose th {
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  padding: 12px 16px;
  text-align: left;
  border: 2px solid var(--c-green);
}

.prose td {
  padding: 10px 16px;
  border: 1px solid var(--c-gray3);
  color: #cccccc;
}

.prose tr:hover td {
  background: var(--c-gray2);
}

/* ===== CHANNEL HEADER ===== */
.channel-header {
  padding: 48px 40px 32px;
  border-bottom: 3px solid var(--c-green);
  background: var(--c-gray);
}

.breadcrumb {
  font-size: 12px;
  color: #666666;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: #888888;
}

.breadcrumb a:hover {
  color: var(--c-green);
  background: none;
}

.channel-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.channel-lead {
  font-size: 16px;
  color: #aaaaaa;
  max-width: 600px;
}

/* ===== CHANNEL MAIN ===== */
.channel-main {
  padding-left: 40px;
}

.children-list {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--c-gray2);
}

.children-list h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.children-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  margin-top: 24px;
  background: var(--c-green);
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--c-black);
  color: var(--c-white);
}

.child-card:hover {
  background: var(--c-blue);
  color: var(--c-white);
}

.child-card strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-green);
}

.child-card span {
  font-size: 13px;
  color: #aaaaaa;
}

.child-card time {
  font-size: 11px;
  color: #555555;
  margin-top: auto;
}

.child-card:hover strong,
.child-card:hover span {
  color: var(--c-white);
}

/* ===== ARTICLE ===== */
.article-section {
  padding-left: 40px;
}

.article-body {
  max-width: 760px;
}

.article-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tag-label {
  display: inline-block;
  padding: 4px 10px;
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-body h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-lead {
  font-size: 18px;
  color: #aaaaaa;
  margin-bottom: 16px;
  max-width: 600px;
}

.article-dates {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: #555555;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-gray2);
}

.article-dates time {
  color: var(--c-green);
}

.article-footer-links {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--c-green);
  flex-wrap: wrap;
}

/* ===== RELATED ===== */
.related-articles {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--c-gray2);
}

.related-articles h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
  margin-top: 20px;
  background: var(--c-gray2);
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--c-black);
  color: var(--c-white);
}

.related-card:hover {
  background: var(--c-blue);
  color: var(--c-white);
}

.related-card strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-green);
}

.related-card span {
  font-size: 12px;
  color: #888888;
}

.related-card:hover strong,
.related-card:hover span {
  color: var(--c-white);
}

/* ===== TAG ===== */
.tag-header {
  padding: 48px 40px 32px;
  border-bottom: 3px solid var(--c-green);
  background: var(--c-gray);
}

.tag-label-big {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--c-blue);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tag-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.tag-aside {
  width: 220px;
  flex-shrink: 0;
}

.tag-section {
  padding-left: 40px;
}

.tag-articles {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--c-gray2);
}

.tag-articles h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.tag-article-list {
  margin-top: 20px;
}

.tag-article-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-gray2);
  color: var(--c-white);
}

.tag-article-item:hover {
  background: none;
  color: var(--c-green);
}

.tag-article-item strong {
  font-size: 15px;
  font-weight: 600;
}

.tag-article-item span {
  font-size: 13px;
  color: #888888;
}

.tag-article-item time {
  font-size: 11px;
  color: #555555;
}

/* ===== ABOUT ===== */
.about-section {
  padding-left: 40px;
}

.about-section h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.about-lead {
  font-size: 18px;
  color: #aaaaaa;
  margin-bottom: 32px;
}

.about-cards {
  margin-top: 48px;
}

.about-cards h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 20px;
  background: var(--c-green);
}

.about-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--c-black);
  color: var(--c-white);
  border: none;
}

.about-card:hover {
  background: var(--c-blue);
  color: var(--c-white);
}

.about-card strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-green);
}

.about-card span {
  font-size: 13px;
  color: #aaaaaa;
}

.about-card:hover strong,
.about-card:hover span {
  color: var(--c-white);
}

/* ===== PRIVACY ===== */
.privacy-section {
  padding-left: 40px;
}

.privacy-section h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.privacy-lead {
  font-size: 18px;
  color: #aaaaaa;
  margin-bottom: 32px;
}

.privacy-footer-links {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--c-green);
  flex-wrap: wrap;
}

/* ===== META DATE ===== */
.meta-date {
  font-size: 12px;
  color: #555555;
  margin-bottom: 24px;
}

.meta-date time {
  color: var(--c-green);
}

/* ===== SUBTITLE ===== */
.subtitle {
  font-size: 16px;
  color: #888888;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== SECTION CONTENT ===== */
.section-content {
  padding: 48px 24px;
  border-top: 2px solid var(--c-gray2);
}

/* ===== FOOTER ===== */
footer {
  margin-top: auto;
  border-top: 3px solid var(--c-green);
  background: var(--c-gray);
}

.footer-cta-block {
  background: var(--c-blue);
  padding: 40px;
  text-align: center;
  border-bottom: 3px solid var(--c-green);
}

.footer-cta-block p {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 16px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 40px;
  align-items: flex-start;
}

.footer-col {
  flex: 1;
  min-width: 160px;
  padding: 0 24px 24px 0;
  border-right: 1px solid var(--c-gray3);
  margin-right: 24px;
}

.footer-col:last-of-type {
  border-right: none;
}

.footer-col b {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-green);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 13px;
  color: #888888;
  border-bottom: 1px solid var(--c-gray2);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-col a:hover {
  color: var(--c-green);
  background: none;
}

footer nav {
  width: 100%;
  border-top: 1px solid var(--c-gray3);
  padding-top: 16px;
  margin-top: 8px;
}

footer nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

footer nav ol li a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 12px;
  color: #666666;
  border-right: 1px solid var(--c-gray3);
  min-height: 40px;
}

footer nav ol li a:hover {
  color: var(--c-green);
  background: none;
}

.footer-copy {
  width: 100%;
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--c-gray3);
  font-size: 12px;
  color: #555555;
}

.footer-copy a {
  color: #888888;
}

.footer-copy a:hover {
  color: var(--c-green);
  background: none;
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .reveal.is-visible {
    transition: none;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  :root {
    --nav-w: 0px;
  }

  .site-shell {
    flex-direction: column;
  }

  .side-nav {
    position: static;
    width: 100%;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 3px solid var(--c-green);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .side-nav__brand {
    padding: 12px 16px;
    border-bottom: none;
    border-right: 2px solid var(--c-green);
  }

  .side-nav > ol {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0;
    flex: 1;
  }

  .side-nav > ol > li > a {
    white-space: nowrap;
    padding: 12px 16px;
    border-bottom: none;
    border-right: 1px solid var(--c-gray2);
  }

  .nav-cta {
    margin: 8px;
    width: auto;
    white-space: nowrap;
  }

  .page-area {
    margin-left: 0;
  }

  .hero {
    flex-direction: column;
    min-height: auto;
  }

  .hero-text {
    padding: 40px 24px;
    border-right: none;
    border-bottom: 2px solid var(--c-green);
  }

  .hero-media {
    width: 100%;
    min-height: 200px;
  }

  main > article.wrap {
    flex-direction: column;
    padding: 24px 16px;
  }

  aside {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 2px solid var(--c-green);
    padding-right: 0;
    padding-bottom: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }

  .aside-block {
    flex: 1;
    min-width: 140px;
    margin-bottom: 0;
  }

  section {
    padding-left: 0;
  }

  .channel-main,
  .article-section,
  .tag-section,
  .about-section,
  .privacy-section {
    padding-left: 0;
  }

  .channel-header,
  .tag-header {
    padding: 32px 20px;
  }

  .footer-inner {
    padding: 24px 16px;
  }

  .footer-cta-block {
    padding: 24px 16px;
  }

  .footer-col {
    min-width: 130px;
    border-right: none;
    margin-right: 0;
    padding-right: 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .children-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .side-nav > ol > li > a {
    font-size: 12px;
    padding: 10px 12px;
  }

  .article-item a {
    flex-direction: column;
    gap: 4px;
  }

  footer nav ol {
    flex-direction: column;
  }

  footer nav ol li a {
    border-right: none;
    border-bottom: 1px solid var(--c-gray2);
  }
}
