/* Default Light Mode Variables */
:root{
    --background-color: #f0f0f0;
    --text-color: #333;
    --navbar-bg-color: #333;
    --navbar-text-color: #fff;
    --link-color: #0066cc;
    --overlay-bg-color: rgba(247, 232, 232, 0.8);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --background-color: #333;
    --text-color: #f0f0f0;
    --navbar-bg-color: #222;
    --navbar-text-color: #f0f0f0;
    --link-color: #66aaff;
    --overlay-bg-color: rgba(44, 40, 40, 0.8);
}

/* Dark Mode Images */
[data-theme="dark"] .icon-img[src*="github-light"] {
    content: url('github-dark-icon.png'); /* Replace with dark mode image for GitHub */
}

[data-theme="dark"] .icon-img[src*="linkedin-light"] {
    content: url('linkedin-dark-icon.png'); /* Replace with dark mode image for LinkedIn */
}

/* Light Mode (Default) */
.icon-img[src*="github-light"] {
    content: url('github-light-icon.png'); /* Light mode image for GitHub */
}

.icon-img[src*="linkedin-light"] {
    content: url('linkedin-light-icon.png'); /* Light mode image for LinkedIn */
}

/* Global styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s, color 0.3s;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-links li {
    margin: 0 1rem;
}

.nav-links a {
    color: var(--navbar-text-color);
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* Hero Section */
#hero {
    height: 100vh; 
    padding: 100px 20px; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    background: var(--background-color);
}

#hero div {
    max-width: 600px;
    margin: 2px auto;
    background: var(--background-color);
}

#hero h1 {
    font-size: 2.5rem; 
    text-align: center;
    margin-bottom: 0.5rem; 
}

#hero p {
    font-size: 1.2rem; 
    margin-top: 0.5rem; 
}

/* Projects Section */
#projects {
    padding: 60px 20px;
    background: var(--background-color);
}

#projects h2{
    font-size:2.5em;
    text-align: center;
}

.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.project-card {
    position: relative;
    width: 300px; 
    margin: 20px; 
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.img-link {
    width: 100%;
    height: auto; 
    display: block;
}

.overlay {
    position: absolute; 
    top: 0;
    left: 0;
    right: 0;
    height: 80%; 
    background: var(--overlay-bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Start hidden */
    transition: opacity 0.3s ease;
    border-radius: 8px;
    padding: 15px;
}

.project-card:hover .overlay {
    opacity: 1; 
}

.git-link {
    display: block; 
    margin-top: 10px;
    color:var(--link-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    z-index: 10; 
}

.git-link:hover{
    cursor:pointer;
    color:#00274e;
}

/* Skills Section */
#skills {
    padding: 60px 20px;
    background:var(--background-color);
}


#skills h2{
    font-size:2.5em;
    text-align: center;
}

.skills {
    display: flex;
    justify-content: space-around;
}

.category {
    flex: 1; 
    margin: 0 20px; 
}

.category h3 {
    margin-bottom: 10px; 
}

.category ul {
    list-style: none; 
}

/* Contact Section */
#contact {
    padding: 60px 20px;
    background: var(--background-color);
}

#contact h2{
    font-size:2.5em;
    text-align: center;
}

.contact-links {
    display: flex;
    justify-content: center;
}

.contact-links a {
    margin: 0 10px; 
    text-decoration: none;
    color:var(--text-color);
}

.icon-img {
    margin-top: 15px;
    width: 30px; 
}

/* Responsive Design for Small Screens */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    /* Hero Section */
    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 1rem;
    }

    /* Projects Section */
    .projects {
        flex-direction: column;
        align-items: center;
    }

    .project-card {
        width: 100%;
        margin: 10px 0;
    }

    /* Skills Section */
    .skills {
        flex-direction: column;
        align-items: center;
    }

    .category {
        margin-bottom: 20px;
    }

    /* Contact Section */
    .contact-links a {
        margin: 0 5px;
    }
}