:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #ffffff;
  --text: #20201d;
  --muted: #696760;
  --line: #e8e3d8;
  --accent: #1f6f68;
  --accent-soft: #e8f0ec;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header,
.site-footer,
main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover,
.post a:hover,
.site-footer a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 80px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0;
}

.intro {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-image {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.post-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.post {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.post time {
  color: var(--muted);
  font-size: 14px;
}

.post p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.post div {
  min-width: 0;
}

.empty-post code {
  font-size: 0.94em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.about {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
}

.about p:last-child {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.article-page {
  max-width: 760px;
  padding: 64px 0 72px;
}

.article-head {
  padding-bottom: 28px;
}

.article-head h1 {
  margin-bottom: 18px;
  font-size: clamp(36px, 6vw, 62px);
}

.article-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.article-body {
  color: var(--text);
  font-size: 18px;
}

.article-body h2,
.article-body h3,
.article-body h4 {
  margin: 34px 0 12px;
  line-height: 1.3;
}

.article-body p,
.article-body ul,
.article-body blockquote,
.article-body pre {
  margin-bottom: 20px;
}

.article-body ul {
  padding-left: 1.35em;
}

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

.article-body img {
  height: auto;
  margin: 24px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-body blockquote {
  margin-left: 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.article-body code {
  padding: 0.12em 0.32em;
  border-radius: 4px;
  background: var(--accent-soft);
  font-size: 0.92em;
}

.article-body pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

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

@media (max-width: 820px) {
  .site-header,
  .site-footer,
  main {
    width: min(100% - 28px, var(--max));
  }

  .site-header {
    min-height: 68px;
  }

  .nav {
    gap: 14px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 0 56px;
  }

  .hero-image {
    aspect-ratio: 16 / 10;
  }

  .post,
  .about {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}
