/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Styles */
body {
    font-family: "Noto Serif", serif;
    line-height: 1.6;
    font-size: 0.8rem;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Root Variables for Light Mode */
:root {
    --background-color: #DFE4E7;
    --text-color: #000000;
    --switch-background: #f39c12;
    --thumb-color: #fff;
    --icon-color: #181818;

    /* Default Colors */
    --bg-color: #f9f9f9;
    --card-bg-color: #fff;
    --text-muted-color: #666;
    --tag-bg-color: #007bff;
    --tag-text-color: #fff;
    --link-btn-bg-color: #007bff;
    --link-btn-text-color: #fff;
    --link-btn-hover-bg-color: #0056b3;
    --border-color: #ddd;
    --box-shadow-color: rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
body.dark-mode {
    --background-color: #1c1c1c;
    --text-color: #ecf0f1;
    --switch-background: #34495e;
    --thumb-color: #f1c40f;
    --icon-color: #fff;

    --bg-color: #181818;
    --card-bg-color: #242424;
    --text-muted-color: #b3b3b3;
    --tag-bg-color: #4a90e2;
    --link-btn-bg-color: #4a90e2;
    --link-btn-hover-bg-color: #357ABD;
    --border-color: #333;
    --box-shadow-color: rgba(0, 0, 0, 0.5);
}

/* Mode Switcher */
#mode-switch {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 60px;
    height: 30px;
    background-color: var(--switch-background);
    border-radius: 15px;
    padding: 5px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

#thumb {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--thumb-color);
    border-radius: 50%;
    transition: left 0.3s ease, background-color 0.3s ease;
}

.icon-enabled-true {
    width: 20px;
    height: 20px;
    fill: var(--icon-color);
    transition: fill 0.3s ease;
}

body.light-mode #thumb {
    left: 5px;
}

body.dark-mode #thumb {
    left: 35px;
}

/* Accessibility */
#mode-switch:focus {
    outline: 2px solid #3498db;
}

#mode-switch:focus #thumb {
    background-color: #3498db;
}

#mode-switch:active #thumb {
    background-color: #2980b9;
}

/* Header */
header {
    /*height: 100vh;*/
    padding: 2rem;
    line-height: 3rem;
}

/* Hero Section */
.hero {
    text-align: center;
    font-size: 1.5rem;
    padding: 5rem;
}

.hero .social-links {
    padding: 2rem;
}

.hero .social-links a {
    text-decoration: none;
    padding: 2rem;
}

.hero .social-links svg {
    height: 3rem;
    width: 3rem;
    fill: var(--icon-color);
    
}

.hero .cta {
    text-align: right;
    padding: 0.5rem 20px;
    font-size: 1rem;
    color: #ffffff;
    background-color: #2c3e50;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.hero .cta:hover {
    background-color: #0056b3;
}

/* Projects Section */
#projects-section {
    background-color: var(--bg-color);
}

#projects-section h2 {
    font-size: 2rem;
    text-align: center;
}


.card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--box-shadow-color);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card:hover {
    transform: translateY(-10px);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.card-text {
    font-size: 16px;
    color: var(--text-muted-color);
    margin-bottom: 20px;
    flex: 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background-color: var(--tag-bg-color);
    color: var(--tag-text-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.links {
    display: flex;
    gap: 10px;
}

.link-btn {
    background-color: var(--link-btn-bg-color);
    color: var(--link-btn-text-color);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.link-btn:hover {
    background-color: var(--link-btn-hover-bg-color);
}

/* Responsive Design */

/* Large screens (desktops and up) */
@media (min-width: 1200px) {
    /* Keep the original styles, or add enhancements for large screens if necessary */
    #projects {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 50px 20px;
        background-color: var(--bg-color);
    }
    
    .project {
        flex: 0 1 calc(33.333% - 20px);
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
    }
    
}

/* Medium screens (tablets and small desktops) */
@media (max-width: 1199px) and (min-width: 768px) {
    .hero .social-links {
        padding: 2rem;
    }
    
    .hero .social-links a {
        text-decoration: none;
        padding: 2rem;
    }
    
    .hero .social-links svg {
        height: 3rem;
        width: 3rem;
        fill: var(--icon-color);
        
    }
    
    .project {
        flex: 0 1 calc(50% - 20px); /* 2 items per row */
    }

    header {
        padding: 1.5rem;
    }

    .hero {
        padding: 4rem;
    }
}

/* Small screens (phones in landscape mode) */
@media (max-width: 767px) and (min-width: 480px) {
    .hero .social-links {
        padding: 1rem;
        fill: var(--icon-color);
        
    }
    
    .hero .social-links a {
        text-decoration: none;
        padding: 1rem;
    }
    
    .hero .social-links svg {
        height: 1rem;
        width: 1rem;
        fill: var(--icon-color);
        
    }
    
    .project {
        flex: 0 1 100%; /* 1 item per row */
    }

    .hero {
        padding: 3rem;
        font-size: 1.2rem;
    }

    .hero .social-links svg {
        height: 2.5rem;
        width: 2.5rem;
    }

    .hero .cta {
        padding: 0.5rem 15px;
        font-size: 0.9rem;
    }
    
    header {
    /*height: 100vh;*/
    padding: 1rem;
    line-height: 3rem;
}

}

/* Extra small screens (phones in portrait mode) */
@media (max-width: 479px) {
    .hero .social-links {
        padding: 1rem;
    }
    
    .hero .social-links a {
        text-decoration: none;
        padding: 1rem;
    }
    
    .hero .social-links svg {
        height: 1rem;
        width: 1rem;
        fill: var(--icon-color);
        
    }
    
    .hero {
        padding: 2rem;
        font-size: 1rem;
    }

    .hero .social-links svg {
        height: 2rem;
        width: 2rem;
    }

    .hero .cta {
        padding: 0.5rem 10px;
        font-size: 0.8rem;
    }

    header {
        padding: 1rem;
    }

    .project {
        margin-bottom: 20px;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
}

.cookie-banner button {
    background-color: #f39c12;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 20px;
    transition: background-color 0.3s ease;
}

.cookie-banner button:hover {
    background-color: #e67e22;
}
