/* ============================================
   木辛 — Design System (alche.studio inspired)
   ============================================ */

/* === Custom Properties === */
:root {
  /* Dark theme (default) */
  --bg: #050508;
  --surface: #0c0c14;
  --surface-alt: #111118;
  --border: #1c1c28;
  --border-light: #2a2a38;
  --text: #e8e8f0;
  --text-dim: #8888a0;
  --text-muted: #585870;

  --cyan: #00c8e0;
  --magenta: #e03090;
  --lime: #a0cc00;
  --orange: #e05828;

  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);

  --section-bg: rgba(12, 12, 20, 0.78);
  --section-bg-alt: rgba(5, 5, 8, 0.72);
  --marquee-bg: rgba(12, 12, 20, 0.78);
  --footer-bg: rgba(5, 5, 8, 0.78);
}

/* Light theme */
[data-theme="light"] {
  --bg: #faf8f4;
  --surface: #fefdfb;
  --surface-alt: #f5f2ec;
  --border: #e0dcd4;
  --border-light: #ccc8c0;
  --text: #1a1814;
  --text-dim: #6b6860;
  --text-muted: #a0988c;

  --cyan: #008098;
  --magenta: #a02060;
  --lime: #688800;
  --orange: #b04018;

  --section-bg: rgba(254, 253, 251, 0.75);
  --section-bg-alt: rgba(250, 248, 244, 0.70);
  --marquee-bg: rgba(254, 253, 251, 0.75);
  --footer-bg: rgba(250, 248, 244, 0.75);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: 100px;
  background: var(--bg);
}

html.theme-switching * {
  transition: background-color 0.5s ease,
              color 0.5s ease,
              border-color 0.5s ease,
              box-shadow 0.5s ease,
              fill 0.5s ease,
              stroke 0.5s ease !important;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: normal; }

::selection {
  background: var(--magenta);
  color: #fff;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }

body.cursor-active * { cursor: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"), auto !important; }

@media (max-width: 768px) {
  body.cursor-active { cursor: auto; }
  .cursor, .cursor-label { display: none !important; }
}

/* === Loading Screen === */
#loadingScreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.loading-bg {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 1;
}

.loading-panel {
  flex: 1;
  height: 100%;
  background: var(--bg);
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

#loadingScreen.split .loading-left {
  transform: translateX(-100%);
}
#loadingScreen.split .loading-right {
  transform: translateX(100%);
}

.loading-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  pointer-events: none;
}

.loading-text {
  display: flex;
  gap: 0.3em;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s ease;
}

#loadingScreen.split .loading-text {
  transform: scale(6);
  opacity: 0;
}

.loading-char {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  color: var(--text);
  animation: loadBreathe 1.2s ease-in-out infinite alternate;
}
.loading-char:nth-child(2) { animation-delay: 0.3s; }

@keyframes loadBreathe {
  from { opacity: 0.3; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1.05); }
}

.loading-bar {
  width: 120px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

#loadingScreen.split .loading-bar {
  opacity: 0;
}

.loading-bar-fill {
  height: 100%;
  background: var(--text);
  border-radius: 2px;
  animation: loadBar 1.8s ease-in-out infinite;
}

@keyframes loadBar {
  0% { width: 0; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0; margin-left: 100%; }
}

/* === Noise Overlay === */
.noise {
  position: fixed; inset: 0; z-index: 9998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* === Theme Toggle === */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--text-dim);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
  transition: all 0.3s;
}
.theme-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: scale(1.15);
  box-shadow: 0 4px 24px rgba(0,200,224,0.2);
}

:root .ico-sun { display: block; }
:root .ico-moon { display: none; }
[data-theme="light"] .ico-sun { display: none; }
[data-theme="light"] .ico-moon { display: block; }

/* === Custom Cursor === */
.cursor {
  position: fixed;
  width: 12px; height: 12px;
  border: 1.5px solid #888;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
  mix-blend-mode: difference;
}
.cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #888;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  mix-blend-mode: difference;
}
.cursor.hover {
  width: 80px; height: 80px;
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}
.cursor-label.show { opacity: 1; }

/* === Navbar === */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: var(--bg);
  opacity: 0.92;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  transition: color 0.3s;
  position: relative;
}
.nav-logo:hover { color: var(--cyan); }

.nav-right { display: flex; align-items: center; gap: 2rem; }

.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--cyan);
  transition: width 0.3s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Sound toggle */
.nav-sound {
  background: none; border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  transition: border-color 0.3s;
}
.nav-sound:hover { border-color: var(--cyan); }
.sound-bar {
  width: 2px;
  background: var(--text-dim);
  border-radius: 1px;
  transition: background 0.3s, height 0.15s;
}
.sound-bar:nth-child(1) { height: 8px; }
.sound-bar:nth-child(2) { height: 14px; }
.sound-bar:nth-child(3) { height: 6px; }
.nav-sound:hover .sound-bar { background: var(--cyan); }

/* === Glitch Hover === */
.glitch-hover {
  position: relative;
}
.glitch-hover::before,
.glitch-hover::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s;
}
.glitch-hover::before {
  color: var(--cyan);
  z-index: -1;
}
.glitch-hover::after {
  color: var(--magenta);
  z-index: -2;
}
.glitch-hover:hover::before {
  opacity: 1;
  animation: glitchSkew 0.4s ease-in-out infinite alternate;
}
.glitch-hover:hover::after {
  opacity: 1;
  animation: glitchSkew2 0.45s ease-in-out infinite alternate;
}

@keyframes glitchSkew {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 0); }
  80% { transform: translate(1px, 1px); }
  100% { transform: translate(0); }
}
@keyframes glitchSkew2 {
  0% { transform: translate(0); }
  20% { transform: translate(2px, -1px); }
  40% { transform: translate(-1px, 1px); }
  60% { transform: translate(1px, 0); }
  80% { transform: translate(-2px, -1px); }
  100% { transform: translate(0); }
}

/* === Hero === */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
}

.hero-center {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
}

.hero-eyebrow {
  margin-bottom: 2rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 1.1rem;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  background: transparent;
}

.hero-name {
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.15em;
}

.char {
  display: inline-block;
  transition: color 0.4s, transform 0.4s;
  animation: charFloat 6s ease-in-out infinite;
}
.char:nth-child(1) { animation-delay: 0s; }
.char:nth-child(2) { animation-delay: 0.15s; }
.char:hover {
  color: var(--cyan);
  transform: translateY(-8px) scale(1.05);
}

@keyframes charFloat {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
  75% { transform: translateY(3px); }
}

.hero-line {
  font-size: 1.1rem;
  color: var(--text-dim);
  line-height: 2.2;
  margin-bottom: 2.5rem;
  font-weight: 400;
}
.hero-line em {
  color: var(--text);
  font-weight: 600;
  position: relative;
  display: inline-block;
  transition: color 0.3s;
  padding: 0 0.15em;
}
.hero-line em:hover { color: var(--cyan) !important; }

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2.5rem;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 100px;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}
.btn-primary:hover {
  background: var(--cyan);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.25);
}
.btn-arrow {
  transition: transform 0.3s;
}
.btn-primary:hover .btn-arrow {
  transform: translateY(3px);
}

/* Hero Marquee */
.hero-marquee {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 5;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  padding: 0.6rem 0;
}

/* === Marquee === */
.marquee-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}
.marquee-track.reverse { animation-direction: reverse; }
.marquee-dot { color: var(--text-muted); font-size: 0.5rem; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* === Divider Marquee === */
.divider-marquee {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 0.8rem 0;
  background: var(--marquee-bg);
}

/* === Sections === */
section {
  padding: 8rem 0;
  position: relative;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#about { background: var(--section-bg); }
#work { background: var(--section-bg-alt); }
#contact { background: var(--section-bg); }

.section-head {
  margin-bottom: 4rem;
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  transition: transform 0.15s linear;
  will-change: transform;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.title-word {
  color: var(--text-dim);
  font-weight: 400;
  font-style: italic;
  font-size: 0.55em;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.title-char {
  transition: color 0.3s;
}
.title-char:hover { color: var(--cyan); }

/* === Reveal === */
.reveal {
  opacity: 1;
  transform: none;
}
.js-ready .reveal {
  opacity: 0;
  transform: translateY(40px) rotateX(3deg);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* === About === */
.about-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

/* Glitch Image */
.glitch-img {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.glitch-img-layer {
  position: absolute;
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--text);
  transition: transform 0.3s, color 0.3s, opacity 0.3s;
}

.glitch-img:hover .glitch-img-1 {
  animation: glitchLayer1 0.6s steps(2) infinite;
  color: var(--cyan);
}
.glitch-img:hover .glitch-img-2 {
  animation: glitchLayer2 0.7s steps(2) infinite;
  color: var(--magenta);
  opacity: 0.7;
}
.glitch-img:hover .glitch-img-3 {
  animation: glitchLayer3 0.5s steps(3) infinite;
  color: var(--lime);
  opacity: 0.5;
}

@keyframes glitchLayer1 {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-4px, 2px); }
  40% { transform: translate(4px, -2px); }
  60% { transform: translate(-2px, 0); }
  80% { transform: translate(2px, -1px); }
}
@keyframes glitchLayer2 {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(3px, -2px); }
  50% { transform: translate(-3px, 1px); }
  75% { transform: translate(1px, 2px); }
}
@keyframes glitchLayer3 {
  0%, 100% { transform: translate(0); opacity: 0.5; }
  33% { transform: translate(-5px, 0); opacity: 0.8; }
  66% { transform: translate(5px, -3px); opacity: 0.3; }
}

.about-lead {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-body > p {
  color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  max-width: 560px;
}

.accent-cyan { color: var(--cyan); }
.accent-magenta { color: var(--magenta); }

/* Stats */
.about-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-item { position: relative; }

.stat-num {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text);
  display: block;
  font-family: var(--font-mono);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 0.5rem;
  display: block;
  line-height: 1.5;
}

/* Skills Strip */
.skills-strip {
  margin-top: 4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 0;
  overflow: hidden;
  background: var(--surface-alt);
}

.strip-track {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  animation: marquee 25s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  white-space: nowrap;
}
.strip-track span:hover { color: var(--cyan); }
.strip-sep {
  color: var(--text-muted);
  font-size: 0.5rem;
}

/* === Work === */
.work-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.work-item {
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.15s linear, opacity 0.15s linear;
  will-change: transform, opacity;
}
.work-item:hover {
  border-bottom-color: var(--cyan);
}

.work-link {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0;
  transition: padding 0.3s;
}

.work-visual {
  overflow: hidden;
  border-radius: var(--radius);
}

.work-img {
  width: 200px;
  height: 130px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s;
}

.work-item:hover .work-img {
  transform: scale(1.04);
}

.work-img-label {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(0,0,0,0.3);
  z-index: 1;
  transition: transform 0.4s, color 0.4s;
}
.work-item:hover .work-img-label {
  transform: scale(1.1);
  color: rgba(0,0,0,0.5);
}

.work-img-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  mix-blend-mode: overlay;
}
.work-item:hover .work-img-overlay {
  opacity: 1;
}

.img-cyan { background: var(--cyan); }
.img-magenta { background: var(--magenta); }
.img-lime { background: var(--lime); }
.img-orange { background: var(--orange); }

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.work-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: letter-spacing 0.4s;
}
.work-item:hover .work-title {
  letter-spacing: 0.06em;
}

.work-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.work-arrow {
  font-size: 1rem;
  color: var(--text-dim);
  transition: color 0.3s, transform 0.3s;
}
.work-item:hover .work-arrow {
  color: var(--cyan);
  transform: translate(3px, -3px);
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.work-tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.3s;
}
.work-item:hover .work-tags span {
  border-color: var(--border-light);
  color: var(--text-dim);
}

/* === Contact === */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-intro {
  font-size: 1.3rem;
  color: var(--text);
  line-height: 1.8;
  font-weight: 500;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-link {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}
.contact-link:hover {
  border-bottom-color: var(--cyan);
  padding-left: 0.5rem;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  transition: color 0.3s;
}
.contact-link:hover .contact-label {
  color: var(--cyan);
}

.contact-value {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s;
}

.contact-icon {
  font-size: 0.9rem;
  color: var(--text-dim);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s;
}
.contact-link:hover .contact-icon {
  opacity: 1;
  transform: translateX(0);
  color: var(--cyan);
}

/* === Footer === */
footer {
  position: relative;
  z-index: 5;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.footer-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.footer-text p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.back-top {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.3s;
}
.back-top:hover { color: var(--cyan); }

.footer-icp { margin-top: 0.5rem; }
.footer-icp a {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.footer-icp a:hover { color: var(--text-dim); }

/* === Responsive === */
@media (max-width: 768px) {
  #bgCanvas { display: none; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.62rem; }

  .hero-name {
    font-size: 3.5rem;
  }

  .hero-line {
    font-size: 0.9rem;
  }

  section { padding: 4rem 0; }

  .section-title {
    font-size: 1.75rem;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .glitch-img {
    width: 100%;
    height: 180px;
  }

  .about-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .stat-num { font-size: 2rem; }

  .work-link {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .work-img {
    width: 100%;
    height: 160px;
  }

  .work-title {
    font-size: 1.2rem;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-link {
    grid-template-columns: 80px 1fr;
  }
  .contact-icon { display: none; }

  .footer-grid {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .navbar .marquee-track { display: none; }
}
