:root {
  --void: #0c0f10;
  --panel-bg: rgba(16, 20, 20, 0.68);
  --panel-border: rgba(143, 174, 149, 0.22);
  --accent: #8fae95;
  --text: #e4e7e2;
  --text-dim: #8b968f;

  /* EDIT: once you have a background image, point this at it, e.g.:
     --bg-image: url('images/bg.jpg');
     Leave it as "none" and you'll get the static-noise placeholder below. */
  --bg-image: url('images/orcal.png');

  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--void);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---- background layers ----
   bg-void: solid base color
   bg-image: your future photo/art, via --bg-image above
   bg-noise: faint static texture that fills the gap until bg-image is set */
.bg-void, .bg-image, .bg-noise {
  position: fixed;
  inset: 0;
}
.bg-void { z-index: -3; background: var(--void); }
.bg-image {
  z-index: -2;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
}
.bg-noise {
  z-index: -1;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- main column: 60% of viewport, centered, capped for big monitors.
   Swap `min(60%, 1280px)` for `60%` if you want pure 60% always. ---- */
.page {
  width: min(60%, 1280px);
  margin-inline: auto;
  padding: 4rem 0 6rem;
}

/* ---- panel: optional blur box for keeping text readable over a busy
   background image. Not used anywhere right now, but kept on purpose —
   if you add a busy bg-image later, add class="panel" back to the
   header/article. ---- */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 4px;
  padding: 2rem 1.75rem;
}

.site-title {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  color: var(--text);
}
.cursor { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }

.site-blurb {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin: 0;
}

/* ---- post directory (index page) ---- */
.entries {
  list-style: none;
  margin: 3.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  counter-reset: entry;
}

.entry { counter-increment: entry; }
.entry h2 { margin: 0; }

.entry-title {
  display: inline-block;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  text-decoration: none;
}
.entry-num::before {
  content: counter(entry, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-right: 0.6rem;
}
.entry-title:hover,
.entry-title:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.entry-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* entry image: wide images squash to the column (never cropped),
   small images stay at natural size. Centered — change to
   `1.25rem 0 0` to left-align them with the text. */
.entry-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto 0;
  border-radius: 2px;
}

/* opt-in hero: breaks out of the column to full viewport width */
.entry-img--bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.entry-desc {
  margin: 1rem 0 0;
  max-width: 70ch;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---- post page ---- */
.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.back-link:hover,
.back-link:focus-visible { text-decoration: underline; }
.back-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0.5rem 0 0;
}

.post-body {
  margin-top: 2rem;
  font-size: 1rem;
  line-height: 1.7;
}
.post-body h2 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}
.post-body h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin: 1.5rem 0 0.5rem;
}
.post-body p {
  margin: 0 0 1rem;
  color: var(--text);
  max-width: 70ch; /* keeps line length readable in the wider column */
}
.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(143, 174, 149, 0.4);
  text-underline-offset: 2px;
}
.post-body a:hover,
.post-body a:focus-visible { text-decoration-color: var(--accent); }
.post-body ul,
.post-body ol { margin: 0 0 1rem; padding-left: 1.25rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 2px solid var(--panel-border);
  color: var(--text-dim);
  font-style: italic;
}
.post-body img {
  max-width: 100%;
  border-radius: 2px;
  margin: 1.5rem 0;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.35em;
  border-radius: 2px;
}
.post-body pre {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  margin: 0 0 1rem;
}
.post-body pre code { background: none; padding: 0; }
.post-body hr {
  border: none;
  border-top: 1px solid var(--panel-border);
  margin: 2rem 0;
}

.site-footer {
  margin-top: 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
  opacity: 0.6;
}

/* narrow screens: the column takes full width */
@media (max-width: 800px) {
  .page { width: 100%; padding: 2.5rem 1.25rem 4rem; }
  .panel { padding: 1.5rem 1.25rem; }
}
