:root {
  --paper: #f4efe5;
  --paper-soft: #ebe4d7;
  --ink: #24211d;
  --ink-soft: #696157;
  --line: rgba(36, 33, 29, 0.16);
  --accent: #c35b38;
  --accent-soft: #e9c7b7;
  --card: rgba(255, 252, 246, 0.64);
  --shadow: 0 18px 60px rgba(62, 49, 34, 0.09);
}

html[data-theme="dark"] {
  --paper: #191917;
  --paper-soft: #22211e;
  --ink: #eee9df;
  --ink-soft: #aaa399;
  --line: rgba(238, 233, 223, 0.15);
  --accent: #ed8b68;
  --accent-soft: #533529;
  --card: rgba(36, 35, 31, 0.76);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 7%, var(--accent-soft) 0, transparent 24rem),
    var(--paper);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
  transition: color 180ms ease, background-color 180ms ease;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.06'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 14px;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 80px;
  gap: 36px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-style: italic;
}

.nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.9rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

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

.theme-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  min-height: 650px;
  padding-block: 90px;
  gap: 72px;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1,
.page-head h1,
.article-header h1,
.not-found h1 {
  margin: 0;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  font-weight: 650;
  line-height: 1.16;
  letter-spacing: -0.055em;
}

.hero h1 span {
  position: relative;
  color: var(--accent);
  font-style: italic;
}

.hero h1 span::after {
  position: absolute;
  right: 0;
  bottom: -0.1em;
  left: 0;
  height: 2px;
  content: "";
  background: currentColor;
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 34rem;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 38px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}

.button:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.text-link {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.88rem;
  text-decoration: none;
}

.text-link:hover {
  color: var(--accent);
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 440px;
  place-items: center;
}

.orbit {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit-one {
  width: 390px;
  height: 390px;
}

.orbit-two {
  width: 280px;
  height: 280px;
  border-style: dashed;
  animation: turn 45s linear infinite;
}

.art-note {
  display: flex;
  width: 205px;
  height: 265px;
  padding: 28px;
  flex-direction: column;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: rotate(5deg);
}

.art-note span {
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

.art-note strong {
  font-family: Georgia, serif;
  font-size: 5rem;
  font-weight: 400;
  line-height: 1;
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

.latest,
.archive {
  padding-block: 80px 120px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.section-heading .eyebrow {
  margin-bottom: 8px;
}

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

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

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.post-card-main {
  display: flex;
  height: 100%;
  min-height: 250px;
  padding: 30px;
  flex-direction: column;
  text-decoration: none;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--ink-soft);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.post-card h3 {
  margin: 24px 0 12px;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.post-card p {
  margin: 0;
  color: var(--ink-soft);
}

.read-more {
  margin-top: auto;
  padding-top: 24px;
  color: var(--accent);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.82rem;
}

.page-head {
  padding-block: 95px 55px;
}

.page-head h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
}

.page-intro {
  max-width: 680px;
  margin-top: 24px;
  color: var(--ink-soft);
}

.article {
  max-width: 850px;
  padding-block: 70px 120px;
}

.back-link {
  color: var(--ink-soft);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.84rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.article-header {
  padding-block: 70px 50px;
  border-bottom: 1px solid var(--line);
}

.article-header h1 {
  margin: 24px 0;
  font-size: clamp(2.35rem, 6vw, 4.6rem);
}

.article-description {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.tags a,
.tag-cloud a {
  padding: 5px 11px;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.76rem;
  text-decoration: none;
}

.tags a:hover,
.tag-cloud a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.article-body {
  padding-top: 30px;
  font-size: 1.05rem;
}

.article-body h2,
.article-body h3 {
  margin-top: 2.3em;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

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

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

.article-body a {
  color: var(--accent);
}

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.article-body blockquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  color: var(--ink-soft);
  border-left: 3px solid var(--accent);
}

.article-body code {
  padding: 0.15em 0.35em;
  font-size: 0.88em;
  background: var(--paper-soft);
  border-radius: 3px;
}

.article-body pre {
  overflow-x: auto;
  padding: 22px;
  background: var(--paper-soft) !important;
  border: 1px solid var(--line);
  border-radius: 4px;
}

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

.article-body hr {
  margin: 3em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 80px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  gap: 24px;
}

.article-nav a {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  text-decoration: none;
}

.article-nav a:hover {
  color: var(--accent);
}

.article-nav a.next {
  text-align: right;
}

.article-nav span {
  margin-bottom: 5px;
  color: var(--ink-soft);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  padding-bottom: 120px;
  gap: 12px;
}

.tag-cloud a {
  padding: 9px 16px;
  font-size: 0.9rem;
}

.tag-cloud sup {
  color: var(--accent);
}

.not-found {
  min-height: 65vh;
  padding-block: 120px;
}

.not-found p:not(.eyebrow) {
  margin-bottom: 34px;
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
}

.site-footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  padding-block: 28px;
  color: var(--ink-soft);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 0.78rem;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

@media (max-width: 800px) {
  .shell {
    width: min(100% - 32px, 680px);
  }

  .header-inner {
    min-height: 68px;
    gap: 18px;
  }

  .nav {
    gap: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 70px 90px;
    gap: 40px;
  }

  .hero-art {
    display: none;
  }

  .post-list {
    grid-template-columns: 1fr;
  }

  .page-head {
    padding-block: 70px 35px;
  }

  .article {
    padding-block: 40px 80px;
  }

  .article-header {
    padding-block: 50px 35px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand > span:last-child {
    display: none;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .article-nav a.next {
    text-align: left;
  }
}

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