/* Built for One — Global Styles */

:root {
  --bg: #0a0a0a;
  --bg-surface: #111111;
  --text: #e8e8e8;
  --text-muted: #bbb;
  --accent: #00ff41;
  --accent-dim: #00882a;
  --accent-glow: rgba(0, 255, 65, 0.12);
  --border: #1e1e1e;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  --max-width: 680px;
  --line-height: 1.75;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: var(--line-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Layout */
header, main, footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Nav */
header {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-name {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  color: var(--accent);
  letter-spacing: -0.02em;
  text-shadow: 0 0 12px var(--accent-glow);
}

.site-name:hover {
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Main content */
main {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Footer */
footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

footer .buddy {
  color: var(--accent);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-dim);
}

a:hover {
  text-decoration-color: var(--accent);
}

/* Post list */
.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.post-list-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 2.5rem;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-item .post-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.post-type--series { color: var(--accent); }
.post-type--quicktake { color: #f7a26a; }

.post-list-item h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.post-list-item h2 a {
  color: var(--text);
  text-decoration: none;
}

.post-list-item h2 a:hover {
  color: var(--accent);
}

.post-list-item .post-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.post-list-item .post-description {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Post article */
.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.post-header .post-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.post-header h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-top: 0.5rem;
}

.post-header time {
  display: block;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.75rem;
}

.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.tag {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}

/* Post body typography */
.post-body {
  font-size: 1rem;
  line-height: var(--line-height);
}

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

.post-body h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-body h2::before {
  content: '## ';
  opacity: 0.4;
}

.post-body h3 {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.post-body h3::before {
  content: '### ';
  opacity: 0.4;
}

.post-body ul, .post-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-body pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Buddy annotations */
.post-body blockquote {
  border-left: 2px solid var(--accent-dim);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  background: var(--accent-glow);
  border-radius: 0 4px 4px 0;
}

.post-body blockquote p {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0;
}

.post-body blockquote strong {
  display: block;
  font-family: var(--font-mono);
  color: var(--accent);
  font-style: normal;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* Home page */
.home-hero {
  margin-bottom: 4rem;
}

.home-hero h1 {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(0, 255, 65, 0.2);
}

.home-hero p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .post-header h1 { font-size: 1.6rem; }
  .home-hero h1 { font-size: 1.6rem; }
}
