:root {
  --paper: #f7f7f4;
  --ink: #181816;
  --muted: #6c6c65;
  --line: #deded7;
  --soft: #ecece6;
  --accent: #315c48;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #cfddd5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(222, 222, 215, 0.85);
  background: rgba(247, 247, 244, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-nav {
  width: min(100% - 40px, 960px);
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-mark {
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-links a:hover,
.site-links a[aria-current="page"] {
  color: var(--ink);
}

.page-shell {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
  flex: 1;
}

.hero {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: clamp(40px, 7vw, 72px);
  padding: 68px 0;
  border-bottom: 1px solid var(--line);
}

.hero-copy-block {
  max-width: 500px;
  color: #45453f;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-copy-block p {
  margin: 0 0 20px;
  color: inherit;
  font: inherit;
}

.hero-copy-block p:last-child {
  margin-bottom: 0;
}

.hero-copy-block a,
.hero-copy-block a:hover {
  color: inherit;
  font: inherit;
  text-decoration: none;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 3px;
  object-fit: contain;
  filter: saturate(0.88) contrast(1.03);
}

.content-section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.writing-section {
  padding-bottom: 24px;
  border-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.page-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.45rem);
  font-weight: 550;
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.section-link:hover {
  color: var(--ink);
}

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

.post-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 68px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding 180ms ease, color 180ms ease;
}

.post-row:hover {
  padding-left: 10px;
  color: var(--accent);
}

.post-row h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 540;
  letter-spacing: -0.01em;
}

.post-row time,
.post-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

#homePhotosGrid {
  gap: 10px !important;
}

#homePhotosGrid a {
  overflow: hidden;
  border-radius: 3px;
  background: var(--soft);
}

#homePhotosGrid img {
  height: 310px !important;
  border-radius: 3px !important;
  box-shadow: none !important;
  filter: saturate(0.9);
  transition: transform 350ms ease, filter 350ms ease;
}

#homePhotosGrid a:hover img {
  transform: scale(1.015);
  filter: saturate(1);
}

.standard-page {
  padding: 76px 0 96px;
}

#categoryList {
  margin-top: 36px !important;
  border-top: 1px solid var(--line);
}

.standard-page > .post-list {
  margin-top: 36px;
}

#categoryList button {
  min-height: 66px;
  padding: 14px 2px !important;
  border-bottom: 1px solid var(--line);
  border-radius: 0 !important;
  color: var(--ink);
  transition: padding 180ms ease, color 180ms ease !important;
}

#categoryList button::after {
  content: "↗";
  color: var(--muted);
}

#categoryList button:hover {
  padding-left: 10px !important;
  background: transparent !important;
  color: var(--accent);
}

.gallery {
  column-gap: 10px !important;
}

.gallery-item {
  margin-bottom: 10px !important;
}

.gallery-img {
  border-radius: 3px !important;
  filter: saturate(0.92);
}

.lightbox {
  background: rgba(18, 18, 16, 0.9) !important;
  backdrop-filter: blur(8px);
}

.site-footer {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
  padding: 28px 0 36px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

.article-shell {
  width: min(100% - 40px, 720px);
  margin: 0 auto;
  padding: 54px 0 96px;
}

.article-back {
  display: inline-block;
  margin-bottom: 70px;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
  font-weight: 600;
  text-decoration: none;
}

.article-back:hover {
  color: var(--ink) !important;
}

.article-header {
  margin-bottom: 64px !important;
  text-align: left !important;
}

.article-header h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.7rem) !important;
  font-weight: 550 !important;
  letter-spacing: -0.055em;
  line-height: 1;
}

.article-header p {
  margin-top: 20px !important;
  color: var(--muted) !important;
  font-size: 0.82rem !important;
}

.article-body {
  color: #33332f;
  font-size: 1.04rem;
  line-height: 1.82;
}

.article-body p {
  margin: 0 0 1.45em;
}

.article-body figure,
.article-body > div {
  margin-top: 34px !important;
  margin-bottom: 34px !important;
}

.article-body img {
  border-radius: 3px !important;
  box-shadow: none !important;
}

@media (max-width: 700px) {
  .site-nav,
  .page-shell,
  .site-footer,
  .article-shell {
    width: min(100% - 32px, 960px);
  }

  .site-links {
    gap: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    min-height: auto;
    padding: 64px 0;
  }

  .hero-image {
    aspect-ratio: auto;
  }

  .content-section,
  .standard-page {
    padding: 58px 0;
  }

  .writing-section {
    padding-bottom: 20px;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  #homePhotosGrid img {
    height: 250px !important;
  }

  .article-back {
    margin-bottom: 48px;
  }

  .article-header {
    margin-bottom: 44px !important;
  }

  .article-body .flex {
    gap: 10px;
  }

  .article-body img.w-1\/2 {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
