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

:root {
    --BGC: #0b0f14;
    --CC: #11171d;
    --TC: #0fe1fd;
    --TC-Dim: rgba(15, 225, 253, 0.1);
    --Text-Main: #ccd6f6;
    --Text-Dim: #8892b0;
}

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    background-color: var(--BGC);
    color: var(--Text-Dim);
}

/* Accessibility: Hide labels visually but keep them readable for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #1c2a36;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--TC);
}

body {
    width: 100%;
    min-height: 100vh;
    display: grid;
}

.header {
    height: 70px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header_name {
    padding: 7px 20px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    color: var(--TC);
    background: rgba(34, 42, 51, 0.8);
    backdrop-filter: blur(15px);
}

.header_name_h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.header_links {
    padding: 7px;
    border-radius: 8px;
    display: flex;
    gap: 25px;
    background: rgba(34, 42, 51, 0.8);
    backdrop-filter: blur(15px);
    position: relative;
}

.header_links_a {
    padding: 7px 20px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
    color: var(--Text-Dim);
    position: relative;
    z-index: 2;
}

.header_links_a:hover,
.header_links_a.active {
    color: var(--TC);
}

.linkBackground {
    position: absolute;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 1;
}

.content {
    display: flex;
    flex-direction: column;
}

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

.welcomeMainText {
    text-align: center;
    color: var(--TC);
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    margin-bottom: 10px;
}

.name {
    margin: 0;
    font-size: 80px;
    font-weight: 700;
    text-align: center;
    line-height: 1.1;
    background: linear-gradient(to right, #e6f1ff, var(--TC));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(15, 225, 253, 0.2));
}

.title {
    font-family: 'JetBrains Mono', monospace;
    margin: 20px auto;
    font-size: 35px;
    text-align: center;
}

.btn {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.welcomeBtn {
    padding: 14px 28px;
    text-decoration: none;
    font-size: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    color: var(--BGC);
    background-color: var(--TC);
    border: 1px solid var(--TC);
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(15, 225, 253, 0.2);
}

.welcomeBtn:hover {
    background-color: transparent;
    color: var(--TC);
    transform: translateY(-3px);
}

/* --- Shared Section Formatting --- */
.section-container {
    opacity: 0;
    /* Handled by JS IntersectionObserver */
    padding: 100px 10%;
    margin: 0 auto;
    max-width: 1200px;
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header hr {
    flex-grow: 0;
    width: 100px;
    border: none;
    height: 1px;
    background-color: #233554;
    transition: all 0.5s ease;
}

.section-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--Text-Main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 24px;
    color: var(--TC);
    font-weight: 400;
}

.section-text {
    font-size: 18px;
    line-height: 1.6;
}

.section-text span {
    color: var(--TC);
}

@keyframes show {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes growUp {
    from {
        flex-grow: 0;
        background-color: #233554;
    }

    to {
        flex-grow: 1;
        background-color: var(--TC);
    }
}

/* --- Cards (Unified for Projects & Certifications) --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.card {
    display: flex;
    flex-direction: column;
    background: rgba(17, 23, 29, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.card:hover {
    transform: translateY(-7px);
    border-color: var(--TC);
    box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.cardImage {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #143d46;
}

.cardContent {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cardTitle {
    margin: 0 0 10px 0;
    color: var(--Text-Main);
    font-size: 22px;
}

.cardSubtitle {
    color: var(--Text-Dim);
    font-size: 15px;
    margin-bottom: 5px;
}

.cardSubtitle span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--TC);
}

.cardDescription {
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.usedSkill {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 15px;
}

.usedSkill span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--TC);
}

.cardLink {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: rgba(11, 15, 20, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .cardLink {
    opacity: 1;
    pointer-events: auto;
}

.cardLink i {
    font-size: 40px;
    color: var(--TC);
    transition: transform 0.3s;
}

.cardLink i:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px var(--TC));
}

/* --- Skills --- */
.skillsContainer {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.skill {
    width: 120px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(17, 23, 29, 0.5);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}

.skill img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

.skill p {
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    transition: color 0.3s;
}

.skill:hover {
    border-color: var(--TC);
    transform: translateY(-5px);
    background: rgba(17, 23, 29, 0.8);
}

.skill:hover img {
    transform: scale(1.1);
}

.skill:hover p {
    color: var(--TC);
}

/* --- Contact & Forms --- */
.contactContent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.contactForm {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contactForm input,
.contactForm textarea {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #233554;
    background-color: rgba(17, 23, 29, 0.8);
    color: var(--Text-Main);
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.contactForm input:focus,
.contactForm textarea:focus {
    border-color: var(--TC);
    background-color: rgba(17, 23, 29, 1);
}

/* --- Footer & UI Elements --- */
.footer {
    padding: 30px;
    text-align: center;
    background-color: #020c1b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
}

.link {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.link i {
    font-size: 22px;
    transition: all 0.3s;
    color: var(--Text-Dim);
}

.link i:hover {
    color: var(--TC);
    transform: translateY(-3px);
}

.backToTop {
    display: none;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    position: fixed;
    bottom: 30px;
    right: 30px;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    background-color: var(--TC);
    z-index: 150;
}

.backToTop i {
    font-size: 22px;
    color: var(--BGC);
    animation: moving 1s infinite alternate;
}

.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--BGC);
    color: var(--TC);
    text-align: center;
    border: 1px solid var(--TC);
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 200;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    box-shadow: 0px 0px 20px #0fe1fd3a;
    font-family: 'JetBrains Mono', monospace;
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* --- Animations --- */
@keyframes moving {
    from {
        transform: translate(0, 5px);
    }

    to {
        transform: translate(0, -3px);
    }
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

.spheres {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.sphere1,
.sphere2,
.sphere3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    background: #0fe1fd33;
}

/* Desktop Animations */
@media (min-width: 769px) {
    .sphere1 {
        width: 400px;
        height: 400px;
        top: 10%;
        left: 10%;
        animation: floatSphere1 10s infinite alternate;
    }

    .sphere2 {
        width: 500px;
        height: 500px;
        top: 10%;
        left: 70%;
        animation: floatSphere2 12s infinite alternate;
    }

    .sphere3 {
        width: 300px;
        height: 300px;
        top: 60%;
        left: 50%;
        animation: floatSphere3 11s infinite alternate;
    }

    @keyframes floatSphere1 {
        to {
            transform: translate(500px, 100px);
        }
    }

    @keyframes floatSphere2 {
        to {
            transform: translate(-200px, 200px);
        }
    }

    @keyframes floatSphere3 {
        to {
            transform: translate(-500px, -100px);
        }
    }
}

.menu-btn {
    display: none;
    font-size: 26px;
    color: var(--TC);
    cursor: pointer;
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 0 25px;
        background: rgba(11, 15, 20, 0.8);
        backdrop-filter: blur(20px);
    }

    .header_name {
        background: none;
        backdrop-filter: none;
    }

    .menu-btn {
        display: block;
    }

    .header_links {
        border-radius: 0;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(11, 15, 20, 0.95);
        border-bottom: 1px solid var(--TC);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .header_links.active {
        max-height: 400px;
    }

    .header_links_a {
        width: 100%;
        text-align: center;
        padding: 25px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .linkBackground {
        display: none;
    }

    .welcome {
        padding: 80px 20px 50px;
    }

    .name {
        font-size: 13vw;
    }

    .btn {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        gap: 15px;
    }

    .welcomeBtn {
        width: 100%;
        text-align: center;
    }

    .section-container {
        padding: 60px 20px;
    }
}