@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* Typing animation */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary) }
}

.typing-text {
    font-size: clamp(2rem, 3vw, 2.8rem);
    color: var(--text-secondary);
    margin: 0 auto;
    border-right: 2px solid var(--primary);
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: 
        typing 2s steps(20, end) forwards,
        blink-caret .75s step-end infinite;
    position: relative;
    display: inline-block;
}

:root {
  --primary: #4F46E5;
  --secondary: #06B6D4;
  --accent: #F43F5E;
  --text-primary: #1F2937;
  --text-secondary: #4B5563;
  --bg-light: #F8FAFC;
  --bg-dark: #1E293B;
  --bg-gradient: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 50%, #FFF1F2 100%);
  --glass-bg: rgba(255,255,255,0.85);
  --glass-blur: blur(16px);
  --shadow: 0 8px 32px rgba(79,70,229,0.12);
  --radius: 2.5rem;
  --transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}

html {
    font-size: 62.5%;
  scroll-behavior: smooth;
}
body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg-gradient);
  animation: animated-bg 12s ease-in-out infinite alternate;
  min-height: 100vh;
  color: var(--text-primary);
  position: relative;
    overflow-x: hidden;
}
@keyframes animated-bg {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
body::before, body::after {
  content: '';
    position: fixed;
  z-index: 0;
  pointer-events: none;
}
body::before {
  top: -120px; left: -120px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.15) 0%, transparent 70%);
  filter: blur(8px);
  animation: blob-move 18s infinite alternate;
}
body::after {
  bottom: -120px; right: -120px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(244,63,94,0.12) 0%, transparent 70%);
  filter: blur(8px);
  animation: blob-move2 22s infinite alternate;
}
@keyframes blob-move {
  0% { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.1) translate(40px, 60px); }
}
@keyframes blob-move2 {
  0% { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.15) translate(-40px, -60px); }
}
.header {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(79,70,229,0.08);
  z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
  padding: 1.8rem 5%;
  transition: all 0.3s ease;
}
.logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: 1px;
}
.navbar {
  display: flex;
  gap: 3.5rem;
  align-items: center;
}
.navbar a {
  font-size: 1.6rem;
  color: var(--text-secondary);
    text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}
.navbar a:hover,
.navbar a.active {
  color: var(--primary);
}
.navbar a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 5px;
  transition: width 0.3s ease;
}
.navbar a:hover::after,
.navbar a.active::after {
  width: 100%;
}
.navbar a.active::before, .navbar a:hover::before {
  content: '';
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}
main {
  padding-top: 10rem;
}
.section {
  margin: 0 auto 6rem auto;
  max-width: 1000px;
  background: rgba(255,255,255,0.7);
  border-radius: 2.5rem;
  box-shadow: 0 8px 32px rgba(79,70,229,0.10);
  padding: 4rem 3rem 3rem 3rem;
  position: relative;
  overflow: visible;
  backdrop-filter: blur(12px);
  z-index: 1;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        opacity: 0;
  transform: translateY(30px);
    }
.section.visible {
        opacity: 1;
  transform: translateY(0);
}
.section:hover {
  box-shadow: 0 0 32px 8px #4F46E533, 0 16px 48px rgba(79,70,229,0.18);
  border: 1.5px solid #4F46E555;
}
.section-title, .section h2 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 2.2rem;
  letter-spacing: 1px;
  position: relative;
  padding-left: 2.2rem;
}
.section-title::before, .section h2::before {
  content: '';
  position: absolute;
  left: 0; top: 0.7rem;
  width: 1rem; height: 2.2rem;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 1rem;
}
/* SVG Wave Divider */
.section + .section::before {
  content: '';
  display: block;
  position: absolute;
  top: -40px; left: 0; width: 100%; height: 40px;
  background: url('data:image/svg+xml;utf8,<svg width="100%25" height="40" viewBox="0 0 100 40" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"><path d="M0,40 Q50,0 100,40 L100,0 L0,0 Z" fill="%23e0e7ff"/></svg>') no-repeat center/cover;
  z-index: 2;
}
.home {
  min-height: 100vh;
    display: flex;
    align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background: var(--bg-gradient);
}
.home-content {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 4rem 3rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 2.5rem;
  box-shadow: 0 8px 32px rgba(79,70,229,0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}
.home-content h1 {
  font-size: clamp(3.2rem, 5vw, 4.2rem);
    font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
.home-content h2 {
  font-size: clamp(2rem, 3vw, 2.8rem);
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  padding: 0.5rem 2rem;
  background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(6,182,212,0.1));
  border-radius: 2rem;
  animation: float 3s ease-in-out infinite;
}

.home-content h2::before {
  content: '';
    position: absolute;
    top: 0;
  left: 0;
  width: 100%;
    height: 100%;
  background: linear-gradient(90deg, 
    rgba(79,70,229,0.2),
    rgba(6,182,212,0.2)
  );
  border-radius: 2rem;
  z-index: -1;
    opacity: 0;
  animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.2;
  }
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
}

.home-content p {
  font-size: clamp(1.4rem, 2vw, 1.6rem);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 500px;
}
.home-buttons {
    display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.btn {
  padding: 1.2rem 2.5rem;
  font-size: clamp(1.4rem, 1.6vw, 1.6rem);
  font-weight: 600;
  border-radius: 5rem;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
  flex: 1;
  max-width: 200px;
}
.btn-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #06B6D4 100%);
  color: white;
}
.btn-secondary {
  background: linear-gradient(135deg, #06B6D4 0%, #4F46E5 100%);
  color: white;
}
.about-container {
  display: flex;
    align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.profile-img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 32px rgba(79,70,229,0.15);
  border: 5px solid #fff;
  background: #fff;
  transition: box-shadow 0.3s, transform 0.3s;
  animation: float 6s ease-in-out infinite;
}
.profile-img:hover {
  box-shadow: 0 16px 48px rgba(79,70,229,0.22);
  transform: scale(1.04);
}
.about-text h2, .skills h2, .projects h2, .contact h2, .education h2 {
  font-size: 2.8rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  padding-left: 2.2rem;
    position: relative;
}
.about-text h2::before, .skills h2::before, .projects h2::before, .contact h2::before, .education h2::before {
  content: '';
    position: absolute;
  left: 0; top: 0.7rem;
  width: 1rem; height: 2.2rem;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 1rem;
}
.about-text p {
  font-size: 1.7rem;
  color: #444;
}
.skills-list {
  margin-top: 2rem;
    display: flex;
  flex-direction: column;
  gap: 2rem;
}
.skill-item {
  display: flex;
    align-items: center;
  gap: 2rem;
  font-size: 1.5rem;
  font-weight: 600;
}
.skill-bar {
  flex: 1;
  height: 1.1rem;
  background: linear-gradient(90deg, 
    rgba(79,70,229,0.1),
    rgba(6,182,212,0.1)
  );
  backdrop-filter: blur(4px);
  border-radius: 1rem;
  overflow: hidden;
    position: relative;
  border: 1px solid rgba(255,255,255,0.2);
}
.skill-bar-fill {
    height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  box-shadow: 0 0 20px rgba(79,70,229,0.2);
  border-radius: 1rem;
        width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.projects-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  padding: 2rem 0;
}
.project-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: 0 8px 32px rgba(79,70,229,0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(79,70,229,0.1);
    position: relative;
    overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.project-card::before {
  content: '';
    position: absolute;
  top: 0;
    left: 0;
    width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(79,70,229,0.1),
    rgba(6,182,212,0.1)
  );
  opacity: 0;
  transition: opacity 0.4s ease;
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 48px rgba(79,70,229,0.15);
  border-color: rgba(79,70,229,0.3);
}
.project-card:hover::before {
  opacity: 1;
}
.project-card h3 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
    position: relative;
}
.project-card p {
  font-size: 1.6rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  flex-grow: 1;
}
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.project-gallery img {
    width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 1.2rem;
  border: 2px solid rgba(79,70,229,0.1);
  transition: all 0.3s ease;
  background: #fff;
}
.project-gallery img:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(79,70,229,0.2);
}
.contact form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}
.contact input, .contact textarea {
  padding: 1.2rem 1.5rem;
  border-radius: 1.2rem;
  border: 1.5px solid #e0e7ff;
  font-size: 1.5rem;
  background: #fff;
  transition: border 0.2s;
  resize: none;
}
.contact input:focus, .contact textarea:focus {
  border: 1.5px solid var(--primary);
  outline: none;
}
.contact form button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  padding: 1.5rem 4rem;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 5rem;
    cursor: pointer;
  transition: all 0.3s ease;
  width: auto;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(79,70,229,0.15);
}
.contact form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79,70,229,0.25);
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}
.contact form button:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(79,70,229,0.2);
}
footer {
  margin-top: 5rem;
  padding: 2rem 0 0 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: 2rem 2rem 0 0;
  font-size: 1.4rem;
  letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}
.footer-contact {
    display: flex;
    justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #fff;
  flex-wrap: wrap;
}
.footer-contact i {
  margin-right: 0.7rem;
  color: var(--bg-light);
}
.footer-contact a {
  color: white;
    font-weight: 600;
  font-size: 1.15em;
  text-decoration: none;
  transition: color 0.2s, text-decoration 0.2s;
}
.footer-contact a:hover {
  color: var(--bg-light);
  text-decoration: underline;
}
@media (max-width: 900px) {
  .about-container { flex-direction: column; align-items: flex-start; }
  .section { padding: 2.5rem 1.2rem; }
  .projects-list { flex-direction: column; }
}
@media (max-width: 600px) {
  .header { padding: 1.2rem 2%; }
  .logo { font-size: 2rem; }
  .navbar a { font-size: 1.2rem; margin: 0 0.7rem; }
  .section { padding: 1.2rem 0.5rem; }
  .profile-img { width: 110px; height: 110px; }
  .section-title, .section h2 { font-size: 2rem; padding-left: 1.2rem; }
  .about-text h2, .skills h2, .projects h2, .contact h2, .education h2 { font-size: 2rem; padding-left: 1.2rem; }
}

.social-bar {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 1rem;
}
.social-bar a {
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
    border-radius: 50%;
  background: white;
  color: var(--primary);
  font-size: 1.8rem;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(79,70,229,0.1);
}
.social-bar a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(79,70,229,0.2);
  background: var(--primary);
  color: white;
}
.scroll-indicator {
    position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-secondary);
  font-size: 1.2rem;
  opacity: 0.8;
}
@media (max-width: 768px) {
  .home {
    padding: 2rem 1.5rem;
  }

  .home-content {
    padding: 3rem 2rem;
  }

  .home-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
  }

  .btn {
    width: 100%;
    max-width: 250px;
  }

  .social-bar {
    gap: 1.5rem;
  }

  .social-bar a {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.6rem;
  }
}
@media (max-width: 480px) {
  .home {
    padding: 1.5rem 1rem;
  }

  .home-content {
    padding: 2.5rem 1.5rem;
  }

  .home-content h1 {
    font-size: clamp(2.8rem, 4vw, 3.2rem);
  }

  .home-content h2 {
    font-size: 2rem;
    padding: 0.3rem 1.5rem;
  }

  .home-content p {
    font-size: 1.4rem;
    padding: 0;
  }

  .social-bar {
    gap: 1.2rem;
  }

  .social-bar a {
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
  }

  .btn {
    padding: 1rem 2rem;
    font-size: 1.4rem;
  }
}

/* Landscape mode */
@media (max-height: 480px) and (orientation: landscape) {
  .home-content {
    padding: 2rem;
    gap: 1.5rem;
  }

  .home-buttons {
    flex-direction: row;
    margin-bottom: 1.5rem;
  }

  .scroll-indicator {
    display: none;
  }
}

.education {
  background: var(--glass-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem 2rem;
  margin: 4rem auto;
  max-width: 1000px;
  animation: fadeIn 1s;
}
.education-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  margin-top: 2rem;
}
.education-card {
  background: rgba(255,255,255,0.9);
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(79,70,229,0.10);
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-left: 6px solid var(--primary);
  border: 1px solid rgba(79,70,229,0.1);
  margin-bottom: 2.5rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.education-card:hover {
  box-shadow: 0 12px 36px rgba(79,70,229,0.15);
  transform: scale(1.02);
}
.edu-degree {
  font-size: 2.1rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 0.7rem;
}
.edu-inst {
  font-size: 1.4rem;
  color: #444;
  margin-bottom: 0.3rem;
}
.edu-year {
  font-size: 1.5rem;
  color: var(--accent);
    font-weight: 600;
  margin-bottom: 0.5rem;
}
.edu-desc {
  font-size: 1.5rem;
  color: #222;
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.project-links {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
    padding: 1rem 0;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.4rem;
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.demo-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(79,70,229,0.2);
}

.demo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.3);
    background: #4338CA;
}

.demo-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(79,70,229,0.2);
}

.github-btn {
    background: #24292E;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.github-btn:hover {
    background: #1B1F23;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.github-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Make sure buttons are clickable in project cards */
.project-card {
    position: relative;
    z-index: 1;
}

.project-card .project-links {
    position: relative;
    z-index: 2;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    margin: 2rem auto;
    padding: 2rem;
    width: 90%;
    max-width: 1000px;
    background: transparent;
}

.close-modal {
    position: fixed;
    top: 2rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

#modalImages {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

#modalImages img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

#modalImages img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .close-modal {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
        width: 3.5rem;
        height: 3.5rem;
    }

    #modalImages {
        gap: 1.5rem;
    }
}

/* Update the animation reset in JavaScript */
.home-content h2.reset-animation {
  animation: none;
  width: 0;
    opacity: 0;
}

.home-content h2.start-animation {
  animation: typing 3.5s steps(20, end) forwards,
             blink-caret 0.85s step-end infinite;
  animation-delay: 0.8s;
}

/* Add max-width to prevent text overflow */
.home-content h2 {
  max-width: 320px; /* Adjust based on text length */
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .home-content h2 {
    font-size: 2.4rem;
    padding: 0.4rem 1.8rem;
  }
}

@media (max-width: 480px) {
  .home-content h2 {
    font-size: 2rem;
    padding: 0.3rem 1.5rem;
  }
}

#menu-icon {
  font-size: 3.6rem;
  color: var(--text-color);
  display: none;
    cursor: pointer;
  margin-left: auto;
  z-index: 100;
}

@media (max-width: 991px) {
  .header {
    padding: 2rem 3%;
  }

  #menu-icon {
    display: block;
  }

  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 270px;
    height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: 0.3s ease;
    box-shadow: -5px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 99;
  }

  .navbar.active {
    right: 0;
  }

  .navbar a {
    display: block;
    margin: 1.5rem 0;
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  .header {
    padding: 1.5rem 4%;
  }

  #menu-icon {
    font-size: 3.2rem;
    margin-right: 1rem;
  }

  .home {
    padding: 0 4%;
  }

  .home-content h3 {
    font-size: 2.6rem;
  }

  .home-content h1 {
    font-size: 5rem;
  }

  .home-content p {
    font-size: 1.6rem;
}

  .about {
    padding: 5rem 4% 2rem;
  }

  .services {
    padding: 5rem 4% 2rem;
  }

  .portfolio {
    padding: 5rem 4% 2rem;
  }

  .contact {
    padding: 5rem 4% 2rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 50%;
  }

  .header {
    padding: 1rem 3%;
  }

  #menu-icon {
    font-size: 3rem;
    margin-right: 0.5rem;
  }

  .home-content h1 {
    font-size: 4rem;
  }

  .home-content h3 {
    font-size: 2.2rem;
  }

  .home-content p {
    font-size: 1.5rem;
  }

  .home-img img {
    width: 90%;
    margin-top: 2rem;
  }

  .about-img img {
    width: 90%;
  }

  .services h2,
  .portfolio h2 {
    margin-bottom: 3rem;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
  }

  .contact form .input-box input {
        width: 100%;
  }
}

/* Ensure content doesn't overflow on very small screens */
@media (max-width: 350px) {
  .header {
    padding: 1rem 2%;
  }

  .home-content h1 {
    font-size: 3.5rem;
  }

  .navbar {
    width: 100%;
  }

  .portfolio-box {
    padding: 1rem;
  }
}

/* Mobile Menu Styles */
.menu-icon {
  display: none;
  font-size: 2.4rem;
  cursor: pointer;
  color: var(--primary);
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 10px rgba(79,70,229,0.15);
        justify-content: center;
        align-items: center;
  transition: 0.3s;
  z-index: 1001;
}

.menu-icon:hover {
  background: var(--primary);
  color: white;
}

/* Navbar Styles */
.navbar {
  display: flex;
  gap: 3.5rem;
  align-items: center;
}

.navbar a {
  font-size: 1.6rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
  position: relative;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .header {
    padding: 1.5rem 4%;
  }
  
  .menu-icon {
    display: flex;
  }
  
  .navbar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
        flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    transition: 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 8rem 4rem;
  }
  
  .navbar.active {
    right: 0;
  }
  
  .navbar a {
    font-size: 1.8rem;
    opacity: 0;
    transform: translateX(50px);
    transition: 0.3s ease;
    width: 100%;
    text-align: center;
    padding: 1rem 0;
  }
  
  .navbar.active a {
    opacity: 1;
    transform: translateX(0);
  }
  
  /* Staggered animation for nav items */
  .navbar a:nth-child(1) { transition-delay: 0.1s; }
  .navbar a:nth-child(2) { transition-delay: 0.2s; }
  .navbar a:nth-child(3) { transition-delay: 0.3s; }
  .navbar a:nth-child(4) { transition-delay: 0.4s; }
  .navbar a:nth-child(5) { transition-delay: 0.5s; }
  .navbar a:nth-child(6) { transition-delay: 0.6s; }
  
  /* Menu overlay */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
        width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .menu-overlay.active {
    display: block;
    opacity: 1;
  }
}

@media (max-width: 480px) {
  .navbar {
    width: 85%;
    padding: 6rem 2rem;
  }
  
  .navbar a {
    font-size: 1.6rem;
    padding: 0.8rem 0;
  }
  
  .menu-icon {
    width: 3.6rem;
    height: 3.6rem;
    font-size: 2rem;
  }
}

/* Fix for landscape mode */
@media (max-height: 480px) and (orientation: landscape) {
  .navbar {
    padding: 4rem 2rem;
    justify-content: flex-start;
    overflow-y: auto;
  }
  
  .navbar a {
    font-size: 1.6rem;
    padding: 0.6rem 0;
  }
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.tech-badge {
    padding: 0.5rem 1.2rem;
    font-size: 1.3rem;
    border-radius: 2rem;
    background: rgba(79,70,229,0.08);
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(79,70,229,0.1);
    box-shadow: 0 2px 4px rgba(79,70,229,0.05);
}

.tech-badge:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79,70,229,0.2);
}

/* Responsive adjustments for tech badges */
@media (max-width: 480px) {
    .tech-stack {
        gap: 0.6rem;
    }
    
    .tech-badge {
        padding: 0.4rem 1rem;
        font-size: 1.2rem;
    }
} 