/* ============================================
   DEV.STORY — Immersive Storytelling Portfolio
   Scroll-driven, parallax, 3D, sound
   ============================================ */

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  --bg: #050510;
  --bg2: #0a0a1a;
  --accent: #22C55E;
  --accent2: #06b6d4;
  --accent3: #8b5cf6;
  --glow: rgba(34, 197, 94, 0.4);
  --glow-dim: rgba(34, 197, 94, 0.1);
  --text: #f0f0f0;
  --text2: #8892a4;
  --text3: #4a5568;
  --border: rgba(255,255,255,0.06);
  --font-h: 'Archivo', sans-serif;
  --font-b: 'Space Grotesk', sans-serif;
  --font-c: 'JetBrains Mono', monospace;
}

html {
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }

body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}

/* Lock scroll until Enter Experience is clicked */
body.locked {
  overflow: hidden !important;
  height: 100vh;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* --- Sound Toggle --- */
.sound-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.sound-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow-dim);
}
.sound-toggle .sound-off { display: none; }
.sound-toggle.muted .sound-on { display: none; }
.sound-toggle.muted .sound-off { display: block; }

/* --- Progress Track --- */
.progress-track {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.progress-fill {
  position: absolute;
  top: 0;
  width: 2px;
  background: var(--accent);
  transition: height 0.1s linear;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--glow);
}

.progress-chapters {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.progress-chapters::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg2);
  border: 2px solid var(--text3);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
  cursor: pointer;
}

.progress-dot.active {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
  transform: scale(1.3);
}

/* --- BG Canvas --- */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Scenes --- */
.scene {
  position: relative;
  z-index: 1;
}

.scene-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- INTRO OVERLAY --- */
.scene-intro {
  height: 400vh;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s, visibility 0.8s;
}

.intro-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-content {
  text-align: center;
}

.intro-logo {
  font-family: var(--font-h);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.intro-bracket { color: var(--accent); }
.intro-dot { color: var(--accent); }

.intro-tagline {
  color: var(--text2);
  font-size: 1rem;
  margin-bottom: 48px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.intro-start {
  position: relative;
  padding: 18px 48px;
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-b);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 60px;
  cursor: pointer;
  transition: all 0.4s;
  letter-spacing: 0.05em;
}

.intro-start:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 40px var(--glow);
}

.intro-start-ring {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 60px;
  animation: ring-pulse 2s ease-in-out infinite;
}

@keyframes ring-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.3; }
}

.intro-hint {
  color: var(--text3);
  font-size: 0.75rem;
  margin-top: 24px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* --- Parallax Container --- */
.parallax-container {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  perspective: 1000px;
}

.parallax-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

/* --- Floating shapes --- */
.floating-shape {
  position: absolute;
  border-radius: 20%;
  opacity: 0.08;
  will-change: transform;
}

.shape-1 {
  width: 300px; height: 300px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  top: 10%; left: 8%;
  animation: morph1 20s ease-in-out infinite;
}

.shape-2 {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, var(--accent3), var(--accent));
  top: 60%; right: 12%;
  border-radius: 30%;
  animation: morph2 15s ease-in-out infinite;
}

.shape-3 {
  width: 150px; height: 150px;
  background: var(--accent2);
  top: 20%; right: 25%;
  border-radius: 50%;
  animation: morph1 25s ease-in-out infinite reverse;
}

.shape-4 {
  width: 100px; height: 100px;
  background: var(--accent);
  bottom: 25%; left: 15%;
  border-radius: 40%;
  animation: morph2 18s ease-in-out infinite;
}

.shape-5 {
  width: 250px; height: 250px;
  background: linear-gradient(45deg, var(--accent3), transparent);
  bottom: 10%; right: 5%;
  border-radius: 35%;
  animation: morph1 22s ease-in-out infinite;
}

.shape-6 {
  width: 80px; height: 80px;
  background: var(--accent);
  top: 35%; left: 40%;
  border-radius: 50%;
  animation: morph2 12s ease-in-out infinite reverse;
}

@keyframes morph1 {
  0%, 100% { border-radius: 20% 50% 30% 60%; transform: rotate(0deg) scale(1); }
  25% { border-radius: 50% 20% 60% 30%; }
  50% { border-radius: 30% 60% 20% 50%; transform: rotate(180deg) scale(1.1); }
  75% { border-radius: 60% 30% 50% 20%; }
}

@keyframes morph2 {
  0%, 100% { border-radius: 40% 60% 50% 30%; transform: rotate(0deg); }
  50% { border-radius: 60% 30% 40% 50%; transform: rotate(-180deg); }
}

/* --- Floating code snippets --- */
.floating-code {
  position: absolute;
  font-family: var(--font-c);
  font-size: 0.8rem;
  color: var(--accent);
  opacity: 0.15;
  white-space: nowrap;
  pointer-events: none;
}

.code-1 { top: 15%; right: 10%; }
.code-2 { bottom: 30%; left: 5%; }
.code-3 { top: 45%; right: 20%; }

/* --- Hero Content --- */
.hero-text-layer {
  z-index: 10;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-overline {
  margin-bottom: 24px;
  height: 24px;
}

.typing-line {
  font-family: var(--font-c);
  font-size: 0.85rem;
  color: var(--accent);
  display: inline-block;
}

.typing-line::after {
  content: '|';
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-title {
  font-family: var(--font-h);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero-word {
  display: inline-block;
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Scroll Cue --- */
.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float 3s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.5s;
}

.scroll-cue.hidden { opacity: 0; }

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.scroll-cue-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid var(--text3);
  border-radius: 12px;
  position: relative;
}

.scroll-cue-wheel {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0% { top: 6px; opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* --- SCENE 1: ABOUT (Horizontal Scroll) --- */
.scene-about {
  height: 400vh;
}

.scene-about .scene-sticky {
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.horizontal-track {
  display: flex;
  height: 100vh;
  will-change: transform;
}

.h-panel {
  flex-shrink: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
}

/* Chapter panel */
.panel-chapter {
  flex-direction: column;
  gap: 24px;
}

.chapter-number {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ch-num {
  font-family: var(--font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.ch-line {
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.chapter-title {
  font-family: var(--font-h);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.text-glow {
  color: var(--accent);
  text-shadow: 0 0 40px var(--glow), 0 0 80px rgba(34,197,94,0.2);
}

/* About intro panel */
.panel-about-intro {
  gap: 80px;
}

.about-photo-3d {
  perspective: 800px;
  flex-shrink: 0;
}

.photo-frame {
  width: 320px;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s;
  transform-style: preserve-3d;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.about-big-text {
  font-family: var(--font-h);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 500;
  line-height: 1.4;
  max-width: 500px;
  color: var(--text2);
}

.about-sub-text {
  font-size: 1rem;
  color: var(--text3);
  margin-top: 20px;
  line-height: 1.7;
  max-width: 500px;
}

/* Stats panel */
.panel-stats { flex-direction: row; gap: 40px; }

.stats-showcase {
  display: flex;
  gap: 60px;
  align-items: center;
}

.stat-big {
  text-align: center;
}

.stat-num {
  font-family: var(--font-h);
  font-size: 4rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}

.stat-suffix {
  font-family: var(--font-h);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text3);
  margin-top: 8px;
}

/* Philosophy panel */
.philosophy-content {
  max-width: 700px;
  text-align: center;
}

.philosophy-title {
  font-family: var(--font-h);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.philosophy-quote {
  font-family: var(--font-h);
  font-size: 1.3rem;
  color: var(--text2);
  font-style: italic;
  margin-bottom: 48px;
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  text-align: left;
}

.philosophy-pillars {
  display: flex;
  gap: 32px;
  text-align: left;
}

.pillar {
  flex: 1;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  transition: all 0.3s;
  cursor: pointer;
}

.pillar:hover {
  border-color: rgba(34,197,94,0.3);
  transform: translateY(-4px);
  box-shadow: 0 0 30px var(--glow-dim);
}

.pillar-num {
  font-family: var(--font-c);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.pillar h4 {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pillar p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
}

/* Timeline panel */
.panel-timeline {
  padding: 60px 120px;
  flex-direction: column;
  gap: 24px;
}

.panel-timeline::before {
  content: 'THE JOURNEY';
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.timeline {
  display: flex;
  gap: 60px;
  align-items: center;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  text-align: center;
  flex-shrink: 0;
}

.tl-year {
  font-family: var(--font-h);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
  text-shadow: 0 0 30px var(--glow);
}

.tl-content h4 {
  font-family: var(--font-h);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tl-content p {
  font-size: 0.85rem;
  color: var(--text2);
  max-width: 200px;
}

/* Values panel */
.values-grid {
  display: flex;
  gap: 32px;
}

.value-card {
  width: 220px;
  padding: 40px 28px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: all 0.4s;
  cursor: pointer;
  transform-style: preserve-3d;
  perspective: 600px;
}

.value-card:hover {
  border-color: rgba(34,197,94,0.3);
  box-shadow: 0 0 40px var(--glow-dim);
  transform: translateY(-8px);
}

.value-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.value-card h4 {
  font-family: var(--font-h);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.value-card p {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.5;
}

/* --- Scene titles --- */
.scene-chapter {
  position: absolute;
  top: 40px;
  left: 60px;
}

.scene-title {
  font-family: var(--font-h);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

/* --- SCENE 2: SKILLS ORBIT --- */
.scene-skills {
  height: 300vh;
}

.skills-orbit {
  position: relative;
  width: 500px;
  height: 500px;
}

.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}

.orbit-core {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, var(--bg) 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px var(--glow), 0 0 120px var(--glow-dim);
  animation: core-pulse 3s ease-in-out infinite;
}

@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 60px var(--glow), 0 0 120px var(--glow-dim); }
  50% { box-shadow: 0 0 80px var(--glow), 0 0 160px var(--glow-dim); }
}

.orbit-label {
  font-family: var(--font-c);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--bg);
}

.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.ring-1 {
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
}

.ring-2 {
  width: 440px;
  height: 440px;
  margin: -220px 0 0 -220px;
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  will-change: transform;
  transition: transform 0.15s linear;
}

/* Counter-rotation handled by JS */

.orbit-item {
  z-index: 5;
  cursor: pointer;
}

.orbit-node {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-c);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text);
  transform: translate(-50%, -50%);
  transition: all 0.3s;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* Larger hit area around nodes */
.orbit-node::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
}

.orbit-node:hover {
  border-color: var(--accent);
  background: var(--glow-dim);
  box-shadow: 0 0 20px var(--glow);
  transform: translate(-50%, -50%) scale(1.2);
}

.node-sm {
  width: 52px;
  height: 52px;
  font-size: 0.55rem;
}

/* --- SCENE 3: PROJECT SHOWCASE --- */
.scene-projects {
  height: 200vh;
}

.project-showcase {
  width: 900px;
  max-width: 90vw;
  position: relative;
}

.project-counter {
  font-family: var(--font-c);
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 20px;
  text-align: right;
}

.project-counter #projectCurrent {
  color: var(--accent);
  font-weight: 700;
}

.project-carousel {
  position: relative;
  min-height: 400px;
}

.project-slide {
  display: none;
  gap: 40px;
  align-items: stretch;
  animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-slide.active {
  display: flex;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.project-slide-image {
  flex: 1.2;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
  min-height: 350px;
}

.project-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-slide:hover .project-slide-image img {
  transform: scale(1.05);
}

.project-slide-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.project-slide-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-slide-tags span {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.7rem;
  background: var(--glow-dim);
  color: var(--accent);
  border: 1px solid rgba(34,197,94,0.2);
  font-family: var(--font-c);
}

.project-slide-info h3 {
  font-family: var(--font-h);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project-slide-info > p {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.7;
}

.project-slide-meta {
  display: flex;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.meta-item {
  font-size: 0.8rem;
  color: var(--text2);
}

.meta-item strong {
  color: var(--accent);
  font-family: var(--font-c);
  font-size: 0.7rem;
  display: block;
  margin-bottom: 4px;
}

.project-slide-actions {
  display: flex;
  gap: 12px;
}

.btn-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-b);
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  background: var(--accent);
  color: var(--bg);
  border: none;
}

.btn-project:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow);
}

.btn-project-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-project-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: none;
}

/* Project nav */
.project-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}

.project-nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  -webkit-tap-highlight-color: transparent;
}

.project-nav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--glow-dim);
}

.project-dots {
  display: flex;
  gap: 8px;
}

.proj-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text3);
  cursor: pointer;
  transition: all 0.3s;
}

.proj-dot.active {
  background: var(--accent);
  box-shadow: 0 0 10px var(--glow);
  transform: scale(1.3);
}

/* --- SCENE 4: TESTIMONIALS --- */
.scene-testimonials {
  height: 300vh;
}

.testimonials-float {
  display: flex;
  gap: 32px;
  perspective: 800px;
}

.test-card {
  width: 320px;
  padding: 36px 28px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  position: relative;
  transition: all 0.5s;
  will-change: transform;
  backdrop-filter: blur(8px);
}

.test-card:hover {
  border-color: rgba(34,197,94,0.3);
  box-shadow: 0 0 40px var(--glow-dim);
}

.test-quote-mark {
  font-family: var(--font-h);
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: -8px;
}

.test-card p {
  font-size: 0.95rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

.test-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.test-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glow-dim);
}

.test-author strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.test-author span {
  font-size: 0.75rem;
  color: var(--text3);
}

/* --- SCENE 5: CONTACT --- */
.scene-contact {
  height: 200vh;
}

.contact-space {
  text-align: center;
  max-width: 700px;
  padding: 0 24px;
}

.contact-title {
  font-family: var(--font-h);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.contact-sub {
  color: var(--text2);
  font-size: 1.1rem;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 80px;
}

.contact-link-big {
  display: flex;
  align-items: center;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.contact-link-big:hover {
  border-color: var(--accent);
  background: var(--glow-dim);
  transform: translateX(8px);
  box-shadow: 0 0 30px var(--glow-dim);
}

.cl-label {
  font-family: var(--font-c);
  font-size: 0.7rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 80px;
  text-align: left;
}

.cl-value {
  flex: 1;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
}

.cl-arrow {
  color: var(--text3);
  transition: all 0.3s;
}

.contact-link-big:hover .cl-arrow {
  color: var(--accent);
  transform: translate(4px, -4px);
}

.contact-footer {
  display: flex;
  justify-content: space-between;
  color: var(--text3);
  font-size: 0.8rem;
  font-family: var(--font-c);
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

/* --- Code Modal (VS Code style) --- */
.code-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.code-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.code-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}

.code-modal-content {
  position: relative;
  width: 680px;
  max-width: 90vw;
  max-height: 80vh;
  background: #1e1e2e;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  overflow: hidden;
  transform: translateY(30px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.code-modal.visible .code-modal-content {
  transform: translateY(0) scale(1);
}

.code-modal-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: #181825;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 12px;
}

.code-modal-dots {
  display: flex;
  gap: 6px;
}

.dot-red, .dot-yellow, .dot-green {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-red { background: #f38ba8; }
.dot-yellow { background: #f9e2af; }
.dot-green { background: #a6e3a1; }

.code-modal-filename {
  font-family: var(--font-c);
  font-size: 0.75rem;
  color: #cdd6f4;
  flex: 1;
}

.code-modal-close {
  background: none;
  border: none;
  color: #6c7086;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.code-modal-close:hover {
  color: #f38ba8;
}

.code-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  max-height: 400px;
}

.code-lines {
  font-family: var(--font-c);
  font-size: 0.8rem;
  line-height: 1.8;
}

.code-line {
  display: flex;
  gap: 16px;
  opacity: 0;
  transform: translateX(-20px);
  animation: codeFadeIn 0.3s ease forwards;
}

.code-line-num {
  color: #585b70;
  min-width: 24px;
  text-align: right;
  user-select: none;
}

.code-line-text {
  color: #cdd6f4;
  white-space: pre;
}

/* Syntax colors */
.syn-keyword { color: #cba6f7; }
.syn-function { color: #89b4fa; }
.syn-string { color: #a6e3a1; }
.syn-comment { color: #585b70; font-style: italic; }
.syn-type { color: #f9e2af; }
.syn-prop { color: #89dceb; }
.syn-number { color: #fab387; }
.syn-tag { color: #f38ba8; }

@keyframes codeFadeIn {
  to { opacity: 1; transform: translateX(0); }
}

.code-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #181825;
}

.code-explanation {
  font-size: 0.85rem;
  color: #a6adc8;
  line-height: 1.6;
}

/* --- Skill Detail Panel --- */
.skill-detail {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%) translateX(40px);
  width: 280px;
  padding: 28px;
  background: rgba(10,10,26,0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.skill-detail.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.skill-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
}

.skill-detail-close:hover {
  color: var(--accent);
}

.skill-detail-name {
  font-family: var(--font-h);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--accent);
}

.skill-detail-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.skill-detail-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  width: 0;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.skill-detail-desc {
  font-size: 0.85rem;
  color: var(--text2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.skill-detail-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill-detail-projects span {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  background: rgba(255,255,255,0.05);
  color: var(--text3);
  border: 1px solid var(--border);
  font-family: var(--font-c);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  /* Give about section more scroll room for 5 panels on mobile */
  .scene-about { height: 600vh; }

  .h-panel {
    padding: 80px 24px 60px;
    flex-direction: column;
    gap: 32px;
    justify-content: flex-start;
    padding-top: 100px;
  }
  .panel-about-intro {
    flex-direction: column;
    gap: 32px;
    justify-content: center;
    padding-top: 80px;
  }
  .photo-frame { width: 200px; height: 250px; }

  .about-big-text { font-size: 1.3rem; }
  .about-sub-text { font-size: 0.85rem; }

  .timeline { flex-direction: column; gap: 24px; }
  .timeline::before { display: none; }
  .timeline-item { text-align: left; }
  .tl-year { font-size: 1.8rem; margin-bottom: 8px; }
  .tl-content p { max-width: 100%; }

  .philosophy-title { font-size: 1.8rem; }
  .philosophy-quote { font-size: 1rem; margin-bottom: 32px; }
  .philosophy-pillars { flex-direction: column; gap: 16px; }
  .pillar { padding: 20px; }

  .values-grid { flex-direction: column; align-items: center; gap: 16px; }
  .value-card { width: 85vw; padding: 28px 20px; }

  .skills-orbit { transform: scale(0.55) !important; }
  .scene-title { font-size: 1.8rem; margin-bottom: 20px; }

  .testimonials-float { flex-direction: column; align-items: center; gap: 20px; }
  .test-card { width: 88vw; padding: 28px 20px; }

  .progress-track { display: none; }
  .scene-chapter { left: 24px; top: 24px; }

  /* Chapter title mobile */
  .chapter-title { font-size: clamp(3rem, 12vw, 5rem); }

  /* Project carousel mobile */
  .project-slide.active { flex-direction: column; }
  .project-slide-image { min-height: 180px; flex: none; }
  .project-slide-info { gap: 12px; }
  .project-slide-info h3 { font-size: 1.4rem; }
  .project-slide-info > p { font-size: 0.85rem; }
  .project-slide-meta { flex-direction: column; gap: 8px; }
  .project-slide-actions { flex-direction: column; }
  .btn-project { text-align: center; justify-content: center; }
  .project-showcase { width: 100%; padding: 0 16px; }
  .project-nav { margin-top: 24px; }

  /* Code modal mobile */
  .code-modal-content { width: 95vw; max-height: 85vh; }
  .code-modal-body { padding: 16px; }
  .code-lines { font-size: 0.65rem; }

  /* Skill detail mobile */
  .skill-detail {
    right: 10px;
    left: 10px;
    width: auto;
    top: auto;
    bottom: 20px;
    transform: translateY(40px);
  }
  .skill-detail.visible {
    transform: translateY(0);
  }

  /* Contact mobile */
  .contact-title { font-size: 2rem; }
  .contact-links { gap: 12px; }
  .cl-label { width: 60px; font-size: 0.6rem; }
  .cl-value { font-size: 0.8rem; }

  /* Intro mobile */
  .intro-logo { font-size: 2rem; }
  .intro-tagline { font-size: 0.85rem; margin-bottom: 36px; }

  /* Hero mobile */
  .hero-title { font-size: clamp(2.5rem, 12vw, 5rem); }
  .floating-code { display: none; }

  /* Sound toggle mobile */
  .sound-toggle { top: 16px; right: 16px; width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
