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

:root {
  --purple-400: #a78bfa;
  --purple-500: #8b5cf6;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --bg-primary: #09090b;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(139, 92, 246, 0.3);
  --text-primary: #fafafa;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ========== PARTICLES ========== */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ========== NAV ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1rem 0;
  transition: all 0.4s ease;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--purple-500);
}

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

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.3s;
  font-weight: 400;
}

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

.nav-cta {
  background: var(--purple-600) !important;
  color: var(--text-primary) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 500 !important;
  transition: all 0.3s !important;
}

.nav-cta:hover {
  background: var(--purple-500) !important;
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(9, 9, 11, 0.97);
  backdrop-filter: blur(20px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.mobile-menu a:hover {
  color: var(--text-primary);
}

/* ========== HERO ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 2rem;
}

.hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple-500);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

.hero-title {
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

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

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.highlight {
  color: var(--purple-400);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--purple-600);
  color: white;
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  background: var(--purple-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

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

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--purple-500), transparent);
  animation: scroll-anim 2s ease-in-out infinite;
}

@keyframes scroll-anim {
  0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

/* ========== SECTIONS ========== */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 0;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--purple-400);
  margin-bottom: 3rem;
}

.label-line {
  width: 40px;
  height: 1px;
  background: var(--purple-500);
}

/* ========== CONTACT CARD ========== */
.contact-card {
  max-width: 520px;
  background: linear-gradient(145deg, rgba(20, 16, 40, 0.95), rgba(12, 10, 24, 0.98));
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(124, 58, 237, 0.03));
  pointer-events: none;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  position: relative;
}

.card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.25);
}

.card-identity h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-role {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
}

.dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-500);
}

.card-company {
  margin-bottom: 1.75rem;
  position: relative;
}

.card-company h3 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--purple-400);
  letter-spacing: 0.1em;
}

.company-line {
  margin-top: 0.75rem;
  height: 1px;
  background: linear-gradient(to right, var(--purple-600), transparent);
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.detail-row:hover {
  background: rgba(139, 92, 246, 0.08);
}

.detail-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--purple-400);
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.detail-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-value {
  font-size: 0.95rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tagline {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 12px;
  text-align: center;
}

.card-tagline p {
  font-size: 0.9rem;
  color: var(--purple-400);
  font-style: italic;
  font-weight: 300;
}

.card-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 3rem;
}

/* Profile Photo */
.about-photo {
  position: relative;
}

.photo-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.photo-frame:hover img {
  transform: scale(1.03);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 9, 11, 0.4), transparent 50%);
  pointer-events: none;
}

.photo-caption {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.photo-caption svg {
  color: var(--purple-500);
}

/* Stats pulled out of about-grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.about-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
}

.about-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--purple-400);
  letter-spacing: -0.02em;
}

.stat-suffix {
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple-400);
}

.stat-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.glow-card {
  grid-column: 1 / -1;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(124, 58, 237, 0.04));
  border-color: rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.stat-icon {
  color: var(--purple-400);
  flex-shrink: 0;
}

.glow-card .stat-label {
  margin-top: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ========== EXPERIENCE GALLERY ========== */
.experience-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 3rem;
  max-width: 500px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  border: 1px solid var(--border);
}

.gallery-item.large {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.gallery-item.wide {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(9, 9, 11, 0.85), rgba(9, 9, 11, 0.1) 60%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tag {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gallery-location {
  font-size: 0.75rem;
  color: var(--purple-400);
  font-weight: 400;
  margin-top: 0.2rem;
}

/* ========== PROJECTS ========== */
.projects-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.project-card.featured {
  background: linear-gradient(145deg, rgba(139, 92, 246, 0.06), var(--bg-card));
  border-color: rgba(139, 92, 246, 0.2);
  grid-column: 1;
}

.project-card.featured::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 2rem;
  right: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-500), transparent);
}

.project-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple-400);
  background: rgba(139, 92, 246, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.project-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-400);
  margin-bottom: 1.25rem;
}

.project-icon.small {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.project-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.project-tags span {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 6px;
  color: var(--purple-400);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-400);
  transition: all 0.3s;
}

.project-link:hover {
  color: var(--purple-500);
  gap: 0.75rem;
}

/* ========== CTA / CONNECT ========== */
.section-cta {
  text-align: center;
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.cta-content > p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.social-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.3s ease;
  color: var(--text-secondary);
  min-width: 120px;
}

.social-card:hover {
  border-color: var(--border-hover);
  color: var(--purple-400);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
}

.social-card span {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ========== FOOTER ========== */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}

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

.footer-sub {
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem !important;
  color: var(--purple-400) !important;
  opacity: 0.5;
}

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

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

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4.5rem);
  }

  .hero-sub {
    font-size: 1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .photo-frame {
    max-width: 320px;
    margin: 0 auto;
  }

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

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

  .gallery-item.large,
  .gallery-item.wide {
    aspect-ratio: 16 / 9;
  }

  .projects-title {
    font-size: 1.8rem;
  }

  .cta-content h2 {
    font-size: 1.8rem;
  }

  .contact-card {
    padding: 2rem 1.5rem;
  }

  .detail-value {
    font-size: 0.85rem;
  }

  .social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }

  .card-header {
    flex-direction: column;
    text-align: center;
  }

  .card-role {
    justify-content: center;
  }

  .card-company {
    text-align: center;
  }

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