/* =========================================================
   AETHERMINE · Blog (index + post)
   Matches the dark-gold theme from demo.css
   ========================================================= */

:root {
  --bg: #07080a;
  --bg-2: #0c0d10;
  --bg-3: #14110c;
  --ink: #f4ede0;
  --ink-2: #cfc7b6;
  --ink-3: #8a8273;
  --ink-4: #4d473d;
  --line: rgba(244, 237, 224, 0.08);
  --line-2: rgba(244, 237, 224, 0.16);
  --gold: #e6c187;
  --gold-2: #f4d9a3;
  --copper: #c97a4a;
  --aether: #6d8fb8;
  --serif: 'Instrument Serif', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --container: 1080px;
  --reading: 720px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.reading { max-width: var(--reading); margin: 0 auto; padding: 0 var(--pad); }

/* Background atmosphere */
.atmosphere { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.30; mix-blend-mode: screen; }
.orb-1 { width: 800px; height: 800px; top: -300px; left: -200px;
  background: radial-gradient(circle, rgba(230,193,135,0.30), transparent 65%); }
.orb-2 { width: 700px; height: 700px; top: 50%; right: -200px;
  background: radial-gradient(circle, rgba(109,143,184,0.20), transparent 65%); }

main { position: relative; z-index: 1; }

/* NAV (mirrors main-site nav: brand pill + links pill + CTA) */
.nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-pill { display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px; border-radius: 100px;
  background: rgba(20, 18, 14, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(244, 237, 224, 0.10);
  font-size: 13px; color: var(--ink-2);
  transition: background 0.2s, border-color 0.2s; }
.nav-pill:hover { background: rgba(20,18,14,0.75); border-color: rgba(244,237,224,0.18); }
.nav-brand { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.nav-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }

.nav-cta-mobile {
  display: none; color: var(--gold); border-color: rgba(230,193,135,0.5);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 10px 16px;
}

.nav-toggle {
  display: none; background: rgba(20,18,14,0.55); border: 1px solid rgba(244,237,224,0.10);
  border-radius: 100px; padding: 0; width: 44px; height: 44px;
  align-items: center; justify-content: center; cursor: pointer;
  flex-direction: column; gap: 5px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: background 0.2s, border-color 0.2s;
}
.nav-toggle:hover { background: rgba(20,18,14,0.75); border-color: rgba(244,237,224,0.18); }
.nav-toggle-bar { display: block; width: 18px; height: 1.5px;
  background: var(--ink); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile-panel {
  display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: rgba(14,12,10,0.92);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(244,237,224,0.10);
  border-radius: 18px; padding: 14px;
  flex-direction: column; gap: 4px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.9);
}
.nav-mobile-panel a {
  display: block; padding: 14px 18px; color: var(--ink-2);
  font-size: 15px; border-radius: 12px; transition: background 0.15s, color 0.15s;
}
.nav-mobile-panel a:hover { background: rgba(244,237,224,0.05); color: var(--ink); }
.nav-mobile-panel a.active { color: var(--gold); }
.nav-mobile-panel .nav-mobile-cta {
  background: rgba(230,193,135,0.10); color: var(--gold);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; margin-top: 6px; text-align: center;
}
.nav-mobile-panel .nav-mobile-cta:hover { background: var(--gold); color: var(--bg); }
.nav.is-open .nav-mobile-panel { display: flex; }

.nav-links { gap: 22px; padding: 12px 22px; font-size: 13px; }
.nav-links a { color: var(--ink-2); transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--gold); }
.nav-links .nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin: -6px -8px -6px 6px;
  border: 1px solid var(--gold); border-radius: 100px;
  color: var(--gold);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.nav-links .nav-cta:hover { background: var(--gold); color: var(--bg); }

@media (max-width: 820px) {
  .nav { position: relative; }
  .nav-links { display: none; }
  .nav-cta-mobile { display: inline-flex; align-items: center; gap: 6px; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 600px) {
  .nav { top: 12px; padding: 0 12px; }
  .nav-brand span { display: none; }
  .nav-brand { padding: 10px 12px; }
  .nav-cta-mobile { padding: 10px 14px; font-size: 10.5px; letter-spacing: 0.12em; }
  .nav-toggle { width: 42px; height: 42px; }
}
@media (max-width: 420px) {
  .nav-cta-mobile { display: none; }
}

/* Reveal animation (matches homepage) */
.fade-in { opacity: 0; transform: translateY(14px); filter: blur(6px);
  animation: blogFade 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
.fade-in.d1 { animation-delay: 0.05s; }
.fade-in.d2 { animation-delay: 0.18s; }
.fade-in.d3 { animation-delay: 0.32s; }
.fade-in.d4 { animation-delay: 0.46s; }
@keyframes blogFade { to { opacity: 1; transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; filter: none; animation: none; }
}

/* HERO */
.b-hero { padding: 130px var(--pad) 48px; text-align: center; }
@media (max-width: 600px) {
  .b-hero { padding: 110px var(--pad) 32px; }
  .b-hero p.lede { font-size: 15.5px; }
  .post-hero { padding: 110px var(--pad) 16px !important; }
  .post-cover { margin: 20px auto 36px; }
  .post-body { font-size: 16.5px; line-height: 1.7; }
  .post-body p.lede { font-size: 19px; }
  .post-body h2 { font-size: 24px; }
  .post-body h3 { font-size: 19px; }
  .b-card-body { padding: 20px 20px 22px; }
  .b-card-title { font-size: 21px; }
}
.b-eyebrow { display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border: 1px solid var(--line-2); border-radius: 100px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-2); margin-bottom: 24px; }
.b-eyebrow .dot { width: 6px; height: 6px; background: var(--gold);
  border-radius: 50%; box-shadow: 0 0 12px var(--gold); }
.b-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 58px); line-height: 1.05;
  letter-spacing: -0.02em; margin: 0 auto 20px; max-width: 880px;
}
.b-hero h1 em { color: var(--gold); font-style: italic; }
.b-hero p.lede { font-size: 17px; color: var(--ink-2);
  max-width: 640px; margin: 0 auto; }

/* INDEX cards */
.b-grid { padding: 24px var(--pad) 120px; max-width: 760px; margin: 0 auto;
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.b-card { display: flex; flex-direction: column;
  background: rgba(12, 13, 16, 0.55);
  border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.b-card:hover { border-color: var(--line-2); transform: translateY(-4px);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,0.8),
              0 0 50px -25px rgba(230, 193, 135, 0.18); }
.b-card-img { aspect-ratio: 16 / 9; background: #0a0a0a;
  overflow: hidden; }
.b-card-img img { width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease; }
.b-card:hover .b-card-img img { transform: scale(1.04); }
.b-card-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }
.b-card-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--ink-3); text-transform: uppercase; margin-bottom: 12px; }
.b-card-meta .sep { color: var(--ink-4); margin: 0 8px; }
.b-card-title { font-family: var(--serif); font-weight: 400;
  font-size: 24px; line-height: 1.18; letter-spacing: -0.01em;
  margin-bottom: 12px; color: var(--ink); }
.b-card-dek { font-size: 14.5px; color: var(--ink-2); line-height: 1.55;
  flex: 1; }
.b-card-cta { margin-top: 20px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

/* POST */
.post-hero { padding: 130px var(--pad) 24px; text-align: center; max-width: 880px; margin: 0 auto; }
.post-hero .b-eyebrow { margin-bottom: 28px; }
.post-hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.06;
  letter-spacing: -0.02em; margin-bottom: 24px;
}
.post-hero h1 em { color: var(--gold); font-style: italic; }
.post-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); }
.post-meta .sep { color: var(--ink-4); margin: 0 10px; }

.post-cover { max-width: 1240px; margin: 32px auto 56px;
  padding: 0 var(--pad); }
.post-cover-frame {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse 90% 100% at 50% 50%, rgba(230,193,135,0.06), transparent 60%),
    linear-gradient(180deg, #15110c 0%, #0a0807 100%);
  padding: 22px 22px 18px;
  box-shadow: 0 40px 100px -40px rgba(0,0,0,0.8),
              0 0 80px -30px rgba(230, 193, 135, 0.15);
}
.post-cover-frame::before, .post-cover-frame::after {
  content: ""; position: absolute; left: 16px; right: 16px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(230,193,135,0.25), transparent);
  pointer-events: none;
}
.post-cover-frame::before { top: 11px; }
.post-cover-frame::after { bottom: 11px; }
.post-cover-frame img {
  width: 100%; height: auto; display: block;
  max-width: var(--post-cover-natural-width, 100%);
  margin-left: auto; margin-right: auto;
  border-radius: 6px;
  image-rendering: auto;
  box-shadow: 0 18px 50px -25px rgba(0,0,0,0.9);
}
.post-cover-label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-4);
  margin-bottom: 12px;
}
.post-cover-label .pcl-tag { color: var(--gold); }
@media (max-width: 600px) {
  .post-cover-frame { padding: 18px 16px 14px; border-radius: 12px; }
  .post-cover-frame::before { top: 10px; left: 14px; right: 14px; }
  .post-cover-frame::after { bottom: 10px; left: 14px; right: 14px; }
  .post-cover-label { font-size: 9.5px; margin-bottom: 12px; }
}
.post-cover-caption {
  margin-top: 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--ink-3); letter-spacing: 0.02em;
  text-align: left;
}
.post-cover-caption b { color: var(--ink-2); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; }
.post-cover-caption a { color: var(--gold); border-bottom: 1px solid rgba(230,193,135,0.35); }

.post-body { padding: 0 var(--pad) 64px; max-width: var(--reading); margin: 0 auto;
  font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.post-body p { margin: 0 0 1.3em; }
.post-body p.lede { font-family: var(--serif); font-style: italic;
  font-size: 22px; line-height: 1.5; color: var(--ink); margin-bottom: 1.6em; }
.post-body h2 {
  font-family: var(--serif); font-weight: 400; font-style: normal;
  font-size: 30px; line-height: 1.18; letter-spacing: -0.01em;
  color: var(--ink); margin: 2.2em 0 0.7em;
}
.post-body h2 em { color: var(--gold); font-style: italic; }
.post-body h3 {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: 22px; line-height: 1.3; color: var(--gold-2);
  margin: 1.8em 0 0.5em;
}
.post-body strong { color: var(--ink); font-weight: 500; }
.post-body em { font-style: italic; color: var(--ink); }
.post-body a { color: var(--gold); border-bottom: 1px solid rgba(230,193,135,0.35); }
.post-body a:hover { border-bottom-color: var(--gold); }

.post-figure { margin: 2.4em calc(-1 * var(--pad)) 2.4em;
  padding: 0 var(--pad); }
.post-figure .frame {
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line-2);
  background: #0a0a0a;
}
.post-figure img { width: 100%; height: auto; display: block; }
.post-figure figcaption {
  margin-top: 14px;
  font-family: var(--mono); font-size: 12px; line-height: 1.55;
  color: var(--ink-3); letter-spacing: 0.02em;
}
.post-figure figcaption b { color: var(--ink-2); font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; }

.post-pull { margin: 2.4em 0; padding: 28px 32px;
  border-left: 2px solid var(--gold);
  background: rgba(20, 18, 14, 0.4);
  border-radius: 0 8px 8px 0;
  font-family: var(--serif); font-style: italic;
  font-size: 22px; line-height: 1.45; color: var(--ink); }

.post-refs { margin: 2em 0 0; padding: 28px 0 0;
  border-top: 1px solid var(--line); }
.post-refs h2 { margin-top: 0; }
.post-refs ol { margin: 1.2em 0 0; padding-left: 1.4em;
  font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.post-refs ol li { margin-bottom: 0.9em; }
.post-refs code { font-family: var(--mono); font-size: 12.5px; color: var(--gold-2); }

/* CTA */
.cta-strip { padding: 90px var(--pad); text-align: center;
  background: linear-gradient(180deg, transparent, rgba(20,18,14,0.4)); }
.cta-strip h2 { font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 4vw, 42px); line-height: 1.15;
  margin-bottom: 28px; }
.cta-strip h2 em { color: var(--gold); font-style: italic; }
.cta-btn {
  display: inline-block; padding: 14px 28px;
  border: 1px solid var(--gold);
  border-radius: 100px;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  transition: background 0.2s, color 0.2s;
}
.cta-btn:hover { background: var(--gold); color: var(--bg); }

/* FOOTER (mirrors main-site footer structure) */
.footer { border-top: 1px solid var(--line); padding: 64px 0 0;
  background: linear-gradient(180deg, transparent, rgba(20,18,14,0.35)); }
.foot-grid { display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px; padding-bottom: 48px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }
.foot-brand { display: flex; align-items: flex-start; gap: 18px; }
.foot-mark { width: 56px; height: 56px; display: block; flex-shrink: 0; }
.foot-brand h4 { font-family: var(--serif); font-weight: 400;
  font-size: 24px; color: var(--ink); margin-bottom: 6px; }
.foot-brand p { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.foot-meta { display: flex; flex-direction: column; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.foot-meta p { display: flex; gap: 14px; align-items: baseline; }
.foot-meta span { color: var(--ink-4); letter-spacing: 0.16em;
  text-transform: uppercase; font-size: 10.5px; min-width: 56px; }
.foot-meta a { color: var(--gold); }
.foot-meta a:hover { color: var(--gold-2); }

.foot-links { display: flex; flex-wrap: wrap; gap: 18px;
  justify-content: center; padding: 22px 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); }
.foot-links a { color: inherit; transition: color 0.2s; }
.foot-links a:hover { color: var(--gold); }
.foot-links a.active { color: var(--gold); }

.foot-bottom { display: flex; justify-content: space-between;
  align-items: center; gap: 16px; padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--ink-4); text-transform: uppercase; }
@media (max-width: 600px) {
  .foot-bottom { flex-direction: column; text-align: center; }
}
.foot-version { color: var(--ink-4); }
