
:root {
  /* Light Mode Colors */
  --primary: #5b21b6;
  --primary-light: #7c3aed;
  --secondary: #2563eb;
  --accent: #f59e42;
  --success: #059669;
  
  --bg-light: #ffffff;
  --bg-light-secondary: #f8fafc;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --border-light: #e5e7eb;
  
  /* Dark Mode Colors */
  --bg-dark: #0f172a;
  --bg-dark-secondary: #1e293b;
  --text-light-on-dark: #f1f5f9;
  --text-muted-dark: #cbd5e1;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  /* 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);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: var(--bg-dark);
  color: var(--text-light-on-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
  background: linear-gradient(135deg, #5b21b6 0%, #2563eb 100%);
  color: white;
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.header.scroll-down {
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-sm) 0;
}

body.dark-mode .header {
  background: linear-gradient(135deg, #4c1d95 0%, #1e40af 100%);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-lg);
}

.logo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 0.75rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: var(--transition-fast);
  padding-bottom: 0.25rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: white;
  font-size: 1.5rem;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding: var(--spacing-xl) 0;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

body.dark-mode .section {
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

body.dark-mode .section-title p {
  color: var(--text-muted-dark);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-content {
  max-width: 800px;
  margin: 0 auto var(--spacing-xl);
}

.intro-text {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
  color: var(--text-light);
}

body.dark-mode .intro-text {
  color: var(--text-muted-dark);
}

.highlight {
  font-weight: 600;
  color: var(--primary);
}

.color-clean { color: var(--secondary); }
.color-functional { color: var(--success); }
.color-interactive { color: var(--accent); }

body.dark-mode .highlight {
  color: var(--primary-light);
}

/* Education Section */
.education-section {
  margin-bottom: var(--spacing-xl);
}

.education-section h3,
.certifications-section h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-lg);
  color: var(--text-dark);
}

body.dark-mode .education-section h3,
body.dark-mode .certifications-section h3 {
  color: var(--text-light-on-dark);
}

.education-grid,
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-lg);
}

.education-card {
  background: linear-gradient(135deg, #ede9fe 0%, #f0f9ff 100%);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary);
  transition: var(--transition);
  display: flex;
  gap: var(--spacing-md);
}

body.dark-mode .education-card {
  background: linear-gradient(135deg, #3e2723 0%, #1a237e 100%);
  border-left-color: var(--primary-light);
}

.education-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.edu-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.edu-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

body.dark-mode .edu-content h4 {
  color: var(--text-light-on-dark);
}

.degree {
  color: var(--primary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.year {
  color: var(--text-light);
  font-size: 0.9rem;
}

body.dark-mode .year {
  color: var(--text-muted-dark);
}

/* Certifications Section */
.certifications-section {
  margin-top: var(--spacing-xl);
}

.cert-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cert-card {
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  display: flex;
  gap: var(--spacing-md);
  align-items: flex-start;
  transition: var(--transition);
  border: 2px solid transparent;
}

.cert-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.cert-1 { background: linear-gradient(135deg, #fef9c3, #fef3c7); }
.cert-2 { background: linear-gradient(135deg, #e0f2fe, #cffafe); }
.cert-3 { background: linear-gradient(135deg, #f3e8ff, #ede9fe); }
.cert-4 { background: linear-gradient(135deg, #dcfce7, #d1fae5); }
.cert-5 { background: linear-gradient(135deg, #fee2e2, #fecaca); }

body.dark-mode .cert-card {
  background: rgba(148, 163, 184, 0.1);
}

.cert-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.cert-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

body.dark-mode .cert-card h4 {
  color: var(--text-light-on-dark);
}

.cert-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

body.dark-mode .cert-card p {
  color: var(--text-muted-dark);
}

/* ============================================
   SKILLS SECTION
   ============================================ */

.skills-section {
  background: var(--bg-light-secondary);
}

body.dark-mode .skills-section {
  background: var(--bg-dark-secondary);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.skill-card {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  text-align: center;
  border-top: 4px solid var(--primary);
}

body.dark-mode .skill-card {
  background: var(--bg-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.skill-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-top-color: var(--secondary);
}

.skill-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  display: block;
}

.skill-card h3 {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

body.dark-mode .skill-card h3 {
  color: var(--text-light-on-dark);
}

.skill-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

body.dark-mode .skill-card p {
  color: var(--text-muted-dark);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-lg);
}

.project-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
}

body.dark-mode .project-card {
  background: var(--bg-dark-secondary);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  gap: var(--spacing-md);
}

.project-header h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
}

body.dark-mode .project-header h3 {
  color: var(--text-light-on-dark);
}

.project-tag {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.project-desc {
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

body.dark-mode .project-desc {
  color: var(--text-muted-dark);
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: var(--spacing-md);
}

.tech {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 500;
}

.features-list {
  list-style: none;
  margin: var(--spacing-md) 0;
  flex-grow: 1;
}

.features-list li {
  padding: 0.5rem 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

body.dark-mode .features-list li {
  color: var(--text-muted-dark);
}

.project-link {
  display: inline-block;
  margin-top: auto;
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.project-link:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-section {
  background: var(--bg-light-secondary);
}

body.dark-mode .contact-section {
  background: var(--bg-dark-secondary);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: start;
}

.contact-form {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

body.dark-mode .contact-form {
  background: var(--bg-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.form-group {
  margin-bottom: var(--spacing-md);
  display: flex;
  flex-direction: column;
}

.form-input {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: white;
  color: var(--text-dark);
}

body.dark-mode .form-input {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-light-on-dark);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

body.dark-mode .form-input:focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.error-message {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.error-message.show {
  display: block;
}

.form-input.error {
  border-color: #dc2626;
}

.submit-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: var(--spacing-sm);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(79, 70, 229, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.form-message {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-top: var(--spacing-md);
  display: none;
  font-weight: 500;
}

.form-message.show {
  display: block;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #059669;
}

body.dark-mode .form-message.success {
  background: rgba(5, 150, 105, 0.2);
  color: #6ee7b7;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #dc2626;
}

body.dark-mode .form-message.error {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
}

.contact-info {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

body.dark-mode .contact-info {
  background: var(--bg-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.contact-info h3 {
  margin-bottom: var(--spacing-lg);
  color: var(--text-dark);
}

body.dark-mode .contact-info h3 {
  color: var(--text-light-on-dark);
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
  margin: 8px 0;
}

.social-link:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-lg);
   background: #4f46e5;
  color: white;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: linear-gradient(135deg, #5b21b6 0%, #2563eb 100%);
  color: white;
  padding: var(--spacing-lg) 0;
  text-align: center;
}

body.dark-mode .footer {
  background: linear-gradient(135deg, #4c1d95 0%, #1e40af 100%);
}

.footer-content p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.project-card {
  animation: slideInLeft 0.4s ease-out;
}

.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.2s; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: center;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: var(--spacing-md);
    font-size: 0.9rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .education-grid,
  .cert-grid,
  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .intro-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.3rem;
  }

  .nav {
    flex-direction: column;
    gap: var(--spacing-sm);
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .section-title h2 {
    font-size: 1.5rem;
  }

  .project-card {
    padding: var(--spacing-md);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ============================================
   MOBILE FIX 
   ============================================ */

@media (max-width: 768px) {

  /* Full width fix (MAIN PROBLEM) */
  .container {
    width: 100%;
    padding: 0 15px;
  }

  /* Header alignment fix */
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  /* Nav fix */
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  /* Toggle button spacing */
  .theme-toggle {
    margin-top: 15px;
  }

  /* Section spacing */
  .section {
    padding: 50px 15px;
  }
}
/* ============================================
   FINAL MOBILE MENU ONLY FIX 🔥 (NO CHANGE)
   ============================================ */

@media (max-width: 768px) {

  /* Show toggle button */
  .menu-btn {
    display: block !important;
    position: fixed !important;
    top: 15px;
    left: 15px;
    z-index: 9999;
  }

  /* Force menu layout */
  #mobileMenu {
    position: fixed !important;
    top: 0 !important;
    left: -100% !important;

    width: 80% !important;
    height: 100vh !important;

    background: linear-gradient(135deg, #5b21b6, #2563eb) !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;

    gap: 25px !important;
    transition: left 0.3s ease !important;

    z-index: 9998 !important;
  }

  /* Open menu */
  #mobileMenu.active {
    left: 0 !important;
  }

  /* Make text visible */
  #mobileMenu a {
    color: white !important;
    font-size: 22px !important;
    display: block !important;
  }
}
/* ============================================
   TOGGLE BUTTON FIX 🔥
   ============================================ */

/* Default (desktop) */
.menu-btn {
  display: none;
}

/* Mobile la mattum show */
@media (max-width: 768px) {

  .menu-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    z-index: 2000;
  }

  /* Hide normal nav in mobile */
  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100vh;
    background: linear-gradient(135deg, #5b21b6, #2563eb);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    transition: 0.3s;
  }

  /* Show menu when active */
  .nav.active {
    left: 0;
  }
}
/* ============================================
   FINAL FORCE FIX 🔥
   ============================================ */

@media (max-width: 768px) {

  #mobileMenu {
    position: fixed;
    top: 0;
    left: -100%;

    width: 80%;
    height: 100vh;

    background: #5b21b6;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 25px;

    z-index: 9999;   /* 🔥 MAIN FIX */
    transition: 0.3s;
  }

  #mobileMenu.active {
    left: 0;
  }

  #mobileMenu a {
    color: white;
    font-size: 22px;
  }

  .menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 10000;  /* above everything */
  }
}
