/* ============================================================
   AWWWARDS-LEVEL DESIGN SYSTEM & STYLESHEET
   Ashutosh Chettri — Mobile Application & Full-Stack Developer
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg-void: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-light: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(37, 99, 235, 0.25);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;

  --accent-blue: #2563eb;
  --accent-blue-glow: rgba(37, 99, 235, 0.15);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-orange: #ea580c;
  --accent-orange-glow: rgba(234, 88, 12, 0.15);
  --accent-purple: #7c3aed;

  --font-heading: 'JetBrains Mono', sans-serif;
  --font-serif: 'JetBrains Mono', serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET & BASE STYLES
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: var(--bg-void);
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-heading);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--text-main);
  color: var(--bg-void);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--accent-orange);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 10000;
  background: var(--accent-orange);
  color: var(--bg-void);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  transition: top 0.25s var(--ease-expo);
}

.skip-link:focus {
  top: 20px;
}

/* ============================================================
   AWARDS-GRADE MAGNETIC GLASS SPOTLIGHT CURSOR
   ============================================================ */
@media (hover: hover) and (pointer: fine) {

  *,
  *::before,
  *::after {
    cursor: none !important;
  }
}

#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#custom-cursor.is-visible {
  opacity: 1;
}

#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--text-main);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100001;
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, height 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 0 10px rgba(15, 23, 42, 0.3);
}

#cursor-aura {
  position: fixed;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border: 1.5px solid rgba(37, 99, 235, 0.4);
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0.02) 70%, transparent 100%);
  backdrop-filter: blur(2px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s var(--ease-expo), height 0.3s var(--ease-expo), border-color 0.3s, background 0.3s, border-radius 0.3s, box-shadow 0.3s;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

#cursor-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s var(--ease-expo);
  white-space: nowrap;
}

/* Hover over interactive elements */
#custom-cursor.is-hovering #cursor-dot {
  width: 4px;
  height: 4px;
  background-color: var(--accent-orange);
}

#custom-cursor.is-hovering #cursor-aura {
  width: 64px;
  height: 64px;
  border-color: var(--accent-orange);
  background: radial-gradient(circle, rgba(234, 88, 12, 0.18) 0%, rgba(234, 88, 12, 0.04) 70%, transparent 100%);
  box-shadow: 0 0 25px rgba(234, 88, 12, 0.25);
}

#custom-cursor.has-label #cursor-aura {
  width: auto;
  min-width: 80px;
  height: 34px;
  padding: 0 16px;
  border-radius: 100px;
  background: var(--text-main);
  border-color: var(--text-main);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
}

#custom-cursor.has-label #cursor-dot {
  opacity: 0;
}

#custom-cursor.has-label #cursor-text {
  opacity: 1;
  transform: scale(1);
}

#custom-cursor.is-active #cursor-aura {
  transform: translate(-50%, -50%) scale(0.88);
}



/* Noise overlay texture */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 990;
  pointer-events: none;
  opacity: 0.038;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   PRELOADER
   ============================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px min(6vw, 80px);
  pointer-events: all;
  transition: transform 1s var(--ease-expo), opacity 0.8s ease;
}

.preloader.is-done {
  transform: translateY(-100%);
  pointer-events: none;
}

.preloader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.preloader-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.preloader-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0f172a 30%, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.preloader-counter {
  font-family: var(--font-mono);
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-orange);
}

.preloader-bar-bg {
  width: 100%;
  max-width: 320px;
  height: 2px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
  transition: width 0.1s linear;
}

.preloader-footer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  letter-spacing: 0.1em;
}



/* ============================================================
   NAVIGATION & PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-emerald), var(--accent-orange));
  z-index: 9999;
  width: 0%;
  box-shadow: 0 0 12px var(--accent-orange-glow);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px min(6vw, 80px);
  backdrop-filter: blur(12px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
  transition: transform 0.4s var(--ease-expo), background-color 0.3s;
}

.site-nav.is-hidden {
  transform: translateY(-100%);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text-main);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent-orange);
  transition: width 0.3s var(--ease-expo);
}

.nav-links a:hover::after,
.nav-links a.is-active::after {
  width: 100%;
}

.sound-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.sound-toggle-btn:hover {
  border-color: var(--border-glow);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.sound-bars span {
  width: 2px;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
  transform-origin: bottom;
}

.sound-toggle-btn.is-active .sound-bars span:nth-child(1) {
  animation: sound-wave 0.8s ease-in-out infinite alternate;
}

.sound-toggle-btn.is-active .sound-bars span:nth-child(2) {
  animation: sound-wave 1.1s ease-in-out infinite alternate 0.2s;
}

.sound-toggle-btn.is-active .sound-bars span:nth-child(3) {
  animation: sound-wave 0.7s ease-in-out infinite alternate 0.4s;
}

@keyframes sound-wave {
  0% {
    transform: scaleY(0.2);
  }

  100% {
    transform: scaleY(1);
  }
}

/* Floating Chapter Rail */
.chapter-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 850;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chapter-rail button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: all 0.35s var(--ease-expo);
  position: relative;
}

.chapter-rail button.is-active {
  background: var(--accent-orange);
  height: 26px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--accent-orange-glow);
}

.chapter-rail button .rail-label {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.chapter-rail button:hover .rail-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 900px) {
  .chapter-rail {
    display: none;
  }

  .nav-links {
    display: none;
  }
}

/* ============================================================
   TYPOGRAPHY & SECTIONS PRIMITIVES
   ============================================================ */
.chapter {
  position: relative;
  width: 100%;
  padding: min(12vw, 120px) min(6vw, 80px);
}

.chapter-inner {
  max-width: 1320px;
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent-orange);
  display: inline-block;
}

.big-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #0f172a 40%, rgba(15, 23, 42, 0.65));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.serif-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.15;
  color: var(--text-main);
  -webkit-text-fill-color: initial;
}

.body-lg {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 680px;
  font-weight: 400;
}

.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.split-word>span {
  display: inline-block;
  will-change: transform;
}

.accent-blue {
  color: var(--accent-blue);
}

.accent-emerald {
  color: var(--accent-emerald);
}

.accent-orange {
  color: var(--accent-orange);
}

/* ============================================================
   CHAPTER 1 — HERO & LANDING
   ============================================================ */
.hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 0 min(6vw, 80px);
  overflow: hidden;
}

#hero-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 100px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero-badge-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.hero-name {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: clamp(3.2rem, 9.5vw, 8.2rem);
  line-height: 0.95;
  background: linear-gradient(135deg, #0f172a 40%, rgba(15, 23, 42, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  color: var(--text-muted);
  max-width: 660px;
  line-height: 1.35;
}

.hero-sub span.highlight {
  color: var(--text-main);
  border-bottom: 1px dashed var(--accent-orange);
}

.hero-meta {
  position: absolute;
  bottom: 40px;
  left: min(6vw, 80px);
  right: min(6vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  z-index: 2;
  letter-spacing: 0.06em;
}

.time-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-weight: 500;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scroll-cue-text {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-cue-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--border-light), transparent);
  position: relative;
  overflow: hidden;
}

.scroll-cue-line::after {
  content: "";
  position: absolute;
  top: -48px;
  left: 0;
  width: 100%;
  height: 48px;
  background: var(--text-main);
  animation: scrollcue 2.2s var(--ease-smooth) infinite;
}

@keyframes scrollcue {
  to {
    top: 100%;
  }
}

/* ============================================================
   CHAPTER 2 — WHO AM I (PINNED WORD ASSEMBLY)
   ============================================================ */
.identity-pin {
  height: 220vh;
  position: relative;
}

.identity-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.06), transparent 70%);
}

.identity-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.6em;
  justify-content: center;
  align-items: center;
  max-width: 1100px;
  padding: 0 24px;
}

.identity-word {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  color: var(--text-faint);
  opacity: 0.3;
  transition: color 0.4s var(--ease-expo), opacity 0.4s, transform 0.4s;
  will-change: color, opacity, transform;
}

.identity-word.is-lit {
  color: var(--text-main);
  opacity: 1;
  transform: scale(1.04);
  text-shadow: 0 0 20px rgba(37, 99, 235, 0.15);
}

.identity-arrow {
  color: var(--accent-orange);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  align-self: center;
  opacity: 0.4;
  transition: opacity 0.4s;
}

.identity-word.is-lit+.identity-arrow {
  opacity: 1;
}

.identity-caption {
  position: absolute;
  bottom: 60px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============================================================
   CHAPTER 3 — THE BUILDER (SKILLS MATRIX & ORBIT)
   ============================================================ */
.builder-wrap {
  min-height: 120vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.orbit-system {
  position: relative;
  width: min(88vw, 760px);
  height: min(88vw, 760px);
  margin-top: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit-core {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--bg-void) 80%);
  border: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--text-main);
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.12);
  z-index: 3;
}

.orbit-core strong {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--accent-orange);
  display: block;
  margin-top: 4px;
}

.orbit-ring {
  position: absolute;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 104px;
  height: 104px;
  margin: -52px 0 0 -52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: transform 0.3s var(--ease-expo), background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
  will-change: transform;
}

.orbit-item span.tool-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.orbit-item:hover {
  /* Hover scale effect removed per user request */
}

@media (max-width: 860px) {
  .orbit-system {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .orbit-ring,
  .orbit-core {
    display: none;
  }

  .orbit-item {
    position: static;
    margin: 0;
    width: auto;
    height: auto;
    padding: 12px 20px;
    flex-direction: row;
    border-radius: 100px;
  }
}

/* ============================================================
   CHAPTER 4 — PROJECTS & WORK SHOWCASE
   ============================================================ */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 40px;
}

.project-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.3s var(--ease-expo);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--text-main);
  color: var(--bg-void);
  border-color: var(--text-main);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}

.project {
  min-height: 90svh;
  display: flex;
  align-items: center;
  padding: min(10vw, 100px) min(6vw, 80px);
  position: relative;
  border-top: 1px solid var(--border-light);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.project.is-hidden {
  display: none;
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: min(6vw, 80px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  width: 100%;
}

.project:nth-child(even) .project-grid {
  direction: rtl;
}

.project:nth-child(even) .project-grid>* {
  direction: ltr;
}

.project-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 16px;
  letter-spacing: 0.1em;
}

.project-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(135deg, #0f172a 50%, rgba(15, 23, 42, 0.7));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 14px;
  display: inline-block;
  font-weight: 500;
}

.project-desc {
  margin-top: 22px;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.05rem;
  max-width: 540px;
}

.project-meta-row {
  display: flex;
  gap: 36px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.project-meta-row div {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.project-meta-row strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  margin-top: 6px;
}

.tech-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.3s, color 0.3s;
}

.tech-pill:hover {
  border-color: var(--border-glow);
  color: var(--text-main);
}

.project-action-btn {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-main);
  transition: all 0.3s var(--ease-expo);
}

.project-action-btn:hover {
  background: var(--text-main);
  color: var(--bg-void);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.15);
}

/* 3D TILT DEVICE MOCKUP FRAME */
.device-frame-container {
  perspective: 1000px;
  display: flex;
  justify-content: center;
}

.device-frame {
  position: relative;
  aspect-ratio: 9/19;
  width: min(75vw, 310px);
  border-radius: 40px;
  border: 8px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.14), inset 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.5s var(--ease-expo);
}

.device-frame .notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 24px;
  background: #cbd5e1;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

.device-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.device-screen canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 860px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project:nth-child(even) .project-grid {
    direction: ltr;
  }

  .device-frame {
    width: 260px;
  }
}

/* ============================================================
   PROJECT MODAL DIALOG
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-expo);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 40px;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s var(--ease-expo);
  box-shadow: 0 25px 70px rgba(15, 23, 42, 0.15);
}

.modal-backdrop.is-open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.25s;
}

.modal-close-btn:hover {
  background: var(--text-main);
  color: var(--bg-void);
}

.modal-title {
  font-size: 2rem;
  font-family: var(--font-heading);
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-orange);
  margin-bottom: 20px;
}

.modal-body {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.modal-body ul {
  margin-top: 16px;
  padding-left: 20px;
}

.modal-body li {
  margin-bottom: 8px;
}

/* ============================================================
   CHAPTER 5 — JOURNEY & EXPERIENCE TIMELINE
   ============================================================ */
.journey-container {
  display: flex;
  flex-direction: column;
  gap: 60px;
  margin-top: 60px;
}

.journey-scene {
  padding: min(6vw, 60px) 0;
  border-top: 1px solid var(--border-light);
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: min(6vw, 70px);
}

@media (max-width: 860px) {
  .journey-scene {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.journey-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.journey-company {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin-top: 8px;
  color: var(--text-main);
}

.journey-dates {
  margin-top: 10px;
  color: var(--accent-orange);
  font-size: 13px;
  font-family: var(--font-mono);
}

.journey-points {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.journey-point {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  opacity: 0.4;
  transition: opacity 0.5s var(--ease-expo), background 0.3s, border-color 0.3s;
}

.journey-point.is-visible {
  opacity: 1;
}

.journey-point:hover {
  background: var(--bg-card);
  border-color: var(--border-glow);
}

.journey-point .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-orange);
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--accent-orange-glow);
}

.journey-point p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 1.02rem;
}

.journey-point strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ============================================================
   CHAPTER 6 — DIGITAL LAB (SELF-HOSTED NETWORK)
   ============================================================ */
.lab-section {
  position: relative;
  padding-bottom: 0;
}

.lab-pin-wrap {
  position: relative;
  height: auto;
  margin-top: 20px;
}

.lab-canvas-sticky {
  position: relative;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lab-canvas {
  width: min(92vw, 920px);
  height: min(78vh, 680px);
}

.lab-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 20px;
  padding-bottom: min(12vw, 120px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.lab-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
}

.lab-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ============================================================
   CHAPTER 7 — CONTACT & FOOTER
   ============================================================ */
.contact {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-title {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 7.5vw, 6.2rem);
  line-height: 1;
  max-width: 950px;
}

.contact-links {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: clamp(14px, 1.8vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.3s, padding-left 0.35s var(--ease-expo);
}

.contact-links .contact-link:last-child {
  border-bottom: 1px solid var(--border-light);
}

.contact-link:hover {
  color: var(--accent-orange);
  padding-left: 16px;
}

.contact-link .arrow {
  font-family: var(--font-heading);
  font-size: 22px;
  transition: transform 0.3s var(--ease-expo);
}

.contact-link:hover .arrow {
  transform: translateX(8px);
}

footer {
  padding: 40px min(6vw, 80px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100000;
  background: var(--bg-card);
  border: 1px solid var(--accent-emerald);
  padding: 14px 22px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px var(--accent-emerald-glow);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-expo), opacity 0.4s;
}

.toast-notification.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}