/* Cold Boot -- t34ch.tech
   Design system: matches t34ch.tech exactly
   All fonts self-hosted, zero external dependencies */

/* ============================================================
   FONTS
   ============================================================ */

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/bebas-neue-400.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-600.ttf') format('truetype');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-700.ttf') format('truetype');
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/libre-baskerville-400.ttf') format('truetype');
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/libre-baskerville-400i.ttf') format('truetype');
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/libre-baskerville-700.ttf') format('truetype');
}

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  --bg: #70757A;
  --bg-dark: #494D52;
  --bg-darker: #35383C;
  --bg-light: #8C9097;
  --bg-panel: #5D6268;
  --yellow: #FFD700;
  --orange: #FF6600;
  --electric: #00BFFF;
  --white: #F5F5F5;
  --cream: #EEECE6;
  --red: #C0392B;
  --green: #39D353;
  --mono: 'IBM Plex Mono', monospace;
  --serif: 'Libre Baskerville', Georgia, serif;
  --display: 'Bebas Neue', Impact, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--cream);
  background-color: var(--bg-darker);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--orange);
}

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

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: var(--bg-darker);
  border-bottom: 2px solid var(--yellow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.logo-cold {
  color: var(--white);
}

.logo-boot {
  color: var(--yellow);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav a {
  color: var(--bg-light);
}

.site-nav a:hover {
  color: var(--yellow);
}

/* ============================================================
   HERO (INDEX)
   ============================================================ */

.hero {
  background: var(--bg-darker);
  padding: 6rem 1.5rem 4rem;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--display);
  font-size: 5rem;
  line-height: 1;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.hero-cold {
  color: var(--white);
}

.hero-boot {
  color: var(--yellow);
}

.hero-tagline {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--bg-light);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--cream);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bg-darker);
  background: var(--yellow);
  padding: 0.75rem 2rem;
  border: 2px solid var(--yellow);
  transition: background 0.15s ease, color 0.15s ease;
}

.hero-cta:hover {
  background: transparent;
  color: var(--yellow);
}

/* ============================================================
   SERIES OVERVIEW (INDEX)
   ============================================================ */

.series-overview {
  background: var(--bg-dark);
  padding: 4rem 1.5rem;
}

.overview-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-heading {
  font-family: var(--display);
  font-size: 2.5rem;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
  text-align: center;
}

.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
}

.phase-card {
  background: var(--bg-darker);
  border: 1px solid var(--bg-light);
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.phase-card:hover {
  border-color: var(--yellow);
}

.phase-number {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--yellow);
  margin-bottom: 0.5rem;
}

.phase-title {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.phase-desc {
  font-family: var(--serif);
  font-size: 0.875rem;
  color: var(--bg-light);
  line-height: 1.6;
}

/* ============================================================
   ARTICLE CARDS (INDEX)
   ============================================================ */

.latest-articles {
  background: var(--bg-darker);
  padding: 4rem 1.5rem;
}

.latest-inner {
  max-width: 960px;
  margin: 0 auto;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.article-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-dark);
  border: 1px solid transparent;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.article-card:hover {
  border-color: var(--yellow);
}

.article-num {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--yellow);
  min-width: 3rem;
  line-height: 1;
  padding-top: 0.15rem;
}

.article-card-body {
  flex: 1;
}

.article-card-title {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.article-card-desc {
  font-family: var(--serif);
  font-size: 0.875rem;
  color: var(--bg-light);
  line-height: 1.5;
  margin-bottom: 0.375rem;
}

.article-card-category {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--electric);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   ARTICLES LIST PAGE
   ============================================================ */

.articles-header {
  background: var(--bg-darker);
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

.articles-header-inner {
  max-width: 720px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--display);
  font-size: 3.5rem;
  color: var(--white);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--bg-light);
}

.articles-list-section {
  background: var(--bg-darker);
  padding: 2rem 1.5rem 4rem;
}

.articles-list-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-dark);
  border: 1px solid transparent;
  padding: 1rem 1.5rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.article-row:hover {
  border-color: var(--yellow);
}

.article-draft {
  opacity: 0.5;
}

.article-row-num {
  font-family: var(--display);
  font-size: 1.75rem;
  color: var(--yellow);
  min-width: 3.5rem;
  text-align: center;
}

.article-row-body {
  flex: 1;
}

.article-row-title {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.125rem;
}

.article-row-desc {
  font-family: var(--serif);
  font-size: 0.8125rem;
  color: var(--bg-light);
  line-height: 1.5;
}

.article-row-category {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--electric);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ============================================================
   ARTICLE SINGLE
   ============================================================ */

.article {
  flex: 1;
}

.article-header {
  background: var(--bg-darker);
  padding: 4rem 1.5rem 2.5rem;
  text-align: center;
  border-bottom: 1px solid var(--bg);
}

.article-header-inner {
  max-width: 720px;
  margin: 0 auto;
}

.article-header-num {
  font-family: var(--display);
  font-size: 3rem;
  color: var(--yellow);
  display: block;
  margin-bottom: 0.5rem;
}

.article-title {
  font-family: var(--display);
  font-size: 3rem;
  color: var(--white);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.article-deck {
  font-family: var(--serif);
  font-size: 1.125rem;
  color: var(--bg-light);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 1rem;
}

.article-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--bg-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.article-meta-sep {
  margin: 0 0.5rem;
  color: var(--bg);
}

.article-meta-category {
  color: var(--electric);
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */

.article-toc {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--bg);
}

.toc-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem;
}

.toc-heading {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--bg-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  font-family: var(--mono);
  font-size: 0.8125rem;
}

.toc-list li {
  margin-bottom: 0.25rem;
}

.toc-list a {
  color: var(--cream);
  text-decoration: none;
  transition: color 0.15s ease;
}

.toc-list a:hover,
.toc-list a.toc-active {
  color: var(--yellow);
}

.toc-list ul {
  list-style: none;
  padding-left: 1.25rem;
  margin-top: 0.25rem;
}

.toc-list ul a {
  color: var(--bg-light);
  font-size: 0.75rem;
}

/* ============================================================
   ARTICLE CONTENT
   ============================================================ */

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.article-content h2 {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--white);
  letter-spacing: 0.04em;
  margin: 3rem 0 1rem;
  padding-top: 1rem;
}

.article-content h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 2rem 0 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.375rem;
}

.article-content strong {
  color: var(--white);
  font-weight: 700;
}

.article-content em {
  font-style: italic;
}

.article-content code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--yellow);
  background: var(--bg-dark);
  padding: 0.125em 0.375em;
  border-radius: 2px;
}

.article-content pre {
  background: var(--bg-dark);
  border-left: 3px solid var(--yellow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--cream);
}

.article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ============================================================
   CALLOUT & REMEMBER BOXES
   ============================================================ */

.callout {
  background: var(--bg-dark);
  border-left: 4px solid var(--electric);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.callout strong {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--electric);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.375rem;
}

.remember {
  background: rgba(255, 215, 0, 0.06);
  border-left: 4px solid var(--yellow);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--serif);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.remember strong {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.375rem;
}

/* ============================================================
   DIAGRAMS
   ============================================================ */

.diagram {
  background: var(--bg-darker);
  border: 1px solid var(--bg);
  margin: 2rem 0;
  padding: 1.5rem;
}

.diagram-title {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-caption {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--bg-light);
  margin-top: 0.75rem;
  line-height: 1.5;
}

figure {
  margin: 0;
}

/* ============================================================
   ARTICLE FOOTER & NAV
   ============================================================ */

.article-footer {
  border-top: 1px solid var(--bg);
  background: var(--bg-dark);
}

.article-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
}

.article-nav-prev,
.article-nav-next {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 45%;
}

.article-nav-next {
  margin-left: auto;
  text-align: right;
}

.nav-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--bg-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.nav-title {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--yellow);
}

.article-nav-prev:hover .nav-title,
.article-nav-next:hover .nav-title {
  color: var(--orange);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */

.site-footer {
  background: var(--bg-darker);
  border-top: 1px solid var(--bg);
  margin-top: auto;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-brand {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--bg-light);
  margin-bottom: 0.375rem;
}

.footer-brand a {
  color: var(--yellow);
}

.footer-license {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--bg);
}

.footer-license a {
  color: var(--bg-light);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }

  .article-title {
    font-size: 2.25rem;
  }

  .phase-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .article-card {
    flex-direction: column;
    gap: 0.5rem;
  }

  .article-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .article-nav {
    flex-direction: column;
  }

  .article-nav-prev,
  .article-nav-next {
    max-width: 100%;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero {
    padding: 4rem 1rem 3rem;
  }

  .article-content {
    padding: 2rem 1rem;
  }

  .header-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}
