/* ==========================================================
   xxccdl 个人网站 — 深色科技风主题
   ========================================================== */

:root {
  --bg: #0a0908;
  --bg-2: #14110d;
  --surface: rgba(255, 246, 230, 0.04);
  --surface-2: rgba(255, 246, 230, 0.07);
  --border: rgba(233, 213, 170, 0.12);
  --border-strong: rgba(233, 213, 170, 0.22);
  --text: #f0ebe0;
  --text-dim: #b3a992;
  --text-faint: #807763;
  --gold: #d9b06a;
  --bronze: #a57c3b;
  --copper: #c97a4a;
  --green: #8fbf7f;
  --danger: #e0705f;
  --grad-main: linear-gradient(120deg, #ecd9a8, var(--gold) 55%, var(--bronze));
  --grad-soft: linear-gradient(120deg, rgba(217,176,106,.16), rgba(165,124,59,.16));
  --glow-gold: 0 0 24px rgba(217, 176, 106, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
  --nav-h: 68px;
}

.hidden { display: none !important; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(165, 124, 59, 0.5); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(217,176,106,.4), rgba(165,124,59,.4));
  border-radius: 8px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold), var(--bronze)); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------------- 背景特效层 ---------------- */

.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(165, 124, 59, 0.18), transparent),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(217, 176, 106, 0.1), transparent),
    var(--bg);
}

#particles { position: absolute; inset: 0; }

.aurora {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
  pointer-events: none;
}
.aurora.a1 {
  background: radial-gradient(circle, rgba(217, 176, 106, 0.28), transparent 65%);
  top: -18vmax; left: -12vmax;
  animation: drift1 26s ease-in-out infinite alternate;
}
.aurora.a2 {
  background: radial-gradient(circle, rgba(165, 124, 59, 0.3), transparent 65%);
  bottom: -20vmax; right: -10vmax;
  animation: drift2 32s ease-in-out infinite alternate;
}
.aurora.a3 {
  background: radial-gradient(circle, rgba(201, 122, 74, 0.16), transparent 65%);
  top: 38%; left: 55%;
  animation: drift3 24s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, -8vmax) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-10vmax, 12vmax) scale(1.1); } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 213, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 213, 170, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

.cursor-glow {
  position: fixed;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 176, 106, 0.07), transparent 65%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
}

/* ---------------- 玻璃拟态 ---------------- */

.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ---------------- 导航 ---------------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(20px, 5vw, 56px);
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.nav.scrolled {
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.5px;
}
.brand .logo {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: var(--grad-main);
  box-shadow: 0 0 18px rgba(217, 176, 106, 0.4);
  animation: logoPulse 3.5s ease-in-out infinite;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(217,176,106,.35); }
  50% { box-shadow: 0 0 26px rgba(165,124,59,.55); }
}

.nav-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 15px;
  position: relative;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
  box-shadow: var(--glow-gold);
}

.nav-auth { display: flex; align-items: center; gap: 12px; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
}
.nav-user .avatar-mini {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: #fff;
  background: var(--grad-main);
}
.nav-user a { color: var(--gold); font-weight: 600; }
.nav-user a:hover { text-shadow: var(--glow-gold); }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }

.btn::before {
  content: "";
  position: absolute;
  top: 0; left: -80%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}
.btn:hover::before { left: 130%; }

.btn-primary {
  background: var(--grad-main);
  border: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(217, 176, 106, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 32px rgba(165, 124, 59, 0.5); }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(217, 176, 106, 0.5); }

.btn-sm { padding: 7px 16px; font-size: 13.5px; }
.btn-danger {
  border-color: rgba(224, 112, 95, 0.4);
  color: var(--danger);
}
.btn-danger:hover { background: rgba(224, 112, 95, 0.12); }

/* ---------------- Hero ---------------- */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 20px 60px;
  position: relative;
}

.hero-hello {
  font-family: var(--mono);
  color: var(--gold);
  letter-spacing: 4px;
  font-size: clamp(13px, 1.6vw, 16px);
  text-transform: uppercase;
  animation: fadeUp 0.8s 0.1s both;
}

.hero-name {
  font-size: clamp(56px, 11vw, 128px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.1;
  background: var(--grad-main);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fadeUp 0.8s 0.25s both, gradShift 7s ease infinite;
  filter: drop-shadow(0 0 32px rgba(217, 176, 106, 0.28));
}
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-typing {
  margin-top: 10px;
  font-size: clamp(20px, 3.4vw, 34px);
  font-weight: 700;
  color: var(--text);
  animation: fadeUp 0.8s 0.4s both;
  min-height: 1.4em;
}
.hero-typing .typed { color: var(--gold); text-shadow: 0 0 24px rgba(217, 176, 106, 0.6); }

.caret {
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--copper);
  box-shadow: 0 0 10px var(--copper);
  animation: caretBlink 0.9s step-end infinite;
}
@keyframes caretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-tagline {
  margin-top: 18px;
  max-width: 560px;
  color: var(--text-dim);
  font-size: clamp(15px, 1.8vw, 18px);
  animation: fadeUp 0.8s 0.55s both;
}

.hero-cta {
  margin-top: 38px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.8s 0.7s both;
}

.bento-stats {
  margin-top: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  animation: fadeUp 0.8s 0.85s both;
}
.bento-card {
  width: 185px;
  padding: 18px 16px 15px;
  border-radius: 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 176, 106, 0.45);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), var(--glow-gold);
}
.bento-card .ico {
  font-size: 17px;
  margin-bottom: 8px;
  display: block;
}
.bento-card .num {
  font-size: 27px;
  font-weight: 800;
  font-family: var(--mono);
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
  white-space: nowrap;
}
.bento-card .label { color: var(--text-faint); font-size: 12.5px; margin-top: 3px; letter-spacing: 0.5px; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 22px;
  animation: bounceY 2s ease-in-out infinite;
}
@keyframes bounceY { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------- 通用 Section ---------------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(70px, 10vw, 120px) 24px 0;
}

.section-head { margin-bottom: 48px; }
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--gold);
  background: rgba(217, 176, 106, 0.08);
  border: 1px solid rgba(217, 176, 106, 0.3);
}
.section-pill .count {
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 18px;
  color: #fff;
  background: var(--grad-main);
}
.section-title {
  margin-top: 10px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 800;
  line-height: 1.2;
}
.section-title .grad {
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-desc { margin-top: 10px; color: var(--text-dim); max-width: 640px; }

/* ---------------- 关于我 ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: start;
}

.avatar-wrap { position: relative; width: 240px; margin: 0 auto; }
.avatar {
  width: 240px; height: 240px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(165, 124, 59, 0.25);
  position: relative;
  z-index: 1;
}
.avatar-fallback {
  width: 240px; height: 240px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  font-size: 84px;
  font-weight: 900;
  font-family: var(--mono);
  background: var(--grad-main);
  color: rgba(255, 255, 255, 0.92);
  position: relative;
  z-index: 1;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(165, 124, 59, 0.3);
}
.avatar-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 34px;
  background: conic-gradient(from var(--angle, 0deg), var(--gold), var(--bronze), var(--copper), var(--gold));
  animation: spin 6s linear infinite;
  opacity: 0.55;
  filter: blur(2px);
  z-index: 0;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

.bio p { color: var(--text-dim); margin-bottom: 16px; font-size: 16px; }

.skills-title {
  margin: 28px 0 14px;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-faint);
  text-transform: uppercase;
  font-family: var(--mono);
}
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.25s;
  cursor: default;
}
.chip:hover {
  color: var(--gold);
  border-color: rgba(217, 176, 106, 0.5);
  box-shadow: var(--glow-gold);
  transform: translateY(-2px);
}

/* ---------------- 项目展示 ---------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.project-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover {
  border-color: rgba(217, 176, 106, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(165, 124, 59, 0.18);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  pointer-events: none;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 176, 106, 0.1), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s;
}
.project-card:hover::after { opacity: 1; }

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid var(--border);
}
.term-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.term-bar i:nth-child(1) { background: #ff5f56; }
.term-bar i:nth-child(2) { background: #ffbd2e; }
.term-bar i:nth-child(3) { background: #27c93f; }
.term-bar .term-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-cover {
  height: 170px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.project-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-cover img { transform: scale(1.08); }

.cover-gradient {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .cover-gradient { transform: scale(1.08); }
.cover-gradient .big-letter {
  font-family: var(--mono);
  font-size: 84px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.22);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  user-select: none;
}

.project-flag {
  position: absolute;
  top: 14px; right: 14px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(6px);
}

.project-body { padding: 22px 22px 24px; }
.project-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.project-desc {
  color: var(--text-dim);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 66px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.project-tags span {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 6px;
  color: var(--gold);
  background: rgba(217, 176, 106, 0.08);
  border: 1px solid rgba(217, 176, 106, 0.22);
}

.project-links {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  display: flex;
  gap: 12px;
}
.project-links .btn { flex: 1; padding: 9px 12px; font-size: 14px; }

/* ---------------- 页脚 ---------------- */

.footer {
  margin-top: clamp(70px, 10vw, 120px);
  border-top: 1px solid var(--border);
  padding: 40px 24px 48px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14px;
}
.socials { display: flex; justify-content: center; gap: 18px; margin-bottom: 18px; }
.socials a {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: all 0.25s;
}
.socials a:hover {
  color: var(--gold);
  border-color: rgba(217, 176, 106, 0.5);
  box-shadow: var(--glow-gold);
  transform: translateY(-3px);
}
.socials svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------------- 滚动渐入 ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------- 管理员快捷编辑 ---------------- */

.edit-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--grad-main);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(165, 124, 59, 0.5);
  transition: transform 0.25s, box-shadow 0.25s;
}
.edit-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 40px rgba(217, 176, 106, 0.5); }

/* ---------------- 认证页 ---------------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-side {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px clamp(30px, 6vw, 90px);
  background:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(217, 176, 106, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(201, 122, 74, 0.1), transparent),
    var(--bg-2);
  border-right: 1px solid var(--border);
}
.auth-side .big-brand {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 900;
  background: var(--grad-main);
  background-size: 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradShift 7s ease infinite;
}
.auth-side p { color: var(--text-dim); margin-top: 16px; max-width: 420px; }
.auth-side .quote {
  margin-top: 40px;
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-dim);
  font-size: 15px;
  max-width: 440px;
}
.auth-side .quote b { color: var(--gold); font-family: var(--mono); }

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: min(420px, 100%);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: fadeUp 0.7s 0.15s both;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 30px;
  position: relative;
}
.auth-tabs .slider {
  position: absolute;
  top: 5px; bottom: 5px;
  width: calc(50% - 5px);
  left: 5px;
  border-radius: 999px;
  background: var(--grad-main);
  box-shadow: 0 0 18px rgba(217, 176, 106, 0.4);
  transition: transform 0.35s cubic-bezier(0.5, 1.4, 0.4, 1);
}
.auth-tabs.register .slider { transform: translateX(100%); }
.auth-tabs button {
  flex: 1;
  position: relative;
  z-index: 1;
  padding: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.3s;
}
.auth-tabs button.on { color: #fff; }

.field { position: relative; margin-bottom: 18px; }
.field input {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.field input:focus {
  border-color: rgba(217, 176, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(217, 176, 106, 0.12), var(--glow-gold);
}
.field label {
  position: absolute;
  left: 16px; top: 14px;
  color: var(--text-faint);
  font-size: 15px;
  pointer-events: none;
  transition: all 0.22s;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: -9px;
  left: 12px;
  font-size: 12px;
  color: var(--gold);
  background: var(--bg-2);
  padding: 0 6px;
  border-radius: 4px;
}
.field .eye {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 17px;
  padding: 4px;
}
.field .eye:hover { color: var(--gold); }

.auth-msg {
  min-height: 22px;
  font-size: 13.5px;
  margin-bottom: 12px;
  color: var(--danger);
}
.auth-msg.ok { color: var(--green); }

.auth-card .btn { width: 100%; padding: 13px; font-size: 16px; }

.auth-card.shake { animation: shake 0.45s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.auth-back {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}
.auth-back a { color: var(--gold); }
.auth-back a:hover { text-shadow: var(--glow-gold); }

/* 密码强度条 */
.strength {
  margin: -8px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.strength-bars { display: flex; gap: 5px; flex: 1; }
.strength-bars i {
  height: 4px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 246, 230, 0.08);
  transition: background 0.3s, box-shadow 0.3s;
}
.strength.s1 .b1 { background: var(--danger); }
.strength.s2 .b1, .strength.s2 .b2 { background: var(--copper); }
.strength.s3 .b1, .strength.s3 .b2, .strength.s3 .b3 { background: var(--gold); box-shadow: 0 0 8px rgba(217,176,106,.5); }
.strength.s4 .b1, .strength.s4 .b2, .strength.s4 .b3, .strength.s4 .b4 { background: var(--green); box-shadow: 0 0 8px rgba(143,191,127,.5); }
.strength .txt { font-size: 12px; color: var(--text-faint); min-width: 3.5em; text-align: right; }

/* 字段提示 */
.field-hint {
  margin: -12px 0 14px;
  font-size: 12px;
  color: var(--text-faint);
}

/* 按钮加载态 */
.btn.loading { pointer-events: none; opacity: 0.85; }
.btn.loading::after {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spinLoader 0.7s linear infinite;
}
@keyframes spinLoader { to { transform: rotate(360deg); } }

/* 登录卡片顶部流光描边 */
.auth-card {
  position: relative;
}
.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 23px;
  padding: 1px;
  background: linear-gradient(130deg, rgba(236,217,168,.5), transparent 30%, transparent 70%, rgba(165,124,59,.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .avatar-wrap, .avatar, .avatar-fallback { width: 200px; }
  .avatar, .avatar-fallback { height: 200px; font-size: 68px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    right: 0;
    flex-direction: column;
    padding: 18px;
    min-width: 200px;
    background: rgba(16, 13, 9, 0.97);
    border: 1px solid var(--border);
    border-radius: 0 0 0 18px;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .nav-links.open { transform: translateX(0); }
  .menu-btn { display: grid !important; }
}

.menu-btn {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  margin-left: auto;
}

@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .bento-card { width: calc(50% - 7px); }
}

/* ---------------- 无障碍：减少动态 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   2026 现代化增强：噪点 / 跑马灯 / 编辑风项目卡 / 页脚大字
   ========================================================== */

.noise {
  position: fixed;
  inset: -50%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-5%, -2%); }
  80% { transform: translate(4%, 4%); }
}

.marquee {
  margin-top: clamp(70px, 10vw, 120px);
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--mono);
  font-size: clamp(22px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 213, 170, 0.35);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee-track span:hover { color: var(--gold); -webkit-text-stroke-color: transparent; }
.marquee-track em { font-style: normal; color: var(--bronze); font-size: 18px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 编辑风项目卡：序号 + 精选跨列 */
.project-cover .cover-index {
  position: absolute;
  left: 18px;
  bottom: 10px;
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 2px;
  line-height: 1;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}
@media (min-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .project-card.featured { grid-column: span 2; }
  .project-card.featured .project-cover { height: 220px; }
}

/* 页脚超大幽灵字 */
.footer {
  position: relative;
  overflow: hidden;
}
.footer .ghost-mark {
  font-size: clamp(90px, 17vw, 260px);
  font-weight: 900;
  letter-spacing: 6px;
  line-height: 0.9;
  text-align: center;
  user-select: none;
  pointer-events: none;
  color: transparent;
  -webkit-text-stroke: 1px rgba(233, 213, 170, 0.12);
  margin-top: 34px;
  margin-bottom: -0.24em;
  font-family: var(--mono);
}

/* ---------------- SVG 图标通用尺寸 ---------------- */
.menu-btn svg { width: 18px; height: 18px; display: block; }
.scroll-hint svg { width: 26px; height: 26px; display: block; }
.bento-card .ico svg { width: 20px; height: 20px; color: var(--gold); }
.project-flag svg { width: 12px; height: 12px; vertical-align: -1px; }
.edit-fab svg { width: 15px; height: 15px; }
.eye svg { width: 18px; height: 18px; display: block; }
.nav-user svg { width: 15px; height: 15px; }

/* ---------------- SVG 图标补充对齐 ---------------- */
.nav-auth .btn svg { width: 14px; height: 14px; vertical-align: -2px; }
.nav-logout svg { width: 15px; height: 15px; display: block; }
.nav-user .name { font-size: 14px; font-weight: 600; }
.marquee-track em {
  width: 8px;
  height: 8px;
  min-width: 8px;
  background: var(--bronze);
  transform: rotate(45deg);
  border-radius: 1px;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
[hidden] { display: none !important; }

/* 页脚邮箱 mailto 链接 */
.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 14px;
  margin-bottom: 20px;
  transition: all 0.25s;
}
.footer-mail:hover {
  color: var(--gold);
  border-color: rgba(217, 176, 106, 0.5);
  box-shadow: var(--glow-gold);
  transform: translateY(-2px);
}
.footer-mail svg { width: 15px; height: 15px; }

/* ---------------- 克制风时髦件：进度条 / 返回顶部 / 类型徽章 / 列表布局 ---------------- */

.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 210;
  background: var(--grad-main);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 17, 13, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--gold);
  cursor: pointer;
  z-index: 89;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.25s, box-shadow 0.25s;
  pointer-events: none;
}
.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover { border-color: rgba(217, 176, 106, 0.5); box-shadow: var(--glow-gold); }
.back-top svg { width: 18px; height: 18px; }
.back-top[hidden] { display: none; }

.edit-fab { bottom: 84px; }

.term-type {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(217, 176, 106, 0.1);
  border: 1px solid rgba(217, 176, 106, 0.3);
  flex-shrink: 0;
}
.list-head { display: flex; align-items: center; gap: 10px; }
.list-head .term-type { margin-left: 0; }
.list-head .project-title { margin-bottom: 0; }
.list-head + .project-desc { margin-top: 8px; }

/* 列表布局 */
.projects-grid.list-mode {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.projects-grid.list-mode .project-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
}
.projects-grid.list-mode .project-card::after { display: none; }
.projects-grid.list-mode .project-cover {
  height: 100%;
  min-height: 170px;
}
.projects-grid.list-mode .project-body {
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
}
.projects-grid.list-mode .project-desc { min-height: 0; }
.projects-grid.list-mode .project-links {
  margin-top: auto;
  padding-top: 16px;
}
.projects-grid.list-mode .project-links .btn { flex: 0 0 auto; }

@media (max-width: 760px) {
  .projects-grid.list-mode .project-card { grid-template-columns: 1fr; }
  .projects-grid.list-mode .project-cover { min-height: 150px; height: 150px; }
}
