:root {
  --bg: #0b0d0c;
  --bg-panel: #141716;
  --border: #2a2f2d;
  --text: #dfe6e2;
  --text-dim: #8a938e;
  --accent: #e2413a;
  --accent-dim: #7a2a26;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.65;
}

/* subtle scanline / grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.015),
    rgba(255, 255, 255, 0.015) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 1000;
}

.hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 2px solid var(--accent-dim);
}

.hero-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.35;
  filter: grayscale(0.6) contrast(1.1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 5%, rgba(11, 13, 12, 0.55) 55%, rgba(11, 13, 12, 0.25) 100%);
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
  width: 100%;
}

.kicker {
  font-family: var(--mono);
  color: var(--accent);
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  margin: 0 0 0.9rem;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: #f4f1ec;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 0 1rem;
}

.byline {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-dim);
  margin: 0;
}

.post {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.post h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: #f4f1ec;
  margin-top: 3rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.post p {
  font-size: 1.03rem;
  color: var(--text);
}

.post ul, .post ol {
  font-size: 1.03rem;
  padding-left: 1.4rem;
}

.post li {
  margin-bottom: 0.5rem;
}

.post strong { color: #f4f1ec; }

.post code {
  font-family: var(--mono);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
  color: #ffb4a8;
}

.post pre {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  margin: 1.4rem 0;
}

.post pre code {
  background: none;
  border: none;
  padding: 0;
  color: #d7ded9;
  font-size: 0.86rem;
  line-height: 1.55;
}

.post blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.4rem 0;
  padding: 0.4rem 1.2rem;
  color: #f4f1ec;
  background: rgba(226, 65, 58, 0.06);
  font-style: italic;
}

.links {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.links a, .post a {
  color: #ff9a8f;
  text-decoration: none;
  border-bottom: 1px solid var(--accent-dim);
}

.links a:hover, .post a:hover {
  border-bottom-color: var(--accent);
}

.disclosure {
  font-size: 0.9rem;
  color: var(--text-dim);
  border-top: 1px dashed var(--border);
  padding-top: 1.2rem;
  margin-top: 2rem;
}

.inline-figure {
  margin: 2rem 0;
  text-align: center;
}

.inline-figure img {
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.inline-figure--small img {
  max-width: 260px;
}

.inline-figure figcaption {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.6rem;
  letter-spacing: 0.02em;
}

footer {
  text-align: center;
  font-family: var(--mono);
  color: var(--accent-dim);
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  padding: 2.5rem 1rem 3rem;
  text-transform: uppercase;
}

@media (max-width: 600px) {
  .hero { min-height: 38vh; }
  .post { padding: 2rem 1.2rem; }
}
