/* ===== CSS VARIABLES ===== */
:root {
  /* Indian Flag Color Palette */
  --primary-color: #FF9933; /* Saffron */
  --primary-dark: #E67E00; /* Darker Saffron */
  --primary-light: #FFB366; /* Light Saffron */
  --secondary-color: #138808; /* Green */
  --green-dark: #0F6B00; /* Darker Green */
  --green-light: #4CAF50; /* Light Green */
  --accent-color: #f7fafc;
  --text-primary: #2d3748;
  --text-secondary: #718096;
  --text-light: #a0aec0;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Layout */
  --navbar-height: 70px;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 5rem 0;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--white);
  overflow-x: hidden;
}

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

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

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: var(--font-size-base);
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

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

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  transform: scaleX(0);
  transform-origin: left;
  animation: highlightGrow 1s ease-out 0.5s forwards;
}

@keyframes highlightGrow {
  to {
    transform: scaleX(1);
  }
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--white) 33%, var(--white) 66%, var(--secondary-color) 100%);
  background-size: 100% 3px;
  background-position: top;
  background-repeat: no-repeat;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: var(--transition-base);
}

.nav-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-height);
}

.nav-logo a {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding: 0.5rem 0;
  text-decoration: none;
  display: block;
  transition: var(--transition-base);
}

/* Remove hover bottom line effect */
.nav-link::after {
  content: none;
}

/* Active state: bold color and subtle bottom indicator */
.nav-link.active {
  color: var(--primary-color);
}

.nav-link.active::before {
   content: none;
 }

/* Optional: quieter hover without border/line */
.nav-link:hover {
  color: var(--primary-dark);
  transform: translateY(-1px);
}

/* Ensure mobile menu active state visible */
@media (max-width: 768px) {
  .nav-menu {
    gap: 1.25rem;
  }
  .nav-link {
    padding: 0.75rem 0;
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  margin: 3px 0;
  transition: var(--transition-base);
}

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--white) 33%, var(--white) 66%, var(--secondary-color) 100%);
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--navbar-height) + 10px); /* Navbar height + extra spacing */
  margin-top: 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) 33%, transparent 33%, transparent 66%, var(--secondary-color) 66%, var(--secondary-color) 100%);
  opacity: 0.1;
  animation: flagWave 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 10%;
  width: 80px;
  height: 80px;
  border: 3px solid var(--primary-color);
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0%, transparent 30%, var(--primary-color) 30%, var(--primary-color) 35%, transparent 35%, transparent 100%);
  animation: chakraSpin 10s linear infinite;
  opacity: 0.3;
}

@keyframes flagWave {
  0%, 100% {
    transform: translateX(0px) scaleY(1);
  }
  50% {
    transform: translateX(10px) scaleY(1.05);
  }
}

@keyframes chakraSpin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

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

.hero-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

/* Ensure all sections have consistent width */
.about .container,
.skills .container,
.projects .container,
.contact .container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 4rem;
}

.hero-title {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.2s forwards;
}

.hero-subtitle {
  font-size: var(--font-size-2xl);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.4s forwards;
}

.hero-description {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.6s forwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  opacity: 0;
  animation: slideInUp 1s ease-out 0.8s forwards;
}

.hero-avatar {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: slideInRight 1s ease-out 0.5s forwards;
}

.morphing-shape {
  width: 300px;
  height: 300px;
  position: relative;
  border: 20px solid var(--primary-color);
  border-radius: 50%;
  background: url('../images/portfolio.jpeg') center/cover no-repeat;
  box-shadow: 0 10px 30px rgba(226, 55, 68, 0.2);
  animation: float 6s ease-in-out infinite;
}



.hero-scroll {
  display: flex;
  justify-content: center;
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  transform: rotate(45deg);
  margin-top: 0.5rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== SECTIONS ===== */
.about,
.skills,
.projects,
.contact {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: 2px;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}

/* ===== ABOUT SECTION ===== */
.about {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 50%, var(--green-light) 100%);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) 20%, transparent 20%, transparent 80%, var(--secondary-color) 80%, var(--secondary-color) 100%);
  opacity: 0.03;
  z-index: -1;
  pointer-events: none;
}

.about-text {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: var(--font-size-lg);
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
  padding: 2rem;
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat h3 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat p {
  color: var(--text-secondary);
  font-weight: 500;
}

/* ===== SKILLS SECTION ===== */
.skills {
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 50%, var(--white) 100%);
  position: relative;
}

.skills::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, transparent 0%, var(--primary-color) 30%, transparent 30%, transparent 70%, var(--secondary-color) 70%, transparent 100%);
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.skill-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition-base);
  border: 2px solid transparent;
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.skill-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--white);
}

.skill-card h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== PROJECTS SECTION ===== */
.projects {
  background: linear-gradient(135deg, var(--gray-50) 0%, var(--green-light) 50%, var(--gray-50) 100%);
  position: relative;
  padding: 6rem 0;
}

.projects::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, var(--secondary-color) 0%, var(--secondary-color) 25%, transparent 25%, transparent 75%, var(--primary-color) 75%, var(--primary-color) 100%);
  opacity: 0.03;
  z-index: -1;
  pointer-events: none;
}

/* Timeline Container */
.projects-timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Mobile Projects Layout - Hidden by default */
.projects-mobile {
  display: none;
}

.projects-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  transform: translateX(-50%);
  border-radius: 2px;
  z-index: 1;
}

/* Timeline Items */
.timeline-item {
  position: relative;
  margin-bottom: 4rem;
  display: flex;
  align-items: center;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

/* Timeline Marker */
.timeline-marker {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marker-dot {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border: 4px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--primary-color);
  transition: var(--transition-base);
}

.timeline-item:hover .marker-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 6px var(--primary-color);
}

.marker-line {
  width: 4px;
  height: 60px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  margin-top: 10px;
  border-radius: 2px;
}

.timeline-item:last-child .marker-line {
  display: none;
}

/* Project Cards */
.project-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  width: 45%;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

/* Visual indicator for cards with live links */
.project-card:has(.project-live-link .project-link:not(.no-link)) {
  border: 2px solid transparent;
  transition: border-color 0.3s ease-in-out;
}

.project-card:has(.project-live-link .project-link:not(.no-link)):hover {
  border-color: var(--primary-color);
}

.project-left {
  margin-right: auto;
  margin-left: 0;
}

.project-right {
  margin-left: auto;
  margin-right: 0;
}

/* Project Image */
.project-image {
  height: 250px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.95), rgba(19, 136, 8, 0.95));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  cursor: pointer;
  z-index: 5;
  pointer-events: auto;
}

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

/* Make the overlay more responsive to clicks */
.project-overlay:hover {
  opacity: 1;
}

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

.project-link {
  padding: 0.75rem 1.5rem;
  background-color: var(--white);
  color: var(--primary-color);
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition-base);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: inline-block;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.project-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.project-link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.project-link.no-link {
  background-color: var(--gray-200);
  color: var(--text-secondary);
  cursor: default;
  opacity: 0.7;
}

.project-link.no-link:hover {
  background-color: var(--gray-200);
  color: var(--text-secondary);
  transform: none;
}

/* Project Content */
.project-content {
  padding: 2rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-category {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 600;
}

.project-year {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.project-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Project descriptions now show full content by default */

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  color: var(--text-primary);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: var(--transition-base);
  border: 1px solid var(--gray-200);
}

.tech-tag:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  transform: translateY(-2px);
}

/* Project Live Link Section */
.project-live-link {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.project-live-link .project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-base);
  box-shadow: var(--shadow-md);
  font-size: var(--font-size-sm);
  cursor: pointer;
  font-family: var(--font-family);
  outline: none;
  pointer-events: auto;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.project-live-link .project-link:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.project-live-link .project-link:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

.project-live-link .project-link i {
  font-size: 0.8em;
  opacity: 0.8;
}

.project-live-link .project-link.no-link {
  background: var(--gray-200);
  color: var(--text-secondary);
  cursor: default;
  opacity: 0.7;
}

.project-live-link .project-link.no-link:hover {
  background: var(--gray-200);
  color: var(--text-secondary);
  transform: none;
}

/* Project-specific button styles (same as mobile) */
.project-live-link .project-link.project-midas {
  background: linear-gradient(135deg, #10b981, #059669);
}

.project-live-link .project-link.project-fafadia {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.project-live-link .project-link.project-allied {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* External link icon styling */
.project-live-link .project-link i {
  margin-left: 0.5rem;
  font-size: 0.8em;
  opacity: 0.8;
}

/* ===== CONTACT SECTION ===== */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  color: #fff;
}

.contact-details h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.contact-details p {
  color: var(--text-secondary);
}

.contact-form {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
}

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(226, 55, 68, 0.1);
}

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

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--white) 33%, var(--white) 66%, var(--secondary-color) 100%);
  color: var(--text-primary);
  padding: 2rem 0;
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) 33%, transparent 33%, transparent 66%, var(--secondary-color) 66%, var(--secondary-color) 100%);
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

.footer-container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
  position: relative;
  z-index: 2;
}

/* ===== MOBILE SPECIFIC FIXES ===== */
@media screen and (max-width: 768px) and (orientation: portrait) {
  .hero {
    padding-top: calc(var(--navbar-height) + 30px); /* Extra spacing for portrait mobile */
  }
}

@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding-top: calc(var(--navbar-height) + 15px); /* Less spacing for landscape mobile */
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .navbar {
    height: var(--navbar-height);
    z-index: 1001; /* Ensure navbar stays on top */
  }

  .nav-container {
    height: var(--navbar-height);
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: var(--navbar-height);
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
    padding: 2rem 0;
    z-index: 1000;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 100vh; /* Use full viewport height */
    padding-top: calc(var(--navbar-height) + 20px); /* Increased spacing for mobile */
    padding-bottom: 2rem; /* Add bottom padding for better spacing */
    margin-top: 0; /* Ensure no margin issues */
  }

  .hero-container {
    padding-top: 0; /* Remove any container padding that might interfere */
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-title {
    font-size: var(--font-size-4xl);
  }

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

  .morphing-shape {
    width: 200px;
    height: 200px;
  }

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

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  /* Mobile Projects Design - Card Layout */
  .projects-timeline {
    display: none; /* Hide timeline on mobile */
  }

  .projects-mobile {
    display: block; /* Show mobile layout */
  }

  .projects-mobile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }

  .mobile-project-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: var(--transition-base);
    border: 2px solid transparent;
    position: relative;
    pointer-events: auto;
  }

  .mobile-project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
  }

  .mobile-project-header {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .mobile-project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    z-index: 1;
  }

  .mobile-project-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(10px);
  }

  .mobile-project-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    z-index: 2;
    position: relative;
  }

  .mobile-project-content {
    padding: 1.5rem;
    position: relative;
    z-index: 5;
  }

  .mobile-project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }

  .mobile-project-category {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 600;
  }

  .mobile-project-year {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
  }

  .mobile-project-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
  }

  .mobile-project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: var(--font-size-sm);
  }

  .mobile-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .mobile-tech-tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border: 1px solid var(--gray-200);
  }

  .mobile-project-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 10;
  }

  .mobile-project-link {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    font-size: var(--font-size-sm);
    display: inline-block;
    position: relative;
    z-index: 10;
    cursor: pointer;
    font-family: var(--font-family);
    outline: none;
    pointer-events: auto;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-project-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .mobile-project-link:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
    box-shadow: var(--shadow-lg), 0 0 0 4px var(--primary-color);
  }

  .mobile-project-link:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
  }

  .mobile-project-link.no-link {
    background: var(--gray-200);
    color: var(--text-secondary);
    cursor: default;
    opacity: 0.7;
  }

  .mobile-project-link.no-link:hover {
    transform: none;
    background: var(--gray-200);
    color: var(--text-secondary);
  }

  /* Project-specific button styles */
  .mobile-project-link.project-midas {
    background: linear-gradient(135deg, #10b981, #059669);
  }

  .mobile-project-link.project-fafadia {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
  }

  .mobile-project-link.project-allied {
    background: linear-gradient(135deg, #f59e0b, #d97706);
  }

  /* External link icon styling */
  .mobile-project-link i {
    margin-left: 0.5rem;
    font-size: 0.8em;
    opacity: 0.8;
  }

  /* Mobile Project Cards Animation */
  .mobile-project-card {
    animation: slideInUp 0.6s ease-out;
  }

  .mobile-project-card:nth-child(1) { animation-delay: 0.1s; }
  .mobile-project-card:nth-child(2) { animation-delay: 0.2s; }
  .mobile-project-card:nth-child(3) { animation-delay: 0.3s; }
  .mobile-project-card:nth-child(4) { animation-delay: 0.4s; }
  .mobile-project-card:nth-child(5) { animation-delay: 0.5s; }

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

  .section-title {
    font-size: var(--font-size-3xl);
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 100vh; /* Use full viewport height */
    padding-top: calc(var(--navbar-height) + 20px); /* Increased spacing for small screens */
    padding-bottom: 1rem; /* Add bottom padding */
    margin-top: 0; /* Ensure no margin issues */
  }

  .hero-container {
    padding-top: 0; /* Remove any container padding that might interfere */
  }

  .hero-title {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-xl);
  }

  .section-title {
    font-size: var(--font-size-2xl);
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
  }

  .morphing-shape {
    width: 150px;
    height: 150px;
  }

  /* Mobile Projects - Small Screens */
  .mobile-project-header {
    height: 150px; /* Smaller header on very small screens */
  }

  .mobile-project-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .mobile-project-title {
    font-size: var(--font-size-lg);
  }

  .mobile-project-description {
    font-size: var(--font-size-xs);
  }

  .mobile-project-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .mobile-project-link {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-xs);
    border: none;
    outline: none;
  }
}

/* Experience section styles */
.experience {
  padding: var(--section-padding);
  background-color: var(--white);
}

.experience-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.experience-item {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  transition: var(--transition-base);
  border: 2px solid transparent;
}

.experience-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.experience-role {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-primary);
}

.experience-company {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  font-weight: 500;
}

.experience-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.experience-duration::before {
  content: '\f017';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
  color: var(--primary-color);
}

.experience-location::before {
  content: '\f3c5';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  margin-right: 8px;
  color: var(--primary-color);
}