:root {
  --bg-color: #ffffff;
  --text-color: #111111;
  --text-muted: #666666;
  --code-bg: #f5f5f5;
  --border-color: #eeeeee;

  /* The Obsession Accent */
  --accent: #7c3aed;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #000000; /* True black for terminal vibe */
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --code-bg: #111111;
    --border-color: #333333;

    /* Dark Mode Accent */
    --accent: #a78bfa;
  }
}

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

html { font-size: 16px; }

::selection {
  background-color: var(--accent);
  color: #ffffff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-color);
  background: var(--bg-color);
  padding: 2rem 1.5rem;
  max-width: 44rem;
  margin: 0 auto;
}

h1, h2, h3 {
  color: var(--text-color);
  font-weight: 700;
}

h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 1.5rem; }
h2 { font-size: 1.5rem; line-height: 1.3; margin-top: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin-top: 2rem; margin-bottom: 0.75rem; }

p { margin-bottom: 1.5rem; }

a {
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

header { margin-bottom: 4rem; }
header h1 { margin-bottom: 1rem; }
header h1 a { border-bottom: none; }

/* Navigation & Terminal Vibe */
nav { margin-top: 0.5rem; font-size: 1rem; display: flex; gap: 1.5rem; }
nav a { border-bottom: none; position: relative; }
nav a:hover { border-bottom: none; color: var(--accent); }

/* Active Tab Highlight with Terminal Cursor */
nav a.active {
  color: var(--accent);
  font-weight: 600;
}
nav a.active::before {
  content: ">_";
  position: absolute;
  left: -1.2rem;
  font-family: ui-monospace, "SF Mono", Monaco, monospace;
  font-weight: bold;
  animation: blink 1s step-end infinite;
}

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

main { margin-bottom: 4rem; }

footer {
  margin-top: 6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
}
footer a { color: var(--text-muted); margin-left: 1rem; border-bottom: none; }
footer a:first-of-type { margin-left: 0; }
footer a:hover { color: var(--accent); }

ul, ol { margin-bottom: 1.5rem; margin-left: 1.5rem; }
li { margin-bottom: 0.75rem; }

pre {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

code { font-family: ui-monospace, "SF Mono", Monaco, "Cascadia Code", Menlo, Consolas, monospace; }

p code {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.875em;
}

blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--accent);
  color: var(--text-muted);
  font-style: italic;
}

.post-list { list-style: none; margin-left: 0; margin-top: 2rem; }
.post-list li { margin-bottom: 2.5rem; }
.post-list li:last-child { margin-bottom: 0; }
.post-item a { text-decoration: none; border-bottom: none; display: block; }
.post-item a:hover h2 { color: var(--accent); }
.post-date { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.25rem; font-weight: 400; font-family: ui-monospace, monospace; }
.post-item h2 { font-size: 1.4rem; margin: 0; font-weight: 600; color: var(--text-color); transition: color 0.2s ease; }

article h1 { margin-bottom: 0.5rem; }
article .post-date { margin-bottom: 2rem; }

@media (max-width: 640px) {
  body { padding: 1.5rem 1.5rem; }
  nav a.active::before { left: -1rem; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
}
