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

/* Variables */
:root {
  --text: #111;
  --muted: #555;
  --accent: #0066cc;
  --border: #e0e0e0;
  --bg: #fff;
  --max-width: 680px;
}

/* Base */
html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

main {
  flex: 1;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

/* Header / Nav */
header {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

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

nav ul a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

/* Footer */
footer {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: 2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

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

a:hover {
  text-decoration: underline;
}

/* Home */
.home-intro {
  margin-bottom: 1.5rem;
}

.home-intro h1 {
  font-size: 2.25rem;
  margin-bottom: 0.2rem;
}

.home .tagline {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
}

.home .bio {
  max-width: 540px;
  margin-bottom: 1.75rem;
}

.home .bio p {
  color: #333;
  margin: 0;
}

/* Social links */
.social-links {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.social-links a {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.social-links a:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Home section cards */
.home-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.15s;
}

.section-card:hover {
  border-color: #999;
  text-decoration: none;
}

.section-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.section-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 480px) {
  .home-sections {
    grid-template-columns: 1fr;
  }
}

/* List pages */
.list h1 {
  margin-bottom: 2rem;
}

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

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

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

.post-list a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.15rem;
}

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

.post-list time {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.25rem;
}

.post-list p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.empty {
  color: var(--muted);
  margin-top: 1rem;
}

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

article h1 {
  margin-bottom: 0.4rem;
}

article time {
  font-size: 0.9rem;
  color: var(--muted);
}

.post-content h2 { margin-top: 2rem; margin-bottom: 0.75rem; }
.post-content h3 { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.post-content p { margin-bottom: 1.1rem; }
.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.post-content li { margin-bottom: 0.3rem; }
.post-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: #f5f5f5;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}
.post-content pre {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.post-content pre code {
  background: none;
  padding: 0;
}
.post-content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1.25rem 0;
}

/* Responsive */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .home h1 { font-size: 1.75rem; }
}
