/* ===== CSS Variables & Reset ===== */
:root {
  --bg-0: #05060a;
  --bg-1: #0c0e14;
  --bg-2: #141820;
  --bg-3: #1a2030;
  --accent: #9aa8ff;
  --accent-2: #5eead4;
  --accent-rgb: 154, 168, 255;
  --accent-2-rgb: 94, 234, 212;
  --accent-dim: rgba(154, 168, 255, 0.14);
  --accent-glow: rgba(154, 168, 255, 0.38);
  --text: #eaeef6;
  --text-muted: #7a8499;
  --glass: rgba(10, 12, 20, 0.78);
  --glass-border: rgba(154, 168, 255, 0.12);
  --radius: 12px;
  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: 'Cascadia Code', 'Consolas', monospace;
  --scroll-ratio: 0;
  --bg-active: 0;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-0);
  overflow-x: hidden;
  line-height: 1.7;
}

body.protected {
  -webkit-user-select: none;
  user-select: none;
}

body.protected .article-body,
body.protected .modal-box,
body.protected input,
body.protected textarea {
  -webkit-user-select: text;
  user-select: text;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== Scroll Background Layers ===== */
.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.2s ease, transform 1.8s ease;
  will-change: opacity, transform;
}

.bg-layer.active {
  opacity: 1;
  transform: scale(1);
}

/* 首页 — 深空紫 */
.bg-layer-0 {
  background:
    radial-gradient(ellipse 90% 70% at calc(50% + var(--scroll-ratio) * 8%) -8%, rgba(154, 168, 255, 0.22) 0%, transparent 58%),
    radial-gradient(ellipse 55% 45% at calc(88% - var(--scroll-ratio) * 10%) 75%, rgba(94, 234, 212, 0.08) 0%, transparent 55%),
    linear-gradient(calc(168deg + var(--scroll-ratio) * 18deg), #05060a 0%, #0e1220 55%, #080a12 100%);
}

/* 随笔 / 资料 — 靛青 */
.bg-layer-1 {
  background:
    radial-gradient(ellipse 75% 55% at calc(15% + var(--scroll-ratio) * 12%) 20%, rgba(94, 234, 212, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse 65% 50% at calc(82% - var(--scroll-ratio) * 8%) 78%, rgba(154, 168, 255, 0.12) 0%, transparent 50%),
    linear-gradient(180deg, #060810 0%, #101828 100%);
}

/* 联络 — 暮紫 */
.bg-layer-2 {
  background:
    radial-gradient(ellipse 60% 50% at calc(50% + var(--scroll-ratio) * 6%) 38%, rgba(192, 132, 252, 0.12) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 20% 85%, rgba(154, 168, 255, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a0814 0%, #12101c 100%);
}

/* 文章 / 深读 — 墨蓝 */
.bg-layer-3 {
  background:
    radial-gradient(ellipse 70% 55% at calc(72% - var(--scroll-ratio) * 10%) 18%, rgba(94, 234, 212, 0.1) 0%, transparent 52%),
    radial-gradient(ellipse 55% 45% at calc(25% + var(--scroll-ratio) * 8%) 82%, rgba(154, 168, 255, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #080c14 0%, #040508 100%);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(154, 168, 255, 0.07) 0.6px, transparent 0.6px);
  background-size: 28px 28px;
  background-position: calc(var(--scroll-ratio) * 14px) calc(var(--scroll-ratio) * -28px);
  pointer-events: none;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 45%, black 10%, transparent 72%);
  opacity: 0.85;
  transition: opacity 0.6s ease;
}

/* ===== Ambient FX (纯前端) ===== */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.bg-mesh {
  position: absolute;
  inset: 0;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.bg-blob-1 {
  width: min(55vw, 520px);
  height: min(55vw, 520px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(154, 168, 255, 0.55) 0%, transparent 68%);
  animation: blobDrift1 22s ease-in-out infinite alternate;
}

.bg-blob-2 {
  width: min(48vw, 440px);
  height: min(48vw, 440px);
  top: 42%;
  right: -10%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.35) 0%, transparent 70%);
  animation: blobDrift2 26s ease-in-out infinite alternate;
}

.bg-blob-3 {
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  bottom: -6%;
  left: 28%;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.28) 0%, transparent 72%);
  animation: blobDrift3 20s ease-in-out infinite alternate;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 35%, rgba(5, 6, 10, 0.65) 100%);
  pointer-events: none;
}

@keyframes blobDrift1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.45; }
  100% { transform: translate(6%, 4%) scale(1.08); opacity: 0.62; }
}

@keyframes blobDrift2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.38; }
  100% { transform: translate(-8%, -5%) scale(1.06); opacity: 0.55; }
}

@keyframes blobDrift3 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.35; }
  100% { transform: translate(5%, -6%) scale(1.05); opacity: 0.5; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-blob { animation: none !important; }
  .bg-particles-canvas { display: none; }
}

/* ===== Splash Screen ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #05060a;
  transition: opacity 0.8s ease, visibility 0.8s ease;
  height: 100vh;
  height: 100dvh;
}

.splash.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #05060a;
  overflow: hidden;
  position: relative;
}

.splash video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  position: relative;
  z-index: 1;
}

.splash-fallback-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.splash.is-fallback .splash-fallback-art {
  opacity: 1;
  z-index: 2;
}

.splash.is-fallback video {
  opacity: 0;
  pointer-events: none;
}

.splash-brand {
  font-family: var(--mono);
  font-size: clamp(2rem, 10vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  margin-right: -0.35em;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splashBrandIn 1.2s ease forwards;
}

.splash-tagline {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  animation: splashTagIn 1.4s 0.3s ease forwards;
  opacity: 0;
}

@keyframes splashBrandIn {
  0% { opacity: 0; transform: scale(0.92) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes splashTagIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.splash-tap {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 11;
  pointer-events: none;
}

.splash-tap.visible {
  opacity: 1;
  visibility: visible;
  animation: splashTapPulse 1.6s ease-in-out infinite;
}

@keyframes splashTapPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

.splash-skip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  padding: 10px 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  font-family: var(--font);
  z-index: 10;
}

.splash-skip:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
  color: var(--accent);
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
}

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

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-brand {
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  transition: all 0.3s;
}

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 48px;
}

.hero-inner { text-align: center; max-width: 560px; }

.hero-signature {
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 4px;
  margin-bottom: 20px;
  font-family: var(--mono);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s forwards;
}

.hero-avatar-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 28px;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s forwards;
}

.hero-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), transparent 40%, transparent 60%, var(--accent));
  animation: avatarRing 4s ease-in-out infinite alternate;
}

@keyframes avatarRing {
  0% { opacity: 0.65; transform: rotate(0deg); }
  100% { opacity: 1; transform: rotate(8deg); }
}

.hero-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg-0);
}

@keyframes spin { to { transform: rotate(360deg); } }

.hero-name {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0;
  animation: fadeUp 0.8s 0.7s forwards;
}

.hero-nickname {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.hero-bio {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.9s forwards;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s 1s forwards;
}

.tag {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--glass-border);
}

.hero-meta {
  display: flex;
  gap: 20px;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeUp 0.8s 1.1s forwards;
}

.hero-meta span::before { content: '› '; color: var(--accent); }

.hero-title {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 0.75s forwards;
  letter-spacing: 1px;
}

/* Page layout */
.page {
  padding: 120px 0 80px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 48px;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 560px;
  line-height: 1.8;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* About layout */
.about-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

.about-profile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 100px;
}

.about-avatar-wrap {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  position: relative;
}

.about-avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), transparent 50%, var(--accent));
  opacity: 0.85;
}

.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border: 3px solid var(--bg-0);
}

.about-profile h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.about-role {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 8px;
}

.about-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.about-tags .tag { font-size: 11px; padding: 2px 10px; }

.about-card p { color: var(--text-muted); margin-bottom: 16px; line-height: 1.9; }
.about-card p:last-child { margin-bottom: 0; }

/* Resources */
.resources-section { margin-bottom: 56px; }

.resources-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.resources-section-head h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.resources-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.material-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}

.material-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
}

.material-cover {
  height: 140px;
  background: linear-gradient(135deg, var(--bg-2) 0%, var(--bg-3) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.material-cover-empty {
  font-size: 28px;
  color: var(--accent);
  opacity: 0.3;
}

.material-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-body { padding: 20px; }

.material-body h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.material-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.material-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.material-link:hover { text-decoration: underline; }

.material-cat {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.material-note {
  font-size: 12px;
  color: var(--text-muted);
}

.resources-cat + .resources-cat {
  margin-top: 12px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.link-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 22px;
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  display: block;
}

.link-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.link-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.link-logo {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255,255,255,0.08);
  padding: 2px;
}

.link-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.link-arrow {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  transition: stroke 0.3s;
}

.link-card:hover .link-arrow { stroke: var(--accent); }

.link-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.link-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

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

.section { padding: 80px 0; }

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.section-title { font-size: 1.6rem; font-weight: 600; margin-bottom: 40px; }

.entries-grid { display: flex; flex-direction: column; gap: 20px; }

.entry-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.entry-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.entry-date {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.entry-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.entry-summary { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.entry-tags .tag { font-size: 11px; padding: 2px 10px; }

.about-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(12px);
}

.about-card p { color: var(--text-muted); margin-bottom: 16px; }
.about-card p:last-child { margin-bottom: 0; }

.social-links { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }

.social-links a {
  padding: 8px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  transition: all 0.3s;
  text-decoration: none;
}

.social-links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.site-footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-copy {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.55;
}

.footer-icp {
  margin-top: 10px;
  font-size: 12px;
}

.footer-icp a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-icp a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Contact page hero */
.contact-hero {
  margin-bottom: 36px;
  padding: 28px 32px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
}

.contact-hero-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

.contact-hero-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(var(--accent-rgb), 0.35);
}

.contact-hero-profile h2 {
  font-size: 1.35rem;
  margin-bottom: 4px;
}

.contact-hero-profile p {
  color: var(--text-muted);
  font-size: 14px;
}

.contact-hero-hint {
  color: var(--text-muted);
  font-size: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.contact-grid-main {
  margin-bottom: 48px;
}

/* Contact section */
.contact-section {
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--glass-border);
}

.contact-hint {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--font);
  color: inherit;
  text-align: center;
}

.contact-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.1);
}

.contact-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon-svg {
  width: 28px;
  height: 28px;
  display: block;
}

.modal-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.modal-title-icon {
  display: inline-flex;
  color: var(--accent);
}

.modal-title-icon .contact-icon-svg {
  width: 22px;
  height: 22px;
}
.contact-label { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.contact-sub {
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 10px;
}
.contact-tap { font-size: 11px; color: var(--accent); opacity: 0.7; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
  backdrop-filter: blur(20px);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { transform: scale(0.92) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.modal-close:hover { color: var(--accent); }

.modal-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-qr {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto 16px;
  background: #fff;
  padding: 8px;
}

.modal-qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
  padding: 16px;
}

.modal-id {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.modal-id strong { color: var(--accent); }

.modal-value {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--accent);
  padding: 14px;
  background: var(--accent-dim);
  border-radius: 8px;
  margin-bottom: 16px;
  word-break: break-all;
}

.btn-copy {
  padding: 10px 24px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: opacity 0.2s;
}

.btn-copy:hover { opacity: 0.85; }

.article-page { padding: 120px 24px 80px; min-height: 100vh; }

.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
  text-decoration: none;
}

.article-back:hover { color: var(--accent); text-decoration: none; }

.article-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-body {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 36px;
  backdrop-filter: blur(12px);
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-muted);
}

.article-body p { margin-bottom: 1.2em; }
.article-body p:last-child { margin-bottom: 0; }

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 13px;
}

/* ===== Home Sections ===== */
.home-sections {
  padding: 0 0 60px;
}

.home-block {
  margin-bottom: 56px;
}

.home-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.home-block-head h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.home-more {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.home-more:hover { color: var(--accent); text-decoration: none; }

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
}

.home-quick-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(var(--accent-rgb), 0.08);
  text-decoration: none;
}

.home-quick-icon {
  font-size: 22px;
  color: var(--accent);
  margin-bottom: 10px;
}

.home-quick-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.home-quick-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 56px;
}

.home-stat {
  text-align: center;
  padding: 20px 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.home-stat-num {
  font-family: var(--mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.home-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.home-brands-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.home-brands-scroll::-webkit-scrollbar { display: none; }

.home-brand-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  min-width: 140px;
}

.home-brand-chip:hover {
  border-color: var(--accent-glow);
  text-decoration: none;
  transform: translateY(-2px);
}

.home-brand-chip img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.05);
}

.home-brand-chip span {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.home-entries { display: flex; flex-direction: column; gap: 14px; }

.home-entry-card {
  display: block;
  padding: 22px 24px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
}

.home-entry-card:hover {
  border-color: var(--accent-glow);
  transform: translateX(4px);
  text-decoration: none;
}

.home-entry-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.home-entry-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.home-entry-date {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(5, 5, 8, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 0;
  }
  .site-nav.open .nav-links { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
  }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--accent-dim); }
  .site-nav .container { position: relative; }
  .hero-name { font-size: 1.5rem; }
  .hero-avatar-wrap, .hero-avatar { width: 110px; height: 110px; }
  .section { padding: 60px 0; }
  .entry-card { padding: 20px; }
  .article-title { font-size: 1.5rem; }
  .article-body { padding: 24px; }
  .splash-skip { bottom: 16px; right: 16px; }
  .splash-tap { bottom: 64px; font-size: 12px; }
  .about-layout { grid-template-columns: 1fr; }
  .about-profile { position: static; }
  .materials-grid { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 1.6rem; }
  .home-quick-grid { grid-template-columns: 1fr; }
  .home-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .home-stat { padding: 14px 8px; }
  .home-stat-num { font-size: 1.2rem; }
  .hero { min-height: auto; padding: 100px 24px 40px; }
  .contact-grid { grid-template-columns: 1fr; }
  .modal-box { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .hero-meta { flex-direction: column; gap: 8px; }
  .container { padding: 0 16px; }
}

/* Link logo — letter first, image overlays when loaded */
.link-logo-box {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.link-logo-box .link-logo,
.link-logo-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.link-logo-box img.loaded { opacity: 1; }

.link-logo-box .link-logo-placeholder,
.link-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

.material-cover-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(10, 12, 20, 0.9));
}

.home-brand-chip .link-logo-box,
.home-brand-chip .link-logo-placeholder {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 6px;
}

/* ===== Music Player ===== */
.music-player {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  max-width: calc(100vw - 48px);
}

.music-player-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(10, 12, 20, 0.88);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.music-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.music-info {
  min-width: 0;
  flex: 1;
}

.music-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary, #f0ebe3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.music-artist {
  font-size: 0.72rem;
  color: var(--text-muted, #8a8278);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.music-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
  margin-top: 4px;
}

.vis-bar {
  display: block;
  width: 3px;
  height: 4px;
  background: rgba(var(--accent-rgb), 0.35);
  border-radius: 2px;
  transition: height 0.15s ease;
}

.music-player.is-playing .vis-bar {
  animation: visPulse 0.8s ease-in-out infinite alternate;
}

@keyframes visPulse {
  0% { height: 4px; }
  100% { height: 14px; }
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.music-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  padding: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.music-icon {
  width: 15px;
  height: 15px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.music-toggle .music-icon-pause {
  display: none;
}

.music-player.is-playing .music-toggle .music-icon-play {
  display: none;
}

.music-player.is-playing .music-toggle .music-icon-pause {
  display: block;
}

.music-btn:hover {
  background: rgba(var(--accent-rgb), 0.25);
  transform: scale(1.05);
}

.music-player.is-muted .music-player-inner {
  opacity: 0.55;
}

.music-player.is-muted .music-visualizer {
  opacity: 0.3;
}

.music-player.is-loading .music-toggle {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 480px) {
  .music-player {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
  .music-player-inner {
    width: 100%;
  }
  .music-title, .music-artist {
    max-width: 120px;
  }
  .music-icon {
    width: 16px;
    height: 16px;
  }
  .music-btn {
    width: 36px;
    height: 36px;
  }
}

/* ===== 404 Page ===== */
.page-404 {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 80px);
  padding-top: 100px;
}

.not-found {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.not-found-code {
  font-family: var(--mono);
  font-size: clamp(5rem, 18vw, 8rem);
  font-weight: 700;
  line-height: 1;
  margin: 8px 0 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 55%, rgba(192, 132, 252, 0.9) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.04em;
  animation: notFoundPulse 4s ease-in-out infinite;
}

@keyframes notFoundPulse {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

.not-found-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.not-found-desc {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 8px;
}

.not-found-path {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 14px;
  display: inline-block;
  margin: 12px 0 28px;
  word-break: break-all;
}

.not-found-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.not-found-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  border: 1px solid transparent;
}

.not-found-btn-primary {
  background: var(--accent);
  color: #05060a;
}

.not-found-btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.25);
  text-decoration: none;
}

.not-found-btn-ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.not-found-btn-ghost:hover {
  border-color: var(--accent-glow);
  color: var(--accent);
}

.not-found-divider {
  position: relative;
  margin-bottom: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.not-found-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-border);
}

.not-found-divider span {
  position: relative;
  background: var(--bg-0);
  padding: 0 16px;
}

.not-found-links {
  text-align: left;
}

@media (max-width: 768px) {
  .page-404 { padding-top: 88px; }
  .not-found-title { font-size: 1.4rem; }
}
