/* ==========================================================================
   12博主页 · 共享站点样式 /assets/site.css
   墨蓝底 + 电光青 + 暖橙，锐利直角与精密网格
   ========================================================================== */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: var(--ink-900);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, dt {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------- 2. 变量 ---------- */
:root {
  color-scheme: dark;

  --ink-900: #061525;
  --ink-850: #04101c;
  --ink-800: #0a2038;
  --ink-700: #0f2e4a;
  --line: #244b6b;
  --line-soft: rgba(36, 75, 107, 0.55);

  --cyan: #28e0d2;
  --cyan-glow: #a6fff7;
  --cyan-veil: rgba(40, 224, 210, 0.16);
  --orange: #ff8a3d;
  --orange-soft: #ffc29a;

  --text: #eaf6ff;
  --text-dim: #a9c2d6;
  --white: #ffffff;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "SF Mono", "Cascadia Mono",
    "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shell: 1220px;
  --narrow: 760px;
  --gutter: clamp(16px, 4vw, 40px);

  --radius-xs: 2px;
  --radius-sm: 6px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-lift: 0 18px 40px rgba(0, 0, 0, 0.38);
}

/* ---------- 3. 中文排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(30px, 4.6vw, 52px); }
h2 { font-size: clamp(24px, 3.2vw, 38px); }
h3 { font-size: clamp(19px, 2.1vw, 26px); letter-spacing: -0.015em; }
h4 { font-size: clamp(17px, 1.5vw, 20px); letter-spacing: -0.01em; }

p {
  font-size: 16px;
  line-height: 1.78;
  color: var(--text-dim);
}

@media (min-width: 900px) {
  p { font-size: 17px; }
}

.prose p + p {
  margin-top: 1em;
}

strong {
  color: var(--text);
  font-weight: 700;
}

a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--cyan-glow);
}

::selection {
  background: var(--cyan);
  color: #04202a;
}

:focus-visible {
  outline: 2px solid var(--cyan-glow);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

#main-content {
  display: block;
  scroll-margin-top: 96px;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 999;
  transform: translate(-50%, -220%);
  padding: 11px 22px;
  background: var(--cyan);
  color: #04202a;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: var(--radius-xs);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translate(-50%, 0);
  color: #04202a;
}

/* ---------- 5. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: clamp(10px, 1.4vw, 16px) var(--gutter);
  background: linear-gradient(
    180deg,
    rgba(4, 16, 28, 0.96) 0%,
    rgba(6, 21, 37, 0.82) 72%,
    rgba(6, 21, 37, 0.6) 100%
  );
  border-bottom: 1px solid var(--line-soft);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  backdrop-filter: saturate(150%) blur(16px);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}

/* 品牌胶囊 */
.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 6px 16px 6px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(15, 46, 74, 0.72);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.brand:hover {
  border-color: rgba(40, 224, 210, 0.55);
  background: rgba(15, 46, 74, 0.92);
  box-shadow: 0 0 0 1px rgba(40, 224, 210, 0.18), 0 0 24px rgba(40, 224, 210, 0.18);
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--cyan) 46%, #14958c 100%);
  color: #032226;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: 0 0 0 1px rgba(166, 255, 247, 0.35), 0 0 18px rgba(40, 224, 210, 0.4);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.brand-tag {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 栏目胶囊 */
.nav-capsule {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin-inline: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(10, 32, 56, 0.86);
  box-shadow: inset 0 1px 0 rgba(166, 255, 247, 0.08), 0 10px 26px rgba(0, 0, 0, 0.3);
}

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

.nav-list a {
  display: block;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-list a:hover {
  color: var(--text);
  background: rgba(40, 224, 210, 0.1);
}

.nav-list a[aria-current="page"] {
  color: #04202a;
  font-weight: 700;
  background: linear-gradient(180deg, var(--cyan-glow) 0%, var(--cyan) 100%);
  box-shadow: 0 0 18px rgba(40, 224, 210, 0.42);
}

.nav-list a[aria-current="page"]:hover {
  color: #04202a;
}

/* 尾部 */
.header-tail {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-cta {
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(15, 46, 74, 0.9);
  color: var(--text);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-toggle:hover {
  border-color: rgba(40, 224, 210, 0.6);
  background: rgba(40, 224, 210, 0.12);
  color: var(--cyan-glow);
}

.nav-toggle-bars {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background 0.2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

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

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

/* 阅读进度条 */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  display: block;
  height: 2px;
  background: rgba(36, 75, 107, 0.5);
  overflow: hidden;
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--cyan-glow) 55%, var(--orange) 100%);
  box-shadow: 0 0 12px rgba(40, 224, 210, 0.7);
  transition: width 0.1s linear;
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  padding: clamp(44px, 6vw, 76px) var(--gutter) 26px;
  overflow: hidden;
  color: var(--text-dim);
  background:
    radial-gradient(120% 90% at 10% 0%, rgba(40, 224, 210, 0.12), transparent 58%),
    radial-gradient(90% 80% at 94% 6%, rgba(255, 138, 61, 0.1), transparent 56%),
    var(--ink-850);
  border-top: 1px solid var(--line-soft);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 75, 107, 0.24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 75, 107, 0.24) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 72%);
  pointer-events: none;
}

.footer-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--line-soft);
}

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

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.footer-logo:hover {
  color: var(--cyan-glow);
}

.footer-logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-xs);
  background: linear-gradient(135deg, var(--cyan) 0%, #14958c 100%);
  color: #032226;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  box-shadow: 0 0 0 1px rgba(166, 255, 247, 0.28);
}

.footer-logo-text {
  display: inline-block;
}

.footer-summary {
  margin-top: 14px;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-dim);
}

.footer-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 5px 12px;
  border: 1px solid rgba(40, 224, 210, 0.3);
  background: rgba(40, 224, 210, 0.08);
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.footer-stamp .mono {
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.18em;
}

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

.footer-col-title {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(40, 224, 210, 0.28);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--cyan);
}

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

.footer-list a {
  display: inline-block;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-list a:hover {
  color: var(--cyan-glow);
  transform: translateX(3px);
}

.footer-contact-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}

.footer-key {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(169, 194, 214, 0.7);
}

.footer-val {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  overflow-wrap: anywhere;
}

.footer-note {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(169, 194, 214, 0.72);
}

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

.footer-legal,
.footer-copy {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(169, 194, 214, 0.72);
}

/* ---------- 7. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

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

.btn-sm {
  padding: 11px 18px;
  font-size: 13px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, #f2701c 100%);
  color: #1a0a02;
  box-shadow: 0 8px 24px rgba(255, 138, 61, 0.28);
}

.btn-primary:hover {
  color: #1a0a02;
  box-shadow: 0 12px 32px rgba(255, 138, 61, 0.42);
}

.btn-cyan {
  background: linear-gradient(135deg, var(--cyan-glow) 0%, var(--cyan) 55%, #17b6ab 100%);
  color: #032226;
  box-shadow: 0 8px 24px rgba(40, 224, 210, 0.26);
}

.btn-cyan:hover {
  color: #032226;
  box-shadow: 0 12px 32px rgba(40, 224, 210, 0.4);
}

.btn-ghost {
  border-color: var(--line);
  background: rgba(15, 46, 74, 0.6);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: rgba(40, 224, 210, 0.6);
  background: var(--cyan-veil);
  color: var(--cyan-glow);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(169, 194, 214, 0.7);
}

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

.breadcrumb li + li::before {
  content: "/";
  color: rgba(40, 224, 210, 0.55);
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

/* ---------- 9. 正文容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--narrow);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 28px);
}

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

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

@media (max-width: 620px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 10. 基础组件 ---------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(40, 224, 210, 0.4);
  border-radius: var(--radius-xs);
  background: var(--cyan-veil);
  color: var(--cyan-glow);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.6;
}

.tag--warm {
  border-color: rgba(255, 138, 61, 0.45);
  background: rgba(255, 138, 61, 0.14);
  color: var(--orange-soft);
}

.card {
  position: relative;
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: linear-gradient(180deg, rgba(15, 46, 74, 0.92), rgba(10, 32, 56, 0.92));
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.card:hover {
  border-color: rgba(40, 224, 210, 0.45);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.card--accent::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 44px;
  height: 2px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(40, 224, 210, 0.7);
}

.rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--line-soft);
}

/* ---------- 11. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background:
    linear-gradient(135deg, rgba(40, 224, 210, 0.16) 0%, transparent 46%),
    linear-gradient(315deg, rgba(255, 138, 61, 0.14) 0%, transparent 52%),
    var(--ink-700);
}

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img,
.media-frame > svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(166, 255, 247, 0.16);
  pointer-events: none;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

@media (max-width: 620px) {
  .media-frame { aspect-ratio: 4 / 3; }
  .media-frame--wide { aspect-ratio: 16 / 9; }
  .media-frame--tall { aspect-ratio: 4 / 5; }
}

/* ---------- 12. 响应式：头部 / 页脚 ---------- */
@media (max-width: 1080px) {
  .nav-list a {
    padding: 9px 11px;
    font-size: 13px;
  }
}

@media (max-width: 960px) {
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  .nav-capsule {
    position: absolute;
    top: calc(100% + 10px);
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    margin-inline: 0;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(8, 26, 44, 0.98);
    box-shadow: var(--shadow-lift), 0 0 0 1px rgba(40, 224, 210, 0.12);
  }

  .nav-capsule[data-open] {
    display: flex;
  }

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

  .nav-list a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .brand-tag {
    display: none;
  }

  .brand {
    padding: 6px 14px 6px 6px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .brand-name {
    font-size: 14px;
  }

  .footer-summary {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 13. 减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .btn:hover,
  .card:hover,
  .footer-list a:hover {
    transform: none;
  }
}
