* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    outline: none;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

:root {
    --bg-color: #161E31;
    --sec-bg-color: #424769;
    --text-color: #ffffff;
    --key-color: #f9b178;
    --swiper-theme-color: #ffffff !important;
    --swiper-navigation-size: 35px !important;
}

html {
    font-size: 60%;
    overflow-x: hidden;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

section {
    min-height: 100vh;
    padding: 10rem 8% 2rem;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 2rem;
    color: var(--text-color);
    font-weight: 700;
    transition: .5s ease;
    /* cursor: default; */
}

.logo img {
    height: 2.4vh;
}

.logo:hover {
    box-shadow: none;
    transform: scale(1.1);
}


.navbar a {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 700;
}

.navbar a:hover,
.navbar a.active {
    color: var(--key-color);
}

#menu-icon {
    font-size: 3.5rem;
    color: var(--text-color);
    display: none;
}

.home {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-content h3 {
    font-size: 3.2rem;
    font-weight: 700;
}

.home-content h3:nth-of-type(2) {
    margin-bottom: 2rem;
}

span {
    color: var(--key-color);
}

.home-content h1 {
    font-size: 5.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.home-img img {
    width: 25vw;
    animation: floatImage 5s ease-in-out infinite;
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3rem);
    }

    100% {
        transform: translateY(0);
    }
}

.home-content {
    font-size: 1.5rem;
}

.social-media a {
    color: var(--key-color);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    border: 0.2rem solid var(--key-color);
    border-radius: 30%;
    font-size: 2rem;
    margin: 3rem 1.5rem 3rem 0;
    transition: .5s ease;
}

.social-media a:hover {
    background: var(--key-color);
    color: var(--sec-bg-color);
    box-shadow: 0 0 0.7rem var(--key-color);
}

.btn-container {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background: var(--key-color);
    color: var(--bg-color);
    border-radius: 3rem;
    font-size: 1.5rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn.git {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2.3rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

.btn.git i {
    font-size: 2rem;
}

.btn:hover,
.btn#cv:hover {
    box-shadow: 0 0 0.7rem var(--key-color);
    background: none;
    color: var(--key-color);
}

.about {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 10rem 15% 2rem;
}

.about-img img {
    width: 20vw;
}

.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.5rem;
    margin: 2rem 0 3rem;
}

#skill {
    padding: 8rem 8% 2rem;
}


.skill h3 {
    font-size: 2.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.card-container,
.single-card {
    height: 400px;
    max-width: 300px;
    margin: auto;
    position: relative;
}

.cards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.card-container {
    perspective: 900px;
    transform: none;
}

.single-card {
    text-align: center;
    transition: all 2.5s cubic-bezier(0.7, -.5, 0.3, 1.8);
    transform-style: preserve-3d;

}

.card-container:hover .single-card {
    transform: rotateY(180deg);
}

.card-container.flipped .single-card {
    transform: rotateY(180deg);
}

.card-container.unflipped .single-card {
    transform: none;
}

.front,
.back {
    width: 300px;
    position: relative;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    background: var(--sec-bg-color);
}

.front {
    cursor: pointer;
    height: 100%;
    backface-visibility: hidden;
    padding: 3rem 2rem;
    border-radius: 5rem;
    text-align: center;
}

.back {
    height: 100%;
    transform: rotatey(180deg);
    position: absolute;
    border-radius: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.content h3 {
    min-height: 10vh;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.content p {
    line-height: 1.7;
}

.content-back {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 2rem;
    justify-content: center;
    align-items: center;
}

.content-back img {
    padding: 0.5rem;
    height: 6rem;
    padding: 1.5rem;
    border-radius: 2rem;
    background: white;

}

.card-container i {
    font-size: 7rem;
    color: var(--key-color);
}

.card-container h3 {
    margin-top: 2rem;
    font-size: 2.6rem;
}

.card-container p {
    font-size: 1.5rem;
    margin: 1rem 0;
}

.project h2 {
    margin-bottom: 2rem;
}

.swiper {
    width: 100%;
    height: 100%;
    margin-left: auto;
    margin-right: auto;
}

.swiper-slide {
    padding: 0 4rem;
    padding-bottom: 4rem;
    text-align: center;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-pagination-bullet {
    background: var(--swiper-pagination-bullet-inactive-color, #ffffff) !important;
}

.swiper-button-prev,
.swiper-button-next {
    font-weight: bold;

}

.project-container {
    display: flex;
    justify-content: center;
    align-items: center;
    row-gap: 2rem;
    padding-block: 1rem;
    gap: 2rem;
    flex-wrap: wrap;
}



.project-card {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    width: 38rem;
    height: 26rem;
    margin: auto;
    border-radius: 2rem;
}

.project-card.big {
    width: 48rem;
    height: 26rem;
}

.project-card.big#speech {
    display: none;
}

.swiper-slide.big {
    padding: 0 15rem;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.project-modal {
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: top .4s;
    padding: 3rem;
    backdrop-filter: blur(4px);
    background: linear-gradient(to top, hsla(0, 0%, 0%, 0) 0%, var(--key-color) 120%);
}

.project-modal p {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.project-subtitle,
.project-button {
    color: var(--text-color);
    font-size: 1.5rem;
}

.project .btn {
    background-color: var(--sec-bg-color);
    color: var(--text-color);
    margin-top: 1rem;
}

.project .btn:hover {
    box-shadow: none;
    transform: scale(1.1);
}

.project-subtitle-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.2rem 1rem;
}

.project-subtitle-container p {
    font-size: 1rem;
}

.project-subtitle {
    margin-bottom: 1rem;
    background-color: var(--text-color);
    padding: 0.5rem 1rem;
    color: var(--bg-color);
    border-radius: 1rem;
    font-weight: 700;
}

.project-subtitle p {
    font-size: 1.2rem;
}

.project-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.2rem;
}

.project-card:hover .project-modal {
    top: 0;
}

.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(100%);
    transition: all 1s;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

.timeline .heading {
    margin-bottom: 2rem;
}

.timeline {
    margin-bottom: 3rem;
}

.timeline body {
    overflow-x: hidden;
    padding-bottom: 50px;
}

.timeline ul li {
    list-style-type: none;
    position: relative;
    width: 6px;
    margin: 0 auto;
    padding-top: 50px;
    background: #fff;
}


.timeline-title {
    margin-right: 2.2rem;
}

.timeline-title h1 {
    font-size: 2rem;
}

.timeline-title p {
    font-size: 1.2rem;
}

.timeline time,
.timeline-title,
.timeline-desc {
    color: var(--bg-color);
    font-size: 1.5rem;
    text-align: center;
}

.timeline-desc {
    font-size: 1.2rem;
}

.timeline ul li:nth-child(1) {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.timeline ul li:last-child {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.timeline ul li::after {
    border-radius: 50%;
    content: "";
    position: absolute;
    left: 50%;
    bottom: 30%;
    transform: translateX(-50%) translateY(-30%);
    width: 20px;
    height: 20px;
    z-index: 2;
    background: #eee;
}

.timeline ul li div {
    position: relative;
    bottom: 0;
    width: 400px;
    padding: 20px;
    background: var(--text-color);
    box-shadow: 4px 8px 20px 1px rgba(249, 177, 120, 0.5);
    box-shadow: 4px 8px 20px 1px rgba(22, 30, 49, 0.5);
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.timeline ul li div time {
    position: absolute;
    background: var(--key-color);
    width: auto;
    height: 30px;
    top: -15px;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    padding: 1rem;
}

.timeline ul li div div {
    padding: 2rem;
    height: 14rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.timeline ul li div div p {
    text-align: center;
}

.timeline ul li div .discovery {
    margin-right: 10px;
}

.timeline ul li:nth-of-type(odd)>div {
    left: 45px;
}

.timeline ul li:nth-of-type(even)>div {
    left: -439px;
}

.timeline ul li div {
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease-in-out;
}

.timeline ul li:nth-of-type(odd) div {
    transform: translate3d(100px, -10px, 0) rotate(10deg);
}

.timeline ul li:nth-of-type(even) div {
    transform: translate3d(-100px, -10px, 0) rotate(10deg);
}

.timeline ul li.in-view div {
    transform: none;
    visibility: visible;
    opacity: 1;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 9%;
    background: var(--sec-bg-color);
}


.footer-text {
    font-size: 1.5rem;
}

.footer-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: .8rem 1rem;

    border-radius: .8rem;
    transition: .5s ease;
}

.footer-icon a {
    transition: transform 0.5s ease-out;
}


.footer-icon a:hover {
    transition: transform 0.5s ease-in;
    transform: scale(1.5);
}

.footer-icon a i {
    font-size: 2rem;
    color: var(--key-color);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
}

@media screen and (max-width: 900px) {
    html {
        font-size: 55%;
    }

    body {
        overflow-x: hidden;
    }

    .header {
        padding: 2rem 3%;
    }

    section {
        padding: 3rem 6%;
        overflow: hidden;
    }

    .home-content {
        overflow-y: hidden;
    }

    .btn {
        font-size: 1.5rem;
        padding: 1rem 1.8rem;
    }

    .skill {
        padding: 7rem;
    }

    .card-container h3 {
        margin-bottom: 1.5rem;
    }

    .single-card,
    .card-container {
        height: auto;
    }

    .front,
    .back {
        height: 100%;
    }

    .swiper-slide.big {
        padding: 0 4rem;
    }

    .project {
        padding-bottom: 7rem;
    }

    .project-card {
        width: 34rem;
        height: 40rem;
    }

    .project-card.big {
        width: 34rem;
        height: 40rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .project-subtitle-container {
        gap:0.5rem;
    }

    
    .project-modal {
        padding: 1rem;
    }

    .project-modal p {
        font-size: 1.2rem;
    }

    .project .btn {
        margin-top: 0;
    }

    .btn.git {
        padding: 2rem;
    }

    .contact {
        min-height: auto;
    }

    .footer {
        padding: 2rem 3%;
    }

    .timeline ul li div {
        width: 250px;
        flex-direction: column;
    }

    .timeline ul li div div {
        width: 80%;
        margin: 10px;
    }

    .timeline ul li:nth-of-type(even)>div {
        left: -289px;
    }
}

@media (max-width: 768px) {
    .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;
    }

    #menu-icon {
        display: block;
    }

    .btn-container {
        justify-content: center;
    }


    .home {
        flex-direction: column;
    }

    .home-content h3 {
        font-size: 2.6rem;
    }

    .home-content h1 {
        font-size: 5rem;
    }

    .home-content {
        text-align: center;
        order: 2;
    }

    .about-content h2,
    .about-content {
        text-align: center;
    }

    .home-img img {
        width: 60vw;
        margin-top: 4rem;
    }

    .about {
        flex-direction: column;
    }

    .about-img img {
        width: 60vw;
        margin-top: 4rem;
    }

    .content h3 {
        min-height: 0;
    }

    .project h2 {
        margin-bottom: 3rem;
    }

    .project-subtitle-container p {
        font-size: 1rem;
    }
    
    .project .btn {
        font-size: 1.2rem;
        margin-top: 1rem;
    }

    .swiper-slide,
    .swiper-slide.big {
        padding: 0 0.6rem;
    }

    .project-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-card {
        width: 18rem;
        height: 30rem;

    }

    .project-card,
    .project-card.big {
        width: 34rem;
        height: 30rem;
    }

    .project-card#speechspark {
        display: none;
    }

    .project-card.big#speech {
        display: block;
    }
}

@media screen and (max-width:600px) {

    .project-container {
        grid-template-columns: 1fr;
    }

    .timeline ul li {
        margin-left: 20px;

    }

    .timeline ul li div {
        width: calc(100vw - 120px);
    }

    .timeline ul li:nth-of-type(even)>div {
        left: 45px;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 45%;
    }
}