/* Basic Resets & Global Styles */
:root {
    --primary-color: #333333; /* Strong gray for primary elements */
    --secondary-color: #666666; /* Lighter gray for secondary text */
    --primary-darker: #000000; /* Black for hovers */
    --text-color: #000000; /* Black for main text */
    --light-text-color: #ffffff; /* Pure white for text on dark backgrounds */
    --bg-color: #ffffff; /* White background */
    --bg-light: #f5f5f5; /* Off-white for alternate sections */
    --border-color: #dddddd; /* Light gray for borders */
    --shadow-color: rgba(0, 0, 0, 0.1); /* Slightly darker shadow */
    --font-family: 'Poppins', 'Arial', sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #cccccc; /* Light gray for primary elements */
    --secondary-color: #999999; /* Mid-gray for secondary text */
    --primary-darker: #ffffff; /* White for hovers */
    --text-color: #ffffff; /* White for main text */
    --light-text-color: #ffffff; /* White remains */
    --bg-color: #000000; /* Black background */
    --bg-light: #1a1a1a; /* Dark gray for cards */
    --border-color: #444444; /* Dark border color */
    --shadow-color: rgba(0, 0, 0, 0.4); /* Darker shadow for contrast */
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Selection Styling */
::selection {
    background-color: #000000;
    color: var(--light-text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 3em;
}

h1 span {
    color: var(--primary-color);
}

h2 {
    font-size: 2.5em;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.8em;
    margin-bottom: 20px;
}
p {
    margin-bottom: 15px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 50px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px; /* Pill-shaped buttons */
    font-weight: bold;
    text-align: center;
    transition: all 0.4s ease-in-out;
    text-decoration: none;
    margin: 10px 5px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 2px solid var(--primary-color);
}

.primary-btn:hover {
    background-color: var(--primary-darker); /* Black on hover */
    border-color: var(--primary-darker);
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: translateY(-3px);
    text-decoration: none;
}

.small-btn {
    padding: 8px 15px;
    font-size: 0.9em;
}
/* Header & Navigation */
header {
    background-color: var(--bg-color);
    padding: 20px 0;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo a:hover {
    text-decoration: none;
    
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2em;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.theme-toggle-btn:hover {
    color: var(--primary-color);
}

.theme-toggle-btn .fa-sun {
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: bold;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    text-decoration: none;
}

.burger {
    display: none; /* Hidden on desktop */
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden; /* Hide parts of shapes that go outside */
    background: var(--bg-color);
}

/* Animated Shapes in Hero Section */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 15%;
    animation-duration: 25s;
}

.shape-2 {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 5%;
    animation-duration: 18s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 20%;
    right: 10%;
    animation-duration: 22s;
}

.shape-4 {
    width: 50px;
    height: 50px;
    top: 80%;
    right: 20%;
    animation-duration: 15s;
}

.shape-5 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    animation-duration: 28s;
}

.hero-content {
    max-width: 800px;
    margin: 0; /* Changed from margin-bottom: 40px */
    position: relative; /* Bring content above shapes */
    z-index: 1;
}

.hero-content h1 {
    font-size: 4em;
    margin-bottom: 20px;
}

.hero-content .tagline {
    font-size: 1.5em;
    letter-spacing: 1px; /* Reduced letter-spacing for a cleaner look */
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* About Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    text-align: left;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.about-image img {
    border-radius: 5%; /* Circular image */
    max-width: 250px;
    height: 250px;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    box-shadow: 0 5px 15px var(--shadow-color);
    margin: 0 auto; /* Center image */
}

/* Projects Section */
.project-scroll-wrapper {
    overflow-x: auto;
    padding-bottom: 20px; /* Space for scrollbar */
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: var(--primary-color) var(--bg-light); /* For Firefox */
}

/* For Chrome, Safari, and Edge */
.project-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}
.project-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
}
.project-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-flow: row; /* prevents horizontal overflow */
    width: 100%; /* make sure it fits viewport */
}

.project-card {
    background-color: var(--bg-color);
    border-radius: 12px; /* Softer corners */
    box-shadow: 0 8px 25px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    padding-bottom: 20px;
}

.project-card:hover {
    transform: translateY(-10px); /* A slightly more noticeable lift */
    box-shadow: 0 12px 35px var(--shadow-color);
}

#projects {
    overflow-x: hidden;
    overflow-y: hidden;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.project-counter {
    font-size: 0.85em;
    font-weight: bold;
    color: var(--secondary-color);
    padding: 0 15px;
    margin-bottom: 5px;
    text-align: right;
}

.project-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    padding: 0 15px;
}

.project-card p {
    font-size: 0.95em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    padding: 0 15px;
}

.project-links {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 15px;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.skill-item {
    background-color: var(--bg-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px var(--shadow-color);
    color: var(--primary-color);
}

.skill-item img {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px auto;
    object-fit: contain;
}
.skill-item i {
    transition: transform 0.3s ease;
}
.skill-item:hover i {
    transform: scale(1.2);
}

.skill-item p {
    font-weight: bold;
    margin: 0;
}

.tech-list {
    list-style: none;
    text-align: center;
    padding: 0;
    margin-top: 20px;
}

.tech-list li {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: var(--text-color);
}

.tech-list li strong {
    color: var(--primary-color);
}

/* Contact Section */
.contact-intro {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    text-align: center;
    margin-bottom: 40px;
}

.contact-info p {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.contact-info a {
    color: var(--text-color);
    font-weight: bold;
}

.contact-info a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-info .social-links {
    margin-top: 20px;
}

.contact-info .social-links a {
    font-size: 2.5em;
    margin: 0 15px;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.contact-info .social-links a:hover {
    color: var(--primary-color);
}


/* Footer */
footer {
    background-color: #111111; /* Dark gray footer */
    color: #cccccc;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

footer p {
    margin: 0;
}

.footer-social a {
    color: #cccccc;
    font-size: 1.5em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #ffffff;
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0;
        top: 80px; /* Adjust based on header height */
        height: calc(100vh - 80px);
        background-color: var(--bg-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 50px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    }

    .nav-links li {
        opacity: 0;
        margin: 20px 0;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .burger {
        display: block;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content .tagline {
        font-size: 1.2em;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image img {
        margin-top: 30px;
    }

    .project-grid {
        grid-auto-columns: 85%; /* Adjust card width for smaller screens */
        gap: 20px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    footer .container {
        flex-direction: column;
    }

    .footer-social {
        margin-top: 15px;
    }
}

@media (min-width: 992px) {
    .project-grid {
        grid-auto-columns: 31%; /* Show roughly 3 cards on larger screens */
        gap: 30px;
    }
}
/* Dark Mode Icon Toggle */
body.dark-mode .theme-toggle-btn .fa-moon {
    display: none;
}

body.dark-mode ::selection {
    background-color: #ffffff;
    color: #000000;
}

body.dark-mode .theme-toggle-btn .fa-sun {
    display: inline-block;
}

/* Burger Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Nav Link Animation */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* Floating Shapes Animation */
@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(45deg); }
    50% { transform: translateY(0px) rotate(90deg); }
    75% { transform: translateY(20px) rotate(135deg); }
    100% { transform: translateY(0px) rotate(180deg); }
}

/* The Modal (Popup) Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    height: 80vh;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop;
    animation-duration: 0.4s
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

/* The Close Button */
.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#liveDemoIframe {
    width: 100%;
    height: 95%;
    border: none;
}
