/* CSS Variables - steipete.me inspired */
:root {
  --background: #fdfdfd;
  --foreground: #282728;
  --accent: #006cac;
  --muted: #e6e6e6;
  --border: #ece9e9;
  --text-muted: #666;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #212737;
    --foreground: #eaedf3;
    --accent: #ff6b01;
    --muted: #343f60bf;
    --border: #3a4563;
    --text-muted: #9ca3af;
  }
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--foreground);
  background-color: var(--background);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

/* Navigation */
.site-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 400;
  padding: 0.25rem 0;
  transition: color 0.15s ease;
}

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

.nav-link.active {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 4px;
}


/* Hero */
.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.hero-text h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

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

.hero-text h1 a:hover {
  text-decoration: underline;
}

.tagline {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Section titles */
.section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  margin-bottom: 1rem;
}

.post-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding: 1rem;
  margin: -1rem;
  border-radius: 8px;
  transition: background-color 0.15s ease;
}

.post-link:hover {
  background-color: var(--muted);
}

.post-title {
  color: var(--foreground);
  font-weight: 600;
  font-size: 1.1rem;
}

.post-link:hover .post-title {
  color: var(--accent);
}

.post-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.reading-time::before {
  content: '·';
  margin-right: 0.5rem;
}

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

.post-header .post-title {
  font-size: 2rem;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.post-header .post-meta {
  margin-top: 0;
}

/* Post content */
.post-content {
  margin-bottom: 3rem;
}

.post-content h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-content h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

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

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-style: wavy;
}

.post-content ul, .post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

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

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

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

/* Code blocks */
.post-content code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
  font-size: 0.875em;
  background-color: var(--muted);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.post-content pre {
  background-color: var(--muted);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Post navigation */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.post-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.post-nav a:hover {
  text-decoration: underline;
}

.nav-prev {
  margin-right: auto;
}

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

/* Page layout */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  margin: 0;
}

.page-content a {
  color: var(--accent);
}

.page-content ul {
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

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

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .hero {
    flex-direction: column;
    text-align: center;
  }

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

  .post-nav {
    flex-direction: column;
  }

  .nav-next {
    margin-left: 0;
  }
}

/* Syntax highlighting */
.highlight {
  background-color: var(--muted);
  border-radius: 8px;
  margin: 1.5rem 0;
}

.highlight pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
}
