/* ===== Modern Portfolio CSS ===== */

/* === Base Styles and CSS Reset === */
:root {
  /* Color Variables */
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #06b6d4;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #71717a;
  --background-primary: #ffffff;
  --background-secondary: #f9fafb;
  --background-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  
  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Poppins', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--background-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--primary-hover);
}

img, svg {
  max-width: 100%;
  height: auto;
}

ul, ol {
  list-style: none;
}

section {
  padding: 5rem 0;
}

button, input, textarea {
  font-family: var(--font-body);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Header and Navigation === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

header.scrolled {
  padding: 1rem 5%;
  box-shadow: var(--shadow-lg);
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.logo h1 {
  font-size: 1.5rem;
  margin-bottom: 0;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo span {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  font-size: 1rem;
}

.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 var(--transition-normal);
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1002;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 9px;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
  top: 0px;
}

.hamburger span:nth-child(2) {
  top: 9px;
}

.hamburger span:nth-child(3) {
  top: 18px;
}

.hamburger.active span:nth-child(1) {
  top: 9px;
  transform: rotate(135deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.hamburger.active span:nth-child(3) {
  top: 9px;
  transform: rotate(-135deg);
}

/* === Hero Section === */
.hero {
  padding: 10rem 5% 5rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at bottom right, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  z-index: -1;
}

.hero-content {
  flex-basis: 50%;
  padding-right: 2rem;
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--text-primary), var(--primary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
}

.hero-visual {
  flex-basis: 50%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.interactive-element {
  width: 100%;
  aspect-ratio: 1/1;
  max-width: 500px;
  position: relative;
}

.shape-container {
  width: 100%;
  height: 100%;
  position: relative;
  perspective: 1000px;
  transform-style: preserve-3d;
  animation: rotateContainer 20s linear infinite;
}

@keyframes rotateContainer {
  0% {
    transform: rotateY(0) rotateX(10deg);
  }
  100% {
    transform: rotateY(360deg) rotateX(10deg);
  }
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0.7;
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
  transform: translateZ(0);
  transition: all 0.5s ease;
}

.shape-1 {
  width: 40%;
  height: 40%;
  top: 10%;
  left: 10%;
  animation: floatAnimation 6s ease-in-out infinite;
}

.shape-2 {
  width: 30%;
  height: 30%;
  top: 60%;
  left: 20%;
  animation: floatAnimation 8s ease-in-out infinite;
  animation-delay: 0.5s;
}

.shape-3 {
  width: 35%;
  height: 35%;
  top: 20%;
  right: 15%;
  animation: floatAnimation 7s ease-in-out infinite;
  animation-delay: 1s;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.shape-4 {
  width: 25%;
  height: 25%;
  top: 70%;
  right: 10%;
  animation: floatAnimation 9s ease-in-out infinite;
  animation-delay: 1.5s;
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.shape-5 {
  width: 20%;
  height: 20%;
  top: 40%;
  left: 40%;
  animation: floatAnimation 5s ease-in-out infinite;
  animation-delay: 2s;
}

@keyframes floatAnimation {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-20px) translateX(10px);
  }
}

.particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* === Buttons === */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  border: none;
  text-align: center;
  background-color: var(--background-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  position: relative;
}

.btn-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width var(--transition-normal);
}

.btn-link:hover {
  color: var(--primary-hover);
}

.btn-link:hover::after {
  width: 100%;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--background-tertiary);
  transition: all var(--transition-normal);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: color var(--transition-normal);
}

.btn-icon:hover {
  background-color: var(--primary-color);
}

.btn-icon:hover svg {
  color: white;
}

/* === Projects Section === */
.projects {
  background-color: var(--background-secondary);
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.section-header.align-left {
  text-align: left;
  margin-left: 0;
}

.section-header.align-left h2::after {
  left: 0;
  transform: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.project-card {
  background-color: var(--background-primary);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.project-card.featured {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.project-card.featured::before {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  bottom: -2px;
  left: -2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  z-index: -1;
  border-radius: 16px;
}

.project-img {
  height: 200px;
  background-color: #f0f0f0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-secondary);
  font-size: 3rem;
}

.project-img::before {
  content: '</ >';
  font-family: var(--font-heading);
  opacity: 0.2;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  align-items: flex-start;
  justify-content: flex-end;
}

.technology-badge {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
}

.project-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.project-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.projects-more {
  text-align: center;
  margin-top: 3rem;
}

/* === Skills Section === */
.skills {
  position: relative;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.skills-category h3 {
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  font-size: 1.5rem;
  display: inline-block;
  position: relative;
}

.skills-category h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-item {
  margin-bottom: 0.5rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.skill-name {
  font-weight: 500;
}

.skill-percent {
  color: var(--primary-color);
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background-color: var(--background-tertiary);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
  width: 0;
  transition: width 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

.skills-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 1200px;
  margin: 4rem auto 0;
  padding: 0 5%;
  justify-content: center;
}

.badge {
  background-color: var(--background-tertiary);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.badge:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* === About Section === */
.about {
  background-color: var(--background-secondary);
  position: relative;
  overflow: hidden;
}

.about-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  align-items: center;
}

.about-description {
  margin-bottom: 2rem;
}

.about-description p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-cta {
  display: flex;
  gap: 1rem;
}

.about-image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.experience-card {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 2rem;
  border-radius: 16px;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 300px;
}

.experience-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 8s linear infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.experience-number {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.experience-text {
  font-size: 1.25rem;
  font-weight: 500;
}

/* === Contact Section === */
.contact {
  position: relative;
}
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
  width: 100%;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-tertiary);
  border-radius: 12px;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  color: var(--primary-color);
}

.contact-details h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.contact-details p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-tertiary);
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.social-link svg {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  transition: color var(--transition-normal);
}

.social-link:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.social-link:hover svg {
  color: white;
}
.contact-form-container {
  background-color: var(--background-secondary);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  font-size: 0.9375rem;
}

.form-group input,
.form-group textarea {
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--background-primary);
  font-size: 1rem;
  transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* === Footer === */
footer {
  background-color: var(--background-tertiary);
  padding: 4rem 5% 1.5rem;
  margin-top: 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-logo p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  justify-content: space-between;
}

.footer-nav h3,
.footer-social h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  transition: color var(--transition-normal);
}

.footer-nav a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background-primary);
  border-radius: 50%;
  transition: all var(--transition-normal);
}

.social-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: color var(--transition-normal);
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

.social-icon:hover svg {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-tertiary);
  font-size: 0.875rem;
}

/* === Animation Classes === */
.animate-text {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.animate-in {
  opacity: 0;
  transform: translateX(50px);
  animation: fadeInRight 1s 0.5s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Intersection Observer Animations for scrolling */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === Responsive Styles === */
/* Extra large devices (large desktops) */
@media (max-width: 1400px) {
  .hero-content h1 {
    font-size: 3.2rem;
  }
  
  .section-header h2 {
    font-size: 2.2rem;
  }
}

/* Large devices (desktops) */
@media (max-width: 1200px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .hero {
    padding-top: 8rem;
  }
  
  section {
    padding: 4rem 0;
  }
}

/* Medium devices (tablets) */
@media (max-width: 992px) {
  html {
    font-size: 15px;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 8rem;
    padding-bottom: 3rem;
  }
  
  .hero-content {
    flex-basis: 100%;
    padding-right: 0;
    margin-bottom: 3rem;
  }
  
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-visual {
    flex-basis: 100%;
    justify-content: center;
  }
  
  .interactive-element {
    max-width: 400px;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-header.align-left {
    text-align: center;
  }
  
  .section-header.align-left h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-description {
    text-align: center;
  }
  
  .about-cta {
    justify-content: center;
  }
  
  .about-image {
    justify-content: center;
  }
  
  .skills-category h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .skills-category h3 {
    text-align: center;
    display: block;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .contact-info {
    text-align: center;
    align-items: center;
  }
  
  .contact-form {
    max-width: 600px;
    margin: 0 auto;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  
  .social-icons {
    justify-content: center;
  }
}

/* Small devices (landscape phones) */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  header {
    padding: 1rem 5%;
  }
  
  .logo h1 {
    font-size: 1.3rem;
  }
  
  .hamburger {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--background-primary);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    z-index: 1000;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.125rem;
  }
  
  .interactive-element {
    max-width: 300px;
  }
  
  .skills-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  section {
    padding: 3.5rem 0;
  }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .contact-info {
    align-items: center;
  }
  
  .social-links {
    margin-top: 1.5rem;
    justify-content: center;
  }
  
  .contact-form-container {
    padding: 1.5rem;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    font-size: 14px;
  }
  
  .contact-form .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .footer-nav, .footer-social {
    text-align: center;
  }
  
  .footer-nav ul {
    align-items: center;
  }
}

/* Extra small devices (phones) */
@media (max-width: 576px) {
  section {
    padding: 3rem 0;
  }
  
  .hero {
    padding-top: 7rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
  }
  
  .interactive-element {
    max-width: 250px;
  }
  
  .about-cta {
    flex-direction: column;
    width: 100%;
    gap: 1rem;
  }
  
  .about-cta .btn-primary,
  .about-cta .btn-secondary {
    width: 100%;
  }
  
  .project-links {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .project-img {
    height: 180px;
  }
  
  .skills-badges {
    gap: 0.5rem;
  }
  
  .badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .contact-form-container {
    padding: 1.25rem;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
  }
  
  .contact-item {
    margin-bottom: 0.75rem;
  }
  
  .form-group {
    gap: 0.375rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.75rem;
    font-size: 0.9rem;
  }
  
  .contact-form .btn-primary {
    padding: 0.75rem;
  }
  
  .social-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-bottom {
    margin-top: 1rem;
  }
}

/* Very small devices */
@media (max-width: 375px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .section-header h2 {
    font-size: 1.6rem;
  }
  
  .experience-number {
    font-size: 3rem;
  }
  
  .experience-text {
    font-size: 1rem;
  }
  
  .project-content {
    padding: 1.25rem;
  }
  
  .contact-content {
    gap: 2rem;
  }
  
  .contact-item {
    gap: 0.75rem;
  }
  
  .contact-details h3 {
    font-size: 1rem;
  }
  
  .contact-details p {
    font-size: 0.875rem;
  }
  
  .social-links {
    gap: 0.75rem;
  }
  
  .social-link {
    width: 36px;
    height: 36px;
  }
  
  .contact-form-container {
    padding: 1rem;
  }
  
  .contact-form {
    gap: 1.25rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.75rem;
  }
}

/* For extra small screens that need extreme adjustments */
@media (max-width: 320px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-content h1 {
    font-size: 1.6rem;
  }
  
  .interactive-element {
    max-width: 200px;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  
  .contact-form-container {
    padding: 0.875rem;
  }
  
  .contact-form {
    gap: 1rem;
  }
  
  .form-group {
    gap: 0.25rem;
  }
  
  .form-group label {
    font-size: 0.85rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.625rem;
    font-size: 0.85rem;
  }
  
  .contact-icon {
    width: 36px;
    height: 36px;
  }
  
  .contact-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .social-link {
    width: 32px;
    height: 32px;
  }
  
  .social-link svg {
    width: 16px;
    height: 16px;
  }
}

/* Ensure mobile nav menu doesn't cover content when open */
body.menu-open {
  overflow: hidden;
}

/* Fix for nav-links display issue in IE11 and older browsers */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  .nav-links {
    display: flex;
  }
}

/* Overlay for when mobile menu is active */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.active {
  display: block;
}

/* Additional touch device specific styles */
@media (hover: none) {
  .btn-primary:active, 
  .btn-secondary:active {
    transform: scale(0.98);
  }
  
  .project-card:active {
    transform: translateY(-5px);
  }
  
  .badge:active {
    transform: translateY(-2px);
  }
}

/* Print styles for better print rendering */
@media print {
  body {
    background-color: white;
    color: black;
  }
  
  .hero, .projects, .skills, .about, .contact {
    padding: 1rem 0;
    page-break-inside: avoid;
  }
  
  .header, .footer {
    display: none;
  }
  
  .project-card, .badge {
    box-shadow: none;
    border: 1px solid #eee;
  }
  
  .btn-primary, .btn-secondary {
    border: 1px solid #000;
    color: #000;
    background: none;
  }
}