/* CSS Custom Properties for Dynamic Theming */
:root {
  --primary-color: #3B82F6;
  --secondary-color: #8B5CF6;
  --accent-color: #F59E0B;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.8);
  --border-color: rgba(148, 163, 184, 0.2);
  --shadow-light: rgba(59, 130, 246, 0.1);
  --shadow-medium: rgba(0, 0, 0, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-accent: linear-gradient(135deg, var(--accent-color), #EF4444);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-card: rgba(30, 41, 59, 0.9);
}

/* Light Theme Variables */
[data-theme="light"] {
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-card: rgba(255, 255, 255, 0.9);
  --border-color: rgba(30, 41, 59, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  scroll-behavior: smooth;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Loading Animation */
body.loading {
  overflow: hidden;
}

body.loading::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.loading::after {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10000;
}

@keyframes spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Hero Section */
header.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  z-index: 2;
  position: relative;
  width: 100%;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

header.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../assets/images/backgroundportup.png') center/cover;
  opacity: 0.1;
  z-index: -1;
}

.intro-animate {
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.role-prefix {
  color: var(--accent-color);
  font-weight: 400;
  font-size: 0.8em;
}

.typewriter-text {
  color: var(--primary-color);
  font-weight: 700;
  position: relative;
}

.typewriter-text::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--accent-color);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Enhanced Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 20px var(--shadow-medium);
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  display: block;
}

.nav-links li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary-color);
  background: rgba(59, 130, 246, 0.1);
}

.nav-links li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-links li a:hover::before,
.nav-links li a.active::before {
  width: 80%;
}

/* Hide close button on desktop */
.close-menu {
  display: none;
}

@media (min-width: 769px) {
  .close-menu {
    display: none !important;
  }
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: scale(1.1);
}

/* Simple Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* Dropdown Mobile Navigation */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 0.5rem 0.5rem;
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s;
  }

  .nav-links li a:hover {
    background: #f3f4f6;
  }

  .close-menu {
    display: none;
  }
}



/* Section Styling */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  scroll-margin-top: 100px; /* Account for fixed navbar */
  position: relative;
}

/* Add visual indicator for active section */
.section.active {
  animation: sectionHighlight 0.5s ease;
}

@keyframes sectionHighlight {
  0% {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.01);
  }
  100% {
    background: transparent;
    transform: scale(1);
  }
}

.section h2 {
  text-align: center;
  margin-bottom: 3rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 2rem auto;
  max-width: 800px;
  text-align: center;
}

/* Profile Images */
.profile-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.profile-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary-color);
  box-shadow: 0 10px 30px var(--shadow-light);
  transition: all 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

/* About Content */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}




.menu a {
  text-decoration: none;
  color: #333;
  padding: 8px 0;
}


    @keyframes navFadeSlide {
      from { opacity: 0; transform: translateY(-50px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    @keyframes itemReveal {
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }


.intro-animate {
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #00ffc3;
  width: 0;
  animation: typing 5s steps(50, end) infinite, blink 0.75s step-end infinite;
  font-size: 2rem;
  color: #dba203;
}

@keyframes typing {
  0% { width: 0; }
  40% { width: 100%; }
  75% { width: 100%; }
  100% { width: 0; }
}

@keyframes blink {
  0%, 100% {
    border-color: transparent;
  }
  50% {
    border-color: #00ffc3;
  }
}



.section {
  padding: 60px 20px;
  text-align: center;
  animation: fadeIn 1.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced Skills Section */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.skill-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.skill-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--shadow-light);
  border-color: var(--primary-color);
}

.skill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.skill-header i {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
}

.skill-percentage {
  font-weight: 700;
  color: var(--primary-color);
}

.skill-bar-container {
  background: var(--bg-secondary);
  border-radius: 1rem;
  overflow: hidden;
  height: 8px;
}

.skill-bar {
  height: 100%;
  border-radius: 1rem;
  transition: width 2s ease-in-out;
  position: relative;
  background: var(--skill-color, var(--primary-color));
}

.skill-progress {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    var(--skill-color, var(--primary-color)) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    var(--skill-color, var(--primary-color)) 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Legacy skill bars for backward compatibility */
.skill-bar.html,
.skill-bar.css,
.skill-bar.js {
  background: var(--primary-color);
  color: var(--bg-primary);
  padding: 1rem;
  margin: 0.5rem 0;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  padding: 20px;
  margin: 20px auto;
  border-radius: 10px;
  width: 80%;
  transition: transform 0.3s ease;
}
.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #FACC15;
}

/* Enhanced Form Styling */
form {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

form input,
form textarea {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Form Validation Styles */
form input.error,
form textarea.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

/* Enhanced Submit Button */
.submit-btn {
  background: var(--gradient-primary);
  padding: 1rem 2rem;
  border: none;
  color: white;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.submit-btn.loading {
  pointer-events: none;
}

.submit-btn i {
  font-size: 1rem;
}

/* Screen Reader Only Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Form Note */
.form-note {
  text-align: center;
  margin-top: 1rem;
  color: var(--text-secondary);
}

.form-note small {
  font-size: 0.875rem;
}

/* Contact Content Layout */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

/* Social Section */
.social-section {
  margin-top: 3rem;
  text-align: center;
}

.social-section h3 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

/* Enhanced Contact Info in Footer */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.contact-info i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.contact-info a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-color);
}

/* Footer Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* Contact Fallback */
.contact-fallback {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.contact-fallback p {
  color: var(--text-secondary);
  margin: 0;
}

.email-fallback {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.email-fallback:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Contact Alternatives */
.contact-alternatives {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  text-align: center;
}

.contact-alternatives h4 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.contact-method {
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  justify-content: center;
}

.email-btn {
  background: var(--primary-color);
  color: white;
}

.email-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.whatsapp-btn {
  background: #25D366;
  color: white;
}

.whatsapp-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

.copy-btn {
  background: var(--accent-color);
  color: white;
}

.copy-btn:hover {
  background: #D97706;
  transform: translateY(-2px);
}

.contact-method small {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Responsive contact methods */
@media (max-width: 640px) {
  .contact-alternatives {
    padding: 1rem;
  }

  .contact-btn {
    min-width: 100%;
    padding: 1rem;
  }
}

form input::placeholder,
form textarea::placeholder {
  color: var(--text-secondary);
}

form textarea {
  min-height: 120px;
  resize: vertical;
}

button {
  background: var(--gradient-primary);
  padding: 1rem 2rem;
  border: none;
  color: white;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

button:active {
  transform: translateY(0);
}

button.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Enhanced Project Cards */
.projects-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Mobile-First Improvements */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Touch-Friendly Interactions */
@media (hover: none) and (pointer: coarse) {
  /* Mobile touch devices */
  .project-card:hover {
    transform: none;
  }

  .project-card:active {
    transform: translateY(-5px);
    transition: transform 0.1s ease;
  }

  .nav-links li a:hover {
    background: rgba(59, 130, 246, 0.1);
  }

  .social-icons a:hover {
    transform: none;
  }

  .social-icons a:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  .project-btn:hover {
    transform: none;
  }

  .project-btn:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

/* Improved Mobile Typography */
@media (max-width: 768px) {
  /* Better text readability on mobile */
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  p {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Larger touch targets */
  button,
  .project-btn,
  .contact-btn,
  .nav-links a {
    min-height: 44px;
    min-width: 44px;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--primary-color);
}

.project-image-container {
  position: relative;
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.tech-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.project-content {
  padding: 1.5rem;
}

.project-card h3 {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.project-card p {
  color: var(--text-secondary);
  margin: 0.5rem 0 1rem 0;
  line-height: 1.6;
}

.project-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.feature-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-color);
}

.project-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0.5rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.project-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

.project-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.project-btn.info {
  background: var(--accent-color);
}

/* Certification Card */
.certification-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  max-width: 500px;
  margin: 2rem auto;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.certification-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px var(--shadow-light);
}

.certification-card img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.cert-info {
  margin: 1rem 0;
}

.cert-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.cert-info p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.cert-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.skill-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.card-button {
  background: var(--gradient-primary);
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 2rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.card-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.link-button {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

/* Social Icons */
.social-icons {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  color: var(--primary-color);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Notification System */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  box-shadow: 0 10px 30px var(--shadow-medium);
  backdrop-filter: blur(10px);
  z-index: 10000;
  animation: slideInRight 0.3s ease;
  max-width: 400px;
}

.notification-success {
  border-left: 4px solid #10B981;
}

.notification-error {
  border-left: 4px solid #EF4444;
}

.notification-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.notification.fade-out {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Project Modal */
.project-overlay-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.project-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin: 2rem;
  animation: scaleIn 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: var(--primary-color);
  color: white;
}

.project-modal-body {
  padding: 2rem;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Footer Styling */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 2rem 1rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--primary-color);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* ========== RESPONSIVE DESIGN ========== */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .skills {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .navbar {
    padding: 1rem 1.5rem;
  }

  .hero {
    padding: 1.5rem;
    min-height: 90vh;
  }

  .intro-animate {
    font-size: clamp(2rem, 4vw, 3rem);
  }
}

/* Tablets */
@media (max-width: 768px) {
  /* Navigation */
  .navbar {
    padding: 1rem;
  }

  /* Enhanced Hero Section for Tablets */
  .hero {
    min-height: 100vh;
    padding: 1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
  }

  .intro-animate {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .role-prefix {
    font-size: 0.9em;
    display: inline-block;
    margin-top: 0.5rem;
  }

  .typewriter-text {
    font-size: 0.9em;
    display: inline-block;
  }

  /* Sections */
  .section {
    padding: 4rem 1.5rem;
  }

  .section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  /* About Section */
  .profile-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
  }

  .profile-img {
    width: 150px;
    height: 150px;
    margin: 0.5rem;
  }

  .about-text {
    font-size: 1.1rem;
    max-width: 100%;
    padding: 0 1rem;
  }

  /* Skills Section */
  .skills {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skill-item {
    padding: 1rem;
  }

  /* Projects */
  .gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    margin: 0 auto;
    max-width: 400px;
  }

  .project-tech {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .tech-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .project-features {
    gap: 0.25rem;
  }

  .feature-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }

  .project-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .project-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
  }

  /* Contact Form */
  form {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .contact-alternatives {
    margin: 1rem;
    padding: 1.5rem;
  }

  /* Footer */
  .footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  /* Typography */
  h1 { font-size: clamp(1.8rem, 6vw, 2.2rem); }
  h2 { font-size: clamp(1.6rem, 5vw, 2rem); }
  h3 { font-size: clamp(1.3rem, 4vw, 1.6rem); }

  /* Navigation */
  .navbar {
    padding: 0.75rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .nav-links {
    padding: 1.5rem;
    gap: 0.5rem;
  }

  .nav-links li a {
    padding: 1rem;
    font-size: 1.1rem;
  }

  /* Enhanced Hero Section for Mobile Phones */
  .hero {
    min-height: 100vh;
    padding: 1rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
    padding: 0 0.5rem;
  }

  .intro-animate {
    font-size: clamp(1.5rem, 7vw, 2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Better mobile text handling */
  .intro-animate br {
    display: block;
    margin: 0.25rem 0;
  }

  .role-prefix {
    font-size: 0.8em;
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .typewriter-text {
    font-size: 0.85em;
    display: inline-block;
    min-height: 1.5em;
  }

  /* Sections */
  .section {
    padding: 3rem 1rem;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section-title {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    margin-bottom: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
  }

  /* About Section */
  .profile-gallery {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .profile-img {
    width: 120px;
    height: 120px;
    margin: 0.25rem;
  }

  .about-text {
    font-size: 1rem;
    line-height: 1.6;
    padding: 0 0.5rem;
    text-align: center;
  }

  /* Skills Section */
  .skills {
    gap: 0.75rem;
  }

  .skill-item {
    padding: 0.75rem;
  }

  .skill-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .skill-header i {
    font-size: 1.2rem;
  }

  .skill-name {
    font-size: 0.9rem;
  }

  .skill-percentage {
    font-size: 0.9rem;
  }

  /* Certifications */
  .certification-card {
    margin: 1rem;
    padding: 1rem;
  }

  .cert-skills {
    gap: 0.25rem;
  }

  .skill-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }

  /* Projects */
  .project-card {
    max-width: 100%;
    margin: 0;
  }

  .project-content {
    padding: 1rem;
  }

  .project-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .project-card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .project-tech {
    justify-content: center;
    gap: 0.2rem;
  }

  .tech-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .project-features {
    justify-content: center;
    gap: 0.2rem;
  }

  .feature-tag {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }

  .project-actions {
    gap: 0.5rem;
  }

  .project-btn {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  /* Contact Form */
  form {
    padding: 1rem;
    margin: 0 0.5rem;
  }

  form input,
  form textarea {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .submit-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    max-width: 100%;
  }

  .contact-alternatives {
    margin: 0.5rem;
    padding: 1rem;
  }

  .contact-alternatives h4 {
    font-size: 1.1rem;
  }

  .contact-btn {
    min-width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Social Icons */
  .social-icons {
    gap: 0.75rem;
  }

  .social-icons a {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  /* Footer */
  .footer {
    padding: 1.5rem 0.75rem 1rem;
  }

  .footer-container {
    gap: 1.5rem;
  }

  .footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .contact-info {
    gap: 0.5rem;
  }

  .contact-info p {
    font-size: 0.9rem;
  }

  .footer-social {
    gap: 0.75rem;
  }

  .footer-social a {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }

  .footer-bottom {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  /* Notifications */
  .notification {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Modals */
  .project-modal-content {
    margin: 0.5rem;
    max-height: 95vh;
  }

  .project-modal-body {
    padding: 1rem;
  }

  .close-modal {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
}

/* Extra Small Phones */
@media (max-width: 360px) {
  .intro-animate {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
  }

  .section {
    padding: 2rem 0.75rem;
  }

  .profile-img {
    width: 100px;
    height: 100px;
  }

  .project-card {
    margin: 0 0.25rem;
  }

  .contact-btn {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  .social-icons a {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

.social-icons a:hover {
  color: #FACC15;
  transform: scale(1.2);
}

.profile-img {
      position: relative;
      width: 200px;
      height: 200px;
      border-radius: 50%;
      overflow: hidden;
      box-shadow: 0 0 15px rgba(0, 255, 200, 0.6);
      animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
      0% {
        box-shadow: 0 0 10px rgba(0, 255, 200, 0.3), 0 0 20px rgba(0, 255, 200, 0.2);
      }
      50% {
        box-shadow: 0 0 25px rgba(0, 255, 200, 0.5), 0 0 35px rgba(0, 255, 200, 0.3);
      }
      100% {
        box-shadow: 0 0 10px rgba(0, 255, 200, 0.3), 0 0 20px rgba(0, 255, 200, 0.2);
      }
    }

@keyframes fadeFloat {
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}



.footer {
  background: #1E293B;
  color: #F1F5F9;
  padding: 40px 20px;
  text-align: center;
}
.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
}
.footer-section {
  flex: 1 1 250px;
  margin: 20px;
}
.footer-section h3 {
  color: #FACC15;
  margin-bottom: 10px;
}
.footer-section ul {
  list-style: none;
  padding: 0;
}
.footer-section ul li {
  margin: 5px 0;
}
.footer-section a {
  color: #38BDF8;
  text-decoration: none;
}
.footer-section a:hover {
  color: #FACC15;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}
.footer-social a {
  color: #38BDF8;
  font-size: 1.5rem;
  transition: transform 0.3s, color 0.3s;
}
.footer-social a:hover {
  color: #FACC15;
  transform: scale(1.2);
}

.footer-bottom {
  margin-top: 30px;
  font-size: 0.9rem;
  border-top: 1px solid #334155;
  padding-top: 15px;
}

.certification-card {
  width: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  background-color: #fff;
  text-align: center;
  margin: 20px;
}

.certification-card img {
  width: 100%;
  height: auto;
  display: block;
}

.card-button {
  background-color: #0078D7;
  color: white;
  border: none;
  padding: 12px 20px;
  margin: 15px 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

.card-button:hover {
  background-color: #005fa3;
}

.link-button {
  text-decoration: none;
  color: white;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px;
}

.project-card {
  background: #1E293B;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #F1F5F9;
  text-align: center;
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #334155;
  transition: transform 0.4s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(250, 204, 21, 0.2);
}

.project-card img:hover {
  transform: scale(1.05);
}

.project-card h3 {
  color: #FACC15;
  margin: 15px 10px 5px;
}

.project-card p {
  padding: 0 15px 20px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.project-btn {
  background: linear-gradient(45deg, #38BDF8, #FACC15);
  text-decoration-line: none;
  padding: 10px;
  border-radius: 15px;
  font-weight: bold;
  transition: background 0.3s;
}

.project-btn:hover {
  background: linear-gradient(45deg, #FACC15, #38BDF8);
}

#project-btn {
  padding-bottom: 25px;
}

h2 {
  text-align: center;
}




/* Hide the icon on laptop and larger screens (min-width: 1024px) */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #444;
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 10px;
    border-radius: 5px;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* ========== MOBILE-SPECIFIC OPTIMIZATIONS ========== */

/* Prevent horizontal scroll on mobile */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Smooth scrolling for mobile */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Mobile-friendly focus states */
@media (max-width: 768px) {
  *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
  }

  /* Larger tap targets for mobile */
  .hamburger {
    padding: 1rem;
    margin: -0.5rem;
  }

  .theme-toggle {
    padding: 0.75rem;
    margin-left: 0.5rem;
  }

  /* Mobile-optimized animations */
  .animate-on-scroll {
    transform: translateY(20px);
  }

  .animate-on-scroll.animate-in {
    transform: translateY(0);
  }

  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }

    .typewriter-text::after {
      animation: none;
    }

    .intro-animate {
      animation: none;
    }
  }
}

/* Mobile landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
    padding: 1rem;
  }

  .intro-animate {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
  }

  .section {
    padding: 2rem 1rem;
  }
}

/* High DPI displays (Retina) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .profile-img,
  .project-card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Dark mode improvements for mobile */
@media (max-width: 768px) {
  [data-theme="dark"] {
    --shadow-light: rgba(59, 130, 246, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.3);
  }

  [data-theme="light"] {
    --shadow-light: rgba(59, 130, 246, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.1);
  }
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  /* Reduce expensive effects on mobile */
  .project-card,
  .skill-item,
  .certification-card {
    will-change: transform;
    backface-visibility: hidden;
  }

  /* Optimize background attachments */
  header.hero::before {
    background-attachment: scroll;
  }

  /* Reduce blur effects on mobile for better performance */
  .navbar {
    backdrop-filter: blur(5px);
  }

  .notification,
  form,
  .contact-alternatives {
    backdrop-filter: blur(5px);
  }
}
