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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
}

a {
  color: #2563eb;
  text-decoration: underline;
}

a:hover {
  color: #1d4ed8;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-main {
  padding: 2.5rem 0 4rem;
}

/* ===========================
   Header & Nav
   =========================== */
.site-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0;
}

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

.site-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-title:hover {
  color: #2563eb;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9rem;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: #1a1a1a;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #6b7280;
}

.site-footer a:hover {
  color: #1a1a1a;
}

/* ===========================
   Home Page
   =========================== */
.hero {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 2.5rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
}

.hero-tagline {
  font-size: 1.125rem;
  color: #4b5563;
  margin: 0;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.view-all {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.view-all:hover {
  text-decoration: underline;
}

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

.post-item {
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.post-item:first-child {
  padding-top: 0;
}

.post-item-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.post-item-link:hover .post-item-title {
  color: #2563eb;
}

.post-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
}

.post-item-date {
  font-size: 0.8rem;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

.post-item-description {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

/* ===========================
   List Page
   =========================== */
.list-page {
}

.list-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.list-description {
  color: #6b7280;
  margin: 0 0 2rem;
  font-size: 1rem;
}

/* ===========================
   Single Post
   =========================== */
.post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.post-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  color: #1a1a1a;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background-color: #f3f4f6;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
}

.tag:hover {
  background-color: #e5e7eb;
  color: #1a1a1a;
}

/* ===========================
   Post Content (Prose)
   =========================== */
.post-content {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #1f2937;
}

.post-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  color: #1a1a1a;
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
  color: #1a1a1a;
}

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

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

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

.post-content blockquote {
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 4px solid #2563eb;
  background-color: #eff6ff;
  color: #1e40af;
  border-radius: 0 0.25rem 0.25rem 0;
}

.post-content blockquote p {
  margin: 0;
}

.post-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background-color: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 0.2em;
  color: #1a1a1a;
}

.post-content pre {
  margin: 1.5rem 0;
  padding: 1.25rem;
  background-color: #1e1e2e;
  border-radius: 0.5rem;
  overflow-x: auto;
}

.post-content pre code {
  background-color: transparent;
  padding: 0;
  font-size: 0.875rem;
  color: #cdd6f4;
  line-height: 1.6;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.post-content th,
.post-content td {
  padding: 0.6rem 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.post-content th {
  background-color: #f9fafb;
  font-weight: 600;
}

.post-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 600px) {
  .hero-title {
    font-size: 1.75rem;
  }

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

  .site-nav {
    gap: 1rem;
  }

  .post-item-link {
    flex-direction: column;
    gap: 0.2rem;
  }
}
