:root {
  --surface: rgba(14, 20, 36, 0.9);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --border: rgba(148, 163, 184, 0.2);
  --shadow: 0 18px 40px rgba(2, 8, 23, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background-color: #080c18;
  background-image:
    linear-gradient(180deg, rgba(6, 10, 22, 0.92) 0%, rgba(8, 14, 28, 0.88) 50%, rgba(6, 10, 22, 0.92) 100%),
    url("../picture/site-bg.jpg");
  background-position: center top, center top;
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, scroll;
  min-height: 100vh;
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  body {
    background-image:
      linear-gradient(180deg, rgba(6, 10, 22, 0.92) 0%, rgba(8, 14, 28, 0.88) 50%, rgba(6, 10, 22, 0.92) 100%),
      image-set(url("../picture/site-bg.webp") type("image/webp"), url("../picture/site-bg.jpg") type("image/jpeg"));
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

h1,
h2,
h3 {
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 12, 24, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 1rem;
}

.site-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  width: 100%;
  max-width: 100%;
  background-color: #0a1020;
  background-image:
    linear-gradient(130deg, rgba(8, 14, 30, 0.75), rgba(10, 18, 38, 0.65)),
    url("../picture/site-bg.jpg");
  background-position: 0 0, center 40%;
  background-size: auto, cover;
  background-repeat: no-repeat, no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .site-hero {
    background-image:
      linear-gradient(130deg, rgba(8, 14, 30, 0.75), rgba(10, 18, 38, 0.65)),
      image-set(url("../picture/site-bg.webp") type("image/webp"), url("../picture/site-bg.jpg") type("image/jpeg"));
  }
}

.site-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(8, 12, 24, 0.82), rgba(15, 23, 42, 0.56));
}

.site-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(147, 51, 234, 0.08));
  transform: skewX(-8deg);
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: 88px 0 64px;
  display: grid;
  gap: 18px;
  color: #ffffff;
  max-width: 860px;
}

.hero-inner h1 {
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  margin: 0;
}

.hero-inner p {
  margin: 0;
  color: rgba(226, 232, 240, 0.92);
  line-height: 1.8;
  font-size: 1.05rem;
}

.hero-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.hero-card {
  background: rgba(14, 20, 36, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.hero-card h2.hero-card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.hero-card p,
.hero-card ul {
  margin: 0;
  color: rgba(226, 232, 240, 0.9);
  line-height: 1.6;
}

.hero-card ul {
  padding-left: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.15);
  color: #e0f2fe;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  width: fit-content;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #051018;
  box-shadow: 0 12px 20px rgba(34, 211, 238, 0.3);
}

.btn-secondary {
  border-color: rgba(148, 163, 184, 0.5);
  color: #e2e8f0;
  background: rgba(14, 20, 36, 0.6);
}

.section {
  padding: 96px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  position: relative;
  overflow: hidden;
}

.section::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0.04) 45%, transparent 72%);
  pointer-events: none;
}

.section-title {
  display: grid;
  gap: 10px;
  margin-bottom: 42px;
  padding-left: 0;
}

.section-title p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
  line-height: 1.8;
  font-size: 1.05rem;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: 860px;
  line-height: 1.85;
  color: #cbd5f5;
}

.prose > * {
  margin: 0;
}

.prose h2 {
  margin-top: 12px;
  margin-bottom: 4px;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  color: #ffffff;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.28);
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 6px;
}

.bento-grid,
.card-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card,
.info-card,
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card::before,
.info-card::before,
.post-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(125, 211, 252, 0.12);
  pointer-events: none;
}

.card:hover,
.info-card:hover,
.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.35);
  box-shadow: 0 20px 36px rgba(2, 8, 23, 0.55);
}

.section-title h2 {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(125, 211, 252, 0.35);
}

.section .container > h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(125, 211, 252, 0.35);
}

.card h3,
.info-card h3,
.post-card h3 {
  margin: 0;
}

.card p,
.info-card p,
.post-card .post-body p {
  margin: 0;
  color: #cbd5f5;
  line-height: 1.7;
}

.mini-card {
  min-height: 150px;
}

.mini-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.mini-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0;
  color: #cbd5f5;
}

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

.info-card picture {
  display: block;
  width: 100%;
}

.info-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 12px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.stat-list {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.stat-list span {
  color: #ffffff;
  font-weight: 600;
}

.post-card picture {
  display: block;
  width: 100%;
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.post-body {
  display: grid;
  gap: 8px;
  align-content: start;
}

form {
  display: grid;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(14, 20, 36, 0.7);
  color: var(--text);
}

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

footer .footer-col-title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

footer {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  padding: 40px 0 60px;
  color: var(--muted);
  background: rgba(6, 10, 22, 0.88);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

@media (max-width: 980px) {
  .bento-grid,
  .card-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 768px) {
  .site-hero {
    clip-path: none;
  }

  .site-hero::after {
    display: none;
  }

  .section::after {
    display: none;
  }

  .bento-grid,
  .card-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .nav-links {
    position: absolute;
    right: 20px;
    top: 70px;
    background: #0f172a;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    display: none;
    min-width: 200px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .site-hero {
    min-height: 260px;
  }
}
