:root {
  --bg: #0a100e;
  --text: #33ff66;
  --text-dim: #1a8a3a;
  --text-faint: #0d4a1f;
  --text-bright: #66ffaa;
  --glow: rgba(51, 255, 102, 0.08);
  --glow-strong: rgba(51, 255, 102, 0.15);
  --font: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  position: relative;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

/* ── Scanlines ── */

.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.12) 0px,
    rgba(0, 0, 0, 0.12) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ── Container ── */

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Nav ── */

nav {
  padding: 1rem 0 0;
  font-size: 0.9rem;
}

.prompt {
  color: var(--text-dim);
}

.nav-title {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text-faint);
}

.nav-title:hover {
  color: var(--text-bright);
  border-color: var(--text-dim);
}

.cursor {
  color: var(--text);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Home ── */

.home-intro {
  padding: 3rem 0 2rem;
}

.site-name {
  font-family: var(--font);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--text-bright);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 0 30px var(--glow-strong);
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-style: italic;
}

.divider {
  color: var(--text-faint);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  padding: 1.5rem 0;
}

/* ── Post list ── */

.posts {
  display: flex;
  flex-direction: column;
}

.post-entry {
  border-left: 2px solid var(--text-faint);
  transition: border-color 0.2s;
}

.post-entry:hover {
  border-color: var(--text-dim);
  background: var(--glow);
}

.post-link {
  display: block;
  padding: 1.2rem 0 1.2rem 1.2rem;
  text-decoration: none;
}

.post-date {
  font-size: 0.75rem;
  color: var(--text-faint);
  display: block;
}

.post-title {
  color: var(--text-bright);
  font-size: 1rem;
  font-weight: 500;
  display: block;
  margin: 0.2rem 0 0.5rem;
}

.post-excerpt {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Single Post ── */

.post-header {
  padding: 3rem 0 2rem;
}

.post-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}

.post-header h1 {
  font-family: var(--font);
  font-weight: 500;
  font-size: 1.6rem;
  color: var(--text-bright);
  line-height: 1.4;
  text-shadow: 0 0 20px var(--glow-strong);
}

.post-body {
  padding-bottom: 2rem;
}

.post-body p {
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-body hr {
  border: none;
  margin: 2.5rem 0;
  color: var(--text-faint);
  font-size: 0.8rem;
  text-align: center;
}

.post-body hr::before {
  content: '· · ·';
  letter-spacing: 0.5em;
}

.post-body blockquote {
  border-left: 2px solid var(--text-dim);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
  font-style: italic;
}

.post-body strong {
  font-weight: 500;
  color: var(--text-bright);
}

.post-body em {
  font-style: italic;
  color: var(--text);
}

.post-body code {
  font-size: 0.9em;
  background: rgba(51, 255, 102, 0.06);
  padding: 0.15em 0.4em;
  border: 1px solid var(--text-faint);
  border-radius: 2px;
  color: var(--text-bright);
}

.post-body pre {
  background: rgba(0, 0, 0, 0.4);
  padding: 1.2rem;
  border: 1px solid var(--text-faint);
  border-radius: 2px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.post-body a {
  color: var(--text-bright);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-dim);
}

.post-body a:hover {
  border-style: solid;
  text-shadow: 0 0 8px var(--glow);
}

/* ── Post Nav ── */

.post-nav {
  padding: 0 0 2rem;
  font-size: 0.9rem;
}

.post-nav a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--text-faint);
}

.post-nav a:hover {
  color: var(--text-bright);
  border-color: var(--text-dim);
}

/* ── Footer ── */

footer {
  padding: 2rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 2rem;
  margin: 1rem 0 1.5rem;
}

.footer-grid p {
  font-size: 0.65rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.8;
}

.footer-link-wrap {
  margin-top: 1rem;
}

.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  border-bottom: 1px dashed var(--text-faint);
}

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

/* ── Responsive ── */

@media (max-width: 600px) {
  html {
    font-size: 14px;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .post-header h1 {
    font-size: 1.3rem;
  }

  .ascii-header {
    font-size: 0.6rem;
  }
}

/* ── Loader ── */

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loader-symbol {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-letter {
  font-family: var(--font);
  font-size: 10rem;
  font-weight: 700;
  color: var(--text-bright);
  text-shadow:
    0 0 40px rgba(51, 255, 102, 0.5),
    0 0 80px rgba(51, 255, 102, 0.25),
    0 0 120px rgba(51, 255, 102, 0.1);
  line-height: 1;
  animation: pulse 1.5s ease-in-out infinite;
}

.loader-text {
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.25em;
  margin-top: 2.5rem;
  height: 1.5em;
}

@keyframes pulse {
  0%, 100% {
    text-shadow:
      0 0 40px rgba(51, 255, 102, 0.5),
      0 0 80px rgba(51, 255, 102, 0.25),
      0 0 120px rgba(51, 255, 102, 0.1);
  }
  50% {
    text-shadow:
      0 0 60px rgba(51, 255, 102, 0.7),
      0 0 100px rgba(51, 255, 102, 0.4),
      0 0 160px rgba(51, 255, 102, 0.15);
  }
}


/* ── Load animation ── */

@keyframes typeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.home-intro {
  animation: typeIn 0.4s ease both;
}

.posts {
  animation: typeIn 0.4s ease 0.1s both;
}

.post-header {
  animation: typeIn 0.4s ease both;
}

.post-body {
  animation: typeIn 0.4s ease 0.08s both;
}
