/* ============================================
   ZAKHAR SHYLOV — PORTFOLIO v3
   Premium Dark Theme + Extreme Animations
   ============================================ */

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

:root {
  --bg: #06060a;
  --bg-elevated: #0c0c12;
  --bg-card: rgba(18, 18, 26, 0.6);
  --bg-card-hover: rgba(26, 26, 38, 0.8);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #f0f0f5;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --accent: #818cf8;
  --accent-2: #c084fc;
  --accent-3: #6366f1;
  --accent-soft: rgba(129, 140, 248, 0.1);
  --accent-glow: rgba(129, 140, 248, 0.3);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1120px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =============================================
   LOADER — Cinematic Loading Screen
   ============================================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-smooth),
              visibility 0.8s var(--ease-smooth);
}

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

.loader-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.loader-particles {
  position: absolute;
  inset: 0;
}

.loader-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: loaderParticleFloat 3s ease-in-out infinite;
}

@keyframes loaderParticleFloat {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  20% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: translateY(-200px) scale(0); }
}

.loader-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Animated ring */
.loader-logo {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 40px;
}

.loader-ring {
  width: 100%;
  height: 100%;
  animation: loaderRingSpin 2s linear infinite;
}

.loader-ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 290;
  stroke-dashoffset: 290;
  stroke-linecap: round;
  animation: loaderRingDraw 1.8s var(--ease-out) forwards;
}

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

@keyframes loaderRingDraw {
  to { stroke-dashoffset: 70; }
}

.loader-initials {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInScale 0.6s 0.3s var(--ease-out) forwards;
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* Letter reveal */
.loader-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  perspective: 800px;
}

.loader-letter {
  font-family: var(--font-display);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: transparent;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  transform: translateY(40px) rotateX(60deg) scale(0.8);
  animation: letterReveal3D 0.7s var(--ease-out) forwards;
}

.loader-letter:nth-child(1)  { animation-delay: 0.1s; }
.loader-letter:nth-child(2)  { animation-delay: 0.15s; }
.loader-letter:nth-child(3)  { animation-delay: 0.2s; }
.loader-letter:nth-child(4)  { animation-delay: 0.25s; }
.loader-letter:nth-child(5)  { animation-delay: 0.3s; }
.loader-letter:nth-child(6)  { animation-delay: 0.35s; }
.loader-letter:nth-child(8)  { animation-delay: 0.5s; }
.loader-letter:nth-child(9)  { animation-delay: 0.55s; }
.loader-letter:nth-child(10) { animation-delay: 0.6s; }
.loader-letter:nth-child(11) { animation-delay: 0.65s; }
.loader-letter:nth-child(12) { animation-delay: 0.7s; }
.loader-letter:nth-child(13) { animation-delay: 0.75s; }

@keyframes letterReveal3D {
  0% { opacity: 0; transform: translateY(40px) rotateX(60deg) scale(0.8); }
  60% { opacity: 1; transform: translateY(-5px) rotateX(-5deg) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); }
}

/* Shimmer sweep */
.loader-text::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(129, 140, 248, 0.2) 45%, rgba(192, 132, 252, 0.2) 55%, transparent 100%);
  animation: shimmerSweep 1.5s 1s ease-in-out forwards;
  opacity: 0;
  pointer-events: none;
}

@keyframes shimmerSweep {
  0% { opacity: 1; transform: translateX(-120%); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(120%); }
}

.loader-spacer { width: 14px; }

.loader-subtitle {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeIn 0.5s 0.8s var(--ease-out) forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.loader-bar {
  width: 220px;
  height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width 0.1s linear;
}

.loader-percent {
  position: absolute;
  top: 12px;
  right: 0;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-tertiary);
  opacity: 0;
  animation: fadeIn 0.4s 0.5s var(--ease-out) forwards;
}

/* =============================================
   CURSOR
   ============================================= */
.cursor-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9990;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.04) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  will-change: transform;
  transition: opacity 0.4s ease;
}

.cursor-glow.active { opacity: 1; }

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9991;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease, width 0.2s ease, height 0.2s ease;
  mix-blend-mode: screen;
}

.cursor-dot.active { opacity: 0.8; }
.cursor-dot.hovering { width: 40px; height: 40px; opacity: 0.15; }

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: all 0.4s var(--ease-smooth);
  opacity: 0;
  transform: translateY(-10px);
}

body.loaded .nav {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.nav.scrolled {
  background: rgba(6, 6, 10, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  transition: all 0.3s var(--ease-smooth);
}

.nav-logo-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.nav-logo:hover .nav-logo-text {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-logo-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.6); }
}

.nav-links {
  display: flex;
  gap: 4px;
  position: relative;
}

.nav-link {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: var(--radius-xs);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

/* Animated nav indicator */
.nav-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: all 0.35s var(--ease-out);
  opacity: 0;
}

.nav-indicator.visible { opacity: 1; }

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

.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-smooth);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 6, 10, 0.97);
  backdrop-filter: blur(24px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.active { opacity: 1; pointer-events: all; }

.mobile-link {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 12px 24px;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.active .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }

.mobile-link:hover { color: var(--text); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(129, 140, 248, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 50%, rgba(192, 132, 252, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 15% 60%, rgba(52, 211, 153, 0.04) 0%, transparent 50%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent);
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: orbFloat 18s ease-in-out infinite;
}

.hero-orb-1 {
  width: 600px; height: 600px;
  background: rgba(129, 140, 248, 0.06);
  top: -15%; left: 15%;
}

.hero-orb-2 {
  width: 500px; height: 500px;
  background: rgba(192, 132, 252, 0.05);
  bottom: -5%; right: 5%;
  animation-delay: -6s;
}

.hero-orb-3 {
  width: 400px; height: 400px;
  background: rgba(52, 211, 153, 0.04);
  bottom: 15%; left: -8%;
  animation-delay: -12s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
  25% { transform: translate(40px, -30px) scale(1.08); opacity: 0.9; }
  50% { transform: translate(-20px, 20px) scale(0.95); opacity: 0.7; }
  75% { transform: translate(30px, 10px) scale(1.04); opacity: 1; }
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 760px;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 12px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.12);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 36px;
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
}

/* Hero title — character animation */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 10vw, 100px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}

.hero-title-line { display: block; }

.char-wrap {
  display: inline-block;
  overflow: hidden;
}

.char {
  display: inline-block;
  transform: translateY(120%);
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}

/* Show chars once hero-title gets .animate OR after fallback */
.hero-title.animate .char,
body.loaded .hero-title .char {
  transform: translateY(0);
}

.hero-title-first .char-wrap:nth-child(1) .char { transition-delay: 0.05s; }
.hero-title-first .char-wrap:nth-child(2) .char { transition-delay: 0.08s; }
.hero-title-first .char-wrap:nth-child(3) .char { transition-delay: 0.11s; }
.hero-title-first .char-wrap:nth-child(4) .char { transition-delay: 0.14s; }
.hero-title-first .char-wrap:nth-child(5) .char { transition-delay: 0.17s; }
.hero-title-first .char-wrap:nth-child(6) .char { transition-delay: 0.2s; }

/* Shylov — whole word animation (gradient + clip-text doesn't work with nested overflow:hidden) */
.hero-title-accent {
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    var(--accent-2) 20%,
    #f0abfc 40%,
    var(--accent) 60%,
    var(--accent-2) 80%,
    var(--accent) 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShimmer 6s linear infinite;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: 0.3s;
}

.hero-title.animate .hero-title-accent,
body.loaded .hero-title .hero-title-accent {
  opacity: 1;
  transform: translateY(0);
}

@keyframes gradientShimmer {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

/* Typed text cursor */
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
  min-height: 1.5em;
}

.typed-cursor {
  display: inline-block;
  color: var(--accent);
  font-weight: 300;
  animation: cursorBlink 0.8s steps(2) infinite;
  margin-left: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-description {
  font-size: clamp(15px, 1.8vw, 17px);
  color: var(--text-tertiary);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero-scroll-indicator {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll-text {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
  opacity: 0;
  animation: fadeIn 1s 2.5s var(--ease-out) forwards;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
  opacity: 0;
  animation: scrollPulse 2.5s 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 0.8; transform: scaleY(1); }
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-smooth);
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(129, 140, 248, 0.3), 0 0 0 1px rgba(129, 140, 248, 0.3);
}

.btn-glow {
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.15);
}

.btn-glow:hover {
  box-shadow: 0 0 40px rgba(129, 140, 248, 0.3), 0 8px 32px rgba(129, 140, 248, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 15px;
}

/* =============================================
   TECH MARQUEE
   ============================================= */
.marquee-section {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-content {
  display: flex;
  gap: 48px;
  align-items: center;
  padding: 0 24px;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.marquee-item:hover {
  color: var(--text);
}

.marquee-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.marquee-item:hover .marquee-icon {
  opacity: 1;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
  opacity: 0.3;
}

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 120px 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: transform 1.2s var(--ease-out);
}

.section.in-view::before {
  transform: translateX(-50%) scaleX(1);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 4px 14px;
  border: 1px solid rgba(129, 140, 248, 0.15);
  border-radius: 100px;
  background: var(--accent-soft);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  position: relative;
  background: linear-gradient(90deg, var(--text) 0%, var(--text) 40%, var(--accent) 50%, var(--text) 60%, var(--text) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-position: 0% center;
}

.section-title.title-visible {
  animation: titleShimmer 2s 0.3s ease-in-out forwards;
}

@keyframes titleShimmer {
  0% { background-position: 100% center; }
  100% { background-position: -100% center; }
}

.section-description {
  font-size: 16px;
  color: var(--text-tertiary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =============================================
   GLASSMORPHISM CARD BASE
   ============================================= */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s var(--ease-smooth);
}

.glass-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* =============================================
   ABOUT
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 64px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.about-text p:last-child { margin-bottom: 0; }

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient border on stat cards */
.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 50%, var(--accent-2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.stat-card:hover::before { opacity: 0.4; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  transition: text-shadow 0.3s ease;
}

.stat-card:hover .stat-number {
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.stat-label {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* =============================================
   PROJECTS
   ============================================= */
.section-projects {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.project-card {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 40px;
  position: relative;
  background: transparent;
  transition: transform 0.4s var(--ease-smooth);
}

.project-card:last-child { margin-bottom: 0; }

/* Animated gradient border */
.project-card-border {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 40%, var(--accent) 50%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
  to { --angle: 360deg; }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.project-card:hover .project-card-border { opacity: 0.6; }

.project-card-inner {
  padding: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.4s var(--ease-smooth);
}

.project-card:hover .project-card-inner {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

/* Spotlight on card */
.project-card-inner::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.05), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  transform: translate(var(--spot-x, -250px), var(--spot-y, -250px));
  z-index: 0;
}

#project-expenses .project-card-inner::before {
  background: radial-gradient(circle, rgba(52, 211, 153, 0.05), transparent 70%);
}

.project-card:hover .project-card-inner::before { opacity: 1; }

.project-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.project-icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), rgba(192, 132, 252, 0.06));
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s ease;
}

#project-expenses .project-icon-wrapper {
  background: linear-gradient(135deg, var(--green-soft), rgba(52, 211, 153, 0.06));
}

.project-card:hover .project-icon-wrapper {
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.2);
  transform: scale(1.05);
}

#project-expenses.project-card:hover .project-icon-wrapper {
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.2);
}

.project-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.project-icon-fallback {
  align-items: center;
  justify-content: center;
}

.project-meta { flex: 1; position: relative; z-index: 1; }

.project-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.project-type {
  font-size: 14px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.project-description {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.project-platforms {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.platform-badge:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.project-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.project-features { margin-bottom: 32px; position: relative; z-index: 1; }

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

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.015);
  border-radius: var(--radius-xs);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.feature-item svg { color: var(--accent); flex-shrink: 0; }
#project-expenses .feature-item svg { color: var(--green); }

.feature-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
  transform: translateX(4px);
}

.project-tech { margin-bottom: 32px; position: relative; z-index: 1; }

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(129, 140, 248, 0.08);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  transition: all 0.3s ease;
}

#project-expenses .tech-tag {
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.08);
  color: var(--green);
}

.tech-tag:hover {
  background: rgba(129, 140, 248, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.15);
}

#project-expenses .tech-tag:hover {
  background: rgba(52, 211, 153, 0.18);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.15);
}

.project-architecture { position: relative; z-index: 1; }

.project-architecture p {
  font-size: 14px;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* =============================================
   SKILLS — TECH ICON CLOUD (floating)
   ============================================= */
.tech-icons-cloud {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 16px;
  margin-bottom: 64px;
  padding: 20px 0;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.tech-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: default;
  animation: techFloat var(--float-duration, 3.5s) var(--float-delay, 0s) ease-in-out infinite;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

@keyframes techFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.tech-icon-item svg,
.tech-icon-img {
  width: 40px;
  height: 40px;
  transition: transform 0.4s var(--ease-out);
  border-radius: 8px;
  object-fit: contain;
}

.tech-icon-item span {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-align: center;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.tech-icon-item:hover {
  border-color: var(--accent);
  background: rgba(129, 140, 248, 0.06);
  box-shadow: 0 12px 36px rgba(129, 140, 248, 0.15), 0 0 0 1px rgba(129, 140, 248, 0.1);
  animation-play-state: paused;
}

.tech-icon-item:hover svg,
.tech-icon-item:hover .tech-icon-img {
  transform: scale(1.15) rotate(-5deg);
}

.tech-icon-item:hover span {
  color: var(--accent);
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-group {
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

/* Sweep line */
.skill-group::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: left 0.8s ease;
}

.skill-group:hover::after { left: 100%; }

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.skill-group-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  color: var(--accent);
  transition: all 0.3s ease;
}

.skill-group:hover .skill-group-icon {
  background: rgba(129, 140, 248, 0.15);
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.2);
  animation: iconFloat 2.5s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.skill-group-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.skill-tag:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(129, 140, 248, 0.15);
  transform: translateY(-2px);
}

/* =============================================
   LANGUAGES
   ============================================= */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}

.language-card {
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px) scale(0.95);
  transition: opacity 0.6s var(--ease-out),
              transform 0.6s var(--ease-out),
              border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.language-card.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.language-card:nth-child(1) { transition-delay: 0.05s; }
.language-card:nth-child(2) { transition-delay: 0.15s; }
.language-card:nth-child(3) { transition-delay: 0.25s; }
.language-card:nth-child(4) { transition-delay: 0.35s; }

.language-name {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.language-level {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 16px;
}

.language-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  overflow: hidden;
}

.language-bar-fill {
  height: 100%;
  width: var(--fill);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-out);
}

.language-bar-fill.animate {
  transform: scaleX(1);
}

/* =============================================
   CONTACT
   ============================================= */
.section-contact {
  border-top: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(129, 140, 248, 0.04) 0%, transparent 60%),
    var(--bg);
}

.contact-content {
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.contact-description {
  font-size: 16px;
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

a.contact-link:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.contact-link svg { color: var(--text-tertiary); flex-shrink: 0; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer-text {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-back-top {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: all 0.3s ease;
}

.footer-back-top:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s var(--ease-out),
              transform 0.8s var(--ease-out);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Hero stagger */
.hero-content .reveal:nth-child(1) { transition-delay: 0.1s; }
.hero-content .reveal:nth-child(2) { transition-delay: 0.3s; }
.hero-content .reveal:nth-child(3) { transition-delay: 0.5s; }
.hero-content .reveal:nth-child(4) { transition-delay: 0.7s; }
.hero-content .reveal:nth-child(5) { transition-delay: 0.9s; }

/* Body loaded transition */
body:not(.loaded) .nav,
body:not(.loaded) .hero-content,
body:not(.loaded) .hero-scroll-indicator {
  opacity: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stats {
    flex-direction: row;
    gap: 16px;
  }
  .stat-card { flex: 1; }
  .tech-icons-cloud { grid-template-columns: repeat(5, 1fr); gap: 12px; }
  .tech-icon-item svg, .tech-icon-img { width: 32px; height: 32px; }
}

@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .hero { padding: 100px 24px 60px; min-height: calc(100vh - 40px); }
  .hero-title { font-size: clamp(44px, 12vw, 72px); }
  .project-card-inner { padding: 28px; }
  .project-name { font-size: 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .languages-grid { grid-template-columns: repeat(2, 1fr); }
  .section-header { margin-bottom: 40px; }
  .about-stats { flex-direction: column; }
  .tech-icons-cloud { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cursor-glow, .cursor-dot { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .hero-badge { font-size: 12px; }
  .languages-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .project-header { flex-direction: column; align-items: flex-start; gap: 14px; }
  .tech-icons-cloud { grid-template-columns: repeat(3, 1fr); }
  .tech-icon-item svg, .tech-icon-img { width: 28px; height: 28px; }
  .tech-icon-item span { font-size: 10px; }
}
