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

:root {
  --primary: #6c63ff;
  --primary-light: #a29bfe; 
  --accent: #fd79a8;
  --bg: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: rgba(26, 26, 46, 0.6);
  --text: #e0e0f0;
  --text-muted: #8888aa;
  --border: rgba(108, 99, 255, 0.2);
  --glow: rgba(108, 99, 255, 0.3);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ===== LIGHT MODE VARIABLES ===== */
:root {
  --nav-bg: rgba(10, 10, 15, 0.9);
}

body.light-mode {
  --bg: #f4f5f7;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.6);
  --text: #2d3436;
  --text-muted: #636e72;
  --border: rgba(108, 99, 255, 0.2);
  --glow: rgba(108, 99, 255, 0.15);
  --nav-bg: rgba(255, 255, 255, 0.9);
}

/* Makes gradients darker in light mode so they don't vanish */
body.light-mode .hero-name,
body.light-mode .preloader-text {
  background: linear-gradient(135deg, var(--primary), #2d3436);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== OFFICIAL ICONS STYLING ===== */
.bx, .bxl, .bxs {
  font-size: 1.15em;
  vertical-align: middle;
  transform: translateY(-1px); /* Optically centers the icon with text */
}

/* Make the large section icons pop with your primary color */
.skill-icon .bx, 
.project-card-icon .bx {
  font-size: 2.5rem;
  color: var(--primary-light);
}

.highlight-icon .bx {
  font-size: 1.3rem;
  color: var(--primary);
}

.contact-link-icon .bx {
  font-size: 1.5rem;
  color: var(--primary-light);
}

.avatar-placeholder .bx {
  font-size: 4rem;
  color: var(--text-muted);
}

/* Nav Actions & Theme Button */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s, transform 0.3s;
}

.theme-toggle:hover {
  color: var(--primary-light);
  transform: rotate(15deg);
}

/* Update hardcoded nav backgrounds to use the new variables */
#navbar.scrolled, #navbar.nav-open {
  background: var(--nav-bg) !important;
}

.about-card, .skill-card, .project-card, .contact-form, .contact-link-item {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;

  /* PREVENT ACCIDENTAL BLUE HIGHLIGHTING */
  -webkit-user-select: none; 
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* IMPORTANT: Re-enable selection for inputs so the contact form works! */
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}
::selection {
  background: var(--primary);
  color: #fff;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent); }

/* ===== UTILITY ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.tag {
  display: inline-block;
  align-items: center;
  gap: 0.3rem; /* Adds perfect spacing between icon and text */
  padding: 0.25rem 0.75rem;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--primary-light);
  transition: all 0.2s;
}

.tag i {
  font-size: 0.95rem; /* Makes the tag icons slightly larger than the text */
}

.tag:hover {
  background: rgba(108, 99, 255, 0.3);
  border-color: var(--primary);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #9b59b6);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: rgba(108, 99, 255, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
  color: var(--primary-light);
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all 0.3s;
}

#navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

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

.nav-logo {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--mono);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  
  visibility: visible;
  position: static;
  transform: none;
  width: auto;
  height: auto;
  background: transparent;
  padding: 0;
}

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

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

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

.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);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease; /* Added transition */
}

/* ANIMATE HAMBURGER TO 'X' */
.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* ===== PRELOADER & TRANSITION ===== */
/* Lock scrolling while loading */
body.no-scroll {
  overflow: hidden;
}

#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999; /* Keeps it on top of everything */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* The slide-up reveal animation */
  transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

/* Class added via JS to trigger the reveal */
#preloader.hidden {
  transform: translateY(-100%); 
  opacity: 0;
  pointer-events: none;
}

.preloader-content {
  font-family: var(--mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow: hidden;
}

.preloader-bracket {
  color: var(--accent);
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.5s ease forwards;
}

.preloader-text {
  background: linear-gradient(135deg, var(--primary-light), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(20px);
  animation: slideUpFade 0.5s ease forwards 0.2s; /* Slight delay */
}

.preloader-bracket:last-child {
  animation-delay: 0.4s; /* Final delay */
}

.preloader-loading-bar {
  margin-top: 1.5rem;
  width: 180px;
  height: 3px;
  background: rgba(108, 99, 255, 0.15);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards 0.6s;
}

.preloader-loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 4px;
  animation: fillBar 1.2s ease-in-out forwards 0.8s;
}

/* Preloader Animations */
@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fillBar {
  0% { width: 0; }
  40% { width: 60%; }
  100% { width: 100%; }
}
/* ===== HERO ===== */
/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px; /* Revert back to 80px here */
  /* Remove flex-direction and justify-content from here! */
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 70% 40%, rgba(108, 99, 255, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(253, 121, 168, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(108, 99, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 99, 255, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 80%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-greeting {
  font-family: var(--mono);
  color: var(--primary-light);
  font-size: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-greeting::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 2px;
  background: var(--primary-light);
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  min-height: 2rem;
}

.hero-role .typed-text {
  color: var(--accent);
  font-weight: 600;
}

.hero-role .cursor {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s infinite;
}

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

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

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

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-container {
  position: relative;
  width: 280px;
  height: 280px;
}

.avatar-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent)) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: rotate 8s linear infinite;
}

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

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}

.avatar-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108,99,255,0.2) 0%, rgba(253,121,168,0.1) 100%);
}

.avatar-placeholder span {
  position: relative;
  z-index: 1;
}

.float-badge {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: float 3s ease-in-out infinite;
}

/* avatar-ring = child 1, avatar-placeholder = child 2, badges start at child 3 */
.float-badge:nth-child(3) { top: 4%;    right: -50px; animation-delay: 0s; }
.float-badge:nth-child(4) { top: 36%;   right: -60px; animation-delay: 0.5s; }
.float-badge:nth-child(5) { bottom: 4%; right: -48px; animation-delay: 1s; }
.float-badge:nth-child(6) { top: 4%;    left: -58px;  animation-delay: 1.5s; }
.float-badge:nth-child(7) { top: 36%;   left: -55px;  animation-delay: 2s; }
.float-badge:nth-child(8) { bottom: 4%; left: -72px;  animation-delay: 2.5s; }

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

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: fadeInUp 1s ease 1.5s both;
}

.scroll-dot {
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-dot::before {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  background: var(--primary-light);
  border-radius: 2px;
  animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}

/* ===== ABOUT ===== */
#about {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.about-image-wrap {
  position: relative;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(108,99,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.about-avatar {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-item {
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.about-text h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(108, 99, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.highlight-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===== SKILLS ===== */

/* Cascade delays for Skills Grid */
.skills-grid .skill-card:nth-child(1) { transition-delay: 0.0s; }
.skills-grid .skill-card:nth-child(2) { transition-delay: 0.0s; }
.skills-grid .skill-card:nth-child(3) { transition-delay: 0.0s; }
.skills-grid .skill-card:nth-child(4) { transition-delay: 0.0s; }
.skills-grid .skill-card:nth-child(5) { transition-delay: 0.0s; }
.skills-grid .skill-card:nth-child(6) { transition-delay: 0.0s; }

#skills {
  padding: 3rem 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.skill-card:hover,
.skill-card.glow-active{
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--glow);
}

.skill-card:hover::before,
.skill-card.glow-active::before{
  transform: scaleX(1);
}

.skill-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.skill-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.skill-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

/* ===== PROJECTS ===== */

/* CAROUSEL BUTTONS (MINIMAL DESIGN) */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  
  /* Minimalist reset */
  background: transparent; 
  border: none; 
  color: var(--text);
  
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* Large, elegant thin arrows */
  font-size: 3rem; 
  transition: all 0.3s ease;
  opacity: 0; 
  pointer-events: none; 
  
  /* Soft drop shadow ensures the arrow is visible over any image/text */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.carousel-btn.show {
  opacity: 0.4; /* Very subtle when just resting there */
  pointer-events: all;
}

.carousel-btn:hover {
  opacity: 1; /* Brightens up when you hover */
  color: var(--primary-light);
  transform: translateY(-50%) scale(1.15); /* Slight pop effect */
}

/* Positioned just outside the cards */
.prev-btn { left: -25px; }
.next-btn { right: -25px; }

/* Keep them tucked in on mobile screens */
@media (max-width: 600px) {
  .prev-btn { left: -10px; }
  .next-btn { right: -10px; }
}

#projects {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

/* CAROUSEL WRAPPER & SCROLLING */
.projects-carousel-wrapper {
  position: relative;
  width: 100%;
}

.projects-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  /* Padding/Margin trick prevents the hover box-shadow from being clipped */
  padding: 1.5rem 0.5rem; 
  margin: -1.5rem -0.5rem; 
  
  /* Hide scrollbars for a clean look */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.projects-carousel::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* CARD STYLES (Animations Preserved) */
.project-card {
  flex: 0 0 340px; /* Locks all cards to the exact same width */
  scroll-snap-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: auto; /* Allows flexbox to make all cards equal height */
}

/* The animated bottom line */
.project-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

/* The hover glow and float effect */
.project-card:hover,
.project-card.glow-active {
  border-color: rgba(108, 99, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--glow);
}

.project-card:hover::after,
.project-card.glow-active::after {
  transform: scaleX(1);
}
/* PROJECT SCREENSHOTS */
.project-image {
  width: 100%;
  height: 180px; /* Keeps all screenshots a uniform height */
  margin-bottom: 1.25rem;
  border-radius: 12px; /* Neat border radius */
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0; 
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images fill the box without squishing */
  object-position: top center; /* Focuses on the top of mobile screenshots like DocuKeep */
  transition: transform 0.4s ease;
}

/* Subtle zoom effect when the card glows or is hovered */
.project-card:hover .project-image img,
.project-card.glow-active .project-image img {
  transform: scale(1.05); 
}
/* INNER CARD ELEMENTS */
.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-card-icon {
  font-size: 2rem;
}

.project-card-links {
  display: flex;
  gap: 0.5rem;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;      /* Changed from width to min-width */
  height: 32px;
  padding: 0 0.8rem;    /* Added padding for the text */
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 0.8rem;    /* Adjusted size to fit the card header */
  font-weight: 500;     /* Added slight weight for readability */
  white-space: nowrap;  /* Prevents text from wrapping to a second line */
}

.icon-link:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: rgba(108, 99, 255, 0.1);
}

.project-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
}

.project-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1; /* This forces the tags to the bottom uniformly */
  margin-bottom: 1rem;
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

/* ===== MOBILE ADJUSTMENT FOR CAROUSEL ===== */
@media (max-width: 600px) {
  .project-card {
    flex: 0 0 85vw; /* Cards take up 85% of screen width on phones */
    scroll-snap-align: start;
  }
}

/* ===== CONTACT ===== */
#contact {
  padding: 3rem 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.contact-info p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s;
  color: var(--text-muted);
}

.contact-link-item:hover {
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.08);
  transform: translateX(4px);
  color: var(--text);
}

.contact-link-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(108, 99, 255, 0.05);
  box-shadow: 0 0 0 3px var(--glow);
}

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

.form-group textarea { min-height: 120px; }

/* ===== FOOTER ===== */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

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

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

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

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-greeting::before { display: none; }

  .hero-bio { margin-left: auto; margin-right: auto; }

  .hero-actions { justify-content: center; }

  .hero-visual { order: -1; }

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

  .featured-inner { grid-template-columns: 1fr; }

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

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 600px) {
  .section-title { font-size: 1.75rem; }
  .hero-name { font-size: 2.5rem; }
  #about, 
  #skills, 
  #projects, 
  #contact {
    padding: 2rem 0; 
  }

  /* Mobile nav: use visibility/transform instead of display:none so animation works */
  .nav-links {
    display: flex;
    visibility: hidden;
    flex-direction: column;
    position: fixed;
    top: 0; 
    right: 0; /* Anchors the menu to the right side */
    bottom: 0;
    width: 60%; /* Sets it to exactly half the screen */
    height: 100vh;
    padding: 6rem 1.5rem 2rem; /* Adjusted side padding for smaller width */
    background: var(--bg-secondary);
    border-left: 1px solid var(--border); /* Adds a line separating it from the background */
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5); /* Makes the menu 'pop' off the page */
    gap: 1.5rem;
    z-index: 1001;
    transform: translateX(100%); /* Hides it off-screen to the right */
    transition: transform 0.3s ease, visibility 0.3s ease;
    /* ADDED: Rounded corners on the left side */
    border-top-left-radius: 24px;
    border-bottom-left-radius: 24px;
  }
  .nav-links.open {
    visibility: visible;
    transform: translateX(0);
  }
  .nav-toggle { display: flex; z-index: 1002; }

  /* Navbar gets solid background when menu is open */
 #navbar.nav-open {
    background: rgba(18, 18, 26, 0.98) !important; 
    backdrop-filter: blur(20px);
  }

  /* Hero scroll indicator – hidden on mobile to avoid layout issues */
  .hero-scroll { display: none; }

  .avatar-container { width: 200px; height: 200px; }

  /* Float badges – show on mobile, smaller & repositioned */
  .float-badge {
    display: flex;
    font-size: 0.68rem;
    padding: 0.25rem 0.55rem;
  }
  .float-badge:nth-child(3) { top: -22px;  right: 8px; }
  .float-badge:nth-child(4) { top: 38%;    right: -12px; }
  .float-badge:nth-child(5) { bottom: -22px; right: 8px; }
  .float-badge:nth-child(6) { top: -22px;  left: 8px; }
  .float-badge:nth-child(7) { top: 38%;    left: -12px; }
  .float-badge:nth-child(8) { bottom: -22px; left: 8px; }

  /* Give hero extra bottom padding so bottom badges don't clip */
  #hero { padding-top: 140px; 
    align-items: flex-start; /* Pushes content up */
    padding-bottom: 4rem; /* Give extra space at bottom */ }

  .featured-inner { padding: 1.5rem; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--primary-light);
  cursor: pointer;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  
  /* Hidden state by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

/* Class added by JS when scrolled down */
.scroll-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--glow);
}

/* Mobile sizing */
@media (max-width: 600px) {
  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
