/* ======================================= */
/* 1. VARIABLES AND GLOBAL RESET */
/* ======================================= */

:root {
    /* Colors - Light Mode Defaults */
    --color-primary: #1e88e5; /* Blue */
    --color-primary-light: #2c97ff;
    --color-primary-dark: #1565c0;
    --color-secondary: #ff7043; /* Orange/Accent */
    --color-background: #ffffff;
    --color-text-light: #f8f8f8;
    --color-text-dark: #333333;
    --color-border: #e0e0e0;
    --color-card-bg: #fdfdfd;
    --color-sidebar-bg: #f5f5f5;
    --color-shadow: rgba(0, 0, 0, 0.1);
    
    /* Layout */
    --sidebar-width: 250px;
}

/* Dark Mode Variables */
body.dark-mode {
    --color-primary: #4fc3f7; /* Lighter Blue for contrast */
    --color-primary-light: #81d4fa;
    --color-primary-dark: #0288d1;
    --color-secondary: #ffab91;
    --color-background: #121212;
    --color-text-light: #e0e0e0;
    --color-text-dark: #ffffff;
    --color-border: #333333;
    --color-card-bg: #1e1e1e;
    --color-sidebar-bg: #1e1e1e;
    --color-shadow: rgba(255, 255, 255, 0.08);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-background);
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--color-text-dark);
}

h2 {
    font-size: 2.2em;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 5px;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-primary-dark);
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
}

.cta-button:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    transform: translateY(-2px);
}

.secondary-cta {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    margin-left: 15px;
}

.secondary-cta:hover {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

/* ======================================= */
/* 2. SIDEBAR NAVIGATION */
/* ======================================= */

#sidebar-nav {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--color-sidebar-bg);
    /* 🌟 EDITED: Reduced sidebar top padding from 30px to 20px */
    padding: 20px 20px; 
    box-shadow: 2px 0 5px var(--color-shadow);
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* 🌟 EDITED: Reduced margin-bottom from 30px to 20px */
    margin-bottom: 20px; 
}

.logo {
    font-size: 1.5em;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.sidebar-title {
    font-size: 0.85em;
    color: #888;
    margin-top: -5px;
    font-weight: 300;
}

.mode-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: var(--color-text-dark);
    transition: color 0.3s;
}

.mode-toggle:hover {
    color: var(--color-primary);
}

/* --- NEW: MOBILE MENU TOGGLE STYLES --- */
.menu-toggle {
    display: none; /* Hidden by default on desktop/large screens */
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: var(--color-text-dark);
    transition: color 0.3s;
    /* Adjusting order and margin to sit nicely next to mode-toggle */
    order: 1;
    margin-right: 15px; 
}

.menu-toggle:hover {
    color: var(--color-primary);
}
/* --- END NEW --- */


.nav-links {
    list-style: none;
    flex-grow: 1;
}

/* Reduced vertical space between menu items */
.nav-links li {
    margin: 10px 0; 
}

.nav-links a {
    display: block;
    padding: 10px 15px;
    color: var(--color-text-dark);
    font-size: 1.05em;
    border-radius: 5px;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-links a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* New: Sidebar Navigation Controls Styling */
.nav-controls {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    margin-top: auto; 
}

.nav-controls button {
    /* Override cta-button styles for smaller, specific controls */
    padding: 8px 15px;
    font-size: 1em;
    width: 48%; 
    border-radius: 5px;
    background-color: var(--color-primary);
    color: var(--color-text-light);
    transition: background-color 0.3s, transform 0.2s;
    text-transform: none; 
    letter-spacing: normal;
}

.nav-controls button:hover {
    background-color: var(--color-primary-dark);
    transform: none; 
}
/* End New Styling */

/* Sidebar CTA and Socials */
.sidebar-cta {
    margin: 20px 0;
}

.sidebar-download-btn {
    width: 100%;
    text-align: center;
    font-size: 0.9em;
}

.sidebar-socials {
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    border-top: 1px solid var(--color-border);
}

.sidebar-socials a {
    font-size: 1.5em;
    color: var(--color-text-dark);
    transition: color 0.3s;
}

.sidebar-socials a:hover {
    color: var(--color-primary);
}

/* ======================================= */
/* 3. CONTENT WRAPPER AND MAIN LAYOUT */
/* ======================================= */

#content-wrapper {
    margin-left: var(--sidebar-width);
    padding: 0;
    transition: margin-left 0.3s;
}

main {
    padding: 30px;
}

/* TIGHTEST SPACE AMONG SECTIONS */
.content-section {
    padding: 20px 0; 
    min-height: auto; 
}

/* Ensures the last section doesn't stick to the footer */
#contact {
    padding-bottom: 30px; 
}

/* ======================================= */
/* 4. HOME/HERO SECTION */
/* ======================================= */

#home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 40px; 
    padding-bottom: 20px; 
    min-height: 50vh; 
}

.hero-content {
    max-width: 60%;
}

.hero-content h1 {
    font-size: 3.5em;
    margin-bottom: 5px;
    color: var(--color-primary-dark);
}

.hero-content h2 {
    font-size: 1.5em;
    color: var(--color-secondary);
    margin-bottom: 25px;
    border-bottom: none;
    padding-bottom: 0;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.hero-image {
    width: 35%;
    display: flex;
    justify-content: flex-end;
}

.hero-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--color-primary-light);
    box-shadow: 0 0 21px -5px #000;
}

.dark-mode .hero-image img {
    box-shadow: 0 0 21px -5px #81d4fa;
}
/* ======================================= */
/* 5. ABOUT SECTION */
/* ======================================= */

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.summary {
    font-size: 1.1em;
    line-height: 1.8;
}

.stats-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 8px var(--color-shadow);
}

.stats-card h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.stats-card ul {
    list-style: none;
    padding-left: 0;
}

.stats-card li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    font-size: 0.95em;
}

.stats-card li:last-child {
    border-bottom: none;
}

.stats-card li i {
    margin-right: 10px;
    color: var(--color-secondary);
}


/* ======================================= */
/* 6. SKILLS SECTION (BOXED LAYOUT) */
/* ======================================= */

.skills-grid {
    display: grid;
    /* Creates columns that are at least 250px wide */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    margin-top: 20px;
}

/* Style for the individual skill box (badge) */
.skill-badge {
    /* **This creates the box look** */
    border: 1px solid var(--color-border); 
    border-radius: 10px; /* Rounded corners */
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: var(--color-card-bg); 
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--color-shadow); 
    cursor: default;
}

.skill-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--color-shadow);
    border-color: var(--color-primary); 
}

/* Icon style inside the badge */
.skill-badge i {
    color: var(--color-primary);
    font-size: 1.5em;
}

/* Text style inside the badge */
.skill-badge span {
    font-weight: 600;
    color: var(--color-text-dark);
}


/* ======================================= */
/* 7. PROJECTS SECTION */
/* ======================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 8px var(--color-shadow);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--color-primary);
    border-color: var(--color-primary);
}

.project-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
    font-size: 1.4em;
}

.project-card .description {
    font-size: 0.95em;
    margin-bottom: 15px;
}

.project-card .skills-used {
    font-size: 0.85em;
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 10px;
}

.link-button {
    display: block;
    align-items: center;
    padding: 8px 15px;
    background-color: var(--color-primary-dark);
    color: var(--color-text-light);
    border-radius: 50px;
    font-size: 0.9em;
    width: 100%;
    text-align: center;
}

.link-button:hover {
    background-color: #000;
    color: var(--color-text-light);
}

.link-button i {
    margin-right: 8px;
}


/* ======================================= */
/* 8. EXPERIENCE & EDUCATION (TIMELINE LAYOUT) */
/* ======================================= */

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* Vertical connecting line */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--color-primary);
    top: 0;
    bottom: 0;
    left: 31px; /* Center alignment for icons on small screens */
    margin-left: -3px;
    z-index: 0;
}

.timeline-item {
    padding: 10px 0;
    position: relative;
    background-color: inherit;
}

.timeline-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    left: 0;
    background-color: var(--color-primary);
    border: 3px solid var(--color-background);
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    box-shadow: 0 0 0 5px var(--color-primary-light);
}

.timeline-content {
    padding: 20px;
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-left: 90px;
    position: relative;
    box-shadow: 0 4px 8px var(--color-shadow);
}

.timeline-content h3 {
    color: var(--color-primary-dark);
    margin-bottom: 5px;
}

.timeline-content .company {
    font-style: italic;
    color: var(--color-secondary);
    margin-bottom: 5px;
}

.timeline-content .date {
    font-size: 0.85em;
    color: #888;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.timeline-content .description {
    font-size: 0.95em;
}

/* ======================================= */
/* 9. CERTIFICATIONS SECTION (GRID LAYOUT) */
/* ======================================= */

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.cert-card {
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 8px var(--color-shadow);
    transition: transform 0.3s;
}

.cert-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-secondary);
}

.cert-card i {
    font-size: 2em;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.cert-card h4 {
    font-size: 1.2em;
    color: var(--color-text-dark);
    margin-bottom: 5px;
}

.cert-card p {
    font-size: 0.9em;
    color: #666;
}

/* Dark Mode specific for cert-card */
body.dark-mode .cert-card p {
    color: #ccc;
}


/* ======================================= */
/* 10. CONTACT SECTION */
/* ======================================= */

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    background-color: var(--color-card-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 8px var(--color-shadow);
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
    border-radius: 5px;
    font-size: 1em;
    background-color: var(--color-background);
    color: var(--color-text-dark);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    margin-top: 10px;
}

.social-links {
    padding: 30px 0;
}

.social-links h3 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: var(--color-text-dark);
    transition: color 0.3s;
}

.social-links a i {
    margin-right: 15px;
    font-size: 1.3em;
    width: 25px;
    text-align: center;
    color: var(--color-secondary);
}

.social-links a:hover {
    color: var(--color-primary);
}


/* ======================================= */
/* 11. FOOTER */
/* ======================================= */

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--color-sidebar-bg);
    border-top: 1px solid var(--color-border);
    font-size: 0.9em;
    color: #888;
    /* margin-left: var(--sidebar-width); Ensures footer aligns with content wrapper */
    transition: margin-left 0.3s;
}


/* ======================================= */
/* 12. MEDIA QUERIES (RESPONSIVENESS) */
/* ======================================= */

@media (max-width: 992px) {
    /* Collapse sidebar on tablets and below */
    #sidebar-nav {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: none;
        padding: 15px 20px;
        flex-direction: column; /* CHANGED: To allow menu links to stack vertically below the header */
        justify-content: space-between;
        align-items: flex-start; /* Align contents to start of container */
    }

    /* Show the mobile menu toggle button */
    .menu-toggle {
        display: block; 
    }
    
    .sidebar-header {
        /* Ensure logo, menu toggle, and mode toggle stay on one row */
        width: 100%;
        display: flex; 
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
    }

    /* Hide menu links and cta by default on mobile */
    .nav-links, .sidebar-cta, .nav-controls {
        display: none;
        width: 100%; /* Take full width for stacking */
    }

    /* **NEW: Show menu links and cta when the active class is present** */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        margin-top: 15px;
    }
    
    .nav-links li {
        width: 100%; /* Make list items take full width */
        margin: 5px 0; /* Adjust vertical spacing for stacked links */
    }

    .sidebar-cta.active {
        display: block;
        width: 100%;
        margin-top: 10px;
    }
    
    .sidebar-download-btn {
        width: 100%; /* Ensure button takes full width */
        text-align: center;
    }
    
    #content-wrapper {
        margin-left: 0;
    }

    main {
        padding: 20px; /* Reduced overall padding */
    }

    .content-section {
        /* Further reduce spacing on mobile */
        padding: 25px 0; 
        min-height: auto;
    }

    /* Hero section adjustments */
    #home {
        flex-direction: column;
        text-align: center;
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .hero-content, .hero-image {
        max-width: 100%;
        width: 100%;
    }

    .hero-image {
        order: -1; /* Image appears first on mobile */
        margin-bottom: 20px;
    }

    .hero-image img {
        margin: 0 auto;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .secondary-cta {
        margin-left: 0;
    }

    /* Grid layout adjustments */
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Timeline adjustments for mobile */
    .timeline::after {
        left: 31px;
    }

    .timeline-content {
        margin-left: 90px;
        padding: 15px;
    }
    
    .timeline-icon {
        left: 0;
    }

    footer {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 1.8em;
    }
    
    .skills-grid {
        grid-template-columns: 1fr; /* Single column for skills on very small screens */
    }

    .projects-grid, .certifications-grid {
        grid-template-columns: 1fr;
    }
}
.dot-pulse {
  position: relative;
  left: -9999px;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #f39c12;
  color: #f39c12;
  box-shadow: 9999px 0 0 -5px #f39c12;
  animation: dotPulse 1.5s infinite linear;
  animation-delay: .25s;
}

.dot-pulse::before, .dot-pulse::after {
  content: '';
  display: inline-block;
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background-color: #f39c12;
  color: #f39c12;
}

.dot-pulse::before {
  box-shadow: 9984px 0 0 -5px #f39c12;
  animation: dotPulseBefore 1.5s infinite linear;
  animation-delay: 0s;
}

.dot-pulse::after {
  box-shadow: 10014px 0 0 -5px #f39c12;
  animation: dotPulseAfter 1.5s infinite linear;
  animation-delay: .5s;
}

@keyframes dotPulseBefore {
  0% {
    box-shadow: 9984px 0 0 -5px #f39c12;
  }
  30% {
    box-shadow: 9984px 0 0 2px #f39c12;
  }
  60%,
  100% {
    box-shadow: 9984px 0 0 -5px #f39c12;
  }
}

@keyframes dotPulse {
  0% {
    box-shadow: 9999px 0 0 -5px #f39c12;
  }
  30% {
    box-shadow: 9999px 0 0 2px #f39c12;
  }
  60%,
  100% {
    box-shadow: 9999px 0 0 -5px #f39c12;
  }
}

@keyframes dotPulseAfter {
  0% {
    box-shadow: 10014px 0 0 -5px #f39c12;
  }
  30% {
    box-shadow: 10014px 0 0 2px #f39c12;
  }
  60%,
  100% {
    box-shadow: 10014px 0 0 -5px #f39c12;
  }
}
#verify-overlay{
    display:none;
    position: fixed;
    width: 100%;
    height: 100%;
    background: #00000075;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 1100;
}
#verify-overlay>.loader{
    position: absolute;
    top:50%;
    left:50%;
}
.text-danger{
    color: #ff0000!important;
}
.text-success{
    color: #009c0d!important;
}
