/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: #1a1a1a;
  color: #b0b0b0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}
::selection {
  background: #8b0000;
  color: #fff;
}

/* ===== CSS Variables ===== */
:root {
  --color-deep-red: #8b0000;
  --color-charcoal: #1a1a1a;
  --color-gold: #ffd700;
  --color-dark-gray: #2e2e2e;
  --color-light-gray: #b0b0b0;
  --color-white: #ffffff;
  --color-red-glass: rgba(139, 0, 0, 0.3);
  --color-gold-glass: rgba(255, 215, 0, 0.2);
  --font-heading: Impact, 'Arial Black', sans-serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Fira Code', 'Courier New', monospace;
  --header-height: 4rem;
  --content-max-width: 1200px;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-gold);
  color: var(--color-charcoal);
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-weight: bold;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus {
  top: 0;
}

/* ===== Header ===== */
.site-header {
  background: var(--color-deep-red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--header-height);
}
.brand {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.brand:hover {
  color: #fff;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  justify-content: center;
  align-items: center;
}
.toggle-bar {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-gold);
  border-radius: 2px;
  transition: transform 0.3s ease;
}
.nav-list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}
.nav-link {
  color: var(--color-white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
  position: relative;
}
.nav-link:hover {
  background: var(--color-gold-glass);
  color: var(--color-gold);
}
.nav-link[aria-current="page"] {
  color: var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  padding-bottom: calc(0.5rem - 2px);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-charcoal);
  border-top: 2px solid var(--color-deep-red);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 2rem;
}
.footer-brand .brand {
  font-size: 1.5rem;
}
.footer-tagline {
  margin-top: 0.5rem;
  color: var(--color-light-gray);
  font-size: 0.9rem;
}
.footer-heading {
  font-family: var(--font-heading);
  color: var(--color-gold);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.footer-nav ul, .footer-contact p {
  list-style: none;
}
.footer-link, .footer-contact a {
  color: var(--color-light-gray);
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer-link:hover, .footer-contact a:hover {
  color: var(--color-gold);
}
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-dark-gray);
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--color-light-gray);
}
.footer-icp, .footer-copyright {
  margin: 0;
}

/* ===== Scroll Progress ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--color-gold);
  z-index: 999;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: var(--color-deep-red);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .nav[data-open] {
    transform: translateX(0);
  }
  .nav-list {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .nav-link {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .nav {
    transition: none;
  }
}

/* ===== Utility ===== */
.main-content {
  min-height: calc(100vh - var(--header-height));
  padding-top: 1rem;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--color-gold);
}
a:hover {
  color: var(--color-white);
}
