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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #3dd68c;
  --accent-dim: rgba(61, 214, 140, 0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

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

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

/* ── Nav ── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { font-weight: 600; font-size: 0.95rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.nav-brand:hover { color: var(--accent); transition: color 0.2s; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* ── Main ── */
main { flex: 1; }

/* ── Hero ── */
.hero { padding: 5rem 0 3.5rem; border-bottom: 1px solid var(--border); }
.hero-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(61, 214, 140, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin-bottom: 2rem; }
.hero-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1.1rem; border-radius: 6px;
  font-size: 0.875rem; font-weight: 500; text-decoration: none;
  transition: all 0.18s; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #0d1117; }
.btn-primary:hover { background: #4ade80; transform: translateY(-1px); }
.btn-secondary { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-secondary:hover { border-color: var(--muted); transform: translateY(-1px); }

/* ── Sections ── */
.section { padding: 3rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.section-title { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.view-all { color: var(--accent); text-decoration: none; font-size: 0.875rem; transition: opacity 0.2s; }
.view-all:hover { opacity: 0.7; }

/* ── Post list ── */
.posts-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--border); gap: 1px;
}
.post-card {
  background: var(--bg); padding: 1.4rem 1.5rem;
  text-decoration: none; display: block; transition: background 0.15s;
}
.post-card:hover { background: var(--surface); }
.post-card-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.post-date { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.post-tag {
  font-size: 0.72rem; color: var(--accent); background: var(--accent-dim);
  border: 1px solid rgba(61, 214, 140, 0.12);
  padding: 0.1rem 0.45rem; border-radius: 9999px;
}
.post-card h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; line-height: 1.3; }
.post-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.5; }

/* ── Page header ── */
.page-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.page-header h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; }
.page-header p { color: var(--muted); margin-top: 0.5rem; font-size: 0.95rem; }

/* ── Post page ── */
.post-content { padding: 3rem 0; }
.post-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.post-header h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.03em; margin: 0.75rem 0 1rem; line-height: 1.2; }
.post-meta { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.post-body { color: var(--text); }
.post-body h2 { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; margin: 2.25rem 0 0.875rem; }
.post-body h3 { font-size: 1.125rem; font-weight: 600; margin: 1.75rem 0 0.75rem; }
.post-body p { margin-bottom: 1.25rem; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body a:hover { opacity: 0.8; }
.post-body code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--surface-2); padding: 0.15em 0.4em; border-radius: 4px;
}
.post-body pre {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem; overflow-x: auto; margin-bottom: 1.25rem;
}
.post-body pre code { background: none; padding: 0; font-size: 0.875rem; line-height: 1.65; }
.post-body ul, .post-body ol { margin-bottom: 1.25rem; padding-left: 1.75rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote {
  border-left: 3px solid var(--accent); padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--muted); font-style: italic; margin-bottom: 1.25rem;
}
.post-body hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── About ── */
.about-page { padding: 3.5rem 0; }
.about-page h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 0.4rem; }
.about-role { color: var(--accent); font-family: var(--mono); font-size: 0.875rem; margin-bottom: 2rem; }
.about-page p { color: var(--muted); margin-bottom: 1.25rem; max-width: 600px; line-height: 1.75; }
.about-page h2 { font-size: 1.1rem; font-weight: 600; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--text); }
.skills-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.skill-badge {
  font-family: var(--mono); font-size: 0.775rem;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  padding: 0.275rem 0.7rem; border-radius: 4px;
  transition: border-color 0.15s, color 0.15s;
}
.skill-badge:hover { border-color: var(--muted); color: var(--text); }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 2rem 0; }
footer p { font-size: 0.85rem; color: var(--muted); }

/* ── Utilities ── */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--mono); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.875rem; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .nav-links { gap: 1.25rem; }
  .page-header h1 { font-size: 1.625rem; }
  .post-header h1 { font-size: 1.5rem; }
}
