/* Base styles copied from bitcoin-power-projection.html on every publish run. */

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

:root {
  --purple: #C9A0FF;
  --purple-dark: #9B6FD4;
  --purple-light: #E8D5FF;
  --purple-bg: #D8B4FE;
  --red: #E02020;
  --red-dark: #B01818;
  --gold: #F0A030;
  --gold-light: #FFD080;
  --grey: #808080;
  --grey-dark: #4A4A4A;
  --grey-light: #B0B0B0;
  --green: #66BB6A;
  --green-dark: #388E3C;
  --green-light: #A5D6A7;
  --teal: #4FE3CE;
  --teal-dark: #1FA894;
  --brown: #A07848;
  --brown-dark: #7A5A32;
  --brown-light: #C4A067;
  --black: #0A0A0A;
  --black-soft: #1A1A1A;
  --white: #F5F5F5;
  --pixel-border: 4px;
  --font-display: 'Press Start 2P', monospace;
  --font-body: 'Space Mono', monospace;

  /* Article accent — bitcoin orange */
  --accent: #F7931A;
  --accent-dark: #C46F0A;
  --accent-light: #FFC978;
}

html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== PIXEL GRID OVERLAY ===== */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 11px 11px;
  pointer-events: none;
  z-index: 9999;
}

/* ===== SCREEN FLICKER / JITTER ===== */
@keyframes screenFlicker {
  0%, 100% { opacity: 1; }
  47% { opacity: 1; }
  47.5% { opacity: 0.99; }
  48% { opacity: 0.995; }
  48.5% { opacity: 1; }
  72% { opacity: 1; }
  72.3% { opacity: 0.992; }
  72.6% { opacity: 1; }
  93% { opacity: 1; }
  93.5% { opacity: 0.988; }
  94% { opacity: 0.993; }
  94.5% { opacity: 0.998; }
  95% { opacity: 1; }
}

body {
  animation: screenFlicker 9s infinite;
}

/* ===== GLITCH EFFECT ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  animation: glitchTrigger 12s infinite;
}

@keyframes glitchTrigger {
  0%, 100% { opacity: 0; }
  30% { opacity: 0; }
  30.2% {
    opacity: 1;
    background: linear-gradient(
      0deg,
      transparent 0%, transparent 15%,
      rgba(255, 0, 80, 0.06) 15%, rgba(255, 0, 80, 0.06) 17%,
      transparent 17%, transparent 42%,
      rgba(0, 255, 200, 0.06) 42%, rgba(0, 255, 200, 0.06) 44%,
      transparent 44%, transparent 68%,
      rgba(255, 0, 80, 0.06) 68%, rgba(255, 0, 80, 0.06) 69%,
      transparent 69%, transparent 100%
    );
    clip-path: polygon(0 14%, 100% 14%, 100% 18%, 0 18%,
                        0 42%, 100% 42%, 100% 45%, 0 45%,
                        0 67%, 100% 67%, 100% 70%, 0 70%);
  }
  30.4% {
    opacity: 1;
    clip-path: polygon(0 22%, 100% 22%, 100% 25%, 0 25%,
                        0 55%, 100% 55%, 100% 57%, 0 57%,
                        0 80%, 100% 80%, 100% 82%, 0 82%);
  }
  30.6% { opacity: 0; clip-path: none; }

  74% { opacity: 0; }
  74.1% {
    opacity: 1;
    background: linear-gradient(
      0deg,
      transparent 0%, transparent 30%,
      rgba(0, 180, 255, 0.07) 30%, rgba(0, 180, 255, 0.07) 33%,
      transparent 33%, transparent 58%,
      rgba(255, 0, 80, 0.05) 58%, rgba(255, 0, 80, 0.05) 60%,
      transparent 60%, transparent 100%
    );
    clip-path: polygon(0 29%, 100% 29%, 100% 34%, 0 34%,
                        0 57%, 100% 57%, 100% 61%, 0 61%);
  }
  74.3% {
    opacity: 1;
    clip-path: polygon(0 10%, 100% 10%, 100% 12%, 0 12%,
                        0 48%, 100% 48%, 100% 51%, 0 51%,
                        0 85%, 100% 85%, 100% 87%, 0 87%);
  }
  74.5% { opacity: 0; clip-path: none; }
}

body.glitch-text .section-title,
body.glitch-text .article-title,
body.glitch-text .nav-home {
  text-shadow:
    -2px 0 rgba(255, 0, 80, 0.7),
     2px 0 rgba(0, 255, 200, 0.7);
  transition: none;
}
body.glitch-text .article-title {
  text-shadow:
    -3px 0 rgba(255, 0, 80, 0.6),
     3px 0 rgba(0, 200, 255, 0.6),
    4px 4px 0 var(--purple-dark),
    8px 8px 0 rgba(0,0,0,0.4);
}

/* ===== NAV BAR ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  background: var(--black-soft);
  border-bottom: 4px solid var(--purple);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nav-logo {
  width: 36px;
  height: 36px;
}
.nav-home {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--purple);
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color 0.15s, text-shadow 0.15s;
}
.nav-home:hover {
  text-shadow:
    0 0 8px rgba(201, 160, 255, 0.85),
    0 0 16px rgba(201, 160, 255, 0.55),
    0 0 28px rgba(201, 160, 255, 0.3);
}
@media (min-width: 769px) {
  .nav-home { font-size: 16px; }
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--grey-light);
  text-decoration: none;
  padding: 10px 16px;
  clip-path: polygon(
    4px 0, calc(100% - 4px) 0,
    calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px),
    calc(100% - 4px) 100%, 4px 100%,
    4px calc(100% - 4px), 0 calc(100% - 4px),
    0 4px, 4px 4px
  );
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.nav-links li:nth-child(1) a { --nav-accent: var(--purple); }
.nav-links li:nth-child(2) a { --nav-accent: var(--teal); }
.nav-links li:nth-child(3) a { --nav-accent: var(--white); }
.nav-links li:nth-child(4) a { --nav-accent: var(--gold); }
.nav-links li:nth-child(5) a { --nav-accent: var(--brown-light); }
.nav-links li:nth-child(6) a { --nav-accent: #7CFC00; }
.nav-links li:nth-child(7) a { --nav-accent: var(--grey-light); }
.nav-links li:nth-child(8) a { --nav-accent: var(--purple); }

.nav-links a:hover {
  color: var(--nav-accent);
  background: color-mix(in srgb, var(--nav-accent) 10%, transparent);
  box-shadow: inset 0 0 0 2px var(--nav-accent);
}

.nav-follow {
  --btn-light: #FFD080;
  --btn-dark: #D48A20;
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--black);
  text-decoration: none;
  padding: 10px 18px;
  white-space: nowrap;
}
.nav-follow:hover {
  --btn-light: #FF5050;
  --btn-dark: #B01818;
  color: var(--white);
}

/* Pixel button treatment for the nav pill (ported from index.html) */
.nav-follow {
  position: relative;
  cursor: pointer;
  image-rendering: pixelated;
  clip-path: polygon(
    4px 0, calc(100% - 4px) 0,
    calc(100% - 4px) 4px, 100% 4px,
    100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px),
    calc(100% - 4px) 100%, 4px 100%,
    4px calc(100% - 4px), 0 calc(100% - 4px),
    0 4px, 4px 4px
  );
  background: linear-gradient(180deg, var(--btn-light) 0%, var(--btn-dark) 100%);
  box-shadow:
    inset 0 3px 0 0 rgba(255,255,255,0.45),
    inset 3px 0 0 0 rgba(255,255,255,0.2),
    inset 0 -3px 0 0 rgba(0,0,0,0.35),
    inset -3px 0 0 0 rgba(0,0,0,0.2);
  filter: drop-shadow(4px 4px 0 var(--black));
  transition: transform 0.08s ease-out, filter 0.08s ease-out, box-shadow 0.08s ease-out;
  border: none !important;
  letter-spacing: 0.5px;
}
.nav-follow:hover {
  filter: drop-shadow(4px 4px 0 var(--black)) drop-shadow(0 0 6px rgba(255,255,255,0.15));
  box-shadow:
    inset 0 3px 0 0 rgba(255,255,255,0.55),
    inset 3px 0 0 0 rgba(255,255,255,0.3),
    inset 0 -3px 0 0 rgba(0,0,0,0.35),
    inset -3px 0 0 0 rgba(0,0,0,0.2);
  background: linear-gradient(180deg, var(--btn-light) 0%, var(--btn-dark) 80%);
}
.nav-follow:active {
  transform: translate(4px, 4px);
  filter: drop-shadow(0 0 0 transparent);
  box-shadow:
    inset 0 -2px 0 0 rgba(255,255,255,0.2),
    inset -2px 0 0 0 rgba(255,255,255,0.1),
    inset 0 3px 0 0 rgba(0,0,0,0.35),
    inset 3px 0 0 0 rgba(0,0,0,0.2);
  background: linear-gradient(180deg, var(--btn-dark) 0%, var(--btn-light) 100%);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--purple);
  transition: all 0.25s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--black-soft);
  border-bottom: 4px solid var(--purple);
  flex-direction: column;
  padding: 16px 24px;
  gap: 4px;
  z-index: 999;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--grey-light);
  text-decoration: none;
  padding: 12px 16px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.mobile-menu a:nth-child(1) { --nav-accent: var(--purple); }
.mobile-menu a:nth-child(2) { --nav-accent: var(--teal); }
.mobile-menu a:nth-child(3) { --nav-accent: var(--white); }
.mobile-menu a:nth-child(4) { --nav-accent: var(--gold); }
.mobile-menu a:nth-child(5) { --nav-accent: var(--brown-light); }
.mobile-menu a:nth-child(6) { --nav-accent: #7CFC00; }
.mobile-menu a:nth-child(7) { --nav-accent: var(--grey-light); }
.mobile-menu a:nth-child(8) { --nav-accent: var(--purple); }

.mobile-menu a:not(.nav-follow):hover {
  color: var(--nav-accent);
  border-left-color: var(--nav-accent);
  background: color-mix(in srgb, var(--nav-accent) 8%, transparent);
}
.mobile-menu .nav-follow {
  display: inline-block;
  text-align: center;
  margin-top: 8px;
  color: var(--black) !important;
  border-left: none;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-follow-desktop { display: none; }
  .hamburger { display: flex; }
}

/* ===== ARTICLE HEAD ===== */
.article-head {
  text-align: center;
  margin: 0 0 40px;
}
.article-label {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--grey);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.article-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 5.5vw, 44px);
  color: var(--white);
  text-shadow:
    4px 4px 0 var(--purple-dark),
    8px 8px 0 rgba(0,0,0,0.4);
  letter-spacing: 2px;
  line-height: 1.4;
}
.article-dek {
  font-family: var(--font-display);
  font-size: clamp(9px, 1.8vw, 11px);
  color: var(--grey-light);
  letter-spacing: 1px;
  line-height: 1.9;
  margin-top: 22px;
}

/* ===== ARTICLE BODY ===== */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 128px 24px 100px;
}
.article-hero-wrap {
  margin-top: 0;
  cursor: default;
}
.article-body p {
  font-family: 'Roboto Mono', 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.85;
  color: var(--white);
  margin-bottom: 28px;
}

.article-subhead {
  font-family: var(--font-display);
  font-size: clamp(15px, 2.6vw, 19px);
  color: var(--purple);
  line-height: 1.6;
  letter-spacing: 0.5px;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 52px 0 26px;
}

.article-list {
  list-style: none;
  font-family: 'Roboto Mono', 'Space Mono', monospace;
  font-size: 15px;
  line-height: 1.85;
  color: var(--white);
  margin: -8px 0 28px;
  padding-left: 4px;
}
.article-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 6px;
}
.article-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}
.article-list strong {
  color: var(--accent);
  font-weight: normal;
}

.article-img-wrap {
  margin: 40px 0;
  image-rendering: pixelated;
}
.article-img-wrap img,
.article-img-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  border: var(--pixel-border) solid var(--black);
  box-shadow:
    inset -4px -4px 0 0 rgba(0,0,0,0.3),
    inset 4px 4px 0 0 rgba(255,255,255,0.15),
    4px 4px 0 0 rgba(0,0,0,0.5),
    0 0 24px rgba(247, 147, 26, 0.22);
}
.article-img-wrap.is-clickable img {
  cursor: pointer;
  transition: filter 0.12s ease-out;
}
.article-img-wrap.is-clickable img:hover {
  filter: brightness(1.1);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10001;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  cursor: pointer;
  animation: lightboxFadeIn 0.18s ease-out;
}
.lightbox.active { display: flex; }

@keyframes lightboxFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 90vh;
  cursor: default;
  display: inline-block;
}

.lightbox-img {
  display: block;
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border: var(--pixel-border) solid var(--black);
  box-shadow:
    inset -4px -4px 0 0 rgba(0,0,0,0.3),
    inset 4px 4px 0 0 rgba(255,255,255,0.15),
    8px 8px 0 0 rgba(0,0,0,0.7);
}

.lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  background: var(--red);
  color: var(--white);
  border: var(--pixel-border) solid var(--black);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow:
    inset -2px -2px 0 0 rgba(0,0,0,0.3),
    inset 2px 2px 0 0 rgba(255,255,255,0.25),
    3px 3px 0 0 rgba(0,0,0,0.5);
  transition: transform 0.1s, background 0.1s;
}
.lightbox-close:hover {
  background: var(--red-dark);
  transform: scale(1.06);
}
.lightbox-close:active {
  transform: translate(2px, 2px);
  box-shadow:
    inset -2px -2px 0 0 rgba(0,0,0,0.3),
    inset 2px 2px 0 0 rgba(255,255,255,0.25),
    1px 1px 0 0 rgba(0,0,0,0.5);
}

@media (max-width: 480px) {
  .lightbox { padding: 20px 12px; }
  .lightbox-close {
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    font-size: 11px;
  }
}

.article-back {
  display: inline-block;
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.15s, text-shadow 0.15s;
}
.article-back:hover {
  color: var(--accent-light);
  text-shadow: 0 0 10px rgba(247, 147, 26, 0.7);
}

.section-divider {
  width: 100%;
  margin: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent) 0px,
    var(--accent) 12px,
    transparent 12px,
    transparent 20px
  );
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 4px solid var(--grey-dark);
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--grey);
  letter-spacing: 1px;
}
footer span { color: var(--red); }


/* ============================================================
   NEWS STORY PAGE  (generated by publish.js - do not hand edit,
   it is overwritten on every publish run)
   ============================================================ */

:root {
  --accent: #C9A0FF;
  --accent-dark: #9B6FD4;
  --accent-light: #E8D5FF;
  --neon-green: #3DFF6E;
}

/* News headlines are full sentences, so the Press Start 2P treatment the
   hand-written articles use is far too big. Oxanium keeps them readable. */
.article-title {
  font-family: 'Oxanium', var(--font-body), sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 4.2vw, 40px);
  line-height: 1.22;
  letter-spacing: 0.4px;
  text-wrap: balance;
  text-shadow: none;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.news-chip {
  --chip-color: var(--purple);
  --chip-text: var(--black);
  font-family: var(--font-display);
  font-size: 7px;
  line-height: 1;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  color: var(--chip-text);
  background: var(--chip-color);
  image-rendering: pixelated;
}
.story--crypto  .news-chip { --chip-color: var(--purple); }
.story--policy  .news-chip { --chip-color: var(--red); --chip-text: var(--white); }
.story--finance .news-chip { --chip-color: var(--neon-green); }
.story--doginal .news-chip { --chip-color: var(--brown-light); }

.news-date {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--grey-light);
}

/* The answer up front: first thing a reader or an AI sees. */
.news-lede {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--purple-light);
  border-left: 4px solid var(--purple);
  padding: 4px 0 4px 18px;
  margin: 0 0 30px;
}

.news-source {
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.7;
  color: var(--grey);
  margin-top: 34px;
  padding-top: 16px;
  border-top: 2px solid rgba(255,255,255,0.08);
}
.news-source a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 2px solid rgba(240,160,48,0.45);
  transition: color 0.12s ease-out, border-color 0.12s ease-out;
}
.news-source a:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  list-style: none;
}
.news-tags li {
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey);
  padding: 4px 8px;
  border: 2px solid rgba(255,255,255,0.10);
}

.story-related {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 2px dashed rgba(255,255,255,0.16);
}
.story-related h2 {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--purple);
  margin-bottom: 18px;
}
.story-related ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.story-related a {
  font-family: 'Oxanium', var(--font-body), sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.45;
  color: var(--white);
  text-decoration: none;
  border-bottom: 2px solid rgba(201,160,255,0.30);
  transition: color 0.12s ease-out, border-color 0.12s ease-out;
}
.story-related a:hover { color: var(--purple); border-bottom-color: var(--purple); }

.story-nav { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Excerpt-card additions for the /articles hub */
.news-headline-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 2px solid rgba(201,160,255,0.28);
  transition: color 0.12s ease-out, border-color 0.12s ease-out;
}
.news-headline-link:hover { color: var(--purple); border-bottom-color: var(--purple); }

.news-more { margin-top: 4px; }
.news-more a {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--purple);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.12s ease-out;
}
.news-more a:hover { border-bottom-color: var(--purple); }
