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

:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-soft: #f1ece4;
  --border: #ddd5ca;
  --text: #23313a;
  --muted: #66757e;
  --accent: #51758a;
  --accent-strong: #3f6277;
  --shadow: 0 12px 30px rgba(35, 49, 58, 0.06);
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

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

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

.site-shell,
.home-view,
.article-view,
.page-view {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(246, 243, 238, 0.94);
}

.site-header .site-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-name {
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a,
.site-footer p,
.footer-links a,
.post-date,
.post-tag,
.read-time,
.back-btn {
  font-size: 0.82rem;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.footer-links a:hover,
.footer-links a:focus-visible,
.back-btn:hover,
.back-btn:focus-visible,
.article-body a:hover,
.article-body a:focus-visible,
.page-body a:hover,
.page-body a:focus-visible {
  color: var(--accent-strong);
}

.site-main {
  min-height: calc(100vh - 150px);
}

.home-view {
  padding: 1.5rem 0 4rem;
}

.article-title {
  font-family: "Playfair Display", serif;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--text);
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading h2,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  font-family: "Playfair Display", serif;
  line-height: 1.2;
  color: var(--text);
}

.section-heading h2 {
  font-size: 1.45rem;
}

.article-subtitle,
.post-excerpt,
.page-body p,
.page-body li,
.article-body p,
.article-body li {
  color: var(--muted);
}

.posts-list {
  display: grid;
  gap: 1rem;
}

.post-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.post-card:hover,
.post-card:focus-visible {
  border-color: var(--accent);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.post-tag {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-soft);
}

.read-time {
  margin-left: auto;
}

.post-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.25;
  margin-bottom: 0.55rem;
}

.post-excerpt {
  font-size: 0.96rem;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 600;
}

.article-view,
.page-view {
  padding: 3rem 0 4rem;
}

.back-btn {
  display: inline-block;
  margin-bottom: 1.5rem;
}

.article-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  margin-top: 0.35rem;
}

.article-subtitle {
  max-width: 680px;
  margin-top: 0.9rem;
  font-size: 1rem;
}

.article-body,
.page-body {
  font-size: 1.03rem;
}

.article-body > * + *,
.page-body > * + * {
  margin-top: 1.25rem;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin-top: 2.4rem;
}

.article-body h2 {
  font-size: 1.8rem;
}

.article-body h3 {
  font-size: 1.45rem;
}

.article-body a,
.page-body a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol,
.page-body ul,
.page-body ol {
  padding-left: 1.4rem;
}

.article-body img,
.page-body img {
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.article-body blockquote,
.page-body blockquote {
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.article-body code,
.page-body code {
  font-family: "DM Mono", monospace;
  font-size: 0.88rem;
  padding: 0.12rem 0.32rem;
  border-radius: 6px;
  background: var(--surface-soft);
}

.article-body pre,
.page-body pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.article-body pre code,
.page-body pre code {
  padding: 0;
  background: transparent;
}

.comments-wrap {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
}

.site-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .home-view {
    padding-top: 1.5rem;
  }

  .site-header .site-shell {
    align-items: flex-start;
    padding: 1rem 0;
  }

  .site-nav {
    gap: 0.75rem;
  }

  .post-card {
    padding: 1.15rem;
  }

  .read-time {
    width: 100%;
    margin-left: 0;
  }
}
