@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0b;
  --bg-card: #111113;
  --bg-code: #0d0d10;
  --fg: #e4e4e7;
  --fg-dim: #8b8b94;
  --fg-muted: #56565e;
  --accent: #7c8aff;
  --accent-dim: #4a5299;
  --border: #1e1e22;
  --border-hover: #2a2a30;
  --code-inline: #c9d1d9;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection {
  background: var(--accent-dim);
  color: var(--fg);
}

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

a:hover {
  color: var(--fg);
}

.container {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 11, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.site-title:hover {
  color: var(--fg);
  opacity: 0.7;
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  font-size: 0.85rem;
  color: var(--fg-dim);
  margin-left: 1.5rem;
  transition: color 0.2s ease;
}

nav a:hover {
  color: var(--fg);
}

main {
  flex: 1;
  padding: 3rem 0;
  animation: fadeIn 0.3s ease-out;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2.75rem;
  margin-bottom: 1rem;
  color: var(--fg);
}

h2::before {
  content: '> ';
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

p {
  margin-bottom: 1.25rem;
  color: var(--fg);
}

.post-meta {
  font-size: 0.82rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}

code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  background: var(--bg-code);
  color: var(--code-inline);
  padding: 0.15em 0.4em;
  border: 1px solid var(--border);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  line-height: 1.6;
  transition: border-color 0.3s ease;
}

pre:hover {
  border-color: var(--accent-dim);
  border-left-color: var(--accent);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  color: var(--code-inline);
}

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

.post-list li {
  padding: 1.5rem 1rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: all 0.25s ease;
  border-left: 2px solid transparent;
  margin-left: -1rem;
}

.post-list li:hover {
  border-color: var(--border-hover);
  border-left-color: var(--accent-dim);
  padding-left: 1.25rem;
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list a {
  color: var(--fg);
  font-weight: 500;
  display: block;
  transition: color 0.2s ease;
}

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

.post-list .post-date {
  font-size: 0.78rem;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.3rem;
  letter-spacing: -0.01em;
}

.post-list .post-excerpt {
  font-size: 0.88rem;
  color: var(--fg-dim);
  margin-top: 0.4rem;
  line-height: 1.55;
}

.hero {
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 1.1rem;
  color: var(--fg-dim);
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.hero p {
  font-size: 0.9rem;
  color: var(--fg-muted);
  margin-bottom: 0;
  font-style: italic;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg);
}

footer p {
  font-size: 0.78rem;
  color: var(--fg-muted);
  text-align: center;
  margin-bottom: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}

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

li {
  margin-bottom: 0.4rem;
}

article ul li {
  list-style-type: none;
  position: relative;
  padding-left: 0.5rem;
}

article ul li::before {
  content: '—';
  position: absolute;
  left: -1.25rem;
  color: var(--fg-muted);
}

strong {
  font-weight: 600;
  color: var(--fg);
}

article {
  max-width: 100%;
}

.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 2rem;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
  transform: translateX(-2px);
}

blockquote {
  border-left: 2px solid var(--accent-dim);
  padding-left: 1.25rem;
  margin-bottom: 1.25rem;
  color: var(--fg-dim);
  font-style: italic;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fg-muted);
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .container {
    padding: 0 1.25rem;
  }

  header {
    padding: 1rem 0;
  }

  header .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  nav {
    width: 100%;
    justify-content: flex-start;
  }

  nav a {
    margin-left: 0;
    margin-right: 1.25rem;
  }

  main {
    padding: 2rem 0;
  }

  pre {
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
  }

  .hero {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
    margin-top: 2rem;
  }

  .post-list li {
    padding: 1.25rem 0.75rem;
    margin-left: -0.75rem;
  }

  .post-list li:hover {
    padding-left: 1rem;
  }

  pre {
    padding: 0.875rem 1rem;
    font-size: 0.8rem;
  }

  code {
    font-size: 0.82rem;
  }
}
