/* ============================================
   MODERN PURPLE/BLACK THEME - COMPLETE CSS
   Dark Mode Default | Light Mode Support
   Full Glassmorphism | Responsive Design
   Fixed Mobile View | Smooth Nav Scroll
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
  transition: background-color 0.3s ease, color 0.3s ease;
  background: #0B0F19;
  color: #F9FAFB;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #111827;
}
::-webkit-scrollbar-thumb {
  background: #8B5CF6;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7C3AED;
}

/* ===== DARK MODE VARIABLES (Default) ===== */
body.dark-mode {
  --bg-primary: #0B0F19;
  --bg-secondary: #111827;
  --bg-card: #111827;
  --bg-glass: rgba(139, 92, 246, 0.06);
  --bg-header: rgba(17, 24, 39, 0.95);
  --primary: #8B5CF6;
  --primary-dark: #7C3AED;
  --primary-light: #A78BFA;
  --primary-glow: rgba(139, 92, 246, 0.2);
  --secondary: #A78BFA;
  --text-main: #F9FAFB;
  --text-dim: #9CA3AF;
  --text-muted: #6B7280;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(139, 92, 246, 0.25);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.15);
  --transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* ===== LIGHT MODE VARIABLES ===== */
body.light-mode {
  --bg-primary: #FAFAFA;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(124, 58, 237, 0.04);
  --bg-header: rgba(255, 255, 255, 0.95);
  --primary: #7C3AED;
  --primary-dark: #6D28D9;
  --primary-light: #A78BFA;
  --primary-glow: rgba(124, 58, 237, 0.1);
  --secondary: #8B5CF6;
  --text-main: #111827;
  --text-dim: #4B5563;
  --text-muted: #6B7280;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(124, 58, 237, 0.2);
  --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.1);
}

body.dark-mode {
  background: var(--bg-primary);
  color: var(--text-main);
}

body.light-mode {
  background: var(--bg-primary);
  color: var(--text-main);
}

/* ===== Typography ===== */
h1, h2, h3, .logo, .nav-btn {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* ===== Header & Navigation ===== */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 80px;
  z-index: 1000;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

header:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo span {
  color: var(--primary);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 40px;
  transition: var(--transition);
}

nav a:hover {
  color: var(--primary);
  background: var(--primary-glow);
}

nav a.nav-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 10px 24px;
  box-shadow: 0 2px 12px var(--primary-glow);
}

nav a.nav-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

/* Theme Button in Navbar */
.theme-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 10px;
}

.theme-btn:hover {
  border-color: var(--primary);
  transform: scale(1.05);
  background: var(--primary-glow);
}

.theme-btn i {
  font-size: 1.1rem;
  color: var(--primary);
}

.menu-toggle {
  display: none;
}

/* ===== INTRO SECTION - FIXED OVERLAPPING ===== */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.23, 1, 0.32, 1), transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

#intro.fade-out {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 2rem;
}

.scene.active {
  opacity: 1;
  pointer-events: auto;
}

/* FIXED: intro text with proper spacing and no overlap */
.intro-text {
  font-size: clamp(2.5rem, 10vw, 8rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  color: #ffffff;
  position: relative;
  z-index: 2;
  max-width: 95vw;
  padding: 0 20px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Fix for multi-line text in scene 2 and 3 */
#scene-2 .intro-text,
#scene-3 .intro-text {
  font-size: clamp(2rem, 8vw, 6rem);
  line-height: 1.15;
}

/* FIXED: Gradient text with proper display */
.intro-text .gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 30%, #8b5cf6 60%, #ec4899 80%, #ffffff 100%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 6s ease-in-out infinite;
  display: inline-block;
}

@keyframes shimmerText {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.intro-text .highlight {
  color: #a78bfa;
  -webkit-text-fill-color: #a78bfa;
  display: inline-block;
}

/* Scene animations */
#scene-1 .intro-text {
  transform: scale(0.4);
  opacity: 0;
  animation: scene1Reveal 1.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes scene1Reveal {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

#scene-2 .intro-text {
  transform: translateX(-50vw) scale(0.7);
  opacity: 0;
  animation: scene2Reveal 1.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes scene2Reveal {
  0% { transform: translateX(-50vw) scale(0.7); opacity: 0; }
  60% { transform: translateX(3vw) scale(1.02); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

#scene-3 .intro-text {
  transform: translateY(50vh) scale(0.7);
  opacity: 0;
  animation: scene3Reveal 1.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes scene3Reveal {
  0% { transform: translateY(50vh) scale(0.7); opacity: 0; }
  60% { transform: translateY(-3vh) scale(1.02); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Mask reveal effects */
.mask-reveal {
  position: relative;
  overflow: hidden;
}

.mask-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #000000;
  z-index: 3;
  animation: maskReveal 1.2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
  animation-delay: 0.15s;
}

@keyframes maskReveal {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.mask-reveal-left::after {
  background: #000000;
  animation: maskRevealLeft 1.2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes maskRevealLeft {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(0); }
}

.mask-reveal-bottom::after {
  background: #000000;
  animation: maskRevealBottom 1.2s cubic-bezier(0.77, 0, 0.18, 1) forwards;
}

@keyframes maskRevealBottom {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

/* ===== LOADING BAR ===== */
#loading-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1.5rem 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  pointer-events: none;
  opacity: 0;
  animation: loadingFadeIn 0.6s ease forwards;
  animation-delay: 0.2s;
}

@keyframes loadingFadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

#loading-bar-track {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

#loading-bar-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.05), transparent);
  animation: scanBar 2s linear infinite;
}

@keyframes scanBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

#loading-bar {
  width: 0%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #ec4899, #a78bfa, #8b5cf6);
  background-size: 300% 100%;
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: width;
  animation: shimmerBar 2s linear infinite;
}

@keyframes shimmerBar {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

#loading-percent {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(167, 139, 250, 0.3);
  letter-spacing: 0.2em;
  margin-top: 0.6rem;
  font-variant-numeric: tabular-nums;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 8% 80px;
  position: relative;
}

.hero-content {
  max-width: 1300px;
  width: 100%;
  z-index: 2;
}

.hero-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text {
  text-align: left;
}

.hero-animation {
  display: flex;
  justify-content: center;
  align-items: center;
}

.greeting {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 10px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.name {
  display: block;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 15px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.typing-wrapper {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.typing-text {
  color: var(--primary);
  border-right: 3px solid var(--primary);
  padding-right: 5px;
  animation: blink 0.7s infinite;
}

@keyframes blink {
  0%, 100% { border-color: var(--primary); }
  50% { border-color: transparent; }
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 500px;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease 0.4s both;
  position: static;
}

.highlight {
  color: var(--primary);
  font-weight: 600;
}

.hero-btns {
  margin-top: 40px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.5s both;
}

.btn {
  padding: 12px 28px;
  border-radius: 60px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn.secondary:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  transform: translateY(-3px);
}

/* ===== Section Styles ===== */
.section {
  padding: 90px 8%;
  max-width: 1300px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 50px;
}

.number {
  font-family: 'Monaco', monospace;
  font-size: 0.85rem;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: inline-block;
  background: var(--primary-glow);
  padding: 4px 14px;
  border-radius: 40px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ===== About Section ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: start;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  color: var(--text-dim);
  line-height: 1.7;
  font-size: 1rem;
}

.about-text strong {
  color: var(--primary);
}

.about-typing {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.1rem;
  display: inline-block;
  border-right: 2px solid var(--primary);
  padding-right: 5px;
  animation: blink 0.7s infinite;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 25px 30px;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.stat-card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.stat-card h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
}

.stat-card p {
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== Experience Section ===== */
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 28px 32px;
  transition: var(--transition);
}

.experience-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.exp-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.exp-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--primary-glow);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
}

.exp-title {
  flex: 1;
}

.exp-title h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.exp-company {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.exp-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 4px 14px;
  border-radius: 40px;
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.exp-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.exp-body ul li {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 6px 0 6px 24px;
  position: relative;
}

.exp-body ul li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ===== Skills Section ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 28px;
  transition: var(--transition);
}

.skill-category:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.skill-cat-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.skill-cat-title i {
  font-size: 1.3rem;
}

.skill-item {
  margin-bottom: 20px;
}

.skill-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.skill-info i {
  font-size: 1.2rem;
  width: 28px;
  color: var(--primary);
}

.skill-info span:first-of-type {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}

.skill-percent {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

body.dark-mode .progress-bar {
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 10px;
  transition: width 0.8s ease;
}

/* ===== Education Section ===== */
.education-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.edu-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: var(--transition);
}

.edu-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.edu-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  background: var(--primary-glow);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--primary);
}

.edu-details {
  flex: 1;
}

.edu-year {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-glow);
  padding: 2px 12px;
  border-radius: 40px;
  display: inline-block;
  margin-bottom: 6px;
}

.edu-details h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.edu-details p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.edu-status {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-glow);
  padding: 2px 12px;
  border-radius: 40px;
  display: inline-block;
  margin-bottom: 6px;
}

/*project section*/
.projects-categories {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.category-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 28px;
  padding: 28px 30px;
  transition: var(--transition);
}

.category-section:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.category-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.category-title i {
  font-size: 1.6rem;
  color: var(--primary);
}

.category-title h3 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.category-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 4px 14px;
  border-radius: 40px;
  border: 1px solid var(--border-color);
}

.category-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.project-item .project-icon {
  width: 50px;
  height: 50px;
  background: var(--primary-glow);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.project-item .project-icon i {
  font-size: 1.6rem;
  color: var(--primary);
}

.project-item h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* --- Infinity Typing Lines --- */
.typing-line {
  font-size: 0.9rem;
  color: var(--text-dim);
  min-height: 1.6em;
  margin-bottom: 14px;
  border-right: 2px solid var(--primary);
  display: inline-block;
  padding-right: 4px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.3s;
  animation: blink 0.7s infinite;
}

/* The JS will update the content, we just style the container */
.typing-line.typing-active {
  border-color: var(--primary);
}

/* ===== UPGRADED PROJECT TAGS ===== */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 16px;
}

.project-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  padding: 5px 16px 5px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  transition: var(--transition);
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.project-tags span::before {
  content: "◆";
  font-size: 0.5rem;
  color: var(--primary);
  opacity: 0.7;
}

.project-tags span:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
  transform: translateY(-2px);
}

/* Tags & links reuse existing styles */
.project-item .project-tags {
  margin: 8px 0 16px;
}

.project-item .project-links,
.project-item .project-link {
  margin-top: auto;
}

/* ===== PROJECT LINKS as BUTTONS ===== */
.project-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;      /* keeps buttons aligned at the bottom */
  padding-top: 12px;
}

.project-link {
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 60px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;

  /* Primary button style (filled) */
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.project-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--primary-glow);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
}

/* Optional: secondary/outline style for "Demo" links */
.project-link.outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  box-shadow: none;
}

.project-link.outline:hover {
  border-color: var(--primary);
  background: var(--primary-glow);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

/* If you want both buttons to be solid, just remove the .outline class from your HTML */

/* ===== Contact Section ===== */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 40px;
  padding: 60px 40px;
  text-align: center;
  transition: var(--transition);
}

.contact-box:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.contact-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.contact-box h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-main);
}

.contact-box p {
  color: var(--text-dim);
  max-width: 500px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.submit-btn {
  width: 100%;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 60px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 25px;
}

.social-icon {
  width: 52px;
  height: 52px;
  background: var(--bg-glass);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-dim);
  transition: var(--transition);
  border: 1px solid var(--border-color);
  text-decoration: none;
}

.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
  border-color: var(--primary);
}

/* ===== Footer ===== */
footer {
  padding: 30px 8% 50px;
  max-width: 1300px;
  margin: 0 auto;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-bottom i {
  color: var(--primary);
}

/* ===== Scroll Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 968px) {
  .hero-main {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-text {
    text-align: center;
  }
  
  .hero-desc {
    margin: 0 auto;
  }
  
  .hero-btns {
    justify-content: center;
  }
  
  .hero-animation dotlottie-player {
    width: 280px !important;
    height: 280px !important;
  }
  
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .about-stats {
    flex-direction: row;
    justify-content: center;
  }

  .scene {
    padding: 1rem;
  }
  
  .hero-text {
    font-size: clamp(2rem, 8vw, 4rem) !important;
    padding: 0 10px;
  }
  
  #scene-2 .hero-text,
  #scene-3 .hero-text {
    font-size: clamp(1.8rem, 7vw, 3.5rem) !important;
  }
}

@media (max-width: 768px) {
  header {
    width: calc(100% - 20px);
    padding: 12px 20px;
    top: 10px;
  }
  
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    background: var(--bg-card);
  }
  
  nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-header);
    backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    gap: 8px;
    z-index: 999;
  }
  
  nav.active {
    display: flex;
  }
  
  nav a, .theme-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-left: 0;
    padding: 12px 20px;
  }
  
  .hero {
    padding: 100px 5% 60px;
    min-height: auto;
  }
  
  .section {
    padding: 60px 5%;
  }
  
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 80%;
    justify-content: center;
  }
  
  .about-stats {
    flex-direction: column;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .contact-box {
    padding: 40px 20px;
  }
  
  .contact-box h2 {
    font-size: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .typing-wrapper {
    font-size: 1.2rem;
  }
  
  .skills-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-animation dotlottie-player {
    width: 220px !important;
    height: 220px !important;
  }
  
  .contact-form {
    padding: 0 10px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 12px 16px;
  }

  .edu-item {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }

  .exp-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .exp-date {
    align-self: flex-start;
  }

  .scene {
    padding: 1rem;
  }
  
  .hero-text {
    font-size: clamp(1.8rem, 7vw, 3rem) !important;
    padding: 0 10px;
  }
  
  #scene-2 .hero-text,
  #scene-3 .hero-text {
    font-size: clamp(1.5rem, 6vw, 2.8rem) !important;
  }

  /* Project categories responsive */
  .category-projects {
    grid-template-columns: 1fr;
  }
  .category-section {
    padding: 20px;
  }
  .category-title {
    flex-wrap: wrap;
  }
  .category-count {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .project-item {
    padding: 18px;
  }
  
  .greeting {
    font-size: 1rem;
  }
  
  .typing-wrapper {
    font-size: 1rem;
  }
  
  .name {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  
  .hero-animation dotlottie-player {
    width: 180px !important;
    height: 180px !important;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
  }
  
  .section-header h2 {
    font-size: 1.5rem;
  }
  
  .number {
    font-size: 0.7rem;
  }

  .hero-text {
    font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
    padding: 0 8px;
  }
  
  #scene-2 .hero-text,
  #scene-3 .hero-text {
    font-size: clamp(1.2rem, 5vw, 2.2rem) !important;
  }
}

/* Fix for iOS smooth scroll */
@supports (-webkit-touch-callout: none) {
  .hero, .section {
    background-attachment: scroll;
  }
}