:root {
  --bg: #f7f8fc;
  --bg-soft: #ffffff;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --text: #1c2130;
  --text-soft: #525a6e;
  --text-muted: #7b8397;
  --primary: #e94560;
  --primary-dark: #c72e48;
  --primary-soft: rgba(233, 69, 96, 0.12);
  --accent: #4f7cff;
  --accent-soft: rgba(79, 124, 255, 0.12);
  --navy: #1a1a2e;
  --navy-soft: #16213e;
  --border: rgba(28, 33, 48, 0.09);
  --border-strong: rgba(28, 33, 48, 0.16);
  --shadow-sm: 0 2px 10px rgba(26, 26, 46, 0.06);
  --shadow: 0 10px 34px rgba(26, 26, 46, 0.1);
  --shadow-lg: 0 20px 60px rgba(26, 26, 46, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --glass-blur: 16px;
  --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #ff6b81 50%, #4f7cff 100%);
  --gradient-soft: linear-gradient(160deg, rgba(233, 69, 96, 0.08), rgba(79, 124, 255, 0.08));
  --header-h: 68px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body.dark-mode {
  --bg: #0d0f16;
  --bg-soft: #151824;
  --bg-elevated: rgba(26, 30, 44, 0.72);
  --text: #eceef5;
  --text-soft: #b6bccd;
  --text-muted: #8a92a6;
  --primary: #ff5c76;
  --primary-dark: #e94560;
  --primary-soft: rgba(255, 92, 118, 0.16);
  --accent: #6f97ff;
  --accent-soft: rgba(111, 151, 255, 0.16);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
  --gradient-hero: linear-gradient(135deg, #0b0d14 0%, #141a2c 45%, #1b2a4a 100%);
  --gradient-soft: linear-gradient(160deg, rgba(255, 92, 118, 0.1), rgba(111, 151, 255, 0.1));
}

*,
*::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;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 8% -10%, var(--primary-soft), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, var(--accent-soft), transparent 55%);
  background-attachment: fixed;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0 0 0.8rem;
}

h1 {
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
  letter-spacing: 0.5px;
}

h2 {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  position: relative;
  padding-bottom: 0.7rem;
  margin: 2.4rem 0 1.1rem;
}

h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  border-radius: 4px;
  background: var(--gradient-accent);
}

h3 {
  font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.22rem);
  margin: 1.7rem 0 0.7rem;
}

h4 {
  font-size: 1rem;
  margin: 1.3rem 0 0.5rem;
  color: var(--text-soft);
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

ul,
ol {
  margin: 0 0 1.1rem;
  padding-left: 1.35rem;
  color: var(--text-soft);
}

li {
  margin-bottom: 0.45rem;
}

li::marker {
  color: var(--primary);
}

strong {
  color: var(--text);
}

time {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--primary-soft);
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.3px;
}

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

#site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: rgba(26, 26, 46, 0.82);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

#site-header.is-sticky {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  background: rgba(20, 20, 38, 0.92);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.brand a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
}

.brand-logo {
  display: inline-flex;
  transition: transform 0.5s var(--ease);
}

.brand a:hover .brand-logo {
  transform: rotate(-12deg) scale(1.08);
}

.brand-text {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(120deg, #fff 0%, #ffd7de 60%, #b9caff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

#main-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

#nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#nav-list li {
  margin: 0;
}

#nav-list a {
  display: inline-block;
  color: #dfe3ef;
  font-size: 0.88rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  position: relative;
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}

#nav-list a:hover,
#nav-list a:focus-visible {
  color: #fff;
  background: rgba(233, 69, 96, 0.28);
  transform: translateY(-1px);
}

#menu-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0.38rem 0.85rem;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

#menu-toggle:hover {
  background: rgba(233, 69, 96, 0.35);
  transform: translateY(-1px);
}

#site-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

#site-search input {
  width: 172px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), width 0.3s var(--ease);
}

#site-search input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

#site-search input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--primary);
  width: 210px;
  outline: none;
}

#site-search button,
#theme-toggle {
  font-family: inherit;
  font-size: 0.84rem;
  color: #fff;
  background: var(--gradient-accent);
  background-size: 160% 160%;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-position 0.5s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#site-search button:hover,
#theme-toggle:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.4);
}

#theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.breadcrumb {
  padding: 1rem 0 0.4rem;
  font-size: 0.85rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
}

.breadcrumb li {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-muted);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--primary);
}

#hero {
  position: relative;
  margin: 1rem 0 2rem;
  padding: clamp(1.6rem, 1rem + 3vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--gradient-hero);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

#hero::before {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(233, 69, 96, 0.55), transparent 70%) 12% 18% / 46% 46% no-repeat,
    radial-gradient(closest-side, rgba(79, 124, 255, 0.5), transparent 70%) 88% 82% / 52% 52% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, 0.14), transparent 70%) 70% 12% / 30% 30% no-repeat;
  animation: heroDrift 18s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, 3%, 0) scale(1.08); }
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 62% 14%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 84% 38%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.5px 1.5px at 34% 68%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.5px 1.5px at 72% 78%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 8% 82%, rgba(255, 255, 255, 0.55), transparent);
  opacity: 0.9;
  pointer-events: none;
}

#hero h1 {
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

#hero .hero-lead {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
  max-width: 78ch;
}

#hero h2 {
  color: #fff;
}

.hero-carousel {
  position: relative;
  margin: 1.6rem 0 1.2rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.carousel-track {
  position: relative;
}

.carousel-slide {
  display: none;
  margin: 0;
  padding: 0;
  animation: slideFade 0.6s var(--ease);
}

.carousel-slide.is-active {
  display: block;
}

@keyframes slideFade {
  from { opacity: 0; transform: scale(1.015); }
  to { opacity: 1; transform: scale(1); }
}

.carousel-slide svg {
  width: 100%;
  height: auto;
  display: block;
}

.carousel-slide figcaption {
  padding: 0.75rem 1.1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(10, 12, 24, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  font-family: inherit;
  font-size: 0.8rem;
  color: #fff;
  background: rgba(10, 12, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  z-index: 2;
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-50%) scale(1.05);
  box-shadow: 0 8px 22px rgba(233, 69, 96, 0.45);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.stat {
  padding: 1rem 0.8rem;
  text-align: center;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
}

.stat:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(233, 69, 96, 0.55);
}

.stat-num {
  display: block;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(120deg, #fff, #ffb3c0 55%, #9db4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.3px;
}

#anchor-nav {
  margin: 0 0 2.4rem;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  box-shadow: var(--shadow-sm);
}

#anchor-nav h2 {
  font-size: 1rem;
  margin: 0 0 0.7rem;
  padding: 0;
  color: var(--text);
}

#anchor-nav h2::after {
  display: none;
}

#anchor-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

#anchor-nav li {
  margin: 0;
}

#anchor-nav a {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-soft);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#anchor-nav a:hover {
  color: #fff;
  background: var(--gradient-accent);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(233, 69, 96, 0.3);
}

main section {
  position: relative;
  padding: clamp(1.2rem, 0.9rem + 1.2vw, 2rem);
  margin-bottom: 1.6rem;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease);
}

main section:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

main section:not(#hero):not(#anchor-nav)::before {
  content: "";
  position: absolute;
  top: 0;
  left: clamp(1.2rem, 0.9rem + 1.2vw, 2rem);
  right: clamp(1.2rem, 0.9rem + 1.2vw, 2rem);
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--gradient-accent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

main section:not(#hero):not(#anchor-nav):hover::before {
  opacity: 1;
}

main section.will-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}

main section.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

main section h2 {
  margin-top: 0;
}

article {
  position: relative;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft), var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

article::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 3px;
  border-radius: 999px;
  background: var(--gradient-accent);
  opacity: 0.75;
  transition: opacity 0.35s var(--ease), top 0.35s var(--ease), bottom 0.35s var(--ease);
}

article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

article:hover::after {
  opacity: 1;
  top: 0.8rem;
  bottom: 0.8rem;
}

article h3 {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

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

article h3 a:hover {
  color: var(--primary);
}

article p {
  margin-bottom: 0.6rem;
}

article a[href^="#article"] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

article a[href^="#article"]::after {
  content: "→";
  transition: transform 0.25s var(--ease);
}

article a[href^="#article"]:hover {
  background: var(--gradient-accent);
  color: #fff;
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(233, 69, 96, 0.3);
}

article a[href^="#article"]:hover::after {
  transform: translateX(3px);
}

#news article {
  background: var(--bg-soft);
}

#news article time,
#articles article time {
  margin-bottom: 0.4rem;
}

details {
  position: relative;
  margin-bottom: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

details:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

details[open] {
  border-color: var(--primary);
  background: var(--gradient-soft), var(--bg-soft);
  box-shadow: var(--shadow);
}

details summary {
  position: relative;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  padding-right: 1.9rem;
  list-style: none;
  transition: color 0.25s var(--ease);
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}

details[open] summary::after {
  content: "−";
  background: var(--primary);
  color: #fff;
  transform: translateY(-50%) rotate(180deg);
}

details summary:hover {
  color: var(--primary);
}

details p {
  margin: 0.85rem 0 0.15rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border-strong);
  animation: detailIn 0.4s var(--ease);
}

@keyframes detailIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

#sitemap ul,
#links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

#sitemap a,
#links a {
  display: inline-block;
  font-size: 0.86rem;
  color: var(--text-soft);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

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

#team h4 {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.86rem;
}

#contact ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
}

#contact li {
  margin: 0;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-soft);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

#contact li:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

#site-footer {
  position: relative;
  margin-top: 2rem;
  padding: 2.6rem 1.25rem 2rem;
  background: var(--gradient-hero);
  color: #d7dbe8;
  overflow: hidden;
}

#site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(closest-side, rgba(233, 69, 96, 0.28), transparent 70%) 88% 8% / 40% 60% no-repeat,
    radial-gradient(closest-side, rgba(79, 124, 255, 0.26), transparent 70%) 4% 92% / 40% 60% no-repeat;
  pointer-events: none;
}

.footer-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr;
  gap: 1.8rem;
  align-items: start;
}

.footer-brand p {
  color: rgba(215, 219, 232, 0.82);
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
}

.footer-brand p strong {
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

#site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

#site-footer nav li {
  margin: 0;
}

#site-footer a {
  color: rgba(240, 165, 179, 0.92);
  font-size: 0.88rem;
  transition: color 0.25s var(--ease), padding-left 0.25s var(--ease);
}

#site-footer a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-meta p {
  color: rgba(215, 219, 232, 0.72);
  font-size: 0.82rem;
  margin: 0 0 0.4rem;
  line-height: 1.7;
}

#back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  width: 54px;
  height: 54px;
  padding: 0;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  background: var(--gradient-accent);
  background-size: 160% 160%;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  box-shadow: 0 10px 28px rgba(233, 69, 96, 0.4);
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease), transform 0.35s var(--ease), background-position 0.5s var(--ease), box-shadow 0.3s var(--ease);
}

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

#back-to-top:hover {
  background-position: 100% 50%;
  box-shadow: 0 14px 34px rgba(233, 69, 96, 0.55);
  transform: translateY(-3px) scale(1.04);
}

#back-to-top:active {
  transform: translateY(0) scale(0.96);
}

@media (max-width: 1024px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-meta {
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 860px) {
  #menu-toggle {
    display: inline-block;
    order: 3;
  }

  #main-nav {
    width: 100%;
    order: 4;
  }

  #nav-list {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.6rem;
    margin-top: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    animation: navIn 0.3s var(--ease);
  }

  #nav-list.is-open {
    display: flex;
  }

  @keyframes navIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  #nav-list a {
    display: block;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
  }

  #site-search {
    flex: 1;
    min-width: 200px;
  }

  #site-search input {
    flex: 1;
    width: 100%;
    min-width: 0;
  }

  #site-search input:focus {
    width: 100%;
  }

  #theme-toggle {
    order: 2;
  }
}

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

  .header-inner {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  .brand-text {
    font-size: 1.08rem;
    letter-spacing: 0.8px;
  }

  main {
    padding: 0 0.9rem 3rem;
  }

  #hero {
    border-radius: var(--radius);
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .stat {
    padding: 0.8rem 0.5rem;
  }

  .carousel-prev,
  .carousel-next {
    top: auto;
    bottom: 58px;
    transform: none;
    font-size: 0.74rem;
    padding: 0.35rem 0.7rem;
  }

  .carousel-prev:hover,
  .carousel-next:hover {
    transform: scale(1.04);
  }

  main section {
    padding: 1.1rem 1rem;
    margin-bottom: 1.1rem;
  }

  main section:not(#hero):not(#anchor-nav)::before {
    left: 1rem;
    right: 1rem;
  }

  article {
    padding: 0.95rem 1rem 0.95rem 1.15rem;
  }

  details {
    padding: 0.75rem 0.95rem;
  }

  #contact ul {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  #back-to-top {
    width: 48px;
    height: 48px;
    right: 0.9rem;
    bottom: 0.9rem;
    font-size: 0.66rem;
  }
}

@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;
  }

  main section.will-reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  #site-header,
  #anchor-nav,
  .hero-carousel,
  #back-to-top,
  #site-footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  main section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}