/* Light Theme Variables */
:root {
  --primary-color: #2A4F6E;       
  --secondary-color: #9BB1C8;      
  --background-dark: #ebdada;     
  --card-background: #fefcf9;      
  --text-light: #1A2B3C;           
  --text-muted: #5C738A;           
  --border-color: #E1E7EF;         
}

/*  Dark Theme Override  */
body.dark-mode {
  --primary-color: #BFD9FF;        
  --secondary-color: #87A2C5;      
  --background-dark: #121C2B;      
  --card-background: #1C2A3A;      
  --text-light: #E3ECF5;           
  --text-muted: #9BAEC8;           
  --border-color: #2F3E50;         
}


body {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-family: var(--font-family);
}

/* Theme Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #007bff;
}
input:checked + .slider:before {
  transform: translateX(24px);
}

/* === Light/Dark Toggle Visibility Fix === */
.theme-toggle-mobile {
  display: none; /* Hidden by default for desktop */
}

/* Show toggle inside mobile menu */
@media (max-width: 768px) {
  .theme-toggle-mobile {
    display: block;
    text-align: center;
    margin-top: 1rem;
  }

  .theme-toggle-mobile .switch {
    margin: 0 auto;
  }
}


/* Variables for consistent styling - Tuned for deeper darks and a vibrant accent */
/* :root {
    --primary-color: #2A4F6E;     
    --secondary-color: #456882;   
    --background-dark: #F9F3EF;  
    --card-background: #ffffff;  
    --text-light: #1B3C53;        
    --text-muted: #4a6d84;        
    --border-color: #D2C1B6;      
    --hover-light: #456882;      
    --box-shadow-dark: rgba(0, 0, 0, 0.15); 
    --transition-speed: 0.3s ease-in-out;
    --font-family: 'Poppins', sans-serif;
} */


/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.7; /* Slightly more line height for readability */
    color: var(--primary-color);
    background-color: var(--background-dark);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--hover-light);
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h2.section-title {
    font-size: 3rem; /* Larger section titles */
    text-align: center;
    margin-bottom: 4rem; /* More space below title */
    position: relative;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

h2.section-title::after {
    content: '';
    display: block;
    width: 80px; /* Wider underline */
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0; /* More space below text, thicker line */
    border-radius: 2px;
}

/* Sections */
.section {
    padding: 100px 5%; /* Increased padding for more space between sections */
    margin: 0 auto;
    max-width: 1200px; /* Max width for content */
}

/* Header & Navigation */
/* Navigation Styles */
header {
    background-color: var(--background-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.4s ease;
}

.logo:hover {
    text-shadow: 0 0 10px rgba(0, 192, 255, 0.5);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Active link styling */
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-links a.active::after {
    width: 100%;
}

/* === CORRECTED HAMBURGER MENU CODE START === */

/* Hamburger Icon Styling */
.hamburger {
    display: none; /* Hidden by default on larger screens */
    cursor: pointer;
    z-index: 1001; /* Ensure hamburger is always on top, even above the menu itself */
    position: relative; /* Needed for z-index to work */
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease; /* Smooth transition for the animation */
}

/* Media Query for Mobile/Tablet Screens (up to 768px wide) */
/* === CORRECTED HAMBURGER MENU CODE START === */

/* Hamburger Icon Styling */
.hamburger {
    display: none; /* Hidden by default on larger screens */
    cursor: pointer;
    z-index: 1001; /* Ensure hamburger is always on top, even above the menu itself */
    position: relative; /* Needed for z-index to work */
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease; /* Smooth transition for the animation */
}

/* Media Query for Mobile/Tablet Screens (up to 768px wide) */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Hide off screen */
    width: 70%;
    height: 100vh;
    background-color: #1c1c30; /* Solid visible background */
    flex-direction: column;
    align-items: center;
    padding-top: 80px;
    gap: 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    visibility: hidden;
    opacity: 0;
    transition: right 0.5s ease, opacity 0.5s ease, visibility 0s 0.5s;
    z-index: 1000;
    display: flex;
  }

  /* When active (toggle class added via JS) */
  .nav-links.active {
    right: 0;
    visibility: visible;
    opacity: 1;
    transition: right 0.5s ease, opacity 0.5s ease, visibility 0s;
  }

  /* Hamburger icon animation */
  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Prevent scroll when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}

/* === CORRECTED HAMBURGER MENU CODE END === */
/* Hero Section */
#home {
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
}

.hero-content {
    max-width: 900px;
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgb(28, 90, 104);
}

.hero-content p {
    font-size: 1.4rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-dark);
    border: 2px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 192, 255, 0.3);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 192, 255, 0.5);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 192, 255, 0.3);
}

/* === Centered Theme Toggle Icon (Below Hero Buttons) === */
.hero-theme-toggle {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-theme-toggle i {
    font-size: 2.2rem;
    color: var(--primary-color);
    background-color: var(--card-background);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 192, 255, 0.3);
}

.hero-theme-toggle i:hover {
    background-color: var(--primary-color);
    color: var(--background-dark);
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 192, 255, 0.5);
}

/* === Side Social Links === */
.side-social-links {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 999;
}

.side-social-links a {
    color: var(--primary-color);
    font-size: 2.2rem;
    transition: transform var(--transition-speed), color var(--transition-speed);
}

.side-social-links a:hover {
    color: var(--hover-light);
    transform: scale(1.2) translateY(-3px);
    text-shadow: 0 0 10px rgba(0, 192, 255, 0.8);
}

/* === About Me Section === */
.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 4rem 2rem;
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.about-section h2 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-image {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    text-align: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    border: 6px solid var(--primary-color);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: 0 0 30px var(--box-shadow-dark);
}

.about-text {
    flex: 2;
    min-width: 350px;
    text-align: justify;
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    background-color: var(--card-background);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 6px 20px var(--box-shadow-dark);
    transition: transform var(--transition-speed);
}

.stat-item:hover {
    transform: translateY(-8px);
}

.stat-item h4 {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.stat-item p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* === Dark Mode Overrides === */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

body.dark-mode .hero-content h1 {
    color: #00ffff;
}

body.dark-mode .btn-secondary {
    border-color: #00ffff;
    color: #00ffff;
}

body.dark-mode .btn-secondary:hover {
    background-color: #00ffff;
    color: #121212;
}

/* === Responsive Styles === */
@media (max-width: 768px) {
    .about-section {
        padding: 2rem 1rem;
        min-height: auto;
    }

    .about-content {
        flex-direction: column;
    }

    .about-text {
        text-align: center;
        min-width: 100%;
    }

    .hero-theme-toggle img {
        width: 1.8rem;
        height: 1.8rem;
        padding: 0.4rem;
    }
}


/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem; /* More space */
    justify-content: center;
}

.skills-column {
    flex: 1;
    min-width: 320px; /* Larger min-width */
    background-color: var(--card-background);
    padding: 3rem; /* More padding */
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--box-shadow-dark);
}

.skills-column h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    text-align: center;
    font-weight: 600;
}

.skill-bar-item {
    margin-bottom: 2rem; /* More space between skill bars */
}

.skill-bar-item p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 0.8rem; /* More space for text above bar */
    font-size: 1.1rem;
}

.skill-bar {
    background-color: #ffffff;
    height: 10px; /* Thicker bar */
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    width: 0;
    background-color: var(--primary-color);
    border-radius: 20px;
    transition: width 1.5s ease-in-out; /* Slower, smoother animation */
}


/* Work Experience Section (Timeline) */
.timeline {
    position: relative;
    max-width: 1000px; /* Wider timeline */
    margin: 0 auto;
    padding: 0 30px;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 5px; /* Thicker line */
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2.5px; /* Center thinner line */
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 50px; /* More horizontal padding */
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 40px; /* More space between items */
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px; /* Larger circles */
    height: 25px;
    right: -12.5px; /* Adjust for larger circle */
    background-color: var(--primary-color);
    border: 5px solid var(--card-background); /* Thicker border on circle */
    top: 20px; /* Adjust vertical position */
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(0, 192, 255, 0.5); /* Glow on circles */
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(even)::after {
    left: -12.5px; /* Adjust for larger circle */
}

.timeline-content {
    padding: 25px 35px; /* More padding */
    background-color: var(--card-background);
    position: relative;
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--box-shadow-dark);
}

.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--text-light);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 12px;
}
.timeline-item:nth-child(odd) .timeline-date {
    text-align: right;
    padding-right: 20px;
}
.timeline-item:nth-child(even) .timeline-date {
    text-align: left;
    padding-left: 20px;
}


/* Projects Section */
.project-categories {
    text-align: center;
    margin-bottom: 3.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem; /* Space between buttons */
}

.category-button {
    background-color: var(--card-background);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.8rem; /* Larger buttons */
    margin: 0.5rem;
    border-radius: 30px; /* More rounded */
    cursor: pointer;
    font-size: 1.05rem;
    transition: all var(--transition-speed);
}

.category-button:hover,
.category-button.active {
    background-color: var(--primary-color);
    color: var(--background-dark);
    border-color: var(--primary-color);
    box-shadow: 0 3px 10px rgba(0, 192, 255, 0.4);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.project-card {
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--box-shadow-dark);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid var(--border-color);
}

.project-card.hide {
    display: none !important;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), 0 0 20px rgba(0, 192, 255, 0.2);
}

.project-img-container,
.project-image-container {
    width: 100%;
    height: 320px;
    overflow: hidden;
    position: relative;
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
}

.project-img-container img,
.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.project-card:hover .project-img-container img,
.project-card:hover .project-image-container img {
    transform: scale(1.06);
}

/* Responsive Image Heights */
@media (max-width: 768px) {
    .project-img-container,
    .project-image-container {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .project-img-container,
    .project-image-container {
        height: 200px;
    }
}

.project-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--primary-color);
    color: var(--background-dark);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em; /* Keeps titles aligned across cards */
}

.project-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1; /* Automatically stretches to align items vertically */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    margin-top: auto; /* Push tags below the description */
}

.project-tag {
    background-color: rgba(42, 79, 110, 0.08);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(42, 79, 110, 0.15);
    transition: all var(--transition-speed);
}

body.dark-mode .project-tag {
    background-color: rgba(191, 217, 255, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(191, 217, 255, 0.15);
}

.project-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.project-links-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-speed);
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-live {
    background-color: var(--primary-color);
    color: var(--background-dark) !important;
    flex: 1;
}

.btn-live:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-github {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light) !important;
    flex: 1;
}

.btn-github:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
}

.disabled-btn,
.disabled-btn:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: transparent !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-details {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color) !important;
    width: 100%;
}

.btn-details:hover {
    background-color: var(--primary-color);
    color: var(--background-dark) !important;
    transform: translateY(-2px);
}

/* Project Details Modal */
.project-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(18, 28, 43, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.project-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--card-background);
  margin: auto;
  padding: 2.25rem;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 650px;
  border-radius: 16px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.project-modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  color: var(--text-muted);
  font-size: 2.25rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-img-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.modal-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 0;
}

.modal-meta {
  display: flex;
  align-items: center;
}

.modal-category {
  background-color: var(--primary-color);
  color: var(--background-dark);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0;
}

.modal-tech-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (max-width: 992px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}


/* Education and Certifications (Similar card styles) */
.education-grid,
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.education-card,
.certification-card {
  background-color: var(--card-background);
  padding: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 20px var(--box-shadow-dark);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.education-card:hover,
.certification-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-header-edu,
.card-header-cert {
  margin-bottom: 1.2rem;
}

.card-header-edu h3,
.card-header-cert h3 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin: 0.5rem 0;
}

.card-header-edu p,
.card-header-cert p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.year-badge,
.year-badge-cert {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--background-dark);
  padding: 0.4rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 12px;
}

.card-content-edu ul,
.card-content-cert ul {
  padding-left: 1.5rem;
  list-style-type: disc;
  color: var(--text-muted);
  font-size: 1rem;
}

.card-content-edu ul li,
.card-content-cert ul li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}



/* Contact Section */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4rem; /* More gap */
    justify-content: center;
}

.get-in-touch,
.send-message {
    flex: 1;
    min-width: 350px; /* Larger min-width */
    background-color: var(--card-background);
    padding: 3rem; /* More padding */
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--box-shadow-dark);
}

.get-in-touch h3,
.send-message h3 {
    font-size: 2.2rem; /* Larger headings */
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.get-in-touch p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start; /* Align icon to top of text */
    margin-bottom: 2rem; /* More space */
    gap: 1.5rem;
}

.contact-info-item i {
    font-size: 1.8rem; /* Larger icons */
    color: var(--primary-color);
    padding-top: 5px; /* Align with text */
}

.contact-info-item h4 {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.contact-info-item p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 1rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-section .social-links {
    display: flex;
    gap: 1.5rem; /* More space */
    margin-top: 2.5rem;
}

.contact-section .social-links a {
    color: var(--text-muted);
    font-size: 2rem; /* Larger social icons */
    transition: color var(--transition-speed), transform var(--transition-speed), text-shadow var(--transition-speed);
}

.contact-section .social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
    text-shadow: 0 0 10px rgba(0, 192, 255, 0.8);
}

.contact-form .form-group {
    margin-bottom: 1.8rem; /* More space between form fields */
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem; /* More padding in fields */
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px; /* More rounded */
    color: var(--text-light);
    font-size: 1.05rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 192, 255, 0.3); /* Larger, more prominent focus glow */
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px; /* Taller textarea */
}

.submit-button {
    width: auto;
    padding: 1rem 3rem;
    background-color: var(--primary-color);
    color: var(--background-dark);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    letter-spacing: 1px;
}

.submit-button:hover {
    background-color: #0099cc; /* Slightly darker primary on hover */
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 192, 255, 0.5); /* Stronger glow */
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Contact Form Messages */
.form-message {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.05rem;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-message.success {
    display: block;
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.form-message.error {
    display: block;
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Footer */
.site-footer {
    background-color: var(--card-background);
    padding: 4rem 5%; /* More padding */
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 2.5rem; /* More margin */
    gap: 2.5rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem; /* More space */
}

.footer-nav ul li a {
    color: var(--text-muted);
    transition: color var(--transition-speed);
    font-size: 1.05rem;
}

.footer-nav ul li a:hover {
    color: var(--primary-color);
}

.footer-social-icons {
    display: flex;
    gap: 1.5rem; /* More space */
}

.footer-social-icons a {
    color: var(--text-muted);
    font-size: 1.8rem; /* Larger icons */
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.footer-social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom-text {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}


/* Animations */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries for Responsiveness */

/* Tablet & Smaller Desktops */
@media (max-width: 992px) {
    .section {
        padding: 80px 4%;
    }

    h2.section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .about-image {
        max-width: 300px;
    }

    .about-text {
        text-align: center;
        min-width: unset; /* Allow it to shrink */
    }

    .about-text h3 {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1.5rem;
    }

    .skills-container {
        flex-direction: column;
        gap: 3rem;
    }

    .timeline::after {
        left: 20px; /* Move timeline to the left */
        margin-left: 0;
    }

    .timeline-item {
        width: 100%;
        padding-left: 60px; /* Adjust padding for content */
        padding-right: 15px;
        left: 0;
    }

    .timeline-item::after {
        left: 10px; /* Move circle to match the line */
        width: 20px; /* Smaller circles on mobile */
        height: 20px;
        right: auto; /* Remove right position */
        border: 4px solid var(--card-background); /* Adjust border thickness */
    }

    .timeline-item:nth-child(even) {
        left: 0; /* Align all items to the left */
    }

    .timeline-item:nth-child(even)::after {
        left: 10px; /* Move circle to match the line */
    }
    .timeline-item .timeline-date {
        text-align: left; /* Align date with content */
        padding-left: 0;
    }


    .education-grid,
    .certifications-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }

    .contact-container {
        flex-direction: column;
        gap: 3rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    header {
        padding: 1rem 3%;
    }

    /* Disabled duplicate mobile menu rules to resolve position clashing */

    .nav-links li {
        text-align: center;
        margin: 0.5rem 0;
    }

    .nav-links li a {
        font-size: 1.2rem; /* Larger links in mobile menu */
        padding: 0.8rem 0;
        display: block;
    }

    .nav-toggle {
        display: block; /* Show hamburger icon */
    }

    .side-social-links {
        position: static; /* Remove fixed position on mobile */
        transform: none;
        flex-direction: row; /* Layout horizontally */
        justify-content: center;
        margin-top: 3rem; /* Add padding below them */
        width: 100%;
        padding-bottom: 2rem;
    }

    #home {
        padding-top: 2rem; /* Adjust padding for mobile */
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1.5rem;
    }

    .btn {
        width: 90%; /* Make buttons wider */
        margin: 0 auto;
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    h2.section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    .about-stats {
        grid-template-columns: 1fr; /* Stack stats vertically */
        gap: 1rem;
    }

    .skills-column {
        padding: 2rem;
    }

    .skill-bar-item {
        margin-bottom: 1.5rem;
    }

    .project-categories button {
        display: block; /* Stack buttons vertically */
        margin: 0.5rem auto;
        width: 90%;
    }

    .education-grid,
    .certifications-grid {
        grid-template-columns: 1fr; /* Single column for cards */
    }

    .get-in-touch,
    .send-message {
        padding: 2rem;
    }

    .contact-info-item {
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .contact-form input,
    .contact-form textarea {
        padding: 1rem;
    }

    .submit-button {
        padding: 0.9rem 2.5rem;
        font-size: 1.1rem;
    }

    .footer-nav ul {
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 60px 3%;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .btn {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
    .side-social-links a {
        font-size: 1.8rem;
    }
    h2.section-title {
        font-size: 1.8rem;
    }
    .about-text h3 {
        font-size: 1.8rem;
    }
    .stat-item h4 {
        font-size: 2.2rem;
    }
    .skills-column h3 {
        font-size: 1.8rem;
    }
    .timeline-content h3 {
        font-size: 1.5rem;
    }
    .project-card h3,
    .education-card h3,
    .certification-card h3 {
        font-size: 1.4rem;
    }
    .contact-info-item i {
        font-size: 1.5rem;
    }
    .contact-section .social-links a {
        font-size: 1.5rem;
    }
}
/* Toggle Switch Style */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #007bff;
}

input:checked + .slider:before {
  transform: translateX(24px);
}


@media (max-width: 768px) {
  nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .hamburger {
    display: block;
    cursor: pointer;
    z-index: 1003; /* Positioned above the drawer */
    position: fixed; /* Keep pinned to top-right corner over drawer */
    top: 1.5rem;
    right: 1.5rem;
  }

  .hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px 0;
    transition: all 0.3s ease;
  }

  .hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto; /* Reset intermediate absolute layout position */
    width: 70%;
    max-width: 260px;
    height: 100vh;
    background-color: var(--background-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    padding-top: 100px;
    padding-bottom: 2rem;
    visibility: hidden;
    opacity: 0;
    transition: right 0.4s ease, opacity 0.4s ease, visibility 0s 0.4s;
    z-index: 1002; /* Overlay above header */
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-links.active {
    right: 0;
    visibility: visible;
    opacity: 1;
    max-height: none; /* Override intermediate dropdown height cap */
    transition: right 0.4s ease, opacity 0.4s ease, visibility 0s;
  }

  .nav-links li {
    text-align: center;
  }

  .nav-links li a {
    font-size: 1.4rem;
    color: var(--text-light);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }

  .nav-links li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* for send message */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--card-background);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 1rem;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary-color);
}

.submit-button {
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #0099cc;
}  