:root {
  --gold: #c8a24b;
  --gold-light: #e0b84f;
  --gold-dark: #b8923f;
  --cream: #fdf6e3;
  --cream-soft: #fff8e7;
  --bg: #faf7f0;
  --bg-elevated: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --text: #2c2620;
  --text-soft: #5c5348;
  --text-muted: #8a7f70;
  --border: rgba(200, 162, 75, 0.22);
  --border-strong: rgba(200, 162, 75, 0.45);
  --shadow-sm: 0 2px 10px rgba(90, 70, 25, 0.06);
  --shadow-md: 0 10px 30px rgba(90, 70, 25, 0.1);
  --shadow-lg: 0 20px 50px rgba(90, 70, 25, 0.16);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --header-h: 72px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grad-banner: linear-gradient(135deg, #fdf6e3 0%, #f7e7bd 35%, #e0b84f 75%, #c8a24b 100%);
  --grad-accent: linear-gradient(120deg, #c8a24b 0%, #e0b84f 100%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14110c;
    --bg-elevated: #1d1811;
    --bg-glass: rgba(29, 24, 17, 0.68);
    --text: #f3ecdd;
    --text-soft: #cfc4b0;
    --text-muted: #9a8e7b;
    --border: rgba(200, 162, 75, 0.28);
    --border-strong: rgba(224, 184, 79, 0.55);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
    --grad-banner: linear-gradient(135deg, #241d12 0%, #3a2d16 35%, #6b5320 75%, #8a6a26 100%);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-dark);
  text-decoration: none;
  transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
}

a:hover,
a:focus-visible {
  color: var(--gold-light);
}

a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.01em;
}

h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
}

h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  margin-top: 2.6em;
  margin-bottom: 0.7em;
  padding-left: 0.62em;
  position: relative;
}

h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.16em;
  bottom: 0.16em;
  width: 5px;
  border-radius: var(--radius-full);
  background: var(--grad-accent);
}

h3 {
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
  margin-top: 1.8em;
  margin-bottom: 0.55em;
}

p {
  margin: 0 0 1.05em;
  color: var(--text-soft);
}

ul, ol {
  padding-left: 1.3em;
  margin: 0 0 1.2em;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45em;
}

blockquote {
  margin: 1.2em 0;
  padding: 1.1em 1.4em;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-style: normal;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

blockquote:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

blockquote p {
  margin: 0;
}

dl {
  margin: 0;
}

dt {
  font-weight: 700;
  color: var(--text);
  margin-top: 1.5em;
  padding-left: 1.2em;
  position: relative;
}

dt::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-accent);
}

dd {
  margin: 0.45em 0 0;
  padding: 0.9em 1.1em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

dd:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
}

address {
  font-style: normal;
}

figure {
  margin: 1.6em 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

figcaption {
  padding: 0.8em 1.2em;
  font-size: 0.86rem;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ============ Header ============ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand svg {
  border-radius: 12px;
  transition: transform 0.4s var(--ease);
}

.brand:hover svg {
  transform: rotate(-8deg) scale(1.06);
}

.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold);
  white-space: nowrap;
}

#site-header nav {
  flex: 1;
  min-width: 0;
}

#site-header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

#site-header nav ul::-webkit-scrollbar {
  display: none;
}

#site-header nav li {
  margin: 0;
  flex-shrink: 0;
}

#site-header nav a {
  display: inline-block;
  padding: 7px 11px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-full);
  white-space: nowrap;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

#site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: var(--grad-accent);
  transform: translateX(-50%);
  transition: width 0.28s var(--ease);
}

#site-header nav a:hover,
#site-header nav a:focus-visible {
  color: var(--gold-dark);
  background: rgba(200, 162, 75, 0.12);
}

#site-header nav a:hover::after,
#site-header nav a:focus-visible::after {
  width: 60%;
}

/* ============ Main layout ============ */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 40px;
}

#hero {
  margin: 28px 0 12px;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--grad-banner);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

#hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.55), transparent 65%);
  pointer-events: none;
}

#hero::after {
  content: "";
  position: absolute;
  bottom: -60%;
  left: -15%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle at center, rgba(255, 248, 231, 0.45), transparent 60%);
  pointer-events: none;
}

#hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.6em;
  color: #3a2d10;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: fadeUp 0.8s var(--ease) both;
}

#hero > p {
  position: relative;
  z-index: 1;
  max-width: 62ch;
  color: #4a3a17;
  font-size: clamp(0.95rem, 1.5vw, 1.06rem);
  animation: fadeUp 0.8s var(--ease) 0.12s both;
}

#hero figure {
  position: relative;
  z-index: 1;
  margin: 1.8em 0 0;
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(90, 70, 25, 0.18);
  animation: fadeUp 0.9s var(--ease) 0.22s both;
}

#hero figure svg {
  display: block;
  width: 100%;
}

#hero figcaption {
  color: #5a471e;
  background: rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.5);
}

/* ============ Inner anchor nav ============ */
main > nav[aria-label="页面内锚点导航"] {
  margin: 26px 0;
  padding: 20px 22px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
}

main > nav[aria-label="页面内锚点导航"] h2 {
  margin: 0 0 0.6em;
  font-size: 1.05rem;
  padding-left: 0.62em;
}

main > nav[aria-label="页面内锚点导航"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

main > nav[aria-label="页面内锚点导航"] li {
  margin: 0;
}

main > nav[aria-label="页面内锚点导航"] a {
  display: inline-block;
  padding: 5px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

main > nav[aria-label="页面内锚点导航"] a:hover,
main > nav[aria-label="页面内锚点导航"] a:focus-visible {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(200, 162, 75, 0.35);
}

/* ============ Article content ============ */
#main-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 46px);
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.8s var(--ease) 0.1s both;
}

#main-content > h2:first-child {
  margin-top: 0;
}

#main-content article {
  padding: 1.4em 1.5em;
  margin: 1.4em 0;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

#main-content article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#main-content article h3 {
  margin-top: 0;
}

#main-content article h3 a {
  color: var(--text);
}

#main-content article h3 a:hover {
  color: var(--gold-dark);
}

#main-content article > p:first-of-type {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6em;
}

#main-content article a[href^="#article"] {
  display: inline-block;
  margin-top: 0.4em;
  padding: 6px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: rgba(200, 162, 75, 0.12);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}

#main-content article a[href^="#article"]:hover {
  background: var(--grad-accent);
  color: #fff;
  transform: translateX(3px);
}

#news ul {
  list-style: none;
  padding: 0;
}

#news li {
  padding: 1.1em 1.3em;
  margin-bottom: 0.9em;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

#news li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

#news li h3 {
  margin: 0 0 0.3em;
}

#news li p {
  margin: 0.15em 0;
  font-size: 0.92rem;
}

#news li p:first-of-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

#contact {
  margin-top: 2.4em;
}

#contact address {
  padding: 1.3em 1.5em;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1em;
}

#contact address p {
  margin: 0.3em 0;
}

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

#sitemap li,
#links li {
  margin: 0;
}

#sitemap a,
#links a {
  display: inline-block;
  padding: 5px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

#sitemap a:hover,
#links a:hover {
  color: #fff;
  background: var(--grad-accent);
  border-color: transparent;
  transform: translateY(-2px);
}

/* ============ Aside ============ */
main aside {
  margin-top: 28px;
  padding: 24px 26px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.7s var(--ease) both;
}

main aside h2 {
  margin-top: 0;
  font-size: 1.15rem;
}

main aside p {
  margin: 0.35em 0;
  font-size: 0.92rem;
}

main aside p:nth-child(2),
main aside p:nth-child(3),
main aside p:nth-child(4) {
  font-weight: 600;
  color: var(--text);
}

/* ============ Footer ============ */
footer {
  margin-top: 40px;
  padding: 34px 20px 44px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  margin: 0.4em auto;
  max-width: var(--maxw);
  font-size: 0.86rem;
  color: var(--text-muted);
}

footer p:first-child {
  color: var(--text-soft);
  font-weight: 600;
}

/* ============ Animations ============ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll-driven reveal (progressive enhancement) */
@supports (animation-timeline: view()) {
  #main-content > h2,
  #main-content > h3,
  #main-content > p,
  #main-content > ul,
  #main-content > ol,
  #main-content > dl,
  #main-content > blockquote,
  #main-content > article,
  #main-content > figure,
  main aside {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 42%;
  }
}

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

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  :root {
    --header-h: 64px;
  }

  #site-header nav a {
    padding: 6px 9px;
    font-size: 0.85rem;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 10px 16px 0;
    gap: 8px;
  }

  .brand {
    padding-bottom: 6px;
  }

  #site-header nav {
    width: 100%;
    order: 3;
    padding-bottom: 8px;
  }

  #site-header nav ul {
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  main {
    padding: 0 16px 32px;
  }

  #hero {
    margin-top: 18px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
    line-height: 1.7;
  }

  .header-inner {
    padding: 8px 14px 0;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  #site-header nav a {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  #hero {
    padding: 26px 18px;
    border-radius: var(--radius-md);
  }

  #hero figure {
    margin-top: 1.2em;
  }

  main > nav[aria-label="页面内锚点导航"] {
    padding: 16px;
  }

  #main-content {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  #main-content article {
    padding: 1.1em 1em;
  }

  h2 {
    margin-top: 2.1em;
  }

  blockquote {
    padding: 0.9em 1em;
  }

  main aside {
    padding: 18px;
  }

  footer {
    padding: 26px 16px 36px;
  }
}

@media (max-width: 400px) {
  #site-header nav ul {
    gap: 0;
  }

  #site-header nav a {
    padding: 5px 6px;
    font-size: 0.76rem;
  }
}