:root {
  --bg: #f7f6f2;
  --paper: #ffffff;
  --text: #242424;
  --muted: #737373;
  --subtle: #a2a2a2;
  --line: #e5e1da;
  --line-strong: #d5d0c8;
  --shadow: 0 18px 50px rgba(35, 35, 35, 0.06);
  --shadow-strong: 0 26px 70px rgba(35, 35, 35, 0.09);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 209, 198, 0.34), transparent 28rem),
    var(--bg);
  font-family:
    ui-serif, "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  line-height: 1.8;
  animation: page-fade 520ms ease both;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  width: 26rem;
  height: 26rem;
  content: "";
  border-radius: 999px;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.32;
  transform: translate3d(0, 0, 0);
  animation: slow-drift 14s ease-in-out infinite alternate;
}

body::before {
  top: -10rem;
  right: -8rem;
  background: rgba(173, 184, 190, 0.36);
}

body::after {
  left: -10rem;
  bottom: 16rem;
  background: rgba(220, 207, 186, 0.42);
  animation-delay: -6s;
}

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

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(36, 36, 36, 0.06);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  padding: clamp(72px, 13vw, 150px) 0 clamp(64px, 10vw, 118px);
}

.hero::after {
  position: absolute;
  right: 10%;
  bottom: 24%;
  width: 9rem;
  height: 9rem;
  content: "";
  border: 1px solid rgba(36, 36, 36, 0.08);
  border-radius: 999px;
  opacity: 0.55;
  animation: small-float 9s ease-in-out infinite alternate;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--subtle);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(58px, 12vw, 118px);
  line-height: 1;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.subtitle {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 24px);
}

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

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

.section-head.simple {
  align-items: flex-start;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.search {
  display: grid;
  gap: 7px;
  min-width: min(320px, 100%);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(36, 36, 36, 0.04);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-card {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.article-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-strong);
}

.article-card time {
  color: var(--subtle);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.article-card h3 {
  margin: 28px 0 12px;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.article-card p {
  display: -webkit-box;
  margin-bottom: 22px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag {
  align-self: flex-start;
  margin-top: auto;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
}

.empty-state {
  margin: 24px 0 0;
  color: var(--muted);
}

.archive-list {
  display: grid;
  gap: 20px;
}

.archive-year {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.archive-year h3 {
  margin: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 500;
}

.archive-year ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-year li {
  color: var(--text);
}

.archive-year a {
  color: var(--text);
  transition: color 160ms ease, padding-left 160ms ease;
}

.archive-year a:hover {
  color: var(--muted);
  padding-left: 4px;
}

.about-card {
  max-width: 620px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.about-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 36px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.footer a:hover {
  color: var(--text);
}

.article-page {
  background:
    radial-gradient(circle at 85% 10%, rgba(214, 209, 198, 0.34), transparent 24rem),
    var(--bg);
}

.article-shell {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 62px;
}

.back-link,
.bottom-link {
  display: inline-flex;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover,
.bottom-link:hover {
  color: var(--text);
  transform: translateX(-2px);
}

.post {
  margin: 46px 0 34px;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
}

.post-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.post h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(38px, 8vw, 72px);
  letter-spacing: 0.04em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--subtle);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

.post-meta span {
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.post p {
  margin-bottom: 1.35em;
  color: #3f3f3f;
  font-size: 18px;
  line-height: 1.95;
}

.post p:last-child {
  margin-bottom: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 620ms ease, transform 620ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.article-grid [data-reveal]:nth-child(2n) {
  transition-delay: 60ms;
}

.article-grid [data-reveal]:nth-child(3n) {
  transition-delay: 110ms;
}

@keyframes page-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slow-drift {
  from {
    transform: translate3d(-8px, -4px, 0);
  }
  to {
    transform: translate3d(10px, 8px, 0);
  }
}

@keyframes small-float {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(8px, -10px, 0);
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .footer {
    width: min(100% - 24px, 980px);
  }

  .nav,
  .section-head,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

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

  .article-card {
    min-height: 220px;
  }

  .archive-year {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-shell {
    width: min(100% - 24px, 760px);
    padding-top: 24px;
  }

  .post {
    border-radius: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .article-card:hover {
    transform: none;
  }

  [data-reveal],
  [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  body,
  body::before,
  body::after,
  .hero::after {
    animation: none !important;
  }
}
