:root {
  --bg: #f4f5f3;
  --paper: #ffffff;
  --ink: #151817;
  --muted: #66706b;
  --line: #d8ddda;
  --accent: #296b50;
  --accent-soft: #e1eee8;
  --dark: #111513;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}
body[data-site="media"] { --accent: #2876a8; --accent-soft: #e1edf5; }
body[data-site="library"] { --accent: #9a5a2a; --accent-soft: #f3e8dc; }
body[data-site="gallery"] { --accent: #9b4d3c; --accent-soft: #f4e5e1; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  color: #fff;
  background: rgba(17, 21, 19, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  flex: 0 0 auto;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand small {
  display: block;
  margin-top: -4px;
  color: #adb7b2;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
}
.nav-links { display: flex; flex: 0 0 auto; gap: 26px; color: #d7ddda; font-size: 14px; white-space: nowrap; }
.nav-links a:hover { color: #fff; }

.hero {
  position: relative;
  min-height: 610px;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 6, .50);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(700px, 100%);
  padding: 112px 0 78px;
}
.eyebrow {
  margin: 0 0 16px;
  color: #d8e8e0;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .16em;
}
.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.hero .lead {
  max-width: 640px;
  margin: 22px 0 0;
  color: #edf1ef;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.7;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-meta span {
  padding: 7px 12px;
  color: #fff;
  background: rgba(0, 0, 0, .46);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  font-size: 12px;
}

.section { padding: 82px 0; }
.section.white { background: var(--paper); }
.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 440px);
  gap: 40px;
  align-items: end;
  margin-bottom: 34px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.section-head p { margin: 0; color: var(--muted); }

.feature-grid {
  display: grid;
  grid-template-columns: 1.45fr .75fr;
  gap: 28px;
}
.feature-card,
.article-card {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(17, 24, 20, .05);
}
.feature-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-copy { padding: 30px; }
.tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 13px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .08em;
}
.feature-copy h3,
.article-card h3 {
  margin: 0;
  line-height: 1.35;
  letter-spacing: -.02em;
}
.feature-copy h3 { font-size: clamp(25px, 3vw, 38px); }
.feature-copy p,
.article-card p { color: var(--muted); }
.read-more { color: var(--accent); font-weight: 700; }

.side-list {
  display: grid;
  align-content: start;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.side-item {
  display: block;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.side-item:last-child { border-bottom: 0; }
.side-item:hover { background: var(--accent-soft); }
.side-item strong { display: block; margin-bottom: 7px; font-size: 18px; line-height: 1.45; }
.side-item span { color: var(--muted); font-size: 13px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.article-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.article-card .card-copy { padding: 24px; }
.article-card h3 { font-size: 21px; }
.article-card p { margin: 10px 0 18px; font-size: 14px; }

.topic-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  color: #fff;
  background: #333b37;
  border-radius: 16px;
}
.topic {
  min-height: 160px;
  padding: 26px;
  background: var(--dark);
}
.topic b { display: block; margin-bottom: 12px; font-size: 18px; }
.topic span { color: #aeb8b3; font-size: 13px; }

.page-hero {
  padding: 88px 0 64px;
  color: #fff;
  background: var(--dark);
}
.page-hero h1,
.article-title h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.15;
  letter-spacing: -.04em;
}
.page-hero p { max-width: 720px; margin: 20px 0 0; color: #bdc7c2; font-size: 18px; }

.article-title { padding: 82px 0 44px; }
.article-title .summary {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}
.article-cover {
  width: min(calc(100% - 40px), var(--max));
  max-height: 620px;
  margin: 0 auto;
  object-fit: cover;
  border-radius: 18px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 70px;
  align-items: start;
  padding: 62px 0 100px;
}
.article-body { font-size: 17px; }
.article-body h2 {
  margin: 52px 0 15px;
  font-size: 29px;
  line-height: 1.35;
  letter-spacing: -.025em;
}
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin: 0 0 20px; }
.article-body ul { padding-left: 1.4em; }
.article-body li { margin-bottom: 10px; }
.note {
  margin: 34px 0;
  padding: 24px 26px;
  background: var(--accent-soft);
  border-left: 5px solid var(--accent);
  border-radius: 0 12px 12px 0;
}
.article-aside {
  position: sticky;
  top: 92px;
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.article-aside b { display: block; margin-bottom: 12px; }
.article-aside a {
  display: block;
  padding: 8px 0;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.article-aside a:last-child { border-bottom: 0; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.about-grid h2 { margin-top: 0; font-size: 34px; line-height: 1.35; }
.principles { display: grid; gap: 14px; }
.principle {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.principle b { display: block; margin-bottom: 6px; }
.principle span { color: var(--muted); font-size: 14px; }

.site-footer {
  padding: 52px 0;
  color: #aab4af;
  background: #0d100f;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  align-items: flex-end;
}
.footer-grid strong { color: #fff; }
.footer-grid p { max-width: 620px; margin: 8px 0 0; font-size: 13px; }
.footer-nav { display: flex; gap: 20px; font-size: 13px; }

.not-found {
  min-height: calc(100vh - 66px);
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg);
}
.not-found h1 { margin: 0; font-size: clamp(70px, 15vw, 150px); color: var(--accent); }
.not-found p { color: var(--muted); }

@media (max-width: 900px) {
  .feature-grid,
  .article-layout,
  .about-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-strip { grid-template-columns: repeat(2, 1fr); }
  .article-aside { position: static; }
}

@media (max-width: 650px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .nav { min-height: 60px; }
  .nav { gap: 14px; }
  .brand { font-size: 17px; }
  .brand small { display: none; }
  .nav-links { gap: 15px; font-size: 13px; }
  .nav-links a:nth-child(2) { display: none; }
  .hero { min-height: 560px; }
  .hero-copy { padding: 90px 0 54px; }
  .section { padding: 58px 0; }
  .section-head { grid-template-columns: 1fr; gap: 14px; }
  .feature-grid,
  .card-grid,
  .topic-strip { grid-template-columns: 1fr; }
  .footer-grid { display: block; }
  .footer-nav { margin-top: 24px; }
  .article-cover { width: calc(100% - 28px); border-radius: 12px; }
}

@media (max-width: 380px) {
  .brand { font-size: 16px; }
  .nav-links { gap: 10px; font-size: 12px; }
  .nav-links a:nth-child(3) { display: none; }
}

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