:root {
  color-scheme: light;
  --bg: #f5f0e8;
  --paper: #fbf8f1;
  --ink: #211d18;
  --muted: #6c635a;
  --line: rgba(45, 38, 29, 0.18);
  --panel: rgba(251, 248, 241, 0.72);
  --accent: #9e3824;
  --accent-soft: #d5b39b;
  --display: "Songti SC", STSong, "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-family: var(--body);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
}

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

.site-shell {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.masthead {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}

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

.brand,
.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-size: 18px;
}

.nav-links {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 356px;
  align-items: center;
  gap: 92px;
  padding: 62px 0 100px;
}

.hero-copy {
  min-width: 0;
}

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

.hero h1 {
  max-width: 820px;
  margin: 28px 0 32px;
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 600;
  line-height: 1.09;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.hero h1 span {
  display: inline;
}

.hero-text {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.9;
}

.issue-cover {
  min-height: 506px;
  padding: 32px 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 16px 18px 0 rgba(45, 38, 29, 0.04), 0 14px 34px rgba(45, 38, 29, 0.06);
}

.cover-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.cover-header p,
.cover-header span,
.cover-title p,
.cover-footer span {
  margin: 0;
}

.cover-header p,
.cover-footer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.cover-header span {
  font-family: var(--display);
  font-size: 21px;
}

.cover-title strong {
  display: block;
  max-width: 280px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.cover-title p {
  margin-top: 30px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.cover-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

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

.section-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 86px;
  margin-top: 26px;
}

.section h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.2;
}

.section-body p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.section-body {
  display: grid;
  gap: 20px;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 38px;
}

.work-list article {
  min-height: 236px;
  padding: 22px 0 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.work-list span {
  color: var(--accent);
  font-weight: 700;
}

.work-list h3 {
  margin: auto 0 14px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 600;
}

.work-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.work-feature {
  margin-top: 28px;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: border-color 160ms ease, transform 160ms ease;
}

.work-feature:hover {
  color: var(--accent);
}

.work-feature span {
  align-self: start;
  color: var(--accent);
  font-weight: 700;
}

.work-feature h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 600;
}

.work-feature p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.work-feature strong {
  padding-left: 26px;
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
}

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

.post-card,
.empty-posts {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.72);
}

.post-card {
  display: flex;
  flex-direction: column;
}

.post-card time {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.post-card h3 {
  margin: 42px 0 14px;
  font-size: 24px;
  line-height: 1.22;
}

.post-card h3 a:hover {
  color: var(--accent);
}

.post-card p,
.empty-posts {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.article-shell {
  min-height: 100vh;
}

.article-nav {
  border-bottom: 1px solid var(--line);
}

.post-page {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 76px 0 110px;
}

.back-link {
  display: inline-block;
  margin-bottom: 46px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

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

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

.post-header h1,
.article-index h1 {
  margin: 16px 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.post-header p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.post-content {
  padding-top: 42px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 44px 0 16px;
  line-height: 1.24;
}

.post-content h2 {
  font-size: 30px;
}

.post-content h3 {
  font-size: 24px;
}

.post-content p,
.post-content li,
.post-content blockquote {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.9;
}

.post-content p {
  margin: 0 0 24px;
}

.post-content a {
  color: var(--accent);
  border-bottom: 1px solid rgba(184, 66, 36, 0.3);
}

.post-content ul {
  margin: 0 0 24px;
  padding-left: 1.35em;
}

.post-content blockquote {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 3px solid var(--accent-soft);
  color: var(--muted);
}

.post-content code {
  padding: 0.12em 0.28em;
  border-radius: 4px;
  background: rgba(33, 31, 26, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.post-content pre {
  overflow-x: auto;
  margin: 30px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 31, 26, 0.06);
}

.post-content pre code {
  padding: 0;
  background: transparent;
}

.article-index {
  min-height: calc(100vh - 88px);
}

.contact {
  min-height: 46vh;
  border-bottom: 0;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(250px, 1fr);
  align-items: start;
  gap: 60px;
  margin-top: 18px;
}

.contact-panel {
  max-width: 760px;
}

.contact-panel h2 {
  margin-bottom: 18px;
}

.contact-method {
  width: 100%;
  padding: 18px 22px;
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-method span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.contact-method a {
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
}

.contact-method a:hover {
  color: var(--accent);
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100% - 28px, 680px);
  }

  .nav {
    height: 74px;
  }

  .nav-links {
    gap: 10px;
    font-size: 13px;
  }

  .hero,
  .section-grid,
  .work-list,
  .post-list,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 50px;
    padding: 44px 0 76px;
  }

  .hero h1 {
    font-size: clamp(38px, 14vw, 58px);
  }

  .hero-text,
  .section-body p,
  .contact-panel p {
    font-size: 17px;
  }

  .issue-cover {
    width: min(360px, 100%);
    min-height: 470px;
  }

  .section {
    padding: 78px 0;
  }

  .work-list article,
  .post-card,
  .empty-posts {
    min-height: 220px;
  }

  .work-feature {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .work-feature strong {
    padding-left: 0;
  }

  .contact-layout {
    gap: 28px;
  }

  .contact-method {
    width: fit-content;
  }

  .post-page {
    padding: 54px 0 88px;
  }
}

@media (max-width: 520px) {
  .nav-links {
    display: none;
  }

  .brand span:last-child {
    display: inline;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 37px;
    line-height: 1.2;
  }

  .hero h1 span {
    display: block;
  }
}
