/* ============================================================
   码上进化 — Open Design 风格 (Light + Accent Green)
   ============================================================ */

:root {
  /* ---- Open Design inspired palette ---- */
  --paper: #fafafa;
  --paper-warm: #f5f5f5;
  --paper-dark: #f0f0f0;
  --ink: #262626;
  --ink-soft: #434343;
  --ink-mute: #595959;
  --ink-faint: #8c8c8c;
  --accent: #63d4f0;           /* bright green, like Open Design */
  --accent-soft: #8be5fb;
  --accent-dark: #0e7490;
  --accent-tint: #ecfeff;
  --bone: #ffffff;
  --line: #d9d9d9;
  --line-hover: #bfbfbf;
  --line-soft: #f0f0f0;
  --shadow-sm: 0 2px 8px rgba(38,38,38,0.06);
  --shadow: 0 30px 60px -30px rgba(38,38,38,0.16);
  --shadow-card: 0 1px 3px rgba(38,38,38,0.06), 0 4px 16px rgba(38,38,38,0.04);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font: 'Albert Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --max-width: 1200px;
  --nav-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ===== Navigation ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height); z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all 0.4s ease;
}
.nav.scrolled {
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav .nav-logo { color: #fff; transition: color 0.4s; }
.nav.scrolled .nav-logo { color: var(--ink); }
.nav .nav-links a { color: rgba(255,255,255,0.7); transition: color 0.4s; }
.nav .nav-links a:hover, .nav .nav-links a.active { color: #fff; }
.nav.scrolled .nav-links a { color: var(--ink-mute); }
.nav.scrolled .nav-links a:hover, .nav.scrolled .nav-links a.active { color: var(--ink); }
.nav .nav-cta { background: rgba(255,255,255,0.15) !important; color: #fff !important; border: 1px solid rgba(255,255,255,0.2); }
.nav.scrolled .nav-cta { background: var(--ink) !important; color: var(--bone) !important; border: none; }
.nav .nav-avatar { border-color: rgba(255,255,255,0.4); }
.nav.scrolled .nav-avatar { border-color: #262626; }
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 2rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.15rem; font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.nav-logo span { font-weight: 400; color: var(--ink-faint); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a {
  font-size: 0.9rem; color: var(--ink-mute);
  transition: color 0.2s; position: relative;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent); border-radius: 1px;
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.35rem 0.35rem 0.5rem !important; border-radius: 100px;
  font-size: 0.85rem !important; font-weight: 600 !important;
  background: var(--ink) !important; color: var(--bone) !important;
  transition: all 0.2s;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }
.nav-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 2px solid rgba(99,254,19,0.5);
}
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--ink); cursor: pointer; padding: 0.5rem;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.6rem; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.2s; font-family: var(--font);
}
.btn-sm { padding: 0.45rem 1rem; font-size: 0.8rem; }
.btn-primary {
  background: var(--ink); color: var(--bone);
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-soft);
}
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-accent {
  background: var(--accent); color: var(--ink);
}
.btn-accent:hover { background: var(--accent-soft); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: var(--paper);
}
#physicsCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.hero-overlay {
  position: relative; z-index: 2;
  text-align: center;
  padding: calc(var(--nav-height) + 2rem) 2rem 4rem;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 1rem; border-radius: 100px;
  background: var(--accent-tint);
  border: 1px solid rgba(99,254,19,0.3);
  font-size: 0.8rem; color: var(--accent-dark);
  font-weight: 500; margin-bottom: 2rem;
}
.hero-badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}
.hero h1 .accent {
  color: var(--accent-dark);
  position: relative;
}
.hero h1 .accent::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 8px;
  background: var(--accent);
  opacity: 0.4;
  border-radius: 4px;
  z-index: -1;
}
.hero p {
  font-size: 1.1rem; color: var(--ink-mute);
  line-height: 1.8; margin-bottom: 2.5rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.hero-stats {
  display: flex; gap: 3rem; justify-content: center;
  margin-top: 3.5rem; padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}
.hero-stat .number {
  font-size: 2rem; font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-dark);
}
.hero-stat .label {
  font-size: 0.82rem; color: var(--ink-faint);
  margin-top: 0.2rem; font-weight: 500;
}

/* Physics Controls */
.physics-controls {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%); z-index: 3;
  display: flex; gap: 0.5rem;
}
.phys-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  font-family: var(--font);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.phys-btn:hover {
  background: #fff; border-color: var(--accent);
  color: var(--accent-dark); box-shadow: 0 4px 16px rgba(99,212,240,0.15);
  transform: translateY(-1px);
}

/* ===== Cards ===== */
.card {
  background: var(--bone);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--line);
}

/* ===== Tags ===== */
.tag {
  display: inline-block; padding: 0.2rem 0.7rem;
  border-radius: 100px; font-size: 0.73rem; font-weight: 600;
}
.tag-tutorial { background: var(--accent-tint); color: var(--accent-dark); }
.tag-opinion { background: #f0eaff; color: #6d28d9; }
.tag-story { background: #e0f7fa; color: #0e7490; }
.tag-resource { background: #fff7ed; color: #c2410c; }

/* ===== Profile Section ===== */
.profile-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; background: var(--paper); overflow: hidden; }
.profile-card { text-align: center; position: relative; z-index: 2; }
.profile-avatar-ring { position: relative; width: 160px; height: 160px; margin: 0 auto 2rem; }
.profile-avatar-ring img { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; border: 4px solid #262626; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.profile-name { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.profile-name .accent { color: var(--accent-dark); }
.profile-bio { color: var(--ink-mute); font-size: 1rem; max-width: 460px; margin: 0 auto 2rem; line-height: 1.8; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.profile-tag { padding: 0.35rem 0.9rem; border-radius: 100px; font-size: 0.8rem; font-weight: 600; background: var(--accent-tint); color: var(--accent-dark); border: 1px solid rgba(99,212,240,0.2); }
.profile-stats { display: flex; gap: 2.5rem; justify-content: center; padding-top: 2rem; border-top: 1px solid var(--line-soft); }
.profile-stat .num { font-size: 1.8rem; font-weight: 700; font-family: var(--font-mono); color: var(--accent-dark); }
.profile-stat .label { font-size: 0.8rem; color: var(--ink-faint); font-weight: 500; margin-top: 0.15rem; }
.profile-deco { position: absolute; z-index: 1; }
.profile-deco.dot-grid { top: 10%; right: 8%; width: 120px; height: 120px; background: radial-gradient(circle, var(--line) 1px, transparent 1px); background-size: 12px 12px; opacity: 0.5; }
.profile-deco.circle { bottom: 15%; left: 6%; width: 80px; height: 80px; border: 2px solid var(--accent-tint); border-radius: 50%; opacity: 0.6; }

/* ===== Section Layout ===== */
.section {
  max-width: var(--max-width); margin: 0 auto; padding: 5rem 2rem;
}
.section-kicker {
  font-size: 0.78rem; font-weight: 600; color: var(--accent-dark);
  text-transform: uppercase; letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.section-desc {
  color: var(--ink-mute); font-size: 1.05rem;
  max-width: 560px; margin-bottom: 3rem;
  line-height: 1.7;
}

/* ===== Blog Grid ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.blog-card { padding: 2rem; display: block; }
.blog-card .tag { margin-bottom: 1rem; }
.blog-card h3 {
  font-size: 1.1rem; font-weight: 700; line-height: 1.4;
  margin-bottom: 0.7rem; letter-spacing: -0.01em;
  color: var(--ink);
}
.blog-card p {
  color: var(--ink-mute); font-size: 0.9rem; line-height: 1.7;
  margin-bottom: 1.25rem;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.blog-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.78rem; color: var(--ink-faint); font-weight: 500;
}

/* ===== Featured Card ===== */
.featured-card {
  display: grid; grid-template-columns: 1fr 1.2fr;
  margin-bottom: 2rem; cursor: pointer;
}
.featured-visual {
  background: linear-gradient(135deg, var(--accent-tint), #e8ffd4);
  min-height: 280px; display: flex;
  align-items: center; justify-content: center;
  font-size: 5rem;
}
.featured-content {
  padding: 2.5rem; display: flex;
  flex-direction: column; justify-content: center;
}
.featured-content .tag { margin-bottom: 1rem; }
.featured-content h3 {
  font-size: 1.4rem; font-weight: 700; line-height: 1.3;
  margin-bottom: 1rem; letter-spacing: -0.02em;
}
.featured-content p {
  color: var(--ink-mute); font-size: 0.95rem;
  line-height: 1.7; margin-bottom: 1.5rem;
}

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.filter-btn {
  display: inline-block; padding: 0.4rem 1rem; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-mute); transition: all 0.2s; cursor: pointer;
}
.filter-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.filter-btn.active {
  background: var(--ink) !important;
  color: var(--bone) !important;
  border-color: var(--ink) !important;
}

/* ===== Project Grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}
.project-card { padding: 2rem; overflow: hidden; }
.project-img {
  width: 56px; height: 56px; border-radius: 14px;
  overflow: hidden; margin-bottom: 1.25rem;
  border: 1px solid var(--line-soft);
}
.project-img img { width: 100%; height: 100%; object-fit: cover; }
.project-card h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem;
}
.project-desc {
  color: var(--ink-mute); font-size: 0.88rem;
  line-height: 1.65; margin-bottom: 1.25rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tech-tag {
  padding: 0.2rem 0.55rem; border-radius: var(--radius-xs);
  font-size: 0.72rem; font-family: var(--font-mono); font-weight: 500;
  background: var(--paper-warm); border: 1px solid var(--line-soft);
  color: var(--ink-faint);
}

/* ===== Article Page ===== */
.article-container {
  max-width: 720px; margin: 0 auto;
  padding: 160px 2rem 4rem;
}
.article-header { margin-bottom: 2.5rem; }
.article-header .back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--ink-faint); font-size: 0.85rem;
  margin-bottom: 2rem; transition: color 0.2s; font-weight: 500;
}
.article-header .back:hover { color: var(--ink); }
.article-header .tag { margin-bottom: 1rem; }
.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700; line-height: 1.25;
  letter-spacing: -0.03em; margin-bottom: 1.25rem;
}
.article-header .meta {
  display: flex; gap: 1.5rem;
  color: var(--ink-faint); font-size: 0.85rem; font-weight: 500;
}
.article-body { font-size: 1.05rem; line-height: 1.9; }
.article-body h2 {
  font-size: 1.45rem; font-weight: 700;
  margin: 2.5rem 0 1rem; letter-spacing: -0.02em;
  color: var(--ink);
}
.article-body h3 {
  font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.75rem;
}
.article-body p { margin-bottom: 1.25rem; color: var(--ink-soft); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: var(--accent-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-soft);
  font-style: italic;
}
.article-body code {
  font-family: var(--font-mono);
  background: var(--paper-warm); padding: 0.15rem 0.4rem;
  border-radius: 4px; font-size: 0.88em; color: var(--accent-dark);
  border: 1px solid var(--line-soft);
}
.article-body pre {
  background: var(--ink); color: #e4e4e7;
  border-radius: var(--radius-sm); padding: 1.5rem;
  overflow-x: auto; margin: 1.5rem 0;
}
.article-body pre code {
  background: none; padding: 0; color: #e4e4e7;
  font-size: 0.85rem; line-height: 1.7; border: none;
}
.article-body ul, .article-body ol {
  margin: 1rem 0 1.25rem 1.5rem; color: var(--ink-soft);
}
.article-body li { margin-bottom: 0.5rem; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-footer {
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}

/* ===== About Page ===== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.about-text p {
  color: var(--ink-soft); font-size: 1rem;
  line-height: 1.8; margin-bottom: 1.5rem;
}
.about-text blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem; margin-top: 1.5rem;
  background: var(--accent-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--ink-soft);
}
.about-subtitle {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}
.skill-bars { display: flex; flex-direction: column; gap: 1.25rem; }
.skill-label {
  display: flex; justify-content: space-between;
  margin-bottom: 0.4rem; font-size: 0.85rem;
}
.skill-label span:first-child { color: var(--ink); font-weight: 600; }
.skill-label span:last-child { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.78rem; }
.bar-track {
  height: 6px; background: var(--line-soft);
  border-radius: 3px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 3px;
  background: var(--accent); transition: width 1s ease;
}

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ''; position: absolute;
  left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-dark));
  opacity: 0.3;
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -2rem; top: 0.5rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
  transform: translateX(-4px);
}
.timeline-item .time {
  font-size: 0.78rem; color: var(--accent-dark);
  font-family: var(--font-mono); font-weight: 600;
  margin-bottom: 0.2rem;
}
.timeline-item h4 {
  font-size: 0.95rem; font-weight: 700; margin-bottom: 0.2rem;
}
.timeline-item p {
  font-size: 0.88rem; color: var(--ink-mute);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--line-soft);
  padding: 2.5rem 2rem; text-align: center;
  background: var(--paper-warm);
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.footer p { color: var(--ink-faint); font-size: 0.82rem; font-weight: 500; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  color: var(--ink-faint); font-size: 0.82rem;
  transition: color 0.2s; font-weight: 500;
}
.footer-links a:hover { color: var(--ink); }

/* ===== Animations ===== */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(250,250,250,0.97);
    backdrop-filter: blur(16px);
    padding: 1.5rem 2rem; gap: 1.25rem;
    border-bottom: 1px solid var(--line-soft);
  }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-visual { min-height: 180px; }
  .blog-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 1rem; }
  .physics-controls { bottom: 1rem; }
}

/* ===== Music Player ===== */
.music-player {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0.8rem; border-radius: 100px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s;
}
.music-player:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.music-toggle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}
.music-toggle:hover { transform: scale(1.05); }
.music-toggle.playing {
  animation: musicPulse 2s ease-in-out infinite;
}
@keyframes musicPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(38,38,38,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(38,38,38,0); }
}
.music-icon { width: 18px; height: 18px; }
.music-info {
  min-width: 80px; max-width: 160px;
}
.music-title {
  font-size: 0.75rem; font-weight: 600;
  color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 0.3rem;
}
.music-progress {
  height: 3px; background: var(--line-soft);
  border-radius: 2px; overflow: hidden;
}
.music-progress-bar {
  height: 100%; width: 0;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}
.music-volume {
  width: 60px;
}
.music-volume input[type="range"] {
  width: 100%; height: 3px;
  -webkit-appearance: none; appearance: none;
  background: var(--line-soft); border-radius: 2px;
  outline: none; cursor: pointer;
}
.music-volume input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--ink);
  cursor: pointer;
}
@media (max-width: 768px) {
  .music-player { bottom: 1rem; right: 1rem; padding: 0.4rem 0.6rem; }
  .music-info { display: none; }
  .music-volume { display: none; }
}

/* ===== Non-homepage navbar: solid from start ===== */
.nav.solid {
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav.solid .nav-logo { color: var(--ink); }
.nav.solid .nav-links a { color: var(--ink-mute); }
.nav.solid .nav-links a:hover, .nav.solid .nav-links a.active { color: var(--ink); }
.nav.solid .nav-cta { background: var(--ink) !important; color: var(--bone) !important; border: none; }
.nav.solid .nav-avatar { border-color: #262626; }
