/* ==========================================================================
   CSS Variables & Base Styling
   ========================================================================== */
:root {
  /* Main Colors */
  --primary-color: #4169e1;        /* Royal Blue */
  --secondary-color: #6c63ff;      /* Periwinkle */
  --accent-color: #00c7b7;         /* Turquoise */
  
  /* Text Colors */
  --text-dark: #222831;
  --text-light: #eeeeee;
  --text-muted: #8b8b8b;
  
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #121212;
  
  /* Other Variables */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Sora', sans-serif;
  --border-radius: 8px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  
  /* Dark Mode Variables (Default: Dark Theme) */
  --bg-color: #0a0a0a;
  --text-color: #f5f5f5;
  --card-bg: #1e1e1e;
  --border-color: rgba(255, 255, 255, 0.1);
  --nav-bg: transparent;
  --nav-bg-scrolled: #121212;
  --section-bg: #121212;
  --form-bg: #1e1e1e;
  --muted-color: #a0a0a0;
  --shadow-color: rgba(0, 0, 0, 0.4);
  --hero-gradient: linear-gradient(to bottom, #0a0a0a, #121212);
}

/* Light Mode Variables (Applied when light-mode class is added) */
body.light-mode {
  --bg-color: var(--bg-primary);
  --text-color: var(--text-dark);
  --card-bg: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --nav-bg-scrolled: var(--bg-primary);
  --section-bg: var(--bg-secondary);
  --form-bg: #ffffff;
  --muted-color: var(--text-muted);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --hero-gradient: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

/* Reset & Basic Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

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

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style-type: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }

.grid { display: grid; }
.grid-center { place-items: center; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.hidden { display: none; }
.visible { visibility: visible; opacity: 1; }
.invisible { visibility: hidden; opacity: 0; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.cursor-pointer { cursor: pointer; }

.transition { transition: var(--transition); }
.transition-fast { transition: all 0.2s ease; }
.transition-slow { transition: all 0.6s ease; }

.hover-scale:hover { transform: scale(1.05); }
.hover-lift:hover { transform: translateY(-5px); }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-sm { box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1); }

/* ==========================================================================
   Layout & Components
   ========================================================================== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-color);
}

.underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  margin: 0 auto;
  border-radius: 2px;
}

.highlight {
  color: var(--primary-color);
}

section {
  padding: 100px 0;
}

/* Buttons */
.primary-btn, .secondary-btn, .resume-btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.primary-btn::before, .secondary-btn::before, .resume-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
  z-index: -1;
}

.primary-btn:hover::before, .secondary-btn:hover::before, .resume-btn:hover::before {
  width: 300px;
  height: 300px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.primary-btn:hover {
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.6);
  transform: translateY(-3px) scale(1.05);
  color: white;
}

.secondary-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(65, 105, 225, 0.4);
}

.resume-btn {
  background: linear-gradient(135deg, var(--accent-color), #00a896);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 199, 183, 0.3);
}

.resume-btn:hover {
  box-shadow: 0 8px 25px rgba(0, 199, 183, 0.6);
  transform: translateY(-3px) scale(1.05);
  color: white;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  background-color: var(--nav-bg);
  transition: background-color 0.3s ease, padding 0.3s ease;
  padding: 20px 0;
}

header.scrolled {
  background-color: var(--nav-bg-scrolled);
  box-shadow: 0 5px 20px var(--shadow-color);
  padding: 15px 0;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --- Ultra-compact header for mobile --- */
@media (max-width: 600px) {
  header {
    min-height: 28px !important;
    max-height: 44px;
    padding: 0 0 !important;
    background: var(--nav-bg-scrolled);
    box-shadow: 0 2px 8px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .logo a {
    font-size: 0.85rem !important;
    padding: 0 4px;
    letter-spacing: 0.2px;
    font-weight: 700;
  }
  nav {
    min-height: 28px;
    height: 44px;
    align-items: center;
  }
  .theme-switcher {
  font-size: 0.7rem !important;
  margin-left: 8px;
  padding: 0;
  /* nudge slightly lower so it sits beside the menu bars */
  transform: translateY(6px);
  transition: transform 0.18s ease;
  }
  .mobile-menu-btn {
  padding: 0 2px;
  align-self: center;
  }
  .mobile-menu-btn .bar {
  width: 14px;
  height: 2px;
  margin: 3px 0; /* increased vertical gap */
  display: block;
  border-radius: 2px;
  }
  /* place dropdown just under the header and make hide/slide distance moderate */
  .nav-links {
  top: 72px !important; /* moved lower so first item isn't flush with header */
  left: 50%;
  transform: translate(-50%, -120%); /* hidden just above header, centered */
  padding-top: 8px; /* breathing room from top */
  transition: transform 0.28s ease, opacity 0.22s ease, visibility 0.22s ease;
    z-index: 1000;
  }

  .nav-links.active {
    transform: translate(-50%, 6px); /* drop slightly below header into view, centered */
    opacity: 1;
    visibility: visible;
  }

  /* Center menu items inside the dropdown on small screens */
  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-color);
    opacity: 1; /* ensure visible after transition */
  }

  .nav-links a::after {
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    width: 60%;
  }

  /* put theme switcher next to the hamburger on mobile */
  /* place menu button first, theme switcher to its right */
  .mobile-menu-btn {
    order: 2;
    margin-right: 6px;
    margin-top: 5px;
  }

  .theme-switcher {
    order: 3;
    margin-left: 6px;
    margin-top: 10px;
  }
}

.logo a {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

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

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

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

.theme-switcher {
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 20px;
  /* use variable for vertical translate to keep JS-safe */
  --ts-translate: 0px;
  transform: translateY(var(--ts-translate));
  transition: transform 0.36s ease;
  color: var(--text-color);
}

.theme-switcher:hover {
  color: var(--primary-color);
}

/* rotate only the inner icon when toggled; keep translateY intact */
.theme-switcher.rotated i {
  transform: rotate(360deg);
  transition: transform 0.48s cubic-bezier(.2,.9,.2,1);
}

.mobile-menu-btn {
  display: none;
  cursor: pointer;
  /* ensure inner bars are centered when shown */
  align-items: center;
  justify-content: center;
  flex-direction: column; /* stack bars vertically */
}

.bar,
.mobile-menu-btn .bar {
  /* slightly larger default hamburger bars */
  width: 28px;
  height: 0px;
  background-color: var(--text-color);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 3px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  background: var(--hero-gradient);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero .intro {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-color);
}

.hero h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
}

.hero .description {
  color: var(--muted-color);
  margin-bottom: 30px;
  font-size: 1.1rem;
  max-width: 90%;
}

.hero-cta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

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

.hero .social-links a {
  color: var(--text-color);
  font-size: 1.4rem;
  transition: var(--transition);
}

.hero .social-links a:hover {
  color: var(--primary-color);
  transform: translateY(-3px);
}

.hero-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 350px;
}

.shape {
  width: 350px;
  height: 350px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: morph 8s ease-in-out infinite;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 30px var(--shadow-color);
}

.bitmoji-overlay {
  position: absolute;
  max-width: 320px;
  height: auto;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.animated-character {
  position: absolute;
  width: 280px;
  height: 280px;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.animated-character svg {
  width: 100%;
  height: 100%;
}

/* Character Animations */
.character-head {
  animation: float 3s ease-in-out infinite;
}

.character-eye {
  animation: blink 3s ease-in-out infinite;
}

.character-mouth {
  animation: smile 5s ease-in-out infinite;
}

.character-arm-left {
  transform-origin: right center;
  animation: waveLeft 4s ease-in-out infinite;
}

.character-arm-right {
  transform-origin: left center;
  animation: waveRight 4s ease-in-out infinite;
}

.character-body {
  animation: breathe 4s ease-in-out infinite;
}

.character-leg-left, .character-leg-right {
  animation: bounce 2s ease-in-out infinite alternate;
}

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

@keyframes blink {
  0%, 45%, 55%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.1);
  }
}

@keyframes smile {
  0%, 100% {
    d: path('M85,85 Q100,95 115,85');
  }
  50% {
    d: path('M85,80 Q100,90 115,80');
  }
}

@keyframes waveLeft {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-15deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

@keyframes waveRight {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(15deg);
  }
  75% {
    transform: rotate(-5deg);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(1.05);
  }
}

@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-3px);
  }
}

.profile-pic {
  position: relative;
  z-index: 2;
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  box-shadow: 0 10px 30px var(--shadow-color);
}

@keyframes morph {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  50% {
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.scroll-prompt {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0.7;
  transition: var(--transition);
  color: var(--text-color);
}

.scroll-prompt:hover {
  opacity: 1;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--text-color);
  border-radius: 20px;
  position: relative;
  margin-bottom: 10px;
}

.mouse::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--text-color);
  border-radius: 50%;
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
  background-color: var(--section-bg);
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
}

.about-image {
  flex: 1;
  max-width: 400px;
}

.about-image img {
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: var(--transition);
}

.about-image img:hover {
  transform: scale(1.03);
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-color);
}

.about-text p {
  color: var(--muted-color);
  margin-bottom: 20px;
}

.about-cta {
  margin-top: 30px;
}

/* ==========================================================================
   Skills Section
   ========================================================================== */
.skills {
  background-color: var(--bg-color);
}

.skills-content {
  display: flex;
  flex-direction: column;
  gap: 50px;
  align-items: center;
}

.skill-category {
  width: 100%;
  max-width: 900px;
}

.skill-category h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 25px;
  color: var(--text-color);
  text-align: center;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin: 0 auto;
}

.skill-item {
  background-color: var(--card-bg);
  padding: 25px 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 20px var(--shadow-color);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  width: 150px;
}

.skill-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px var(--shadow-color);
  border-color: var(--primary-color);
}

.skill-item i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.skill-item p:first-child {
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.skill-item:hover p:first-child {
  transform: scale(1.1);
}

/* TypeScript Logo Specific Styling */
.skill-item .ts-logo {
  font-family: 'Inter', sans-serif;
  font-size: 2em;
  font-weight: bold;
  color: #3178c6;
  background: transparent;
  padding: 5px;
  border-radius: 4px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.skill-item:hover .ts-logo {
  transform: scale(1.1);
  text-shadow: 0 0 15px rgba(49, 120, 198, 0.4);
}

.skill-item p {
  font-weight: 500;
  color: var(--text-color);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects {
  background-color: var(--section-bg);
}

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 8px 20px;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-weight: 500;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: left 0.3s ease;
  z-index: -1;
}

.filter-btn:hover::before, .filter-btn.active::before {
  left: 0;
}

.filter-btn:hover, .filter-btn.active {
  background-color: transparent;
  color: white;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 5px 15px rgba(108, 99, 255, 0.3);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.project-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color);
  position: relative;
  transform-style: preserve-3d;
  cursor: pointer;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.1), rgba(0, 199, 183, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.project-card:hover {
  box-shadow: 0 25px 50px var(--shadow-color);
}

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

/* 3D Tilt Effect */
.project-card.tilt {
  transition: transform 0.1s ease-out;
}

.project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .project-image img {
  transform: scale(1.1) rotate(1deg);
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.7));
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition);
}

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

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

/* Remove icon buttons from all project cards */


.project-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  background-color: white;
  border-radius: 50%;
  color: var(--text-dark);
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.project-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* GitHub button specific styling */
.btn-github {
  background-color: #24292e !important;
  color: white !important;
}

.btn-github:hover {
  background-color: #444d56 !important;
  transform: translateY(-3px) scale(1.1);
}

/* Demo button specific styling */
.btn-demo {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.btn-demo:hover {
  background-color: var(--secondary-color) !important;
  transform: translateY(-3px) scale(1.1);
}

/* Completely hide overlay and action icons on project cards */


.project-info {
  padding: 25px;
}

.project-info h4 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.project-info p {
  color: var(--muted-color);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

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

.project-tags span {
  background-color: rgba(65, 105, 225, 0.1);
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
}

.dark-mode .project-tags span {
  background-color: rgba(65, 105, 225, 0.2);
}

.projects-cta {
  text-align: center;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
  background-color: var(--bg-color);
}

.contact-content {
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.contact-info, .contact-form {
  flex: 1;
}

.contact-info h4 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--text-color);
}

.contact-info p {
  color: var(--muted-color);
  margin-bottom: 30px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.contact-item i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.contact-item h5 {
  margin-bottom: 5px;
  font-weight: 600;
  color: var(--text-color);
}

.contact-item p a {
  color: var(--muted-color);
}

.contact-item p a:hover {
  color: var(--primary-color);
}

.contact-item .social-links {
  display: flex;
  gap: 15px;
}

.contact-item .social-links a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--card-bg);
  border-radius: 50%;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.contact-item .social-links a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.contact-form {
  background-color: var(--form-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-color);
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.2);
}

.contact-form .primary-btn {
  width: 100%;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background-color: var(--section-bg);
  padding: 70px 0 30px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.footer-logo a {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
}

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

.footer-links ul {
  display: flex;
  gap: 30px;
}

.footer-links a {
  color: var(--text-color);
  transition: var(--transition);
}

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

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: var(--card-bg);
  border-radius: 50%;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--muted-color);
}

.footer-bottom i {
  color: #ff4d4d;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
  
  .about-content, .contact-content {
    flex-direction: column;
  }
  
  .about-image {
    max-width: 100%;
    margin-bottom: 30px;
  }
  
  .contact-info {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 5px 0;
    min-height: 45px;
  }
  
  .logo a {
    font-size: 1.2rem;
    line-height: 1;
  }
  
  .nav-links {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translate(-50%, -8px);
    opacity: 0;
    visibility: hidden;
    width: calc(100% - 36px);
    max-width: 420px;
    background: rgba(10,10,10,0.78);
    backdrop-filter: blur(6px) saturate(120%);
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.6);
    transition: transform 320ms cubic-bezier(.2,.9,.2,1), opacity 260ms ease, visibility 260ms ease;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
  }

  .nav-links.active {
    transform: translate(-50%, 12px);
    opacity: 1;
    visibility: visible;
  }

  /* Center menu items for the wider mobile breakpoint */
  .nav-links a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    font-weight: 600;
    color: var(--text-color);
  }

  .nav-links a::after {
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    width: 60%;
  }
  
  .mobile-menu-btn {
  display: block;
  padding: 10px; /* larger hit area */
  margin-right: 10px;
  display: inline-flex; /* ensure centering of bars */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  }
  
  .mobile-menu-btn .bar {
  width: 34px; /* wider bars on mobile */
  height: 3px;
  margin: 5px 0; /* comfortable vertical spacing */
  border-radius: 3px;
  }
  
  .theme-switcher {
  font-size: 0.9rem;
  padding: 3px;
  order: 2;
  margin-right: 6px;
  }
  
  .hero {
    padding-top: 60px;
  }
  
  .hero .container {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-content {
    margin-bottom: 50px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero .description {
    max-width: 100%;
  }
  
  .hero-cta, .hero .social-links {
    justify-content: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .footer-links ul {
    justify-content: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  header {
    padding: 3px 0;
    min-height: 40px;
  }
  
  .logo a {
    font-size: 1rem;
    line-height: 1;
  }
  
  .theme-switcher {
    font-size: 0.8rem;
    padding: 2px;
  }
  
  .mobile-menu-btn {
  padding: 6px;
  flex-direction: column;
  }
  
  .mobile-menu-btn .bar {
  width: 28px;
  height: 2px;
  margin: 3px 0;
  }
  
  .hero {
    padding-top: 50px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  
  .hero-cta a {
    width: 100%;
  }
  
  .projects-filter {
    flex-direction: column;
    gap: 10px;
  }
  
  .filter-btn {
    width: 100%;
  }
  
  .shape {
    width: 250px;
    height: 250px;
  }
  
  .profile-pic {
    width: 220px;
    height: 220px;
  }
  
  .contact-form {
    padding: 20px;
  }
  
  .footer-links ul {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  header {
    padding: 2px 0;
    min-height: 35px;
  }
  
  .logo a {
    font-size: 0.9rem;
    line-height: 1;
  }
  
  .theme-switcher {
    font-size: 0.7rem;
    padding: 1px;
  }
  
  .mobile-menu-btn .bar {
    width: 14px;
    height: 1px;
    margin: 1px 0;
  }
  
  .hero {
    padding-top: 40px;
  }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero h2 {
    font-size: 1.3rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 360px) {
  header {
    padding: 1px 0;
    min-height: 30px;
  }
  
  .logo a {
    font-size: 0.8rem;
    line-height: 1;
  }
  
  .theme-switcher {
    font-size: 0.6rem;
    padding: 0;
  }
  
  .mobile-menu-btn .bar {
    width: 12px;
    height: 1px;
    margin: 0.5px 0;
  }
  
  .hero {
    padding-top: 35px;
  }
  
  .container {
    padding: 0 10px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero h2 {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
}

