/* article-style.css
   Shared stylesheet for writing/essay pages (extracted from ghostbat.html).
   Link this instead of inlining: <link rel="stylesheet" href="article-style.css">
   Adds .writing-hub-* rules for the writing index page. */

:root {
  --fog:       #f7f7f7;
  --snow:      #ffffff;
  --carbon:    #000000;
  --midnight:  #181825;
  --graphite:  #484758;
  --stone:     #636363;
  --pebble:    #949494;
  --tangerine: #f69251;
  --hero-bg:   #080503;
  --shadow-subtle:   rgba(24,24,37,0.12) 0px 2px 3px -2px;
  --shadow-subtle-2: rgba(0,0,0,0.04) 0px 1px 2px 0px,
                     rgba(0,0,0,0.02) 0px 2px 4px 0px,
                     rgba(0,0,0,0.02) 0px 4px 8px 0px;
  --r-card:  24px;
  --r-inner: 12px;
  --r-btn:   28px;
  --r-nav:   32px;
  --r-badge: 100px;
  --font-display: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--fog); color: var(--carbon); font-family: var(--font-body);
       -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; }

/* NAV */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: 12px 24px;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  max-width: 1200px; margin: 0 auto;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: var(--r-nav);
  box-shadow: var(--shadow-subtle);
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 15px; font-weight: 500;
  color: var(--carbon); letter-spacing: -0.01em;
}
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--stone);
  padding: 6px 12px; border-radius: var(--r-badge);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--carbon); }
.nav-cta {
  background: var(--tangerine) !important;
  color: var(--carbon) !important;
  border-radius: var(--r-btn) !important;
  padding: 8px 20px !important;
  box-shadow: var(--shadow-subtle-2);
  transition: opacity 0.2s !important;
}
.nav-cta:hover { opacity: 0.85 !important; }

/* ARTICLE HERO */
.article-hero {
  position: relative;
  background: var(--hero-bg);
  margin-top: -80px;
  padding: 200px 0 80px;
  text-align: center; overflow: hidden;
}
.article-hero .hero-img { position: absolute; inset: 0; z-index: 0; }
.article-hero .hero-img img {
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.28;
}
.article-hero .hero-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,5,3,0.3) 0%, rgba(8,5,3,0.88) 100%);
}
.article-hero .inner {
  position: relative; z-index: 2;
  max-width: 800px; margin: 0 auto; padding: 0 32px;
}
.article-hero .tag {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(246,146,81,0.75); margin-bottom: 16px;
}
.article-hero h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(28px, 5vw, 52px);
  color: #fff; letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 12px;
}
.article-hero .meta {
  font-size: 13px; color: rgba(255,255,255,0.32);
  font-family: var(--font-mono); letter-spacing: 0.06em;
}

/* ARTICLE */
.article {
  max-width: 760px; margin: 0 auto;
  padding: 64px 32px 120px;
}
.article h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 400;
  letter-spacing: -0.015em; margin: 52px 0 16px;
  color: var(--carbon);
}
.article h3 {
  font-family: var(--font-display); font-size: 17px; font-weight: 400;
  margin: 36px 0 12px; color: var(--carbon);
}
.article p {
  font-size: 16px; line-height: 1.8;
  color: var(--midnight); margin: 0 0 18px;
}
.article ul { list-style: none; padding: 0; margin: 0 0 28px; }
.article ul li {
  padding: 6px 0 6px 22px; position: relative;
  color: var(--stone); font-size: 15px; line-height: 1.65;
}
.article ul li::before { content: "->"; position: absolute; left: 0; color: var(--pebble); }

/* IMAGE BLOCKS */
.img-block {
  margin: 36px 0; border-radius: var(--r-inner);
  overflow: hidden; box-shadow: var(--shadow-subtle);
  background: var(--snow);
}
.img-block img { width: 100%; display: block; }
.img-caption {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--pebble); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 16px; background: var(--snow);
}
.img-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0; }
.img-grid .img-block { margin: 0; }

/* CALLOUT */
.callout {
  background: var(--snow); border-left: 3px solid var(--tangerine);
  border-radius: 0 var(--r-inner) var(--r-inner) 0;
  padding: 18px 22px; margin: 32px 0;
  font-size: 14px; line-height: 1.7; color: var(--stone);
  box-shadow: var(--shadow-subtle);
}
.callout .k {
  font-family: var(--font-mono); font-size: 9px; color: var(--tangerine);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 8px; display: block;
}

/* NOTE */
.note {
  background: var(--snow); border-left: 3px solid rgba(0,0,0,0.12);
  border-radius: 0 var(--r-inner) var(--r-inner) 0;
  padding: 18px 22px; margin: 32px 0;
  font-size: 14px; line-height: 1.7; color: var(--stone);
  box-shadow: var(--shadow-subtle);
}

/* BACK */
.back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; margin-top: 40px;
  font-size: 14px; font-weight: 500; color: var(--carbon);
  background: var(--snow); border-radius: var(--r-btn);
  box-shadow: var(--shadow-subtle);
  transition: box-shadow 0.2s, transform 0.2s;
}
.back:hover { box-shadow: var(--shadow-subtle-2); transform: translateY(-1px); }

@media (max-width: 700px) {
  .img-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .article-hero { padding-top: 160px; }
}
::selection { background: var(--tangerine); color: var(--carbon); }

/* ---- WRITING HUB (index of essays) ---- */
.hub-wrap { max-width: 1000px; margin: 0 auto; padding: 8px 32px 120px; }
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hub-card {
  background: var(--snow); border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-subtle); transition: transform 0.3s ease, box-shadow 0.3s ease;
}
a.hub-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-subtle-2); }
.hub-card.muted { opacity: 0.5; pointer-events: none; }
.hub-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--fog); }
.hub-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hub-card .ph {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--pebble);
}
.hub-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.hub-tag {
  align-self: flex-start; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--stone);
  background: var(--fog); border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-badge); padding: 4px 10px; margin-bottom: 12px;
}
.hub-card h3 {
  font-family: var(--font-display); font-size: 19px; font-weight: 400;
  letter-spacing: -0.01em; line-height: 1.25; color: var(--carbon); margin-bottom: 8px;
}
.hub-card p { font-size: 14px; line-height: 1.6; color: var(--stone); margin: 0 0 16px; flex: 1; }
.hub-card .read { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tangerine); }
.hub-card .status { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pebble); }
@media (max-width: 700px) { .hub-grid { grid-template-columns: 1fr; } .hub-wrap { padding: 8px 20px 80px; } }
