@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

:root {
    --bg-color: #000;
    --bg-color-rgb: 0, 0, 0;
    --text-color: #fff;
    --main-color: #b74b4b;
    --main-color-rgb: 183, 75, 75;
    --second-bg-color: #161616;
    --second-bg-color-rgb: 22, 22, 22;
    --card-color: #252525;
    --border-radius: 0.8rem;
}

[data-theme="light"] {
    --bg-color: #fff;
    --bg-color-rgb: 255, 255, 255;
    --text-color: #333;
    --main-color: #b74b4b;
    --main-color-rgb: 183, 75, 75;
    --second-bg-color: #f0f0f0;
    --second-bg-color-rgb: 240, 240, 240;
    --card-color: #ffffff;
}

/* Theme Blue */
[data-theme="dark"][data-color="#4b8bb7"] {
    --main-color: #4b8bb7;
    --main-color-rgb: 75, 139, 183;
}

[data-theme="light"][data-color="#4b8bb7"] {
    --main-color: #4b8bb7;
    --main-color-rgb: 75, 139, 183;
}

/* Theme Green */
[data-theme="dark"][data-color="#4bb76e"] {
    --main-color: #4bb76e;
    --main-color-rgb: 75, 183, 110;
}

[data-theme="light"][data-color="#4bb76e"] {
    --main-color: #4bb76e;
    --main-color-rgb: 75, 183, 110;
}

/* Theme Purple */
[data-theme="dark"][data-color="#b74b9f"] {
    --main-color: #b74b9f;
    --main-color-rgb: 183, 75, 159;
}

[data-theme="light"][data-color="#b74b9f"] {
    --main-color: #b74b9f;
    --main-color-rgb: 183, 75, 159;
}

/* Theme Gold */
[data-theme="dark"][data-color="#b7964b"] {
    --main-color: #b7964b;
    --main-color-rgb: 183, 150, 75;
}

[data-theme="light"][data-color="#b7964b"] {
    --main-color: #b7964b;
    --main-color-rgb: 183, 150, 75;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader .circle {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background-color: var(--main-color);
    margin: 0 10px;
    animation: pulse 1.5s ease infinite;
}

.loader .circle:nth-child(2) {
    animation-delay: 0.2s;
}

.loader .circle:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 5px;
    background-color: var(--main-color);
    width: 0%;
    z-index: 1000;
    transition: width 0.3s ease;
}

/* Scroll To Top */
.scroll-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 40px;
    height: 40px;
    background-color: var(--main-color);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.scroll-top.active {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background-color: var(--text-color);
    color: var(--main-color);
    box-shadow: 0 0 10px var(--main-color);
}

/* Particles Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Remove the overlay approach */
.about::before,
.skills::before,
.projects::before,
.education::before,
.certificates::before,
.contact::before {
    display: none;
}

/* Section background transparency for particle visibility */
section:not(.home) {
    background-color: transparent !important;
}

.skills,
.contact {
    background-color: transparent !important;
}

.education,
.experience,
.projects,
.certificates {
    background-color: rgba(22, 22, 22, 0.3) !important;
}

[data-theme="light"] .education,
[data-theme="light"] .experience,
[data-theme="light"] .projects,
[data-theme="light"] .certificates {
    background-color: rgba(240, 240, 240, 0.3) !important;
}

/* Container backgrounds for better content readability */
.experience-box,
.certificate-box {
    background-color: var(--card-color) !important;
}

/* Home section */
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: var(--bg-color);
    position: relative;
    z-index: 1;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 1000;
    margin-left: 10px;
    flex-shrink: 0;
}

.mobile-nav-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: 0.3s ease;
}

.mobile-nav-toggle:hover .bar {
    background-color: var(--main-color);
}

/* Mobile Navigation */
@media (max-width: 995px) {
    header {
        width: 90%;
        padding: 0.8rem 1.5rem;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .logo {
        font-size: 2.2rem;
    }

    nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        background-color: rgba(var(--second-bg-color-rgb), 0.6);
        backdrop-filter: blur(8px);
        border-radius: 20px;
        padding: 2rem;
        z-index: 999;
        transition: right 0.5s ease;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        overflow-x: visible;
        border-left: none;
        border-bottom: none;
        border-top: none;
    }

    nav.active {
        right: 5%;
        display: block;
    }

    nav a {
        display: block;
        font-size: 2rem;
        margin: 2rem 0;
        text-align: center;
        padding: 0.5rem;
        border-bottom: none;
    }

    nav a:after {
        display: none;
    }

    nav a:hover,
    nav a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: none;
        background-color: rgba(var(--main-color-rgb), 0.2);
    }

    .mobile-nav-toggle.active .bar:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .mobile-nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}

/* Remove conflicting older mobile navigation styles */
@media(max-width:995px) {
    nav a.active {
        border-bottom: none;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
    transition: 0.3s ease;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
}

header {
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    padding: 0.8rem 2.5rem;
    background-color: rgba(var(--bg-color-rgb), 0.5);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: transform 0.4s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-left: 1px solid var(--main-color);
    border-right: 1px solid var(--main-color);
}

/* Header background when scrolled */
header.scrolled {
    background-color: rgba(var(--bg-color-rgb), 0.6);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
    padding: 0.8rem 2.5rem;
}

/* Header hidden when scrolling down */
header.hidden {
    transform: translate(-50%, -100%);
}

.logo {
    font-size: 2.5rem;
    color: var(--main-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
    white-space: nowrap;
    flex-shrink: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo:hover {
    transform: scale9(1.1);
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for navigation */
nav::-webkit-scrollbar {
    display: none;
}

/* Navigation links with improved readability */
nav a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin: 0 1rem;
    padding: 0.3rem 0.2rem;
    font-weight: 600;
    transition: 0.3s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

nav a:hover,
nav a.active {
    color: var(--main-color);
}

nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--main-color);
    left: 0;
    bottom: -2px;
    transition: width 0.3s ease;
}

nav a:hover:after,
nav a.active:after {
    width: 100%;
}

@media(max-width:995px) {
    nav {
        /* Remove conflicting styles */
        position: fixed;
        border-left: none;
        border-bottom: none;
        border-bottom-left-radius: 0;
        padding: 2rem;
        border-top: none;
    }

    nav.active {
        display: block;
    }

    nav a {
        display: block;
        font-size: 2rem;
        margin: 3rem;
    }

    nav a:hover,
    nav a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: none;
        background-color: rgba(var(--main-color-rgb), 0.2);
    }
}


section {
    min-height: 100vh;
    padding: 10rem 9% 5rem;
    position: relative;
    z-index: 1;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background-color: var(--bg-color);
}

.home .home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}


span {
    color: var(--main-color);
}

.home-content h3 {
    font-size: 3.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.home-content p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
}

.home-img {
    border-radius: 50%;
}

.home-img img {
    position: relative;
    width: 35vw;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--main-color);
    cursor: pointer;
    transition: 0.3s ease;
    border: 2px solid var(--main-color);
}

.home-img img:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px var(--main-color);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    border: 0.2rem solid var(--main-color);
    font-size: 2rem;
    border-radius: 50%;
    margin: 3rem 1.5rem 3rem 0;
    transition: 0.3s ease;
    color: var(--main-color);
}

.social-icons a:hover {
    color: black;
    transform: scale(1.3) translateY(-5px);
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background-color: var(--main-color);
    color: var(--bg-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--main-color);
}

.typing-text {
    font-size: 34px;
    font-weight: 600;
    min-width: 280px;
}

.typing-text span {
    position: relative;
}

.typing-text span::before {
    content: "software Developer";
    color: var(--main-color);
    animation: words 20s infinite;
}

.typing-text span::after {
    content: "";
    background-color: var(--bg-color);
    position: absolute;
    width: calc(100% + 8px);
    height: 100%;
    border-left: 3px solid var(--bg-color);
    right: -8;
    animation: cursor 0.6s infinite;
}

@keyframes cursor {
    to {
        border-left: 3px solid var(--main-color);
    }
}

/* */
@keyframes words {

    0%,
    20% {
        content: "";
    }

    21%,
    40% {
        content: "";
    }

    41%,
    60% {
        content: "";
    }

    61%,
    80% {
        content: "";
    }

    81%,
    100% {
        content: "";
    }
}

@media (max-width: 1000px) {
    .home {
        gap: 4rem;
    }
}

@media(max-width:995px) {
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }

    .home .home-content h3 {
        font-size: 2.5rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    font-size: 2.2rem;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-toggle:hover {
    color: var(--main-color);
    transform: rotate(30deg);
}

/* Section Headings */
.heading {
    text-align: center;
    font-size: 4.5rem;
    margin-bottom: 5rem;
    color: var(--text-color);
}

/* Skills Section */
.skills {
    background-color: var(--bg-color);
    position: relative;
    z-index: 1;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-box {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2.5rem;
    /* Matched education box padding for consistency if okay, or stick to existing */
    padding: 2rem;
    /* Keeping original padding */
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    /* Keeping original shadow base but might want to update */
    transition: 0.5s ease;
}

.skill-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--main-color);
    border-color: var(--main-color);
}

.skill-box h3 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background-color: var(--main-color);
    color: var(--bg-color);
    font-size: 1.4rem;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    display: inline-block;
}

/* Education & Experience Sections */
.education,
.experience {
    background-color: var(--second-bg-color);
    position: relative;
    z-index: 1;
}

.education-container,
.experience-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.experience-box {
    background-color: var(--bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 0.2rem solid var(--main-color);
    transition: 0.5s ease;
}

.education-box {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: 0.5s ease;
}

.education-box:hover,
.experience-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--main-color);
    border-color: var(--main-color);
}

.education-content h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.education-content p {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.education-content .highlight {
    color: var(--main-color);
    font-weight: 600;
    margin-top: 1rem;
}

/* Certificates Section */
.certificates {
    background-color: var(--second-bg-color);
    position: relative;
    z-index: 1;
}

.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.certificate-box {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: 0.5s ease;
}

.certificate-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--main-color);
}

.certificate-img {
    position: relative;
    overflow: hidden;
    height: 180px;
}

.certificate-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.certificate-box:hover .certificate-img img {
    transform: scale(1.1);
}

.certificate-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.5s ease;
}

.certificate-box:hover .certificate-overlay {
    opacity: 1;
}

.certificate-link {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--main-color);
    color: var(--bg-color);
    font-size: 1.6rem;
    border-radius: 4rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.certificate-link:hover {
    background-color: var(--bg-color);
    color: var(--main-color);
    box-shadow: 0 0 10px var(--main-color);
}

.certificate-content {
    padding: 2rem;
}

.certificate-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.8rem;
}

.certificate-content p {
    font-size: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background-color: var(--bg-color);
    position: relative;
    z-index: 1;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-box {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-right: 2rem;
}

.contact-item h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-item p {
    font-size: 1.6rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4.5rem;
    height: 4.5rem;
    background-color: var(--bg-color);
    border-radius: 50%;
    color: var(--main-color);
    font-size: 2rem;
    transition: 0.3s ease;
}

.social-links a:hover {
    background-color: var(--main-color);
    color: var(--bg-color);
    transform: translateY(-5px);
}

.contact form {
    max-width: 100%;
    margin: 0 auto;
}

.input-box {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.input-box input {
    width: 48%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background-color: var(--second-bg-color);
    border-radius: var(--border-radius);
    margin: 0.7rem 0;
}

textarea {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.6rem;
    color: var(--text-color);
    background-color: var(--second-bg-color);
    border-radius: var(--border-radius);
    margin: 0.7rem 0 2rem;
    resize: none;
}

/* Footer Section */
.footer {
    background-color: var(--second-bg-color);
    padding: 4rem 9%;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info h3,
.footer-contact h3,
.footer-links h3 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.footer-info p,
.footer-contact p {
    font-size: 1.6rem;
    color: var(--text-color);
    line-height: 1.8;
}

.footer-contact p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-contact i {
    color: var(--main-color);
    margin-right: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    font-size: 1.6rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    transition: 0.3s ease;
}

.footer-links a:hover {
    color: var(--main-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    border-top: 2px solid var(--bg-color);
    padding-top: 2rem;
}

.footer-bottom p {
    font-size: 1.6rem;
    color: var(--text-color);
}

/* CV Download Button */
.cv-download {
    position: fixed;
    left: 30px;
    bottom: 30px;
    z-index: 99;
}

.cv-download .btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.cv-download .btn i {
    font-size: 1.8rem;
}

/* Animations */
@keyframes progress {
    from {
        width: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-box,
.skill-box,
.education-box,
.experience-box,
.certificate-box {
    animation: fadeIn 1s ease-out;
}

/* Responsive Design */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media (max-width: 991px) {
    section {
        padding: 10rem 4% 2rem;
    }

    .home {
        flex-direction: column-reverse;
        text-align: center;
    }

    .home-content h1 {
        font-size: 4.5rem;
    }

    .home-img img {
        width: 60vw;
        margin-top: 4rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 50%;
    }

    header {
        width: 95%;
        padding: 0.8rem 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .input-box input {
        width: 100%;
    }

    .cv-download {
        left: 20px;
        bottom: 20px;
    }

    .controls-container {
        position: absolute;
        right: 10px;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }

    header {
        width: 98%;
        padding: 0.7rem 1rem;
    }

    .home-img img {
        width: 90vw;
    }

    .footer {
        text-align: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2.4rem);
    }

    100% {
        transform: translateY(0);
    }
}

/* Theme Controls Container */
.controls-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Theme Toggle and Theme Selector */
.theme-toggle,
.theme-selector-toggle {
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.theme-toggle:hover,
.theme-selector-toggle:hover {
    color: var(--main-color);
    transform: rotate(30deg);
}



/* Theme Settings Panel */
.theme-settings {
    position: fixed;
    top: 15%;
    right: -300px;
    width: 280px;
    background-color: var(--second-bg-color);
    padding: 2rem;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.5s ease;
}

.theme-settings.open {
    right: 0;
}

.theme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--main-color);
    padding-bottom: 1rem;
}

.theme-header h3 {
    font-size: 2rem;
    color: var(--text-color);
}

.close-theme-settings {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: 0.3s ease;
}

.close-theme-settings:hover {
    color: var(--main-color);
}

.theme-mode h4,
.accent-color h4 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.theme-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: 0.3s ease;
}

.theme-option:hover {
    transform: translateY(-5px);
}

.option-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 0.5rem;
    border: 2px solid transparent;
    transition: 0.3s ease;
}

.theme-option[data-mode="dark"] .option-preview {
    background-color: #161616;
}

.theme-option[data-mode="light"] .option-preview {
    background-color: #f0f0f0;
}

.theme-option.active .option-preview {
    border-color: var(--main-color);
}

.theme-option span {
    font-size: 1.4rem;
    color: var(--text-color);
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s ease;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-color);
}

/* Projects Section with 3D Flip Cards */
.projects {
    background-color: var(--second-bg-color);
    position: relative;
    z-index: 1;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    perspective: 1000px;
}

.project-card {
    height: 380px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

.project-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: 0.5s ease;
}

.project-card:hover .card-front,
.project-card:hover .card-back {
    border-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}

.card-back {
    transform: rotateY(180deg);
    justify-content: space-between;
}

.card-front img {
    width: 100%;
    height: 70%;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.card-front h3,
.card-back h3 {
    font-size: 2.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.card-back p {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.project-tech span {
    background-color: var(--main-color);
    color: var(--bg-color);
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

.project-links {
    display: flex;
    justify-content: space-between;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--main-color);
    font-size: 1.6rem;
    transition: 0.3s ease;
}

.project-links a:hover {
    color: var(--text-color);
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }

    .controls-container {
        position: absolute;
        right: 80px;
    }

    .language-switcher select {
        font-size: 1.2rem;
        padding: 0.3rem 0.8rem;
    }

    .theme-settings {
        width: 250px;
    }
}

@media (max-width: 1100px) {
    nav a {
        font-size: 1.5rem;
        margin: 0 0.6rem;
    }

    .logo {
        font-size: 2.2rem;
    }
}

@media (max-width: 995px) {
    header {
        width: 90%;
        padding: 0.8rem 1.5rem;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .logo {
        font-size: 1.8rem;
    }

    nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        background-color: rgba(var(--second-bg-color-rgb), 0.9);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 2rem;
        z-index: 999;
        transition: right 0.5s ease;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        flex-direction: column;
        overflow-x: visible;
    }

    nav a {
        margin: 1rem 0;
        font-size: 1.6rem;
        text-align: center;
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    header {
        width: 95%;
        padding: 0.8rem 1.2rem;
    }

    .controls-container {
        gap: 0.5rem;
    }

    .language-switcher select {
        padding: 0.3rem 0.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 450px) {
    header {
        width: 98%;
        padding: 0.7rem 1rem;
    }

    .logo {
        font-size: 1.6rem;
    }

    .theme-toggle,
    .theme-selector-toggle {
        width: 24px;
        height: 24px;
        font-size: 1.6rem;
    }

    .language-switcher {
        display: none;
    }
}

/* Adjust text shadow for light theme */
[data-theme="light"] nav a,
[data-theme="light"] .logo {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}