/* ============================================
   PORTFOLIO — style.css
   Premium Minimal Black & White Developer Portfolio
   Purple accent · 3D Cinematic Scroll Animations
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --bg-light: #ffffff;
  --bg-dark: #050505;
  --text-dark: #111111;
  --text-light: #f5f5f5;
  --text-muted: #888888;
  --text-muted-light: #aaaaaa;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --accent-glow-strong: rgba(124, 58, 237, 0.6);
  --border-light: rgba(0, 0, 0, 0.08);
  --border-dark: rgba(255, 255, 255, 0.08);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 72px;
  --perspective: 1200px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Utility ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 500;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
}

/* ---------- Scroll reveal base ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 40px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* When navbar is over a dark section */
.navbar.dark-mode {
  color: var(--text-light);
}

.navbar.dark-mode.scrolled {
  background: rgba(5, 5, 5, 0.85);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

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

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

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

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

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

.nav-links a.active {
  color: var(--accent);
}

.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px !important;
  background: var(--accent);
  color: #fff !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: .3s ease-in-out !important;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.nav-resume-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
  background: #6d28d9;
}

.nav-resume-btn::after {
  display: none !important;
}

/* Mobile hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
}

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

.navbar.dark-mode .nav-hamburger span {
  background: var(--text-light);
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =============================================
   HERO SECTION
   ============================================= */
#home {
  position: relative;
  min-height: 100vh;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  overflow: hidden;
  perspective: var(--perspective);
}

.hero-bg-text {
  --bg-scale-x: 0.7;
  --bg-scale-y: 1.55;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(var(--bg-scale-x), var(--bg-scale-y));
  transform-origin: center center;
  font-family: var(--font-display);
  font-size: clamp(3rem, 12vw, 10rem);
  font-weight: 900;
  color: rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -2px;
  z-index: 0;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  justify-items: center;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  padding-top: var(--nav-height);
}

/* Center area: greeting, name, role, stats */
.hero-center {
  will-change: transform;
}

/* Single horizontal bottom bar */
.hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  opacity: 0;
  animation: heroFadeUp 0.7s 0.9s ease forwards;
}

.hero-bottom .hero-description {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  margin-bottom: 0;
  text-align: left;
}

.hero-bottom .hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  flex-shrink: 0;
}

.hero-bottom .hero-buttons {
  margin-bottom: 0;
  flex-shrink: 0;
}

.hero-bottom .hero-socials {
  margin-left: 50px;
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex-shrink: 0;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 3px;
  margin-bottom: 12px;
  text-transform: uppercase;
  opacity: 0;
  animation: heroFadeUp 0.7s 0.2s ease forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 8px;
  opacity: 0;
  animation: heroFadeUp 0.7s 0.35s ease forwards;
}

.hero-role {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 20px;
  letter-spacing: 1px;
  opacity: 0;
  animation: heroFadeUp 0.7s 0.5s ease forwards;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.5;
  margin-bottom: 10px;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero buttons */
.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  opacity: 0;
  animation: heroFadeUp 0.7s 0.8s ease forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  background: #6d28d9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: transparent;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  transition: transform var(--transition), border-color var(--transition), color var(--transition);
}

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

/* Social icons in hero */
.hero-socials {
  display: flex;
  gap: 16px;
  opacity: 0;
  animation: heroFadeUp 0.7s 0.95s ease forwards;
}

.hero-socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  font-size: 1rem;
  transition: var(--transition);
}

.hero-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* Hero image */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 800px;
  opacity: 0;
  animation: heroFadeUp 0.9s 0.5s ease forwards;
}

.hero-image-wrapper {
  position: relative;
  will-change: transform;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent);
  border-radius: 20px;
  opacity: 0.3;
  transform: rotate(3deg);
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -16px;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 24px;
  transform: rotate(-2deg);
}

/* JS-animated rings (replace pseudo-elements when active) */
.hero-image-wrapper.rings-active::before,
.hero-image-wrapper.rings-active::after {
  display: none;
}

.hero-ring {
  position: absolute;
  pointer-events: none;
  border-radius: 20px;
  z-index: 0;
}

.hero-ring-inner {
  inset: -8px;
  border: 2px solid var(--accent);
  opacity: 0.3;
  border-radius: 20px;
}

.hero-ring-outer {
  inset: -16px;
  border: 1px solid rgba(124, 58, 237, 0.1);
  border-radius: 24px;
}

.hero-image {
  width: 340px;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  position: relative;
  z-index: 1;
  filter: grayscale(20%);
  transition: filter var(--transition);
}

.hero-image:hover {
  filter: grayscale(0%);
}

/* Stats row */
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

.stat-item .stat-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-item .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
#about {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-left .section-desc {
  color: var(--text-muted-light);
  margin-bottom: 32px;
}

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted-light);
}

.highlight-item i {
  color: var(--accent);
  font-size: 0.6rem;
}

/* About Education Card */
.about-education {
  margin-top: 36px;
}

.education-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 22px 26px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.education-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 60%);
  pointer-events: none;
}

.education-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 8px 30px var(--accent-glow);
  transform: translateY(-2px);
}

.education-header {
  margin-bottom: 16px;
}

.education-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-light);
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
  letter-spacing: 0.5px;
}

.education-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent-glow);
}

.education-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.education-college {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted-light);
  font-weight: 500;
  min-width: 0;
}

.education-college i {
  color: var(--accent);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.education-cgpa {
  flex-shrink: 0;
}

.education-cgpa .cgpa-pill {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Timeline */
.timeline-container {
  position: relative;
  perspective: var(--perspective);
}

.timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-dark);
}

.timeline-progress {
  position: absolute;
  left: 24px;
  top: 0;
  width: 2px;
  height: 0;
  background: var(--accent);
  transition: height 0.4s ease;
}

.timeline-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 40px;
  transform-style: preserve-3d;
  opacity: 0;
  /* Initial 3D pushed-back state */
  transform: perspective(800px) translateZ(-60px) rotateX(8deg) scale(0.95);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: perspective(800px) translateZ(0) rotateX(0deg) scale(1);
}

.timeline-item.active .timeline-card {
  box-shadow: 0 0 30px var(--accent-glow);
}

.timeline-dot {
  position: absolute;
  left: 16px;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--border-dark);
  z-index: 2;
  transition: var(--transition);
}

.timeline-item.active .timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow-strong);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  padding: 20px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.timeline-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.timeline-card p {
  font-size: 0.88rem;
  color: var(--text-muted-light);
  line-height: 1.6;
}

/* =============================================
   SKILLS SECTION
   ============================================= */
#skills {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 120px 0;
}

.skills-header {
  text-align: center;
  margin-bottom: 60px;
}

.skills-header .section-desc {
  margin: 0 auto;
  color: var(--text-muted);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  perspective: var(--perspective);
}

.skill-card {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 32px 28px;
  /* Smooth transition for reveal and hover */
  transition: opacity 0.6s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.35s ease;
  will-change: transform;
  /* Reveal initial state */
  opacity: 0;
  transform: translateY(30px);
}

.skill-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s !important;
}

.skill-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
}

.skill-card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 1.2rem;
  color: var(--accent);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover .skill-card-icon {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

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

.skill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 20px;
  color: var(--text-muted);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.skill-tag i {
  font-size: 0.95rem;
  /* Inline style sets the brand color — ensure it's never overridden */
  color: inherit;
  transition: opacity 0.2s ease;
}

.skill-card:hover .skill-tag {
  background: rgba(124, 58, 237, 0.06);
  color: var(--text-dark);
}

.skill-card:hover .skill-tag i {
  opacity: 1;
}

/* =============================================
   PROJECTS SECTION
   ============================================= */
#projects {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 120px 0 160px;
  position: relative;
  overflow: visible;
}

.projects-header {
  text-align: center;
  margin-bottom: 60px;
}

.projects-header .section-desc {
  margin: 0 auto;
  color: var(--text-muted-light);
}

.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 44px;
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
}

.project-card {
  position: sticky;
  top: calc(90px + var(--card-index, 0) * 24px);
  min-height: 420px;
  background: linear-gradient(135deg, rgba(20, 18, 30, 0.96) 0%, rgba(10, 10, 15, 0.98) 100%);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 24px;
  overflow: hidden;
  transform-origin: center top;
  will-change: transform, filter;
  transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  box-shadow: 0 14px 45px -10px rgba(0, 0, 0, 0.85),
    0 0 30px rgba(124, 58, 237, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.project-card:hover {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 20px 65px -10px rgba(0, 0, 0, 0.92),
    0 0 40px rgba(124, 58, 237, 0.22);
}

.project-card-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 48px;
  min-height: 100%;
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-light);
  padding: 5px 12px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 6px;
  letter-spacing: 1px;
}

.project-category {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.85);
  color: #fff;
  padding: 5px 14px;
  border-radius: 5px;
  backdrop-filter: blur(4px);
}

.project-body h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-body p {
  font-size: 0.95rem;
  color: var(--text-muted-light);
  line-height: 1.7;
  margin-bottom: 26px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.project-tech span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  padding: 6px 15px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 20px;
  color: var(--text-light);
  font-weight: 500;
  transition: background var(--transition), border-color var(--transition);
}

.project-tech span i {
  font-size: 0.92rem;
  color: var(--accent-light);
  display: inline-flex;
  align-items: center;
}

.project-card:hover .project-tech span {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.14);
}

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

.project-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 9px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), border-color var(--transition);
}

.project-link-github {
  border: 1.5px solid var(--border-dark);
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.03);
}

.project-link-github:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.project-link-live {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}

.project-link-live:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-2px);
}

.project-image-container {
  position: relative;
  overflow: hidden;
  height: 340px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #08080c;
}

.project-image-container img {
  width: 105%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

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

.project-image-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 10, 16, 0.6) 100%);
  pointer-events: none;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
#contact {
  background: var(--bg-light);
  color: var(--text-dark);
  padding: 120px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left .section-desc {
  color: var(--text-muted);
  margin-bottom: 40px;
}

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

.contact-info-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 10px;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-info-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

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

.contact-info-text .availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #22c55e;
  font-weight: 500;
}

.availability-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
}

.contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.contact-socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  font-size: 1rem;
  transition: var(--transition);
}

.contact-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  position: relative;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-primary);
  font-size: 0.92rem;
  background: rgba(0, 0, 0, 0.02);
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  color: var(--text-dark);
}

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

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.form-group label {
  position: absolute;
  left: 20px;
  top: 16px;
  font-size: 0.92rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition);
  background: var(--bg-light);
  padding: 0 4px;
}

.form-group input:focus~label,
.form-group input:not(:placeholder-shown)~label,
.form-group textarea:focus~label,
.form-group textarea:not(:placeholder-shown)~label {
  top: -8px;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
  display: none;
}

.form-group.error .form-error {
  display: block;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #ef4444;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: none;
  cursor: pointer;
  align-self: flex-start;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
  background: #6d28d9;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-submit .spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading .btn-text {
  display: none;
}

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

/* Form success */
.form-success {
  display: none;
  text-align: center;
  padding: 40px;
  animation: heroFadeUp 0.5s ease;
}

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

.form-success i {
  font-size: 3rem;
  color: #22c55e;
  margin-bottom: 16px;
}

.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-muted);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-brand span {
  color: var(--accent);
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-muted-light);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 340px;
}

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

.footer-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  font-size: 0.9rem;
  color: var(--text-muted-light);
  transition: var(--transition);
}

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

.footer-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-nav a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted-light);
  padding: 6px 0;
  transition: color var(--transition), padding-left var(--transition);
}

.footer-nav a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted-light);
  margin-bottom: 14px;
}

.footer-contact-item i {
  color: var(--accent);
  font-size: 0.85rem;
  width: 16px;
  text-align: center;
}

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

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

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero-content {
    gap: 40px;
  }

  .hero-image {
    width: 280px;
    height: 340px;
  }

  .about-grid {
    gap: 60px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .navbar {
    padding: 0 20px;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: var(--bg-light);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
    transition: right var(--transition);
    z-index: 999;
  }

  .navbar.dark-mode .nav-links {
    background: var(--bg-dark);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
  }

  .nav-overlay.open {
    display: block;
  }

  /* Hero */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: calc(var(--nav-height) + 40px);
  }

  .hero-bottom {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 24px;
    padding: 20px 0;
  }

  .hero-bottom .hero-description {
    max-width: 100%;
    text-align: center;
    flex-basis: 100%;
    margin: 0 auto;
  }

  .hero-bottom .hero-stats {
    justify-content: center;
    flex-basis: 100%;
    gap: 24px;
  }

  .hero-bottom .hero-actions {
    flex-basis: 100%;
    width: 100%;
    align-items: center;
  }

  .hero-bottom .hero-buttons {
    justify-content: center;
    width: 100%;
    flex-direction: column;
  }

  .hero-bottom .hero-buttons .btn-primary,
  .hero-bottom .hero-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .hero-bottom .hero-socials {
    justify-content: center;
    margin-right: 50px;
  }

  .hero-image {
    width: 220px;
    height: 260px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-highlights {
    grid-template-columns: 1fr;
  }

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

  /* Projects */
  .projects-grid {
    gap: 32px;
  }

  .project-card {
    top: calc(75px + var(--card-index, 0) * 16px);
    min-height: auto;
  }

  .project-card-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 28px;
  }

  .project-image-container {
    height: 250px;
  }

  .project-desc {
    display: none;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 480px) {
  .hero-name {
    font-size: 2.2rem;
  }

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

  .education-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 24px;
  }

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

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .project-card-inner {
    padding: 24px 20px;
    gap: 22px;
  }

  .project-body h3 {
    font-size: 1.35rem;
  }

  .project-image-container {
    height: 195px;
  }

  .project-links {
    flex-direction: column;
  }

  .project-links a {
    width: 100%;
    justify-content: center;
  }
}

/* =============================================
   SECTION TRANSITION DIVIDERS
   ============================================= */
.section-divider-down {
  /* White to black transition */
  height: 80px;
  background: linear-gradient(to bottom, var(--bg-light), var(--bg-dark));
  margin: 0;
  padding: 0;
}

.section-divider-up {
  /* Black to white transition */
  height: 80px;
  background: linear-gradient(to bottom, var(--bg-dark), var(--bg-light));
  margin: 0;
  padding: 0;
}

/* =============================================
   SCROLL PROGRESS BAR
   ============================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 1001;
  width: 0%;
  transition: none;
}

/* =============================================
   CUSTOM CURSOR GLOW (desktop only)
   ============================================= */
@media (hover: hover) {
  .cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    will-change: left, top;
    transition: opacity 0.3s;
  }
}