:root {
  --bg: #0f0f12;
  --card: #16161b;
  --text: #e8e8f0;
  --muted: #a3a3b2;
  --accent: #6ea8fe;
}

* {
  box-sizing: border-box;
}

html, body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.site-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.post-card {
  background: var(--card);
  border: 1px solid #23232a;
  padding: 1rem;
  border-radius: 12px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.post-card:hover {
  transform: translateY(-1px);
  border-color: #2c2c35;
  background: #1b1b22;
}

.post-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.post-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.post-content {
  background: var(--card);
  border: 1px solid #23232a;
  padding: 1.25rem;
  border-radius: 12px;
}

.post-content h1, .post-content h2, .post-content h3 {
  margin-top: 1.5rem;
}

.post-content pre, .post-content code {
  background: #1d1d24;
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
}

.footer {
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid #23232a;
  padding-top: 1.5rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 1rem;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 800px;
  background: var(--card);
  border: 1px solid #2a2a33;
  border-radius: 12px;
  padding: 1rem;
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}