/* ============================================
   CSS Variables & Theme
   ============================================ */
:root {
  --bg: #fafaf9;
  --bg-alt: #f3f2ef;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --accent-hover: #1d4ed8;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --nav-height: 64px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg: #0f0f0f;
  --bg-alt: #1a1a1a;
  --surface: #222222;
  --text: #e8e8e8;
  --text-secondary: #aaaaaa;
  --text-muted: #777777;
  --accent: #60a5fa;
  --accent-soft: #1e3a5f;
  --accent-hover: #93bbfd;
  --border: #333333;
  --border-light: #2a2a2a;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

/* ============================================
   Page Load Curtain
   ============================================ */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.loader-text {
  font-size: 3rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--text);
  animation: loaderPulse 1s ease-in-out infinite alternate;
}

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

/* ============================================
   Accent Color Picker
   ============================================ */
.color-picker {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 998;
}

.color-picker-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.color-picker-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  border-color: var(--accent);
}

.color-options {
  position: absolute;
  bottom: 52px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.color-picker.open .color-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.color-swatch:hover {
  transform: scale(1.25);
  border-color: #fff;
}

.color-swatch.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--text-muted);
}

/* ============================================
   Mouse Trail Canvas
   ============================================ */
.mouse-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  width: 100vw;
  height: 100vh;
}

/* ============================================
   Wave Section Dividers
   ============================================ */
.wave-divider {
  position: relative;
  margin-top: -2px;
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  width: 100%;
  height: 50px;
  display: block;
}

.wave-divider.flip {
  transform: scaleY(-1);
  margin-top: 0;
  margin-bottom: -2px;
}

/* ============================================
   Animated Hamburger Menu
   ============================================ */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

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

/* ============================================
   Confetti
   ============================================ */
.confetti-piece {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 10001;
  animation: confettiFall 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(120px) rotate(720deg) scale(0.3); }
}

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

[data-theme="dark"] .grain-overlay {
  opacity: 0.04;
}

/* ============================================
   Mouse Spotlight
   ============================================ */
.mouse-spotlight {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

.mouse-spotlight.active {
  opacity: 1;
}

[data-theme="dark"] .mouse-spotlight {
  background: radial-gradient(circle, rgba(96,165,250,0.06) 0%, transparent 70%);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================
   Status Badge
   ============================================ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #16a34a;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  animation: heroFadeUp 1s ease 0s both;
}

[data-theme="dark"] .status-badge {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ============================================
   Hero Particles Canvas
   ============================================ */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   Scroll Progress Bar
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #a78bfa, var(--accent));
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
  width: 0%;
  z-index: 1001;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================
   Custom Cursor
   ============================================ */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  opacity: 0.5;
}

.cursor-dot.hovering {
  width: 12px;
  height: 12px;
  background: var(--accent-hover);
}

.cursor-ring.hovering {
  width: 52px;
  height: 52px;
  border-color: var(--accent-hover);
  opacity: 0.3;
}

.cursor-ring.clicking {
  width: 28px;
  height: 28px;
  opacity: 0.8;
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

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

ul { list-style: none; }

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

strong { font-weight: 600; }

/* Highlighter marker effect */
.marker {
  position: relative;
  font-weight: 600;
}

.marker::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0;
  height: 40%;
  background: rgba(37, 99, 235, 0.12);
  z-index: -1;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.marker.highlighted::after {
  transform: scaleX(1);
}

[data-theme="dark"] .marker::after {
  background: rgba(96, 165, 250, 0.15);
}

em { color: var(--text-muted); font-style: normal; font-size: 0.9em; }

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: transparent;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="dark"] .navbar.scrolled {
  background: rgba(15, 15, 15, 0.85);
}

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

.nav-logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo-dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  position: relative;
}

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

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

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

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

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

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

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

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.06;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -150px;
  right: -100px;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -50px;
  left: -80px;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--accent);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.hero-content {
  text-align: center;
  z-index: 1;
  animation: heroFadeUp 1s ease 0.2s both;
}

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.hero-name {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-title-wrapper {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  margin-bottom: 16px;
  min-height: 1.7em;
  font-family: var(--font-mono);
  font-weight: 400;
}

.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}

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

.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.hero-location svg {
  color: var(--accent);
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.hero-socials {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.hero-socials a {
  color: var(--text-muted);
  transition: all var(--transition);
  display: flex;
  align-items: center;
}

.hero-socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent);
  animation: scrollDown 2s ease-in-out infinite;
}

@keyframes scrollDown {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 100px 24px;
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 48px;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-title.visible::after {
  width: 40px;
}

.text-scramble {
  font-family: var(--font-mono);
  letter-spacing: 0;
  transition: font-family 0.3s ease, letter-spacing 0.3s ease;
}

.text-scramble.decoded {
  font-family: var(--font);
  letter-spacing: -0.5px;
}

/* ============================================
   About Section
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

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

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

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: inline;
  font-family: var(--font-mono);
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
}

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

/* ============================================
   Skills Section
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
  --organic-rotate: 0deg;
  transform: rotate(var(--organic-rotate));
}

.skill-category:hover {
  transform: translateY(-3px) rotate(0deg);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skill-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.skill-category h3 {
  font-size: 1rem;
  font-weight: 600;
}

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

.skill-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--bg-alt);
  border-radius: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
  cursor: default;
}

[data-theme="dark"] .skill-tag {
  background: rgba(255,255,255,0.06);
}

.skill-tag:hover {
  background: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-2px) scale(1.05);
}

.skill-tag:active {
  transform: scale(0.95);
}

.skill-tag.pop {
  animation: tagPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes tagPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2) rotate(-3deg); }
  70% { transform: scale(0.95) rotate(1deg); }
  100% { transform: scale(1) rotate(0); }
}

/* ============================================
   Timeline / Experience
   ============================================ */
.timeline {
  position: relative;
  padding-left: 32px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

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

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--accent);
  z-index: 1;
  transition: all var(--transition);
}

.timeline-item:hover .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover .timeline-content {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  transform: translateX(6px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.timeline-company {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 2px;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 4px;
}

.timeline-details {
  list-style: none;
  margin-bottom: 14px;
}

.timeline-details li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.timeline-details li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timeline-tags span {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 500;
}

/* ============================================
   Education
   ============================================ */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.edu-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: all var(--transition);
}

.edu-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.edu-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.edu-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-school {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.edu-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.subsection-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.cert-list {
  margin-bottom: 40px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: transform 0.3s ease, padding-left 0.3s ease;
  cursor: default;
}

.cert-item:hover {
  transform: translateX(6px);
  padding-left: 4px;
  color: var(--text);
}

.cert-item:last-child {
  border-bottom: none;
}

.cert-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

.cert-item.award svg {
  color: #f59e0b;
}

/* Languages */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-name {
  font-size: 0.92rem;
  font-weight: 500;
  min-width: 70px;
}

.lang-bar {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.lang-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #a78bfa);
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

.lang-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: -2px;
  bottom: -2px;
  width: 10px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease 1.2s;
  box-shadow: 0 0 8px var(--accent);
}

.lang-fill[style*="width"]::after {
  opacity: 0.6;
}

.lang-level {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 85px;
  text-align: right;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-subtitle {
  color: var(--text-secondary);
  margin-top: -32px;
  margin-bottom: 40px;
  font-size: 1.05rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition);
  display: block;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.contact-card svg {
  color: var(--accent);
  margin-bottom: 12px;
}

.contact-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.contact-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.copy-hint {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--accent);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.contact-card:hover .copy-hint {
  opacity: 0.7;
  transform: translateY(0);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  text-align: center;
  padding: 28px 24px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Reveal Animation
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered children animation */
.skills-grid .skill-category,
.contact-grid .contact-card,
.about-stats .stat-card,
.edu-grid .edu-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.skills-grid.stagger-in .skill-category,
.contact-grid.stagger-in .contact-card,
.about-stats.stagger-in .stat-card,
.edu-grid.stagger-in .edu-card {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Tilt card effect */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt .skill-icon,
.tilt .edu-icon,
.tilt svg,
.tilt h3 {
  transition: transform 0.3s ease;
}

.tilt:hover .skill-icon,
.tilt:hover .edu-icon {
  transform: translateZ(20px);
}

/* Glow effect on skill tags */
.skill-tag {
  position: relative;
  overflow: hidden;
}

.skill-tag::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.skill-tag:hover::after {
  opacity: 1;
}

/* Timeline line drawing animation */
.timeline::before {
  transition: none;
  animation: drawLine 1.5s ease forwards;
  transform-origin: top;
}

@keyframes drawLine {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Magnetic button wobble */
.magnetic {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hero name gradient on hover */
.hero-name {
  transition: background 0.5s ease;
  cursor: default;
}

.hero-name:hover {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav logo spin on hover */
.nav-logo {
  transition: transform 0.3s ease;
  display: inline-block;
}

.nav-logo:hover {
  transform: rotate(-5deg) scale(1.05);
}

/* Ripple on contact cards */
.contact-card {
  position: relative;
  overflow: hidden;
}

.contact-card .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.12);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to { transform: scale(4); opacity: 0; }
}

/* Social icon bounce */
.hero-socials a {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-socials a:hover {
  transform: translateY(-4px) scale(1.15);
}

/* Timeline marker pulse */
.timeline-item:hover .timeline-marker::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: markerPulse 1s ease-out infinite;
}

@keyframes markerPulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ============================================
   Dynamic Gradient Mesh Background
   ============================================ */
.gradient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  opacity: 0.4;
  background: radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(167,139,250,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(34,197,94,0.04) 0%, transparent 50%);
  transition: opacity 0.5s ease;
}

[data-theme="dark"] .gradient-mesh {
  opacity: 0.3;
}

/* ============================================
   Cursor Context Label
   ============================================ */
.cursor-context {
  position: fixed;
  pointer-events: none;
  z-index: 9996;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.1s ease;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.cursor-context.visible {
  opacity: 0.5;
}

/* ============================================
   Section Progress Dots
   ============================================ */
.section-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 997;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.section-dots.visible {
  opacity: 1;
}

.section-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  cursor: pointer;
}

.section-dots .dot:hover {
  background: var(--accent);
  transform: scale(1.4);
}

.section-dots .dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-dots .dot::before {
  content: attr(data-label);
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-50%) translateX(5px);
  pointer-events: none;
}

.section-dots .dot:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ============================================
   Command Palette
   ============================================ */
.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cmd-palette-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cmd-palette {
  width: 520px;
  max-width: 90vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  overflow: hidden;
  transform: scale(0.95) translateY(-10px);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cmd-palette-overlay.open .cmd-palette {
  transform: scale(1) translateY(0);
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}

.cmd-input-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.cmd-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  outline: none;
}

.cmd-input::placeholder {
  color: var(--text-muted);
}

.cmd-kbd {
  font-size: 0.65rem;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.cmd-results {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
}

.cmd-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cmd-result:hover,
.cmd-result.selected {
  background: var(--accent-soft);
  color: var(--accent);
}

.cmd-result svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.cmd-result:hover svg,
.cmd-result.selected svg {
  color: var(--accent);
}

.cmd-result-hint {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ============================================
   Hero Name Letter Animation
   ============================================ */
.hero-name .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotate(5deg);
  animation: letterDrop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  transition: transform 0.3s ease, color 0.3s ease;
}

.hero-name .letter:hover {
  color: var(--accent);
  transform: translateY(-5px) scale(1.1) !important;
}

.hero-name .letter-space {
  display: inline-block;
  width: 0.3em;
}

@keyframes letterDrop {
  from { opacity: 0; transform: translateY(30px) rotate(5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ============================================
   Card Hover Spotlight
   ============================================ */
.card-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.skill-category:hover .card-spotlight,
.stat-card:hover .card-spotlight,
.edu-card:hover .card-spotlight,
.contact-card:hover .card-spotlight {
  opacity: 1;
}

/* ============================================
   Gradient Border Glow
   ============================================ */
.skill-category,
.stat-card,
.edu-card,
.contact-card,
.timeline-content {
  position: relative;
  overflow: hidden;
}

.skill-category::before,
.stat-card::before,
.edu-card::before,
.timeline-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, 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.4s ease;
  background-size: 300% 300%;
  animation: gradientBorderShift 3s ease infinite;
}

.skill-category:hover::before,
.stat-card:hover::before,
.edu-card:hover::before,
.timeline-content:hover::before {
  opacity: 1;
}

@keyframes gradientBorderShift {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* ============================================
   Smart Navbar (hide on scroll down)
   ============================================ */
.navbar.nav-hidden {
  transform: translateY(-100%);
}

.navbar {
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Idle Breathing Animation
   ============================================ */
.hero-content.breathing .hero-name {
  animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.008); }
}

/* ============================================
   Scroll Velocity Tilt
   ============================================ */
.section.velocity-tilt {
  transition: transform 0.3s ease-out;
}

/* ============================================
   Word-by-Word Reveal
   ============================================ */
.about-text .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-right: 0.25em;
}

.about-text .word.word-visible {
  opacity: 1;
  transform: translateY(0);
}

.about-text .word-strong {
  font-weight: 600;
}

/* ============================================
   Timeline Expandable
   ============================================ */
.timeline-details {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.timeline-content.collapsed .timeline-details {
  max-height: 0;
  opacity: 0;
}

.timeline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--accent);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
  font-weight: 500;
  padding: 4px 0;
  margin-bottom: 8px;
  transition: gap 0.2s ease;
}

.timeline-toggle:hover {
  gap: 6px;
}

.timeline-toggle svg {
  transition: transform 0.3s ease;
}

.timeline-content.collapsed .timeline-toggle svg {
  transform: rotate(-90deg);
}

/* ============================================
   Rubber Band Button Press
   ============================================ */
.btn:active {
  animation: rubberBand 0.4s ease;
}

@keyframes rubberBand {
  0% { transform: scale(1); }
  30% { transform: scaleX(1.15) scaleY(0.85); }
  40% { transform: scaleX(0.85) scaleY(1.15); }
  50% { transform: scaleX(1.05) scaleY(0.95); }
  65% { transform: scaleX(0.98) scaleY(1.02); }
  75% { transform: scaleX(1.01) scaleY(0.99); }
  100% { transform: scale(1); }
}

/* ============================================
   Animated Gradient Text on Hero Title
   ============================================ */
.hero-title-wrapper {
  background: linear-gradient(90deg, var(--text-secondary), var(--accent), var(--text-secondary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 4s linear infinite;
}

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

/* ============================================
   Party Mode Easter Egg
   ============================================ */
body.party-mode {
  animation: partyBg 0.5s linear infinite;
}

body.party-mode * {
  transition: none !important;
}

@keyframes partyBg {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

/* ============================================
   Footer Hint
   ============================================ */
.footer-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.5;
}

.footer-hint kbd {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

/* ============================================
   Responsive
   ============================================ */
@media (pointer: coarse), (max-width: 768px) {
  .cursor-dot, .cursor-ring, .mouse-spotlight, .mouse-trail, .cursor-context { display: none !important; }
  .grain-overlay { opacity: 0.015; }
  .color-picker { bottom: 20px; left: 20px; }
  .section-dots { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
  }

  .nav-links a::after {
    display: none;
  }

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

  .about-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 14px 8px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .edu-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .timeline {
    padding-left: 24px;
  }

  .timeline-marker {
    left: -24px;
    width: 12px;
    height: 12px;
  }

  .timeline-header {
    flex-direction: column;
  }

  .section {
    padding: 64px 20px;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .languages-grid {
    grid-template-columns: 1fr;
  }
}
