/* ═══════════════════════════════════════
   SAGUN SIGDEL — PORTFOLIO STYLESHEET
   ═══════════════════════════════════════ */

/* 0. CSS Variables & Reset
─────────────────────────── */
:root {
  --bg:             #0F172A;
  --bg-alt:         #0B1120;
  --card-bg:        #1E293B;
  --card-bg-hover:  #243044;
  --border:         #334155;
  --border-hover:   #475569;

  --primary:        #A78BFA;
  --primary-hover:  #C4B5FD;
  --primary-glow:   rgba(167, 139, 250, 0.3);
  --secondary:      #22D3EE;
  --secondary-glow: rgba(34, 211, 238, 0.3);

  --text-1:         #E2E8F0;
  --text-2:         #94A3B8;
  --text-3:         #64748B;

  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;

  --transition:     all 0.3s ease;
  --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      32px;

  --shadow-card:    0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow:    0 0 30px var(--primary-glow);
  --shadow-cyan:    0 0 30px var(--secondary-glow);

  --nav-h:          72px;
  --section-pad:    clamp(80px, 10vw, 140px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.loaded {
  opacity: 1;
}

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

/* ═══════════════════════════════════════
   1. PRELOADER
─────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.preloader-inner {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.preloader-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  color: var(--primary);
  letter-spacing: -0.03em;
}

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

/* ═══════════════════════════════════════
   2. SCROLL TO TOP
─────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition), box-shadow 0.3s;
}

#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#scroll-top:hover {
  background: var(--primary);
  color: var(--bg);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

#scroll-top svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════
   3. NAVBAR
─────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  height: var(--nav-h);
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  border-bottom: 1px solid transparent;
}

#navbar.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-1);
  letter-spacing: -0.03em;
}

.nav-logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  padding: 4px 0;
  transition: color 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

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

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════
   4. LAYOUT UTILITIES
─────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.section {
  padding: var(--section-pad) 0;
}

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

.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(167,139,250,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.2;
}

.section-title em {
  font-style: italic;
  color: var(--primary);
}

/* ═══════════════════════════════════════
   5. BUTTONS
─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:active::before { opacity: 0.08; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818CF8);
  color: white;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px var(--primary-glow);
}

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

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════
   6. HERO SECTION
─────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 5vw, 48px) 80px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 60px;
  position: relative;
}

.hero-bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(167,139,250,0.12), transparent 70%);
  top: -100px; right: -100px;
  animation: float1 8s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,211,238,0.08), transparent 70%);
  bottom: 0; left: -80px;
  animation: float2 10s ease-in-out infinite;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(167,139,250,0.06), transparent 70%);
  top: 40%; left: 40%;
  animation: float1 12s ease-in-out infinite reverse;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(30px, -40px) scale(1.05); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%       { transform: translate(-20px, 30px) scale(1.08); }
}

.floating-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-dots span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0.4;
  animation: dot-float 6s ease-in-out infinite;
}

.floating-dots span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; opacity: 0.3; }
.floating-dots span:nth-child(2) { top: 70%; left: 85%; animation-delay: -2s; background: var(--secondary); opacity: 0.25; }
.floating-dots span:nth-child(3) { top: 40%; left: 60%; animation-delay: -4s; width: 6px; height: 6px; }
.floating-dots span:nth-child(4) { top: 80%; left: 20%; animation-delay: -1s; background: var(--secondary); }
.floating-dots span:nth-child(5) { top: 15%; left: 75%; animation-delay: -3s; }
.floating-dots span:nth-child(6) { top: 55%; left: 45%; animation-delay: -5s; width: 3px; height: 3px; opacity: 0.5; }

@keyframes dot-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}

.hero-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-1) 60%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-2);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-prefix { color: var(--text-2); }

.typing-wrapper {
  display: inline-flex;
  align-items: center;
  color: var(--secondary);
  font-weight: 600;
}

.cursor {
  display: inline-block;
  color: var(--secondary);
  animation: blink 0.8s step-end infinite;
  margin-left: 2px;
}

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

.hero-bio {
  font-size: 1rem;
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.8;
}

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

.hero-social {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: var(--transition);
}

.social-link svg { width: 17px; height: 17px; }

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

/* Hero animation keyframes */
.hero-animate {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes hero-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Visual */
.hero-visual {
  position: relative;
  width: clamp(280px, 35vw, 420px);
  height: clamp(280px, 35vw, 420px);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border);
  animation: rotate-ring 20s linear infinite;
}

.avatar-ring::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--primary);
}

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

.avatar-container {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(167,139,250,0.2), rgba(34,211,238,0.1));
  border: 2px solid rgba(167,139,250,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.avatar-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(34,211,238,0.1));
  transition: transform 0.5s ease;
}

.avatar-placeholder:hover { transform: scale(1.05); }

.avatar-placeholder svg { width: 100%; height: 100%; }

.avatar-badge {
  position: absolute;
  bottom: -8px;
  right: -8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.avatar-badge span {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  line-height: 1;
}

.avatar-badge small {
  font-size: 0.7rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Orbiting elements */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(167,139,250,0.2);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: orbit-spin linear infinite;
}

.orbit-1 { width: 300px; height: 300px; animation-duration: 12s; }
.orbit-2 { width: 380px; height: 380px; animation-duration: 18s; animation-direction: reverse; }

.orbit-dot {
  width: 10px;
  height: 10px;
  background: var(--secondary);
  border-radius: 50%;
  margin-top: -5px;
  box-shadow: 0 0 12px var(--secondary);
}

.orbit-2 .orbit-dot {
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
  width: 7px;
  height: 7px;
}

@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   7. ABOUT SECTION
─────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about-text p {
  color: var(--text-2);
  margin-bottom: 20px;
  line-height: 1.85;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.about-interests h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-1);
  margin-bottom: 24px;
}

.interest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.interest-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.interest-item:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateX(4px);
  box-shadow: -4px 0 20px var(--primary-glow);
}

.interest-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(167,139,250,0.15), rgba(34,211,238,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.interest-icon svg { width: 18px; height: 18px; }

.interest-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-1);
  margin-bottom: 2px;
}

.interest-item p {
  font-size: 0.82rem;
  color: var(--text-2);
}

/* ═══════════════════════════════════════
   8. SKILLS SECTION
─────────────────────────── */
.skills-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.skills-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}

.skills-group:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.skills-group-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}
.group-dot--cyan { background: var(--secondary); box-shadow: 0 0 8px var(--secondary); }
.group-dot--lavender { background: var(--primary-hover); box-shadow: 0 0 8px var(--primary-hover); }

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

.pill {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: var(--transition);
  white-space: nowrap;
}

.pill:hover {
  background: rgba(167,139,250,0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.pill-accent {
  background: rgba(167,139,250,0.12);
  border-color: rgba(167,139,250,0.3);
  color: var(--primary);
}

.pill-cyan {
  background: rgba(34,211,238,0.1);
  border-color: rgba(34,211,238,0.3);
  color: var(--secondary);
}

/* Skill bars */
.skill-bars {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
}

.bars-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-1);
  margin-bottom: 28px;
}

.bar-list { display: flex; flex-direction: column; gap: 20px; }

.bar-item {}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-2);
  margin-bottom: 8px;
}

.bar-label span:last-child {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.bar-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 100px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ═══════════════════════════════════════
   9. PROJECTS SECTION
─────────────────────────── */
.projects-filter {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: transparent;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(167,139,250,0.15);
  border-color: var(--primary);
  color: var(--primary);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

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

.project-card:hover {
  border-color: rgba(167,139,250,0.5);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35), 0 0 30px var(--primary-glow);
}

.project-card--featured {
  border-color: rgba(167,139,250,0.25);
  background: linear-gradient(135deg, var(--card-bg), rgba(167,139,250,0.05));
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-icon { font-size: 1.8rem; }

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

.project-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-3);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.project-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(167,139,250,0.1);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.project-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-1);
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.7;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.project-tech span {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  color: var(--primary);
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 2px 10px;
  border-radius: 100px;
}

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

/* ═══════════════════════════════════════
   10. TIMELINE SECTION
─────────────────────────── */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--primary) 10%, var(--primary) 90%, transparent);
  opacity: 0.3;
}

.timeline-item {
  display: flex;
  justify-content: flex-end;
  padding-right: calc(50% + 40px);
  margin-bottom: 40px;
  position: relative;
}

.timeline-item.tl-right {
  justify-content: flex-start;
  padding-right: 0;
  padding-left: calc(50% + 40px);
}

.tl-dot {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-alt);
  box-shadow: 0 0 16px var(--primary);
  z-index: 1;
}

.tl-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 320px;
  transition: var(--transition);
}

.tl-card:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 20px var(--primary-glow);
}

.tl-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.tl-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.tl-card h4 {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--secondary);
  margin-bottom: 10px;
}

.tl-card p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 12px;
}

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

.tl-tags span {
  font-size: 0.72rem;
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  color: var(--secondary);
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--font-mono);
}

/* ═══════════════════════════════════════
   11. CONTACT SECTION
─────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact-intro {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 32px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: rgba(167,139,250,0.4);
  transform: translateX(4px);
  box-shadow: -4px 0 20px var(--primary-glow);
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(167,139,250,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-icon svg { width: 18px; height: 18px; }

.contact-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}

.contact-item p {
  font-size: 0.82rem;
  color: var(--text-2);
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(167,139,250,0.04);
}

.form-success {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--secondary);
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.form-success.show { display: flex; }

/* ═══════════════════════════════════════
   12. FOOTER
─────────────────────────── */
#footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

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

.footer-logo {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--text-1);
}

.footer-logo span { color: var(--primary); }

.footer-text {
  font-size: 0.85rem;
  color: var(--text-2);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-2);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--primary); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-top: 8px;
}

/* ═══════════════════════════════════════
   13. SCROLL ANIMATIONS
─────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.slide-left {
  transform: translateX(-40px);
}

.scroll-reveal.slide-right {
  transform: translateX(40px);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

.card-stagger.visible {
  transition-delay: calc(var(--stagger, 0) * 0.1s);
}

/* Skills group stagger */
.skills-group.visible {
  transition-delay: calc(var(--stagger, 0) * 0.12s);
}

/* Timeline stagger */
.timeline-item.visible {
  transition-delay: calc(var(--stagger, 0) * 0.15s);
}

/* ═══════════════════════════════════════
   14. RESPONSIVE — MOBILE FIRST
─────────────────────────── */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
  #hero {
    justify-content: center;
    text-align: center;
  }
  .hero-bio, .hero-name { max-width: 100%; }
  .hero-cta, .hero-social { justify-content: center; }
  .hero-role { justify-content: center; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    z-index: 800;
  }
  .nav-links.open { display: flex; }
  .nav-link { font-size: 1.3rem; }

  .timeline::before { left: 16px; transform: none; }
  .timeline-item,
  .timeline-item.tl-right {
    justify-content: flex-start;
    padding-left: 48px;
    padding-right: 0;
  }
  .tl-dot { left: 9px; top: 20px; transform: none; }
  .tl-card { max-width: 100%; }

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

  #scroll-top { bottom: 20px; right: 20px; }

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

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
  .about-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .stat { display: flex; align-items: center; gap: 12px; text-align: left; }
  .skills-categories { grid-template-columns: 1fr; }
}