/* ============================================
   THEME SYSTEM
   ============================================ */
:root,
[data-theme="dark"] {
  --color-bg: #050508;
  --color-bg-secondary: #0c0c10;
  --color-bg-card: #12121a;
  --color-bg-card-hover: #1a1a25;
  --color-surface: #16161f;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-border-hover: rgba(99, 102, 241, 0.3);

  --color-text: #f0f0f5;
  --color-text-secondary: #9494a8;
  --color-text-muted: #5c5c72;

  --color-primary: #6366f1;
  --color-primary-hover: #818cf8;
  --color-primary-glow: rgba(99, 102, 241, 0.12);
  --color-primary-subtle: rgba(99, 102, 241, 0.06);

  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
                 radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
  --gradient-section-alt: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 50%, var(--color-bg) 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.08);
  --shadow-glow-strong: 0 0 80px rgba(99, 102, 241, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --section-padding: 120px 0;
  --container-max: 1200px;
  --container-padding: 0 32px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-height: 72px;
}

[data-theme="light"] {
  --color-bg: #fafafa;
  --color-bg-secondary: #f3f3f6;
  --color-bg-card: #ffffff;
  --color-bg-card-hover: #f8f8fb;
  --color-surface: #f0f0f4;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-light: rgba(0, 0, 0, 0.1);
  --color-border-hover: rgba(99, 102, 241, 0.4);

  --color-text: #111118;
  --color-text-secondary: #555566;
  --color-text-muted: #888899;

  --color-primary-glow: rgba(99, 102, 241, 0.08);
  --color-primary-subtle: rgba(99, 102, 241, 0.05);

  --gradient-bg: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
                 radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  --gradient-card: linear-gradient(135deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0) 100%);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.06);
  --shadow-glow-strong: 0 0 80px rgba(99, 102, 241, 0.1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; }

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-text);
}

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  transform: translate(-50%, -50%);
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--color-primary);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease,
              border-color 0.3s ease;
}

body.cursor-visible .cursor-dot,
body.cursor-visible .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--color-primary-hover);
}

body.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(1.5);
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: orbFloat 25s ease-in-out infinite;
  will-change: transform;
}

.ambient-orb:nth-child(1) {
  width: 600px;
  height: 600px;
  background: rgba(99, 102, 241, 0.08);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.ambient-orb:nth-child(2) {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.06);
  bottom: -15%;
  right: -10%;
  animation-delay: -8s;
  animation-duration: 30s;
}

.ambient-orb:nth-child(3) {
  width: 400px;
  height: 400px;
  background: rgba(99, 102, 241, 0.05);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
  animation-duration: 35s;
}

[data-theme="light"] .ambient-orb { opacity: 0.2; }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* Grid pattern */
.grid-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

[data-theme="light"] .grid-pattern { opacity: 0.15; }

/* ============================================
   CONTAINER & UTILITIES
   ============================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section {
  padding: var(--section-padding);
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-secondary);
  margin-bottom: 60px;
  font-size: 1.05rem;
  font-weight: 400;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  transition: all var(--transition-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:active {
  transform: translateY(0) scale(0.97) !important;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::after { opacity: 1; }

.btn-primary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn-outline {
  border: 1px solid var(--color-border-light);
  color: var(--color-text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-hover);
  background: var(--color-primary-subtle);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.btn-outline:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.btn-full { width: 100%; }

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-base);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(250, 250, 250, 0.8);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
}

.nav-menu {
  display: flex;
  gap: 2px;
  align-items: center;
}

.nav-link {
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-base);
}

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

.nav-link:hover::after {
  transform: scaleX(1);
}

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

.nav-link.active::after {
  transform: scaleX(1);
  opacity: 0.5;
}

.nav-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Theme Toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  z-index: 1001;
}

.theme-toggle:hover {
  color: var(--color-primary-hover);
  background: var(--color-primary-subtle);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: all var(--transition-base);
}

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  border-radius: var(--radius-sm);
}

.nav-toggle:hover { background: var(--color-primary-subtle); }

.hamburger {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: all var(--transition-base);
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition-base);
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger { background: transparent; }
.nav-toggle[aria-expanded="true"] .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger::after { top: 0; transform: rotate(-45deg); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-bg);
  pointer-events: none;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Hero entrance: elements start hidden, JS adds .hero-revealed */
.hero-content > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-revealed .hero-greeting { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.hero-revealed .hero-name { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.hero-revealed .hero-title { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }
.hero-revealed .hero-description { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.hero-revealed .hero-cta { opacity: 1; transform: translateY(0); transition-delay: 0.75s; }
.hero-revealed .hero-socials { opacity: 1; transform: translateY(0); transition-delay: 0.9s; }

.hero-greeting {
  font-size: 1rem;
  color: var(--color-primary-hover);
  font-weight: 500;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.hero-name {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  font-weight: 400;
  min-height: 1.5em;
}

.typed-cursor {
  display: inline-block;
  color: var(--color-primary);
  animation: blink 1s step-end infinite;
  font-weight: 300;
  margin-left: 2px;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-description {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 32px;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 12px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.social-link:hover {
  color: var(--color-primary-hover);
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--color-primary-glow);
}

.social-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s,
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.hero-revealed .hero-image {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-image-wrapper {
  position: relative;
}

.hero-image-placeholder {
  width: 340px;
  height: 340px;
  border-radius: var(--radius-xl);
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-image-placeholder:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.hero-image-photo {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-border);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.hero-image-photo:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.35;
  filter: blur(8px);
  transition: opacity var(--transition-base);
}

.hero-image-wrapper:hover::before {
  opacity: 0.6;
}

/* Floating decorative dots around hero image */
.hero-image-wrapper::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
  top: -20px;
  right: -20px;
  opacity: 0.5;
  animation: floatDot 4s ease-in-out infinite;
}

@keyframes floatDot {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, -12px); }
}

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: color var(--transition-fast);
  opacity: 0;
  animation: fadeInScroll 1s ease 1.5s forwards;
}

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

.hero-scroll:hover { color: var(--color-primary-hover); }

.hero-scroll svg {
  animation: gentleBounce 2.5s ease-in-out infinite;
}

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================
   ABOUT
   ============================================ */
.about { background: var(--color-bg-secondary); }

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 72px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about-image-wrapper { position: relative; }

.about-image-placeholder {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.about-image-placeholder:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.about-image-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  object-fit: cover;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.about-image-photo:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
}

.about-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.3;
  transition: opacity var(--transition-base);
}

.about-image-wrapper:hover::before { opacity: 0.5; }

.about-content p {
  color: var(--color-text-secondary);
  margin-bottom: 18px;
  line-height: 1.8;
  font-size: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--color-border);
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* ============================================
   SKILLS
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto;
}

.skill-card {
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  cursor: default;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.skill-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow-strong);
}

.skill-card:hover::before { opacity: 1; }

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: var(--radius-md);
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
  transition: transform var(--transition-spring), background var(--transition-base);
}

.skill-card:hover .skill-icon {
  transform: translateY(-4px) scale(1.08);
  background: var(--color-primary-glow);
}

.skill-name {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.skill-level {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ============================================
   PROJECTS
   ============================================ */
.projects { background: var(--color-bg-secondary); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: default;
}

.project-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.project-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-image-placeholder {
  transform: scale(1.05);
}

.project-content { padding: 24px; }

.project-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  transition: color var(--transition-fast);
}

.project-card:hover .project-name {
  color: var(--color-primary-hover);
}

.project-description {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 18px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tech-tag {
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
  border: 1px solid rgba(99, 102, 241, 0.12);
  letter-spacing: 0.02em;
  transition: all var(--transition-fast);
}

.project-card:hover .tech-tag {
  border-color: rgba(99, 102, 241, 0.25);
}

.project-links { display: flex; gap: 16px; }

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast), transform var(--transition-fast);
  padding: 6px 0;
}

.project-link:hover {
  color: var(--color-primary-hover);
  transform: translateX(2px);
}

.project-link:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============================================
   EDUCATION TIMELINE
   ============================================ */
.timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
  transform-origin: top;
}

.timeline-item {
  position: relative;
  padding-left: 44px;
  padding-bottom: 44px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 3px solid var(--color-primary);
  z-index: 1;
  transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.3);
  box-shadow: 0 0 16px var(--color-primary-glow);
}

.timeline-card {
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all var(--transition-base);
}

.timeline-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-primary-hover);
  font-family: var(--font-mono);
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.timeline-title {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.timeline-institution {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.timeline-description {
  color: var(--color-text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* ============================================
   CONTACT
   ============================================ */
.contact { background: var(--color-bg-secondary); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-subtle);
  color: var(--color-primary-hover);
  transition: all var(--transition-base);
}

.contact-item:hover .contact-icon {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--color-primary-glow);
}

.contact-item h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 3px;
}

.contact-item a, .contact-item p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.contact-item a:hover { color: var(--color-primary-hover); }

.contact-item a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Form */
.contact-form {
  background: var(--gradient-card), var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color var(--transition-base);
}

.contact-form:hover {
  border-color: var(--color-border-light);
}

.form-group { margin-bottom: 22px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.92rem;
  transition: all var(--transition-base);
  outline: none;
}

.form-group input::placeholder, .form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:hover, .form-group textarea:hover {
  border-color: var(--color-border-light);
}

.form-group input:focus, .form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-glow);
  background: var(--color-bg-card);
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding-top: 64px;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 44px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  display: inline-block;
  letter-spacing: -0.04em;
}

.footer-text {
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.footer-socials { display: flex; gap: 12px; }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

/* ============================================
   SCROLL REVEAL SYSTEM
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Stagger children inside grids */
.stagger-grid .reveal { transition-delay: calc(var(--i, 0) * 80ms); }

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  :root { --section-padding: 96px 0; }

  .hero-image-photo { width: 220px; height: 220px; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { gap: 48px; }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
    --nav-height: 64px;
    --container-padding: 0 20px;
  }

  /* Hide custom cursor on mobile */
  .cursor-dot, .cursor-ring { display: none !important; }

  .nav-toggle { display: flex; }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg-secondary);
    border-left: 1px solid var(--color-border);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 4px;
    transition: right var(--transition-slow);
    z-index: 1000;
  }

  .nav-menu.open { right: 0; }
  .nav-link { padding: 14px 16px; font-size: 1rem; }
  .nav-link::after { display: none; }

  .hero-container {
    gap: 24px;
    text-align: center;
  }

  .hero-description { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-image-photo { width: 180px; height: 180px; }
  .hero-scroll { display: none; }
  .hero-name { font-size: clamp(2.5rem, 10vw, 3.5rem); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .about-image-placeholder, .about-image-photo { width: 180px; height: 180px; margin: 0 auto; }
  .about-stats { gap: 16px; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .skill-card { padding: 24px 14px; }

  .projects-grid { grid-template-columns: 1fr; max-width: 500px; }

  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-form { padding: 24px; }

  .footer-container {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root { --section-padding: 64px 0; }

  .hero-name { font-size: 2.4rem; }
  .hero-image-photo { width: 150px; height: 150px; }

  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; }

  .skills-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .skill-card { padding: 20px 10px; }
  .skill-icon { width: 48px; height: 48px; }

  .about-stats { grid-template-columns: 1fr; gap: 16px; }

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

/* ============================================
   NAV OVERLAY
   ============================================ */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.nav-overlay.active { opacity: 1; pointer-events: all; }

/* ============================================
   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;
  }

  .reveal { opacity: 1; transform: none; }
  .hero-content > *, .hero-revealed .hero-content > * { opacity: 1; transform: none; transition-delay: 0s !important; }
  .hero-image, .hero-revealed .hero-image { opacity: 1; transform: none; transition-delay: 0s !important; }
  .hero-scroll { opacity: 1; }
  .ambient-orb { animation: none; }
}
