:root {
  --bg: #10110d;
  --panel: rgba(24, 29, 23, 0.88);
  --panel-strong: rgba(20, 25, 21, 0.96);
  --line: rgba(202, 216, 172, 0.2);
  --line-strong: rgba(226, 171, 92, 0.38);
  --text: #edf0df;
  --muted: #b2b6a2;
  --green: #b8d88d;
  --fluoro: #98ff62;
  --amber: #e6b36a;
  --cream: #f7efdc;
  --shadow: rgba(0, 0, 0, 0.34);
  --max-width: 1120px;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(112, 136, 91, 0.17), transparent 34%),
    radial-gradient(circle at bottom right, rgba(112, 85, 45, 0.12), transparent 28%),
    linear-gradient(180deg, #171913 0%, #0d0e0b 100%);
  font-family: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 50%, transparent 50%),
    linear-gradient(90deg, rgba(184, 216, 141, 0.025), rgba(230, 179, 106, 0.02));
  background-size: 100% 5px, 100% 100%;
  opacity: 0.18;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 55%, transparent 100%);
  opacity: 0.05;
}

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 1rem 0 2.5rem;
  position: relative;
  z-index: 1;
}

.topbar,
.panel,
.footer {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 40px var(--shadow);
}

.topbar {
  padding: 1rem 1.25rem;
  border-radius: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 0.85rem;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(22, 27, 21, 0.84);
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 1.25rem;
  top: 1rem;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--fluoro));
  opacity: 0.9;
  z-index: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

.brand-mark {
  color: var(--amber);
  font-size: 1rem;
}

.brand-text {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  margin-left: auto;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(157, 255, 139, 0.08);
}

main {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: 1.4rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(230, 179, 106, 0.08), transparent 34%, rgba(184, 216, 141, 0.025));
}

.panel::after {
  content: "";
  position: absolute;
  inset: 1rem auto auto 1rem;
  width: 92px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--fluoro));
  opacity: 0.85;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
}

.hero-copy,
.terminal-card,
.post,
.card,
.stack-item {
  position: relative;
  z-index: 1;
}

.kicker,
.panel-label,
.mini-meta {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--amber);
}

h1,
h2,
h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.1;
  margin: 0 0 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  max-width: 11ch;
}

h2 {
  font-size: clamp(1.5rem, 2.4vw, 2.3rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
  color: var(--text);
}

.lede,
.page-banner p,
.post-intro {
  font-size: 1.1rem;
  color: var(--cream);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  font-weight: 700;
  min-height: 46px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button {
  background: var(--amber);
  color: #1b150e;
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(184, 216, 141, 0.045);
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-1px);
}

.terminal-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.terminal-chrome {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.terminal-chrome span {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.ascii-art {
  margin: 0;
  color: var(--green);
  font-size: 0.94rem;
  white-space: pre;
  overflow-x: auto;
}

.prompt-line {
  margin-top: 1rem;
  color: var(--green);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  border-top: 1px solid rgba(202, 216, 172, 0.15);
  padding-top: 0.9rem;
}

.prompt {
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
}

.dashboard-grid,
.split-layout {
  display: grid;
  gap: 1rem;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.badge-panel {
  min-height: 250px;
}

.split-layout {
  grid-template-columns: 1.1fr 0.9fr;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.compact-grid {
  grid-template-columns: 1fr;
}

.card,
.stack-item {
  border: 1px solid var(--line);
  background: rgba(13, 18, 14, 0.74);
  border-radius: 18px;
  padding: 1rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card:hover,
.stack-item:hover {
  transform: translateY(-2px);
  border-color: rgba(230, 179, 106, 0.42);
  background: rgba(17, 23, 18, 0.84);
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-tagline {
  color: var(--cream);
}

.book-cover {
  width: 120px;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.book-thumb {
  width: 64px;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.featured-book-row {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.book-card-with-cover {
  flex-direction: row;
  gap: 1.2rem;
  align-items: flex-start;
}

.book-info {
  flex: 1;
  min-width: 0;
}

.stack-list {
  display: grid;
  gap: 0.75rem;
}

.text-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 700;
}

.text-link:hover {
  color: var(--amber);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.price-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  color: var(--amber);
  font-weight: 700;
  background: rgba(230, 179, 106, 0.06);
}

.page-banner h1,
.post h1 {
  max-width: 15ch;
}

.post {
  max-width: 760px;
  margin: 0 auto;
}

.post h2 {
  margin-top: 2rem;
  font-size: clamp(1.3rem, 2vw, 1.75rem);
}

.post ol,
.post ul {
  margin: 0 0 1.1rem 1.25rem;
  padding: 0;
}

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

pre {
  margin: 1.35rem 0 1.6rem;
  padding: 1.25rem 1.2rem 1.2rem 1.35rem;
  border-radius: 16px;
  border: 2px solid rgba(117, 145, 178, 0.55);
  border-left: 6px solid var(--fluoro);
  background: #0b1220;
  color: #f4f7ee;
  overflow-x: auto;
  line-height: 1.5;
  box-shadow:
    0 16px 30px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  tab-size: 2;
}


pre::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--fluoro), var(--amber));
  opacity: 0.95;
}

code {
  font-family: "IBM Plex Mono", "SFMono-Regular", "Consolas", monospace;
}

p code,
li code {
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(184, 216, 141, 0.08);
  color: var(--cream);
}

pre code {
  display: block;
  min-width: max-content;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 0.94rem;
}

.post-note {
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--amber);
  border-radius: 12px;
  background: rgba(230, 179, 106, 0.08);
}

.post-figure {
  margin: 1.25rem 0;
}

.post-figure img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.post-figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.post p:last-of-type {
  margin-bottom: 1.5rem;
}

.newsletter-panel {
  background:
    linear-gradient(120deg, rgba(230, 179, 106, 0.12), transparent 42%),
    rgba(22, 28, 22, 0.9);
}

.footer {
  margin-top: 1rem;
  border-radius: 18px;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
}

.footer-note {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .dashboard-grid,
  .split-layout,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 0.5rem;
  }

  .topbar,
  .panel,
  .footer {
    padding: 1rem;
  }

  h1 {
    max-width: none;
  }

  .section-heading,
  .footer {
    align-items: start;
  }
}
