:root {
  --navy-deepest: #0A1A2A;
  --navy-ink: #0D2436;
  --gold: #C9A44D;
  --gold-light: #E8D9A6;
  --crimson: #7A2E2E;
  --pearl: #F2EEDC;
  --mist: #A8B0B8;
  --bronze: #B3773C;
  --cream: #F7F3E9;

  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;

  --header-width: 260px;
  --content-max: 1280px;
  --spacing: 24px;
}

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
li,
figure,
figcaption {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--gold-light);
  text-decoration: none;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--navy-deepest);
  color: var(--pearl);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

#main-content {
  scroll-margin-top: 24px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 2px;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--navy-deepest);
  font-weight: 600;
  z-index: 1100;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.skip-link:not(:focus) {
  left: -9999px;
  top: auto;
}

.site-header {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--header-width);
  background: var(--navy-ink);
  border-right: 1px solid rgba(201, 164, 77, 0.4);
  z-index: 1000;
  overflow-y: auto;
}

.header-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: var(--spacing);
  border-top: 4px solid var(--gold);
}

.header-frame::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, transparent 50%, var(--crimson) 50%);
  opacity: 0.6;
  pointer-events: none;
}

.brand {
  margin-bottom: 48px;
}

.brand-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--pearl);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.brand-accent {
  color: var(--gold);
}

.tagline {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--mist);
  letter-spacing: 0.2em;
}

.nav-toggle {
  display: none;
}

.site-nav {
  flex: 1;
}

.nav-item + .nav-item {
  margin-top: 4px;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  color: var(--mist);
  font-size: 1rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, padding-left 0.2s;
}

.nav-link:hover {
  color: var(--gold-light);
  border-left-color: var(--gold);
  padding-left: 8px;
}

.nav-link[aria-current="page"] {
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 600;
}

.nav-index {
  font-size: 0.7rem;
  font-family: var(--font-serif);
  color: var(--bronze);
  letter-spacing: 0.1em;
}

.nav-meta {
  margin-top: auto;
  padding-top: var(--spacing);
  font-size: 0.7rem;
  color: var(--mist);
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(232, 217, 166, 0.2);
}

.content-area {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: calc(var(--spacing) * 2);
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing);
}

@media (min-width: 700px) {
  .layout-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.page-section {
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  font-family: var(--font-serif);
  text-transform: uppercase;
}

.section-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--crimson);
  margin-right: 8px;
  vertical-align: middle;
}

.panel {
  background: var(--navy-ink);
  border: 1px solid rgba(201, 164, 77, 0.4);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  padding: 24px;
}

.site-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--navy-deepest);
  font-weight: 600;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s, color 0.2s;
}

.site-btn:hover {
  background: var(--bronze);
  color: var(--pearl);
}

.site-btn:active {
  transform: translateY(2px);
}

.site-btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.site-btn--outline:hover {
  background: rgba(201, 164, 77, 0.1);
  color: var(--gold-light);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--mist);
}

.breadcrumbs a {
  color: var(--gold);
}

.breadcrumbs a:hover {
  color: var(--gold-light);
}

.breadcrumbs .current {
  color: var(--mist);
}

.image-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201, 164, 77, 0.4);
  background: var(--navy-ink);
}

.img-16x9 {
  aspect-ratio: 16 / 9;
}

.img-4x3 {
  aspect-ratio: 4 / 3;
}

.img-square {
  aspect-ratio: 1 / 1;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 2000;
  pointer-events: none;
}

.scroll-progress__bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.1s linear;
}

.site-footer {
  border-top: 1px solid rgba(201, 164, 77, 0.4);
  background: var(--navy-ink);
}

.footer-frame {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px var(--spacing) 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-desc {
  margin-top: 8px;
  color: var(--mist);
  font-size: 0.9rem;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  color: var(--mist);
}

.footer-list a:hover {
  color: var(--gold-light);
}

.footer-contact p {
  color: var(--mist);
  font-size: 0.9rem;
  margin-top: 4px;
}

.footer-email {
  color: var(--gold) !important;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid rgba(232, 217, 166, 0.15);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--mist);
}

@media (min-width: 900px) {
  body {
    padding-left: var(--header-width);
  }
}

@media (max-width: 899px) {
  body {
    padding-left: 0;
  }

  .site-header {
    position: sticky;
    inset: 0 0 auto 0;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(201, 164, 77, 0.4);
    overflow-y: visible;
  }

  .header-frame {
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-top: none;
    min-height: 0;
  }

  .header-frame::before {
    width: 16px;
    height: 16px;
  }

  .brand {
    margin-bottom: 0;
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .tagline {
    display: none;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--gold);
    border-radius: 4px;
    padding: 0;
  }

  .toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto;
    transition: transform 0.2s, opacity 0.2s;
  }

  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .site-nav {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .site-nav[data-open] {
    max-height: 480px;
    overflow-y: auto;
  }

  .nav-list {
    padding-top: 16px;
    border-top: 1px solid rgba(201, 164, 77, 0.3);
  }

  .nav-item + .nav-item {
    margin-top: 0;
  }

  .nav-link {
    border-left: none;
    justify-content: center;
    padding: 12px;
  }

  .nav-link:hover {
    border-left-color: transparent;
    padding-left: 12px;
  }

  .nav-link[aria-current="page"] {
    border-left: none;
    border-bottom: 2px solid var(--gold);
  }

  .nav-meta {
    display: none;
  }

  .footer-frame {
    padding: 32px 16px 16px;
  }
}
