@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Newsreader:ital,wght@0,400;0,500;1,400&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  background-color: #faf9f7;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Layout ── */

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

/* ── Homepage: header ── */

.site-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 4px;
}

.site-header-text {
  flex: 1;
}

.site-name {
  font-family: 'Newsreader', serif;
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 12px;
  line-height: 1.2;
}

.site-meta {
  font-size: 14px;
  color: #4a4540;
  margin: 0 0 4px;
  line-height: 1.5;
}

.bio {
  margin: 16px 0 20px;
  font-size: 15px;
  color: #4a4540;
  line-height: 1.65;
}

.social-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.social-links a {
  color: #4a4540;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.social-links a:hover {
  color: #1a1a1a;
}

/* ── Divider ── */

.divider {
  border: none;
  border-top: 1px solid #e8e4df;
  margin: 36px 0;
}

/* ── Writing section ── */

.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a09890;
  margin: 0 0 20px;
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid #e8e4df;
}

.post-item:first-child {
  border-top: 1px solid #e8e4df;
}

.post-date {
  font-size: 13px;
  color: #a09890;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
  white-space: nowrap;
}

.post-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.post-title {
  font-size: 15px;
  color: #1a1a1a;
  font-weight: 400;
}

.post-item a {
  text-decoration: none;
}

.post-item a:hover .post-title {
  color: #4a4540;
  text-decoration: none;
}

.post-description {
  font-size: 13px;
  color: #a09890;
  line-height: 1.5;
}

/* ── Post page ── */

.back-link {
  display: inline-block;
  font-size: 13px;
  color: #a09890;
  margin-bottom: 40px;
  text-decoration: none;
}

.back-link:hover {
  color: #1a1a1a;
  text-decoration: none;
}

.post-header {
  margin-bottom: 36px;
}

.post-header h1 {
  font-family: 'Newsreader', serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 12px;
}

.post-byline {
  font-size: 13px;
  color: #a09890;
  display: flex;
  gap: 12px;
}

/* ── Prose ── */

.prose {
  font-size: 16px;
  line-height: 1.75;
  color: #1a1a1a;
}

.prose p {
  margin: 0 0 1.4em;
}

.prose h2 {
  font-family: 'Newsreader', serif;
  font-size: 22px;
  font-weight: 400;
  margin: 2em 0 0.6em;
  line-height: 1.3;
}

.prose h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 1.8em 0 0.5em;
  line-height: 1.4;
  color: #1a1a1a;
}

.prose ul,
.prose ol {
  margin: 0 0 1.4em;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 20px;
  border-left: 2px solid #e8e4df;
  color: #4a4540;
  font-style: italic;
}

.prose blockquote p {
  margin: 0;
}

.prose code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Courier New', monospace;
  font-size: 0.875em;
  background: #f4f2ee;
  padding: 0.15em 0.35em;
  border-radius: 3px;
}

.prose pre {
  background: #f4f2ee;
  border: 1px solid #e8e4df;
  border-radius: 4px;
  padding: 20px;
  overflow-x: auto;
  margin: 0 0 1.6em;
}

.prose pre code {
  background: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
}

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.8em 0;
  border-radius: 4px;
  border: 1px solid #e8e4df;
}

.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #4a4540;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .container {
    padding: 40px 20px 72px;
  }

  .post-item {
    grid-template-columns: 80px 1fr;
    gap: 12px;
  }
}
