/* article.css */
:root {
  --cream: #fbf7f1;
  --cream-2: #f5eee5;
  --almond: #ead8c8;
  --peach: #f1c9b8;
  --sage: #c9d4c1;
  --sage-dark: #7d8f72;
  --brown: #6d5548;
  --brown-2: #9a7b69;
  --text: #3f352f;
  --muted: #786b62;
  --line: rgba(109, 85, 72, .14);
  --white: #fffdf9;
  --shadow: 0 22px 60px rgba(109, 85, 72, .12);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --header-height: 74px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(241, 201, 184, .3), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(201, 212, 193, .34), transparent 28%),
    linear-gradient(180deg, var(--cream), #fffaf5 48%, var(--cream-2));
  line-height: 1.9;
  letter-spacing: .035em;
}

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

img {
  display: block;
  max-width: 100%;
}

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

p {
  color: var(--muted);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid rgba(125, 143, 114, .55);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  background: rgba(251, 247, 241, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(var(--max), calc(100% - 32px));
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  color: var(--brown);
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.brand small {
  color: var(--brown-2);
  font-size: .74rem;
  font-weight: 500;
}

.desktop-nav,
.nav-cta {
  display: none;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--brown);
  color: #fffaf5;
  box-shadow: 0 14px 32px rgba(109, 85, 72, .2);
}

.btn-secondary {
  background: rgba(255, 253, 249, .72);
  color: var(--brown);
  border: 1px solid var(--line);
}

.page-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: auto;
}

.page-inner.narrow {
  width: min(860px, calc(100% - 32px));
}

.article-hero {
  padding: 54px 0 48px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--brown-2);
  font-size: .92rem;
}

.breadcrumb a {
  font-weight: 700;
}

.article-series,
.section-kicker {
  display: inline-flex;
  color: var(--sage-dark);
  font-weight: 900;
  margin-bottom: 10px;
}

h1 {
  font-family: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  font-size: clamp(2.25rem, 8vw, 4.7rem);
  line-height: 1.22;
  letter-spacing: .045em;
  color: var(--brown);
  margin-bottom: 20px;
}

.article-description {
  font-size: 1.12rem;
  max-width: 760px;
  margin-bottom: 22px;
}

.article-hero-media {
  display: block;
  width: min(760px, 100%);
  margin: 24px 0 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.article-hero-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-meta span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(234, 216, 200, .5);
  color: var(--brown);
  font-size: .9rem;
  font-weight: 800;
}

.article-layout {
  display: grid;
  gap: 30px;
  align-items: start;
}

.article-sidebar {
  display: grid;
  gap: 16px;
}

.author-card,
.series-card,
.article-cta,
.related-grid a,
.post-nav-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, .78);
  box-shadow: 0 12px 34px rgba(109, 85, 72, .07);
}

.author-card,
.series-card {
  padding: 22px;
}

.author-card img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 7px solid rgba(255, 253, 249, .9);
  box-shadow: 0 14px 28px rgba(109, 85, 72, .14);
  margin-bottom: 14px;
}

.author-card strong,
.series-card strong {
  display: block;
  color: var(--brown);
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.author-card span,
.series-card span {
  display: block;
  color: var(--sage-dark);
  font-size: .9rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.series-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
  margin: -2px 0 10px;
}

.author-card a,
.series-card a {
  color: var(--sage-dark);
  font-weight: 900;
}

.article-content {
  min-width: 0;
  padding-bottom: 72px;
}

.article-content h2 {
  font-size: clamp(1.55rem, 5vw, 2.28rem);
  line-height: 1.38;
  color: var(--brown);
  margin-top: 48px;
  margin-bottom: 16px;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content p {
  font-size: 1.05rem;
  margin-bottom: 1.25em;
}

.article-content blockquote {
  margin: 34px 0;
  padding: 24px;
  border-left: 5px solid var(--sage);
  border-radius: var(--radius-md);
  background: rgba(201, 212, 193, .22);
  color: var(--brown);
  font-size: 1.18rem;
  font-weight: 800;
}

.article-content ul {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.article-content li {
  position: relative;
  padding-left: 22px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.article-content li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
}

.article-disclaimer {
  margin: 48px 0 0;
  padding: 20px 22px;
  border: 1px solid rgba(120, 137, 113, .28);
  border-radius: var(--radius-md);
  background: rgba(201, 212, 193, .16);
}

.article-disclaimer strong {
  display: block;
  color: var(--sage-dark);
  margin-bottom: 4px;
}

.article-disclaimer p {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.article-source {
  margin: 48px 0 0;
  padding: 22px;
  border: 1px solid rgba(109, 85, 72, .14);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, .72);
  box-shadow: 0 12px 30px rgba(109, 85, 72, .06);
}

.article-source strong {
  display: block;
  color: var(--brown);
  margin-bottom: 4px;
}

.article-source p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .95rem;
}

.article-source a {
  color: var(--sage-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-source + .article-disclaimer {
  margin-top: 18px;
}

.article-cta {
  margin: 54px 0;
  padding: 30px 24px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255, 253, 249, .55), transparent 22%),
    linear-gradient(135deg, rgba(241, 201, 184, .66), rgba(234, 216, 200, .76), rgba(201, 212, 193, .6));
}

.article-cta h2 {
  margin-top: 0;
}

.post-nav {
  display: grid;
  gap: 14px;
  margin: 42px 0;
}

.post-nav-item {
  display: block;
  padding: 20px;
}

.post-nav-item span {
  display: block;
  color: var(--sage-dark);
  font-weight: 900;
  font-size: .9rem;
  margin-bottom: 4px;
}

.post-nav-item strong {
  color: var(--brown);
  font-size: 1.08rem;
}

.post-nav-item.disabled {
  opacity: .58;
}

.related-section {
  margin-top: 46px;
}

.section-head.compact {
  margin-bottom: 18px;
}

.section-head.compact h2 {
  margin-top: 0;
  color: var(--brown);
}

.related-grid {
  display: grid;
  gap: 14px;
}

.related-grid a {
  display: block;
  padding: 20px;
}

.related-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(234, 216, 200, .5);
  color: var(--sage-dark);
  font-size: .86rem;
  font-weight: 900;
}

.related-grid strong {
  display: block;
  color: var(--brown);
  line-height: 1.5;
}

.site-footer {
  padding: 46px 0;
  border-top: 1px solid var(--line);
  background: rgba(109, 85, 72, .08);
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: auto;
  display: grid;
  gap: 18px;
}

.footer-inner strong {
  color: var(--brown);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--brown);
  font-weight: 800;
}

@media (min-width: 640px) {
  .post-nav,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-inner {
    grid-template-columns: 1.2fr .8fr;
  }
}

@media (min-width: 900px) {
  :root {
    --header-height: 82px;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .desktop-nav a {
    padding: 9px 12px;
    border-radius: 999px;
    color: var(--brown);
    font-weight: 700;
    font-size: .94rem;
  }

  .desktop-nav a:hover {
    background: rgba(234, 216, 200, .48);
  }

  .nav-cta {
    display: inline-flex;
    min-height: 42px;
    padding: 9px 16px;
    font-size: .92rem;
  }

  .article-hero {
    padding: 76px 0 62px;
  }

  .article-hero-media {
    margin-top: 28px;
  }

  .article-layout {
    grid-template-columns: 280px minmax(0, 760px);
    justify-content: center;
  }

  .article-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
  }
}

@media (min-width: 1120px) {
  .desktop-nav a {
    padding-inline: 14px;
  }
}
