/* ==========================================================
   竞博CN Shared Site Kit — /assets/site.css
   时空索引舱 · Space-Time Index Capsule
   ========================================================== */

/* ---------- 1. Design Tokens ---------- */
:root {
  --color-bg: #0B1B3A;
  --color-bg-light: #16305F;
  --color-accent: #7B2FDE;
  --color-accent-bright: #9B4DFF;
  --color-accent-2: #F5A623;
  --color-text: #FFFFFF;
  --color-text-secondary: #A8C6F0;
  --color-line: #2A4A7F;
  --color-glass: rgba(255, 255, 255, 0.08);
  --color-success: #00C48A;
  --color-warning: #FFC400;

  --font-heading: "Montserrat", "Noto Sans SC", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "JetBrains Mono", "Roboto Mono", "Noto Sans SC", "Segoe UI", "PingFang SC", "Microsoft YaHei", monospace;

  --container-max: 1280px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --header-top: 12px;
  --header-bottom-offset: 76px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(42, 74, 127, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 74, 127, 0.06) 1px, transparent 1px),
    #0B1B3A;
  background-size: 56px 56px, 56px 56px, auto;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  letter-spacing: 0;
}

::selection {
  background: rgba(123, 47, 222, 0.55);
  color: #fff;
}

/* ---------- 3. Layout & Utilities ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

#main-content {
  display: block;
  min-height: 70vh;
  padding-top: 110px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.text-muted {
  color: var(--color-text-secondary);
  font-size: 13px;
}

.divider {
  height: 1px;
  border: none;
  margin: 24px 0;
  background: linear-gradient(90deg, transparent, var(--color-line) 30%, transparent);
}

.light-trail {
  height: 1px;
  border: none;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgba(123, 47, 222, 0.8) 35%, rgba(245, 166, 35, 0.8) 70%, transparent);
}

/* ---------- 4. Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-bright) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(123, 47, 222, 0.4);
  transition: top 0.25s var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ---------- 5. Header & Capsule Nav ---------- */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 1360px;
  z-index: 1000;
  pointer-events: none;
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(11, 27, 58, 0.72);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(42, 74, 127, 0.55);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  pointer-events: auto;
}

.site-header.is-scrolled .header-inner {
  background: rgba(11, 27, 58, 0.92);
  border-color: rgba(123, 47, 222, 0.4);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: #fff;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: #fff;
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  transform: rotate(45deg);
  transition: transform 0.45s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand:hover .brand-mark::before,
.footer-brand:hover .brand-mark::before {
  transform: rotate(135deg);
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(123, 47, 222, 0.22);
  border-color: rgba(123, 47, 222, 0.4);
}

.nav-link[aria-current="page"] {
  color: #fff;
  background: rgba(123, 47, 222, 0.35);
  border-color: rgba(123, 47, 222, 0.6);
  box-shadow: 0 0 12px rgba(123, 47, 222, 0.25);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(0, 196, 138, 0.08);
  border: 1px solid rgba(0, 196, 138, 0.25);
  font-size: 12px;
  color: rgba(168, 198, 240, 0.85);
  white-space: nowrap;
}

.header-status .status-dot {
  width: 6px;
  height: 6px;
  margin: 0;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  margin-right: 6px;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(123, 47, 222, 0.25);
  border: 1px solid rgba(123, 47, 222, 0.5);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(123, 47, 222, 0.45);
  border-color: rgba(123, 47, 222, 0.8);
}

.nav-toggle-line {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

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

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

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

/* ---------- 6. Mobile Nav ---------- */
@media (max-width: 768px) {
  .header-inner {
    padding: 6px 6px 6px 14px;
  }

  .nav-toggle {
    display: flex;
  }

  .header-status {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: var(--header-bottom-offset);
    left: 50%;
    width: calc(100% - 24px);
    max-width: 560px;
    transform: translateX(-50%) translateY(-12px) scale(0.98);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(11, 27, 58, 0.96);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(42, 74, 127, 0.65);
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    z-index: 999;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
  }

  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 14px;
  }

  #main-content {
    padding-top: 88px;
  }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  padding-top: 60px;
  background: linear-gradient(180deg, #0B1B3A 0%, #080F24 100%);
  border-top: 1px solid rgba(42, 74, 127, 0.45);
  overflow: hidden;
}

.footer-glow {
  position: absolute;
  top: -120px;
  right: 8%;
  width: 420px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(123, 47, 222, 0.18) 0%, rgba(123, 47, 222, 0) 70%);
  pointer-events: none;
}

.footer-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 44px;
}

.footer-summary {
  min-width: 0;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: #fff;
}

.footer-brand:hover,
.footer-brand:focus-visible {
  color: #fff;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  letter-spacing: 0.04em;
}

.footer-brand-en {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: 0.14em;
  line-height: 1.4;
  margin-top: 2px;
}

.footer-statement {
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text-secondary);
  max-width: 42ch;
  margin-bottom: 16px;
}

.footer-address {
  font-size: 13px;
  color: rgba(168, 198, 240, 0.65);
  margin: 0;
}

.footer-col {
  min-width: 0;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.footer-link-item {
  line-height: 1.4;
}

.footer-link {
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #fff;
  padding-left: 4px;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid rgba(42, 74, 127, 0.4);
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(168, 198, 240, 0.5);
}

.contact-value {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.footer-bottom {
  position: relative;
  border-top: 1px solid rgba(42, 74, 127, 0.4);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.footer-copyright,
.footer-icp,
.footer-disclaimer {
  font-size: 12px;
  color: rgba(168, 198, 240, 0.5);
  margin: 0;
}

.footer-disclaimer {
  width: 100%;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-layout {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
  }

  .footer-disclaimer {
    width: auto;
    margin-left: auto;
    text-align: right;
  }
}

/* ---------- 8. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-bright) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 16px rgba(123, 47, 222, 0.35);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: linear-gradient(135deg, #8A3FEA 0%, #AA5EFF 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(123, 47, 222, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-line);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: #fff;
  border-color: var(--color-accent);
  background: rgba(123, 47, 222, 0.12);
}

/* ---------- 9. Section ---------- */
.section {
  padding: 48px 0;
}

.section-header {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-title {
  position: relative;
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 10px;
  padding-left: 18px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
}

.section-subtitle {
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin: 0;
}

@media (min-width: 768px) {
  .section {
    padding: 72px 0;
  }
}

/* ---------- 10. Breadcrumb ---------- */
.breadcrumb,
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: rgba(168, 198, 240, 0.35);
}

.breadcrumb-link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
  color: #fff;
}

.breadcrumb-current {
  color: #fff;
  font-weight: 500;
}

/* ---------- 11. Cards, Panels & Grids ---------- */
.card,
.panel {
  background: var(--color-bg-light);
  border: 1px solid rgba(42, 74, 127, 0.5);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.03) 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(42, 74, 127, 0.55);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.glass-card:hover {
  border-color: rgba(123, 47, 222, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.card-grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: 1fr;
}

.grid-3 {
  grid-template-columns: 1fr;
}

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

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

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

/* ---------- 12. Tags & Badges ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-glass);
  border: 1px solid rgba(42, 74, 127, 0.5);
  font-size: 12px;
  color: var(--color-text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  border: 1px solid transparent;
}

.badge-accent {
  color: #fff;
  background: rgba(123, 47, 222, 0.3);
  border-color: rgba(123, 47, 222, 0.5);
}

.badge-gold {
  color: var(--color-accent-2);
  background: rgba(245, 166, 35, 0.12);
  border-color: rgba(245, 166, 35, 0.35);
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.3);
  color: var(--color-accent-2);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---------- 13. Data Blocks ---------- */
.data-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.data-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
}

.data-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.version-text {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--color-accent-2);
  letter-spacing: 0.02em;
  font-size: 0.95em;
}

/* ---------- 14. Timeline ---------- */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-line) 55%, var(--color-accent-2) 100%);
}

.timeline-item {
  position: relative;
  padding: 0 0 32px 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 2px rgba(123, 47, 222, 0.25);
}

.timeline-item.is-current::before {
  background: var(--color-accent-2);
  border-color: var(--color-accent-2);
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.25);
}

.timeline-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent-2);
  margin-bottom: 4px;
}

.timeline-content {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ---------- 15. Image Frames ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-bg-light);
  border: 1px solid rgba(42, 74, 127, 0.5);
}

.img-frame::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.img-frame--portrait::before {
  padding-top: 75%;
}

.img-frame--square::before {
  padding-top: 100%;
}

.img-frame > img,
.img-frame > .img-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(123, 47, 222, 0.12) 0%, rgba(42, 74, 127, 0.4) 100%);
  color: rgba(168, 198, 240, 0.45);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

/* ---------- 16. Filter Chip ---------- */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--color-line);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: var(--color-accent);
  color: #fff;
}

.filter-chip[aria-pressed="true"],
.filter-chip.is-active {
  background: rgba(123, 47, 222, 0.25);
  border-color: var(--color-accent);
  color: #fff;
}

/* ---------- 17. Scroll Progress & Back to Top ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-2));
  z-index: 2000;
  pointer-events: none;
  transition: width 0.08s linear;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(11, 27, 58, 0.9);
  border: 1px solid rgba(123, 47, 222, 0.6);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s, border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--color-accent-2);
  background: rgba(123, 47, 222, 0.4);
}

/* ---------- 18. Responsive Tuning ---------- */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-link {
    padding: 8px 9px;
    font-size: 13px;
  }

  .header-status {
    padding: 6px 10px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 16px;
  }

  .brand-mark {
    width: 28px;
    height: 28px;
  }
}

/* ---------- 19. Reduced Motion ---------- */
@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;
    transition-delay: 0s !important;
  }
}
