/* === Base === */
:root {
  --bg: #0a0f1a;
  --bg-card: #111827;
  --bg-card-hover: #1a2332;
  --text: #e2e8f0;
  --text-muted: #8892a4;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.15);
  --border: #1e293b;
  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* === Nav === */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  max-width: 960px;
  margin: 0 auto;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo:hover { text-decoration: none; color: var(--accent); }

.logo-icon {
  color: var(--accent);
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--accent); text-decoration: none; }

/* === Main === */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* === Home === */
.hero {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
}
.hero .highlight { color: var(--accent); }

.post-list { list-style: none; }

.post-list-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  transition: background 0.2s, border-color 0.2s;
}
.post-list-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}
.post-list-item a {
  color: var(--text);
  display: block;
}
.post-list-item a:hover { text-decoration: none; }

.post-list-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
  margin-bottom: 0.5rem;
}
.post-list-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.post-list-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* === Post === */
.post-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.post-date {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.75rem;
}
.post-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}
.post-summary {
  font-size: 1.1rem;
  color: var(--text-muted);
}
.post-tags {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}
.tag {
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 100px;
  font-family: var(--mono);
}

.post-content {
  font-size: 1.05rem;
}
.post-content h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.post-content h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
  color: var(--accent);
}
.post-content p {
  margin-bottom: 1.25rem;
}
.post-content ul, .post-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}
.post-content li {
  margin-bottom: 0.5rem;
}
.post-content code {
  font-family: var(--mono);
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}
.post-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.post-content pre code {
  background: none;
  padding: 0;
}
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}
.post-content strong { color: #fff; }
.post-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* === Post Nav === */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* === Footer === */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  max-width: 960px;
  margin: 4rem auto 0;
}

/* === Responsive === */
@media (max-width: 640px) {
  .nav { padding: 1rem; }
  .main { padding: 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .post-title { font-size: 1.5rem; }
  .post-list-title { font-size: 1.1rem; }
}
