@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #1f222d;
    --second-bg-color: #323946;
    --text-color: #fff;
    --main-color: #0ef;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-color);
    color: var(--text-color);
}

body.preload {
    overflow: hidden;
}

.gate-intro {
    position: fixed;
    inset: 0;
    z-index: 3000;
    pointer-events: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
}

.gate {
    background:
        linear-gradient(135deg, rgba(0, 238, 255, 0.15), rgba(31, 34, 45, 0.95)),
        var(--second-bg-color);
    border-right: 1px solid rgba(0, 238, 255, 0.2);
}

.gate-right {
    border-right: none;
    border-left: 1px solid rgba(0, 238, 255, 0.2);
}

.gate-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(3rem, 7vw, 8rem);
    font-weight: 700;
    letter-spacing: .16em;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    opacity: .94;
    text-shadow: 0 0 2rem rgba(0, 238, 255, 0.28);
    transition: opacity 1s ease;
}

.gate-intro.open .gate-left {
    animation: gateOpenLeft 2s cubic-bezier(.22, .61, .36, 1) forwards;
}

.gate-intro.open .gate-right {
    animation: gateOpenRight 2s cubic-bezier(.22, .61, .36, 1) forwards;
}

.gate-intro.open .gate-title {
    opacity: 0;
}

@keyframes gateOpenLeft {
    to { transform: translateX(-100%); }
}

@keyframes gateOpenRight {
    to { transform: translateX(100%); }
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.header.sticky {
    border-bottom: .1rem solid rgba(0, 0, 0, .2);
}

.logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 600;
    cursor: default;
}

.navbar a {
    font-size: 1.7rem;
    color: var(--text-color);
    margin-left: 4rem;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
}

#menu-icon {
    font-size: 3.6rem;
    color: var(--text-color);
    display: none;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-img img {
    width: 35vw;
    animation: floatImage 4s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2.4rem);
    }
    100% {
        transform: translateY(0);
    }
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-child(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--main-color);
}

.home-content h1 {
     font-size: 5.6rem;
     font-weight: 700;
     line-height: 1.3;
}

.home-content p {
    font-size: 1.6rem;
}

.social-media a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: .2rem solid var(--main-color);
    font-size: 2rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.cv-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.cv-buttons .btn {
    text-decoration: none;
}

.open-btn {
    background: transparent;
    border: 2px solid var(--main-color);
    color: var(--main-color);
    transition: 0.3s;
}

.open-btn:hover {
    background: var(--main-color);
}


.btn {
    display: inline-flex;
    justify-content: center;
    padding: 0.5rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 1rem var(--main-color);
    font-size: 1.6rem;
    color: var(--second-bg-color);
    letter-spacing: .1rem;
    cursor: pointer;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
}

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    /* background: var(--second-bg-color); */
    background: radial-gradient(circle at 15% 20%, rgba(0, 238, 255, 0.18), transparent 35%), radial-gradient(circle at 85% 80%, rgba(0, 238, 255, 0.1), transparent 40%), var(--bg-color);
    padding: 5rem 9% 5rem !important;
    min-height: auto;
}

.about-img img {
    width: 35vw;
    border-radius: 10px;
}

.heading {
    text-align: center;
    font-size: 4.5rem;
}

.about-content h2 {
    text-align: left;
    line-height: 1.2;
}

.about-content h3 {
    font-size: 2.6rem;
}

.about-content p {
    font-size: 1.6rem;
    margin: 2rem 0 3rem;
}

.skills {
    position: relative;
}

.skills h2 {
    margin-bottom: 5rem;
}

.skills-slider {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}

.skills-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 50%;
    background: var(--second-bg-color);
    border: .2rem solid rgba(0, 238, 255, 0.35);
    color: var(--main-color);
    cursor: pointer;
    transition: .3s ease;
}

.skills-nav-btn i {
    font-size: 2.8rem;
}

.skills-nav-btn:hover {
    background: var(--main-color);
    color: var(--second-bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}

.skills-container {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    grid-auto-columns: minmax(22rem, 24rem);
    gap: 1.8rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: .5rem .4rem 1rem;
}

.skills-container::-webkit-scrollbar {
    height: 10px;
}

.skills-container::-webkit-scrollbar-thumb {
    background: rgba(0, 238, 255, 0.35);
    border-radius: 20px;
}

.skills-container .skills-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--second-bg-color);
    min-height: 24rem;
    padding: 2.4rem 1.8rem 2.8rem;
    border-radius: 2rem;
    text-align: center;
    border: .2rem solid var(--bg-color);
    opacity: 0;
    overflow: hidden;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    scroll-snap-align: start;
}

.skills-box.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.skills-container .skills-box:hover {
    border-color: var(--main-color);
}

.skills-box .skills-img img {
    height: 6rem;
    width: auto;
    object-fit: contain;
}

.skills-box h3 {
    font-size: 2.1rem;
}

.skills-box p {
    font-size: 1.4rem;
    margin: 1rem 0 2.2rem;
}

.services {
    min-height: auto;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 238, 255, 0.18), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(0, 238, 255, 0.1), transparent 40%),
        var(--bg-color);
    padding-bottom: 8rem;
}

.services .heading {
    margin-bottom: 1.4rem;
}

.services-intro {
    max-width: 70rem;
    margin: 0 auto 4.5rem;
    text-align: center;
    font-size: 1.7rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2rem;
}

.service-card {
    background: rgba(50, 57, 70, 0.72);
    border: 1px solid rgba(0, 238, 255, 0.25);
    border-radius: 1.8rem;
    padding: 3rem 2.4rem;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--main-color);
    box-shadow: 0 18px 45px rgba(0, 238, 255, 0.2);
}

.service-card i {
    display: inline-flex;
    width: 5.4rem;
    height: 5.4rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1.7rem;
    font-size: 2.8rem;
    background: rgba(0, 238, 255, 0.12);
    color: var(--main-color);
    border: 1px solid rgba(0, 238, 255, 0.4);
}

.service-card h3 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1.5rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
}

.portfolio {
    background: var(--second-bg-color);   
}

.portfolio h2 {
    margin-bottom: 4rem;
}

.portfolio-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    gap: 2.5rem;
}

.portfolio-container .portfolio-box {
    position: relative;
    border-radius: 2rem;
    box-shadow: 0 0 1rem var(--bg-color);
    overflow: hidden;
    display: flex;
}

.portfolio-box img {
    width: 100%;
    transition: .5s ease;
}

.portfolio-box img:hover {
    transform: scale(1.1);
}

.portfolio-box .portfolio-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, .1), var(--bg-color));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 4rem;
    transform:  translateY(100%);
    transition: .3s ease;
}

.portfolio-box:hover .portfolio-layer {
    transform: translateY(0);
}

.portfolio-layer h4 {
    font-size: 3rem;
}

.portfolio-layer p {
    font-size: 1.3rem;
    margin: .3rem 0 1rem;
}

.portfolio-layer a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 5rem;
    height: 5rem;
    background-color: var(--text-color);
    border-radius: 50%;
}

.portfolio-layer a i {
    font-size: 2rem;
    color: var(--second-bg-color);
}

/* Modal background */
.modal {
    display: none; 
    position: fixed; 
    z-index: 999; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

/* Modal content */
.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Close button */
.modal .close {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 2rem;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    z-index: 10;
}

.open-modal-btn {
    background: transparent;
    border: none;
    outline: none;
    margin: 5px 0;
    color: #0ef;
    cursor: pointer;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.open-modal-btn:hover {
    transform: scale(1.1);
}

#sliderModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.filament-modal-content {
    background: #1a1a1a;
    padding: 20px;
    max-width: 900px;
    width: 90%;
    border-radius: 10px;
    position: relative;
}

.close-slider {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    z-index: 100;
}

.dynamicSwiper img {
    width: 100%;
    border-radius: 10px;
}

.new-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff0000, #ff5c5c);
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.4);
    z-index: 10;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.footer {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 2rem 9%;
    /* background: var(--bg-color); */
    background: radial-gradient(circle at 15% 20%, rgba(0, 238, 255, 0.18), transparent 35%), radial-gradient(circle at 85% 80%, rgba(0, 238, 255, 0.1), transparent 40%), var(--bg-color);
}

.footer-text {
    font-size: 1.6rem;
}

.footer-iconTop a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem;
    background: var(--main-color);
    border-radius: .8rem;
    transition: .5s ease;
}

.footer-iconTop a:hover {
    box-shadow: 0 0 1rem var(--main-color);
}

.footer-iconTop a i {
    font-size: 2.4rem;
    color: var(--second-bg-color);
}

.footer-email {
    margin-top: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.footer-email i {
    font-size: 18px;
}

.footer-email a {
    color: #fff;
    transition: 0.3s ease;
}

.footer-email a:hover {
    color: #0ef; 
}

/* BREAKPOINTS */

@media only screen and  (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media only screen and  (max-width: 991px) {
    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 10rem 3% 2rem;
    }

    .skills {
        padding-bottom: 7rem;
    }

    .portfolio {
        padding-bottom: 7rem;
    }

    .skills-container .skills-box {
        min-height: 22rem;
    }

    .footer {
        padding: 2rem 3%;
    }

}

@media only screen and  (max-width: 768px) {
    #menu-icon {
        display: block;
    }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }

    .navbar.active {
        display: block;
    }

    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }

    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    } 

    .home-img img {
        width: 70vw;
    }

    .about {
        flex-direction: column-reverse;
    }

    .about img {
        width: 70vw;
        margin-top: 4rem;
    }

    .skills h2 {
        margin-bottom: 3rem;
    }

    .portfolio h2 {
        margin-bottom: 3rem;
    }

    .portfolio-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .skills-slider {
        grid-template-columns: 1fr;
    }

    .skills-nav-btn {
        display: none;
    }

    .skills-container {
        grid-auto-columns: minmax(19rem, 22rem);
        gap: 1.4rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
}

@media only screen and  (max-width: 617px) {
    .portfolio-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
}

@media (max-width: 365px) {
    .home-img img {
        width: 90vw;
    }

    .about-img img {
        width: 90vw;
    }

    .footer {
        flex-direction: column-reverse;
    }

    .footer p {
        text-align: center;
        margin-top: 2rem;
    }
}

/* Animations */

@keyframes highlightCV {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 238, 255, 0);
    }
    40% {
        transform: scale(1.07) rotate(5deg);
        box-shadow: 0 0 1.2rem var(--main-color), 0 0 2.8rem rgba(0, 238, 255, 0.55);
    }
    100% {
        transform: scale(1) rotate(0);
        box-shadow: 0 0 0 rgba(0, 238, 255, 0);
    }
}

.highlight {
    animation: highlightCV 1s ease-in-out 1;
    border-radius: 5px;
}
