/* General styles */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* Default styles for dark mode */
:root {
    --background-image: rgb(0, 0, 0) url("../img/stars01.png") repeat top center;
    --primary-color: rgb(255, 255, 255);
    --primary-font: 'Coda', sans-serif, arial;
    --secondary-font: 'Fira Code', sans-serif;
    --navbar-box-shadow: 5px 5px 10px rgb(255, 255, 255);
    --bg-navbar-opaque: rgb(0, 0, 0);
    --bg-secondary: rgba(30, 35, 30, 0.5);
    --bg-buttons-hover: rgba(40, 45, 40, 0.7);
    --border-buttons: 1px solid grey;
    --box-shadow-buttons-hover: 1px 1px 10px rgb(255, 255, 255);
    --animmation-stars: move-twink-back 100s linear infinite;

    /* Common properties */
    --transition-speed: 0.3s;
    --border-radius: 10px;
    --spacing-base: clamp(1rem, 2vw, 20px);
    --max-width-container: 1400px;
}

/* Styles for light mode */
[data-theme="light"] {
    --background-image: rgb(245, 245, 247) url("../img/banner-light.webp");
    --primary-color: rgb(29, 29, 31);
    --navbar-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --bg-navbar-opaque: rgba(255, 255, 255, 0.8);
    --bg-secondary: rgba(255, 255, 255, 0.9);
    --bg-buttons-hover: rgba(230, 230, 235, 0.9);
    --box-shadow-buttons-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --border-buttons: 1px solid rgb(224, 224, 224);
    --animmation-stars: none;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Specific classes for light mode */

[data-theme="light"] .slide-text {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .navbar-opaque {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Body styles - Starry effect */
body {
    font-family: var(--primary-font);
    margin: 0;
    padding: 0;
    color: var(--primary-color);
    background: var(--background-image);
    animation: var(--animmation-stars);
}

@keyframes move-twink-back {
    from {
        background-position: 0 0;
    }

    to {
        background-position: -10000px 5000px;
    }
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 10px 0;
    box-shadow: var(--navbar-box-shadow);
    z-index: 1;
    transition: background-color var(--transition-speed) ease;
}

.navbar-transparent {
    background-color: transparent;
}

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

#navbar ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0;
}

#navbar ul li a {
    text-decoration: none;
    color: var(--primary-color);
}

#navbar ul li a:hover {
    text-shadow: 1px 1px 1px var(--primary-color);
}

.options-container {
    position: fixed;
    right: 0;
    z-index: 2;
}

#languageToggle,
#toggle-theme {
    padding: 0.5rem;
    margin: 1rem;
}

/* General Button Styles */
.btn {
    font-family: var(--primary-font);
    cursor: pointer;
    color: var(--primary-color);
    background-color: var(--bg-secondary);
    border: var(--border-buttons);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
}

.btn:hover {
    background-color: var(--bg-buttons-hover);
    box-shadow: var(--box-shadow-buttons-hover);
}

/* Welcome section */
#welcome-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

#welcome-section h1 {
    font-family: var(--secondary-font);
    font-size: 4rem;
    letter-spacing: 1rem;
}

#welcome-section h3 {
    font-size: 1.5rem;
    font-family: monospace, 'Fira Code', arial;
    min-height: 60px;
}

/* About-me  */
#about-me {
    padding: clamp(2rem, 5vw, 50px) var(--spacing-base);
    min-height: 90vh;
    scroll-margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#about-me h2 {
    width: 100%;
    max-width: var(--max-width-container);
    margin: 0;
}

#about-me-slides {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 1rem;
}

.slide-text {
    background-color: var(--bg-secondary);
    padding: var(--spacing-base);
    border-radius: var(--border-radius);
    border: var(--border-buttons);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    text-align: justify;
    line-height: 2;
    flex: 1;
}

.slide-img {
    width: clamp(200px, 40vw, 500px);
    height: clamp(200px, 40vw, 500px);
    overflow: hidden;
    border-radius: 50%;
    flex-shrink: 0;
}

.slide-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.skills-container {
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 1vw, 1rem);
    flex-wrap: wrap;
    margin-top: auto;
    max-width: 1200px;
    padding: 0 1rem;
}

/* .skills-container img {
    width: clamp(80px, 10vw, 100px);
    height: auto;
} */

/* Projects */
#projects {
    padding: clamp(2rem, 5vw, 50px) var(--spacing-base);
    scroll-margin-top: 2.5rem;
    width: 100%;
    max-width: var(--max-width-container);
    margin: 0 auto;
}

#projects-slides {
    width: 100%;
}

#projects-buttons {
    margin-bottom: clamp(1rem, 3vw, 20px);
    text-align: center;
}

#projects-buttons button {
    font-size: 1rem;
    padding: clamp(0.5rem, 1vw, 0.75rem);
    margin: clamp(0.5rem, 1.5vw, 15px);
}

.project-section {
    display: none;
    gap: clamp(1rem, 3vw, 2rem);
    justify-content: center;
    flex-wrap: wrap;
}

#developer {
    display: flex;
}

.proj-slide {
    background-color: var(--bg-secondary);
    padding: var(--spacing-base);
    border-radius: var(--border-radius);
    border: var(--border-buttons);
    width: 100%;
    max-width: 400px;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform var(--transition-speed) ease,
        box-shadow var(--transition-speed) ease;
}

.proj-slide:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-buttons-hover);
}

.proj-slide h3 {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.proj-slide p {
    flex-grow: 1;
    margin: 0;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.6;
}

.img-slide {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 5px;
}

.btn-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-container a {
    flex: 1;
    max-width: 150px;
    margin: 0;
    padding: 0.3rem;
    font-size: clamp(0.8rem, 1.2vw, 1rem);
    text-decoration: none;
    text-align: center;
}

/* Contact */

#contact {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: var(--max-width-container);
    margin: 200px auto 0 auto;
    min-height: 90vh;
    scroll-margin-top: 2.5rem;
    padding: clamp(2rem, 5vw, 50px) var(--spacing-base);
}

.contact-form {
    width: 100%;
    max-width: 600px;
    margin: auto;
    padding: 20px;
    border-radius: var(--border-radius);
    text-align: center;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: left;
}

.contact-form input,
.contact-form textarea {
    width: 90%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid rgb(204, 204, 204);
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form button {
    width: 90%;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: rgb(255, 255, 255);
    background-color: rgb(0, 123, 255);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
}

.contact-form button:hover {
    background-color: rgb(0, 86, 179);
}

/* Footer */

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding: 50px 0;
}

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

.social-media {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.social-media>a>img {
    width: 100px;
    height: 35px;
}

/* Media queries */
@media (max-width: 1200px) {
    .proj-slide {
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 991px) {
    #navbar ul {
        justify-content: start;
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .options-container {
        display: flex;
        flex-direction: column;
        margin: 0.2rem;
    }

    #languageToggle,
    #toggle-theme {
        margin: 0.1rem;
        padding: 0.3rem;
    }

    #about-me-slides {
        flex-direction: column-reverse;
        text-align: center;
    }

    .slide-text {
        max-width: 90%;
    }

    .slide-img {
        width: clamp(150px, 50vw, 300px);
        height: clamp(150px, 50vw, 300px);
    }

    .proj-slide {
        max-width: 100%;
        margin: auto 35px;
    }

    .toggle-btn {
        width: 80%;
        max-width: 300px;
        margin: 0;
    }
}

@media (max-width: 600px) {
    .contact-form {
        padding: 15px;
        max-width: 500px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 0.9rem;
    }

    .contact-form button {
        font-size: 0.9rem;
        padding: 10px;
    }
}

@media (max-width: 480px) {

    #navbar {
        font-size: 0.8rem;
    }

    #languageToggle,
    #toggle-theme {
        font-size: 0.6rem;
    }

    #welcome-section h1 {
        font-size: 3rem;
    }

    #welcome-section h3 {
        font-size: 1.2rem;
    }

    .skills-container img {
        width: clamp(60px, 15vw, 80px);
    }

    #projects {
        padding: 1rem;
    }

    .proj-slide {
        min-height: auto;
        padding: 1rem;
        margin: auto 15px;
    }
}

@media (max-width: 400px) {
    .slide-text {
        font-size: 0.9rem;
        max-width: 100%;
    }
}