/* PAGE: Global Stylesheet | LAST EDIT: 2025-03-18 */
/* TO EDIT: colors in :root, fonts, breakpoints */

/* ═══════════════════════════════════════════════
   FONTS
═══════════════════════════════════════════════ */
@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/JTUSjIg69CK48gW7PXoo9WdhyyTh89ZNpQ.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/JTUSjIg69CK48gW7PXoo9WlhyyTh89Y.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/aFTU7PB1QTsUX8KYthSQBK6PYK3EXw.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/aFTU7PB1QTsUX8KYthqQBK6PYK0.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/aFTR7PB1QTsUX8KYvumzEY2tbYf-Vlh3uA.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/aFTR7PB1QTsUX8KYvumzEYOtbYf-Vlg.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: optional;
  src: url('/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════
   CSS VARIABLES — DARK (default)
═══════════════════════════════════════════════ */
:root {
  --color-bg: #111318;
  --color-bg-2: #191c23;
  --color-bg-3: #222630;
  --color-text: #f0f2f5;
  --color-text-muted: #c8d0dc;
  --color-text-dim: #aab4c8;
  --color-accent: #ff4444;
  --color-border: #2a2f3d;
  --color-border-light: #343a4a;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;

  --max-width: 1200px;
  --content-width: 720px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  --border-radius: 2px;
  --transition: 0.2s ease;
}

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

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scanline texture */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.015) 2px,
    rgba(255,255,255,0.015) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.5rem, 8vw, 6rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
h4 { font-size: clamp(1rem, 2vw, 1.4rem); }

p { margin-bottom: 1.2rem; color: #c8cdd8; }

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

/* ═══════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: var(--content-width);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glitch {
  0%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  10% { clip-path: inset(10% 0 85% 0); transform: translate(-3px, 2px); }
  20% { clip-path: inset(40% 0 50% 0); transform: translate(3px, -2px); }
  30% { clip-path: inset(70% 0 15% 0); transform: translate(-2px, 1px); }
  40% { clip-path: inset(20% 0 70% 0); transform: translate(2px, -1px); }
  50% { clip-path: inset(55% 0 30% 0); transform: translate(-3px, 2px); }
  60% { clip-path: inset(85% 0 5%  0); transform: translate(3px, -3px); }
  70% { clip-path: inset(5%  0 90% 0); transform: translate(-1px, 2px); }
  80% { clip-path: inset(30% 0 60% 0); transform: translate(2px, -1px); }
  90% { clip-path: inset(60% 0 25% 0); transform: translate(-3px, 3px); }
}

/* CLS fix (2026-11-10): animating letter-spacing re-wrapped the H1 and shifted
   the whole page; fade only, no layout change. */
@keyframes scanIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fade { animation: fadeUp 0.6s ease both; }
.animate-fade:nth-child(1) { animation-delay: 0.1s; }
.animate-fade:nth-child(2) { animation-delay: 0.2s; }
.animate-fade:nth-child(3) { animation-delay: 0.3s; }
.animate-fade:nth-child(4) { animation-delay: 0.4s; }

.glitch-title {
  position: relative;
  animation: scanIn 0.8s ease both;
}
.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  font-family: var(--font-display);
  font-size: inherit;
  color: var(--color-accent);
  opacity: 0;
}
.glitch-title:hover::before {
  animation: glitch 0.4s steps(1) infinite;
  opacity: 0.7;
}
.glitch-title:hover::after {
  animation: glitch 0.4s steps(1) infinite reverse;
  opacity: 0.5;
  color: #ffffff;
  mix-blend-mode: screen;
}

/* ═══════════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--color-text);
  white-space: nowrap;
}
.site-logo span { color: var(--color-accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.4rem 0.75rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: all var(--transition);
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--color-text);
  border-color: var(--color-border-light);
}
.site-nav a.nav-cta {
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.site-nav a.nav-cta:hover {
  background: var(--color-accent);
  color: #000;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

/* Language switcher */
.lang-switcher {
  position: relative;
}
.lang-current {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition);
  border-radius: var(--border-radius);
}
.lang-current:hover { border-color: var(--color-border-light); color: var(--color-text); }

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  min-width: 130px;
  display: none;
  z-index: 200;
}
.lang-dropdown.open { display: block; }
.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  transition: all var(--transition);
  border-bottom: 1px solid var(--color-border);
}
.lang-dropdown a:last-child { border-bottom: none; }
.lang-dropdown a:hover,
.lang-dropdown a.active { background: var(--color-bg-3); color: var(--color-text); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  animation: fadeUp 0.5s ease both;
}

.hero__title {
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease 0.1s both;
}

.hero__subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 500px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease 0.2s both;
}

.hero__line {
  width: 60px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease 0.3s both;
}

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn--primary {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn--primary:hover { background: var(--color-accent); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}
.btn--outline:hover { border-color: var(--color-text); }

.btn--accent {
  background: var(--color-accent);
  color: #fff;
}
.btn--accent:hover { background: #d93636; }

/* ═══════════════════════════════════════════════
   POST CARDS
═══════════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin: var(--spacing-md) 0;
}

.post-card {
  background: var(--color-bg);
  padding: 1.75rem;
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.post-card:hover { background: var(--color-bg-2); }

.post-card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  text-transform: uppercase;
}

.post-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.1;
  transition: color var(--transition);
}
.post-card:hover .post-card__title { color: var(--color-accent); }

.post-card__excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.post-card--soon {
  opacity: 0.4;
  pointer-events: none;
}
.post-card--soon .post-card__tag::after {
  content: ' // SOON';
  color: var(--color-text-dim);
}

/* ═══════════════════════════════════════════════
   SECTION LABELS
═══════════════════════════════════════════════ */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ═══════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════ */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--spacing-md) 0;
}

/* ═══════════════════════════════════════════════
   BREADCRUMBS
═══════════════════════════════════════════════ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--color-text-muted); transition: color var(--transition); }
.breadcrumbs a:hover { color: var(--color-text); }
.breadcrumbs__sep { color: var(--color-border-light); }
.breadcrumbs__current { color: var(--color-text-muted); }

/* ═══════════════════════════════════════════════
   ARTICLE LAYOUT
═══════════════════════════════════════════════ */
.article-layout {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  padding: var(--spacing-md) 0 var(--spacing-lg);
}

.article-hero__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.article-hero__title {
  margin-bottom: 1.5rem;
  line-height: 1.05;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}
.article-meta__item { display: flex; align-items: center; gap: 0.4rem; }

/* Share buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.share-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  margin-right: 0.25rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition);
  cursor: pointer;
  background: none;
  border-radius: var(--border-radius);
}
.share-btn:hover { border-color: var(--color-text-muted); color: var(--color-text); }
.share-btn--copy.copied { border-color: #00ff88; color: #00ff88; }

/* Table of Contents */
.toc {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--border-radius);
}
.toc__title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}
.toc__list { display: flex; flex-direction: column; gap: 0.1rem; }
.toc__item a {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  padding: 0.3rem 0;
  display: block;
  transition: color var(--transition);
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
}
.toc__item a:hover,
.toc__item a.active {
  color: var(--color-text);
  border-left-color: var(--color-accent);
}
.toc__item--h3 a { padding-left: 1.75rem; font-size: 0.8rem; }

/* Article body typography */
.article-body h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 2.5rem 0 1rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
}
.article-body h3 {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  margin: 1.75rem 0 0.75rem;
  color: #e8ecf2;
}
.article-body p { color: #c4c9d6; font-size: 1rem; line-height: 1.8; }
.article-body a { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--color-accent); }
.article-body ul, .article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.article-body li { color: #c4c9d6; font-size: 1rem; line-height: 1.7; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body strong { color: var(--color-text); font-weight: 600; }

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  overflow-x: auto;
  display: block;
  -webkit-overflow-scrolling: touch;
}
/* Prevent table from blowing out layout */
.article-body .table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
}
.article-body th {
  background: var(--color-bg-3);
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--color-border);
}
.article-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  color: #d0d5e0;
  vertical-align: top;
}
.article-body tr:nth-child(even) td { background: var(--color-bg-2); }

/* Highlight box */
.article-highlight {
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-2);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #d0d5e0;
}

/* ═══════════════════════════════════════════════
   AUTHOR BOX
═══════════════════════════════════════════════ */
.author-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-2);
  margin-top: 2.5rem;
  border-radius: var(--border-radius);
}
.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg-3);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.author-info__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}
.author-info__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.author-info__bio { font-size: 0.875rem; color: var(--color-text-muted); margin: 0; }
.author-info__link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: inline-block;
  transition: color var(--transition);
}
.author-info__link:hover { color: var(--color-text); }

/* ═══════════════════════════════════════════════
   RELATED ARTICLES
═══════════════════════════════════════════════ */
.related-articles { margin-top: var(--spacing-md); }
.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 1.5rem;
}
.related-card {
  background: var(--color-bg);
  padding: 1.25rem;
  transition: background var(--transition);
}
.related-card:hover { background: var(--color-bg-2); }
.related-card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.related-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  transition: color var(--transition);
}
.related-card:hover .related-card__title { color: var(--color-accent); }

/* ═══════════════════════════════════════════════
   LANDING PAGE
═══════════════════════════════════════════════ */
.landing-section {
  padding: var(--spacing-lg) 0;
  border-bottom: 1px solid var(--color-border);
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  margin-top: 1.5rem;
}
.status-item {
  background: var(--color-bg);
  padding: 1.5rem;
}
.status-item__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--color-text-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.status-item__value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-text);
}
.status-item__value--accent { color: var(--color-accent); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); margin-top: 1.5rem; }
details.faq-item { background: var(--color-bg); }
details.faq-item[open] { background: var(--color-bg-2); }
summary.faq-question {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color var(--transition);
}
summary.faq-question:hover { color: var(--color-text-muted); }
summary.faq-question::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--color-text-dim);
  flex-shrink: 0;
  transition: transform var(--transition);
}
details[open] summary.faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════════ */
.cta-section {
  padding: var(--spacing-lg) 0;
  text-align: center;
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { color: var(--color-text-muted); margin-bottom: 2rem; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-md) 0;
  margin-top: auto;
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: center;
}
.site-footer__nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  padding: 0.3rem 0.6rem;
  transition: color var(--transition);
}
.site-footer__nav a:hover { color: var(--color-text-muted); }
.site-footer a { min-height: 44px; display: inline-flex; align-items: center; padding: 0.4rem 0; }
.site-footer__copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}
.site-footer__disclaimer {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  max-width: 500px;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET 768px+
═══════════════════════════════════════════════ */
@media (min-width: 768px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr 1fr; }
  .status-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — DESKTOP 1024px+
═══════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .article-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "hero hero"
      "sidebar body";
    align-items: start;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0 var(--spacing-lg);
  }
  .article-hero {
    grid-area: hero;
    order: unset;
  }
  .article-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: 80px;
    order: unset;
  }
  .article-body-wrap {
    grid-area: body;
    order: unset;
  }
  .toc { margin-bottom: 0; }
  .toc__toggle { display: none !important; }
  .toc__inner { display: block !important; padding: 0; border-top: none; }
  .toc__title { display: block; }
  .menu-toggle { display: none !important; }
  .posts-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ═══════════════════════════════════════════════
   MOBILE NAV
═══════════════════════════════════════════════ */
@media (max-width: 767px) {
  .menu-toggle { display: flex; align-items: center; gap: 0.4rem; }
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--color-bg-2);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75rem 1rem; border: 1px solid var(--color-border); }
  .site-header { position: relative; }
  .site-header__inner { position: relative; }

  /* H1 always first, then sidebar (TOC), then body */
  .article-hero { order: 1; }
  .article-sidebar { order: 2; }
  .article-body-wrap { order: 3; }

  /* Collapsible TOC on mobile */
  .toc {
    padding: 0;
    overflow: hidden;
  }
  .toc__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    text-transform: uppercase;
  }
  .toc__toggle::after {
    content: '▸';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: var(--color-accent);
  }
  .toc.toc--open .toc__toggle::after { transform: rotate(90deg); }
  .toc__inner {
    display: none;
    padding: 0 1.25rem 1rem;
    border-top: 1px solid var(--color-border);
  }
  .toc.toc--open .toc__inner { display: block; }
  .toc__title { display: none; }

  /* Fix horizontal overflow from tables and wide elements */
  .article-body table { font-size: 0.8rem; }
  .article-body table td,
  .article-body table th { padding: 0.5rem 0.6rem; }

  /* Ensure nothing causes horizontal scroll */
  .article-body { overflow-x: hidden; }
  .article-body table { max-width: 100%; }

  /* Hero title wrapping on mobile */
  .article-hero__title { font-size: clamp(2rem, 8vw, 3.5rem); word-break: break-word; }

  /* Status grid full width */
  .status-grid { grid-template-columns: 1fr; }

  /* Prevent wide images and embeds */
  img, video, iframe { max-width: 100%; }

  /* Share buttons wrap */
  .share-buttons { flex-wrap: wrap; }
}

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-text-muted); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.pt-md { padding-top: var(--spacing-md); }
.pb-md { padding-bottom: var(--spacing-md); }
.section { padding: var(--spacing-lg) 0; }
.section + .section { border-top: 1px solid var(--color-border); }

/* ═══════════════════════════════════════════════
   === HOW TO ADD NEW POST ===

   1. Создай папку: /blog/my-new-post/
   2. Скопируй: /blog/what-is-tesla-optimus/index.html → в новую папку
   3. Замени в <head>:
      - title, description, og:tags, canonical URL, hreflang URLs
      - datePublished, dateModified в JSON-LD
   4. Замени контент статьи (H1, H2, текст, таблицы)
   5. Добавь карточку поста в /blog/index.html и /index.html:

   <article class="post-card animate-fade">
     <span class="post-card__tag">// ТЕХНОЛОГИИ</span>
     <a href="/blog/my-new-post/">
       <h2 class="post-card__title">Заголовок поста</h2>
     </a>
     <p class="post-card__excerpt">Краткое описание поста...</p>
     <div class="post-card__meta">
       <span>// 18 MAR 2025</span>
       <span>· 6 MIN READ</span>
     </div>
   </article>

   6. Добавь URL в sitemap.xml с <lastmod> датой
   7. Создай переводы в /ru/ /es/ /zh/ /hi/ папках
   8. Обнови hreflang во всех версиях статьи
═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   Neutralize red (accent) text inside blog posts
   Scoped to .article-layout — affects article pages only,
   leaves header, footer, homepage and tools untouched.
   ═══════════════════════════════════════════════ */
.article-layout .section-label,
.article-layout .snippet-box .snippet-title,
.article-layout .post-intro-label,
.article-layout .tl-yr,
.article-layout .article-body h4,
.article-layout .author-info__role,
.article-layout .related-card__tag,
.article-layout .toc__item a.active,
.article-layout .toc__toggle::after { color: var(--color-text-muted); }
.article-layout .stat-num { color: var(--color-text); }
.article-layout .post-meta-tag {
  color: var(--color-text-muted);
  background: var(--color-bg-3);
  border-color: var(--color-border);
}
.article-layout .article-body a:hover,
.article-layout .related-card:hover .related-card__title { color: #a9c9ff; }

/* Mobile first-screen tightening (2026-11-10): keeps ad slots, moves H1 up */
@media (max-width: 767px) {
  .breadcrumbs { padding: 0.6rem 0; margin-bottom: 1rem; }
  .breadcrumbs__current, .breadcrumbs__sep:nth-last-child(2) { display: none; }
}

/* Compact disclaimers (2026-11-10) */
.site-disclaimer { background:#0a0a0a; border-bottom:1px solid var(--color-border); padding:0.3rem 1rem; text-align:center; font-family:var(--font-mono),monospace; font-size:0.68rem; color:var(--color-text-dim); letter-spacing:0.02em; }
.page-disclaimer { font-family:var(--font-mono),monospace; font-size:0.72rem; line-height:1.5; color:var(--color-text-dim); margin:0.5rem 0 1.25rem; max-width:720px; }

/* Desktop article H1: 2 lines instead of 3 (2026-11-10) */
@media (min-width: 1024px) {
  .article-hero__title { font-size: clamp(2.6rem, 3.6vw, 3.6rem); }
}

/* Readability: small meta text (2026-11-10) */
.article-meta, .article-meta * { font-size: 0.75rem; }

/* Blog index: popular + topic tabs (2026-11-10) */
.popular-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; background:var(--color-border); border:1px solid var(--color-border); margin-bottom:2rem; }
.popular-card { display:flex; gap:1rem; align-items:flex-start; padding:1.1rem 1.25rem; background:var(--color-bg); transition:background var(--transition); }
.popular-card:hover { background:var(--color-bg-2); }
.popular-card__n { font-family:var(--font-display); font-size:2rem; line-height:1; color:var(--color-accent); }
.popular-card__t { font-family:var(--font-display); font-size:1.15rem; line-height:1.15; color:var(--color-text); letter-spacing:.02em; }
.topic-tabs { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 2rem; }
.topic-tab { font-family:var(--font-mono); font-size:.75rem; letter-spacing:.08em; text-transform:uppercase; color:var(--color-text-muted); background:var(--color-bg-2); border:1px solid var(--color-border); padding:.55rem .9rem; min-height:40px; cursor:pointer; }
.topic-tab span { color:var(--color-text-dim); margin-left:.25rem; }
.topic-tab:hover { color:var(--color-text); border-color:var(--color-border-light); }
.topic-tab.active { color:#fff; border-color:var(--color-accent); background:rgba(255,68,68,.1); }
@media (max-width: 767px) { .popular-grid { grid-template-columns:1fr; } .topic-tabs { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; } .topic-tab { white-space:nowrap; } }

/* Author (2026-11-10) */
.author-avatar--img { padding:0; overflow:hidden; background:none; }
.author-avatar--img img { width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block; }
.author-info__name a, .post-meta-item a { color:inherit; text-decoration:underline; text-decoration-color:var(--color-border-light); text-underline-offset:3px; }
.author-hero { display:flex; align-items:center; gap:1.75rem; flex-wrap:wrap; }
.author-hero__img { width:160px; height:160px; border-radius:50%; object-fit:cover; border:2px solid var(--color-accent); }

/* Calculator result peek (mobile) */
.calc-peek { display:flex; align-items:baseline; flex-wrap:wrap; gap:.4rem .9rem; margin:1rem 0; padding:.85rem 1rem; background:var(--color-bg-2); border:1px solid var(--color-border); border-left:3px solid var(--color-accent); color:var(--color-text); text-decoration:none; }
.calc-peek__l { font-family:var(--font-mono); font-size:.72rem; letter-spacing:.1em; text-transform:uppercase; color:var(--color-text-dim); }
.calc-peek__v { font-family:var(--font-display); font-size:1.9rem; line-height:1; color:#fff; }
.calc-peek__s { font-family:var(--font-mono); font-size:.72rem; color:var(--color-text-muted); }
.calc-peek__l { width:100%; }
.calc-peek__c { font-family:var(--font-mono); font-size:.72rem; color:var(--color-accent); margin-left:auto; }
@media (min-width: 861px) { .calc-peek { display:none !important; } }

/* CLS: hold space for AdSense Auto ads (2026-11-10).
   Ads are not removed, moved or resized. The in-page slot Google inserts
   keeps its height from the moment it is placed (usually below the
   screen), so the text under it no longer jumps when the creative loads
   as the reader scrolls to it. Anchor, side-rail and vignette formats
   are fixed overlays and are not affected. */
.google-auto-placed { min-height: 280px; }
.google-auto-placed > ins.adsbygoogle { min-height: 280px; }
.google-auto-placed:has(> ins.adsbygoogle[data-ad-status="unfilled"]),
.google-auto-placed > ins.adsbygoogle[data-ad-status="unfilled"] { min-height: 0; }

/* Article cover image (Discover, 2026-11-10). width/height attributes on the
   <img> reserve the box before it loads, so it causes no layout shift. */
.article-cover { margin: 0 0 1.5rem; }
.article-cover img { width: 100%; height: auto; display: block; border: 1px solid var(--color-border); border-radius: var(--border-radius, 2px); background: var(--color-bg-2); }
