:root {
  --bg: #0a0a0a;
  --bg-card: #111114;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent-blue: #2b7fff;
  --accent-cyan: #44d9e8;
  --gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
  --border: #1e1e24;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-width: 740px;
}

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

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

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

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ── Header ── */

header {
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}

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

.logo {
  height: 32px;
  width: auto;
}

.site-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}

.site-name .sep {
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 0.1em;
}

.site-name .dev {
  font-weight: 300;
  color: var(--text-muted);
  font-size: 0.9em;
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* ── Main ── */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */

.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}

.hero-logo {
  width: 120px;
  height: auto;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.hero h1 .sep {
  color: var(--text-muted);
  font-weight: 300;
  margin: 0 0.05em;
}

.hero h1 .dev {
  font-weight: 300;
  color: var(--text-muted);
}

.tagline {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── About ── */

.about {
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--border);
}

.about > p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
}

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.service {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.service-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.service h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.service p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.contact {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Post List ── */

.recent-posts,
.blog-list {
  padding: 2rem 0 4rem;
}

.recent-posts h2,
.blog-list h1 {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.month-group {
  margin-top: 1.5rem;
}

.month-heading {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  cursor: pointer;
  padding: 0.5rem 0;
  list-style: none;
  user-select: none;
}

.month-heading::-webkit-details-marker {
  display: none;
}

.month-heading::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  transition: transform 0.2s;
  font-size: 0.75rem;
}

details[open] > .month-heading::before {
  transform: rotate(90deg);
}

.month-group .post-list {
  margin-top: 0.25rem;
}

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

.post-list li {
  border-bottom: 1px solid var(--border);
}

.post-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  color: var(--text);
  transition: color 0.2s;
}

.post-list li a:hover {
  color: var(--accent-cyan);
}

.post-title {
  font-weight: 400;
}

.post-list time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 1rem;
}

.post-desc {
  padding: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.view-all {
  display: inline-block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ── Single Post ── */

.post {
  padding: 3rem 0 4rem;
}

.post-header {
  margin-bottom: 2.5rem;
}

.post-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.tag {
  color: var(--accent-blue);
  font-size: 0.8rem;
}

.tag:hover {
  color: var(--accent-cyan);
}

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.25rem 1.5rem;
}

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

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border);
}

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

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.post-content blockquote {
  border-left: 2px solid var(--accent-blue);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.post-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.post-nav .next {
  margin-left: auto;
}

/* ── Footer ── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .post-list li a {
    flex-direction: column;
    gap: 0.25rem;
  }

  .post-list time {
    margin-left: 0;
  }

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