:root {
  --bg: #08080f; --bg-soft: #10101a; --fg: #f4f3ef; --muted: #9594a3;
  --line: rgba(255,255,255,0.12); --accent: #e8c14a; --cyan: #4dd9ff;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--font-body);
  line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* ambient glow so it isn't flat black */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(55% 45% at 12% -5%, rgba(232,193,74,0.10), transparent 60%),
    radial-gradient(45% 45% at 92% 6%, rgba(77,217,255,0.12), transparent 60%),
    radial-gradient(60% 55% at 50% 108%, rgba(77,217,255,0.06), transparent 70%);
}
body::after { /* subtle vignette */
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0,0,0,0.45));
}
a { color: var(--cyan); text-decoration: none; }
::selection { background: var(--accent); color: #1a1505; }

/* reading progress */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  box-shadow: 0 0 12px rgba(77,217,255,0.6);
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

/* ---------- frosted nav (logo stands out) ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,18,0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 30px rgba(0,0,0,0.35);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; max-width: 1100px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(77,217,255,0.45)) drop-shadow(0 0 2px rgba(255,255,255,0.5)); }
.nav a.cta {
  background: linear-gradient(180deg, var(--accent), #c89a2e); color: #1a1505;
  padding: 10px 20px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 22px rgba(232,193,74,0.28); transition: transform .35s cubic-bezier(.16,1,.3,1), box-shadow .35s;
}
.nav a.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232,193,74,0.42); }

/* ---------- article ---------- */
article, .blog-index { padding-block: clamp(48px, 8vh, 90px); position: relative; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cyan); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cyan); padding: 7px 14px; border: 1px solid rgba(77,217,255,0.3);
  border-radius: 999px; background: rgba(77,217,255,0.06);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.03em; line-height: 1.06;
  font-size: clamp(32px, 5.6vw, 56px); margin: 18px 0 16px;
  background: linear-gradient(180deg, #ffffff, #c9c8d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.meta { color: var(--muted); font-size: 14px; margin-bottom: 40px; }

article h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(22px, 3vw, 31px); margin: 46px 0 14px; padding-left: 18px; position: relative;
}
article h2::before {
  content: ''; position: absolute; left: 0; top: 0.12em; bottom: 0.12em; width: 4px; border-radius: 4px;
  background: linear-gradient(var(--cyan), var(--accent)); box-shadow: 0 0 12px rgba(77,217,255,0.4);
}
article h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2vw, 22px); margin: 30px 0 10px; color: #e8e7ef; }
article p { margin: 0 0 18px; color: #d7d6e0; }
article ul, article ol { margin: 0 0 20px 4px; color: #d7d6e0; list-style: none; }
article li { margin-bottom: 12px; padding-left: 28px; position: relative; }
article ul li::before { content: ''; position: absolute; left: 4px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px rgba(77,217,255,0.6); }
article ol { counter-reset: n; }
article ol li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 0.05em; width: 20px; height: 20px; border-radius: 50%; background: rgba(232,193,74,0.15); border: 1px solid rgba(232,193,74,0.4); color: var(--accent); font-family: var(--font-display); font-size: 11px; font-weight: 600; display: grid; place-items: center; }
article strong { color: var(--fg); }
.lead { font-size: clamp(17px, 1.7vw, 21px); color: #e9e8f0; line-height: 1.7; }

/* inline link underline sweep */
article p a, article li a { position: relative; color: var(--cyan); }
article p a::after, article li a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.16,1,.3,1); }
article p a:hover::after, article li a:hover::after { transform: scaleX(1); }

/* ---------- callout (3D tilt) ---------- */
.callout {
  background: linear-gradient(180deg, rgba(22,22,32,0.9), rgba(14,14,22,0.9));
  border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; margin: 38px 0;
  position: relative; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  transform-style: preserve-3d; transition: transform .25s ease, box-shadow .4s;
}
.callout::before { content: ''; position: absolute; inset: 0; border-radius: 18px; padding: 1px;
  background: linear-gradient(120deg, rgba(77,217,255,0.5), transparent 40%, rgba(232,193,74,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.7; }
.callout p { margin-bottom: 8px; }
.callout a.btn { display: inline-block; margin-top: 10px; background: linear-gradient(180deg, var(--accent), #c89a2e); color: #1a1505; padding: 12px 22px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: 14px; box-shadow: 0 8px 24px rgba(232,193,74,0.3); transition: transform .35s cubic-bezier(.16,1,.3,1); transform: translateZ(30px); }
.callout a.btn:hover { transform: translateZ(30px) translateY(-2px); }

/* ---------- related cards (3D tilt) ---------- */
.related { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 32px; }
.related h2 { font-size: 20px; margin: 0 0 16px; padding-left: 0; }
.related h2::before { display: none; }
.related a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; margin-bottom: 12px; border-radius: 14px;
  background: var(--bg-soft); border: 1px solid var(--line); color: var(--fg);
  font-family: var(--font-display); font-weight: 500; font-size: clamp(15px,1.6vw,17px);
  transform-style: preserve-3d; transition: transform .25s ease, border-color .35s, background .35s;
}
.related a::after { content: '→'; color: var(--cyan); transition: transform .35s cubic-bezier(.16,1,.3,1); transform: translateZ(20px); }
.related a:hover { border-color: rgba(77,217,255,0.4); background: #14141f; }
.related a:hover::after { transform: translateZ(20px) translateX(6px); }

/* ---------- blog index list ---------- */
.post-list { list-style: none; margin: 34px 0 0; }
.post-list li {
  border: 1px solid var(--line); border-radius: 18px; background: var(--bg-soft);
  padding: 26px 28px; margin-bottom: 18px; list-style: none;
  transform-style: preserve-3d; transition: transform .25s ease, border-color .35s;
}
.post-list li::before { display: none; }
.post-list li:hover { border-color: rgba(77,217,255,0.35); }
.post-list h2 { font-size: clamp(20px, 2.4vw, 27px); margin: 12px 0 8px; padding-left: 0; }
.post-list h2::before { display: none; }
.post-list h2 a { color: var(--fg); }
.post-list h2 a:hover { color: var(--cyan); }
.post-list p { color: var(--muted); margin: 0; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: 40px; }
footer .wrap { padding-block: 32px; max-width: 1100px; }
footer a:hover { color: var(--cyan); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
