@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

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

:root {
    --primary: #c41016;
    --primary-50: #c410162f;
    --primary-10: #c410160d;
    --white: white;
    --light: #f8f8f8;
    --light-50: #f8f8f82c;
    --light-10: #f8f8f80a;
    --background: #0f0f0f;
    --background-card:#ffffff05;;
    --border-card: #ffffff1a;
    --dark: #111111;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    height: 100vh;
    overflow-x: none;
    background-color: var(--background);
    color: var(--light);
}
h2{
    font-weight: 300;
}
p {
    color: var(--light);
    font-weight: 300;
}

.nav-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    position: fixed;
    background-color: var(--background-card);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--primary-10);
    padding: 8px 200px;
    z-index: 100;
}

.logo img {
    width: 30px;
}

.menu {
    display: flex;
}

.menu li {
    padding-left: 50px;
}

.menu li a {
    font-size: 1.6rem;
    display: inline-block;
    text-decoration: none;
    color: var(--light);
    text-align: center;
    padding: 10px 0;
    transition: 0.15s ease-in-out;
    position: relative;
}

.menu li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: 0.15s ease-in-out;
}

.open-menu .fa-bars:before {
    color: var(--primary);
}

.menu li a:hover:after {
    width: 100%;
}

.open-menu,
.close-menu {
    position: absolute;
    color: var(--primary);
    cursor: pointer;
    font-size: 2rem;
    display: none;
}

span.menu {
    background-color: transparent;
}

.language-select {
    padding-left: 50px;
    display: flex;
    align-items: center;
}

.language-select svg {
    padding-left: 8px;
}

.language-select a {
    text-decoration: none;
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.4rem, 2vw, 1.6rem);
}

.open-menu {
    top: 38px;
    right: 24px;
    transform: translateY(-50%);
}

.close-menu {
    top: 25px;
    right: 25px;
}

#check {
    display: none;
}

.reading-indicator {
    position: fixed;
    top: 54px;
    left: 0;
    width: 0;
    height: 0.3rem; /* Adjusted height to be more typical for a reading indicator */
    background-color: var(--primary);
    transition: width 0.2s linear;
    z-index: 99;
}

@keyframes growReading {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.logo {
    width: 40px;
}

section {
    padding: 200px;
}

section.home {
    min-height: 100svh;
}

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

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

.home-content h3 {
    font-size: clamp(2.4rem, 6vw, 3rem);
    font-weight: 700;
}

.home-content p {
    font-size: clamp(1.4rem, 3vw, 1.6rem);
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background-color: transparent;
    font-size: clamp(1.6rem, 3vw, 2rem);
    border-radius: 50%;
    transition: 0.3s ease;
    color: var(--light);
    z-index: 10;
}

.social-icons a:not(:last-child) {
    margin: 3rem 1.5rem 3rem 0;
}

.social-icons a:hover {
    color: var(--light);
    transform: scale(1.1);
    background-color: var(--background-card);
    box-shadow: 0 0 16px var(--light-50);
}

.btn {
    display: inline-block;
    width: auto;
    padding: 1rem 2.8rem;
    background-color: var(--primary);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: white;
    letter-spacing: 0.3rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn2 {
    display: inline-block;
    width: auto;
    padding: 1rem 2.8rem;
    background-color: var(--dark);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--primary);
    letter-spacing: 0.3rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}

.btn2:hover {
    transform: scale3d(1.03);
    background-color: var(--primary);
    color: white;
    box-shadow: 0 0 16px var(--primary-50);
    border: none;
}

.btn:hover {
    transform: scale3d(1.03);
    background-color: var(--primary);
    color: white;
    box-shadow: 0 0 16px var(--primary);
    border: none;
}

.mouse {
    width: 32px;
    height: 60px;
    border: 3px solid var(--light);
    border-radius: 48px;
    position: absolute;
    bottom: 5%;
}

.mouse::before {
    position: absolute;
    content: "";
    width: 8px;
    height: 15px;
    background-color: var(--primary);
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50px;
    animation: scroll 1s infinite;
}

@keyframes scroll {
    from {
        opacity: 1;
        top: 10px;
    }
    to {
        opacity: 0;
        top: 50px;
    }
}

.typewriter {
    color: var(--light);
    font-size: 3rem;
    font-weight: 700;
}

.typewriter-text {
    font-size: 6rem;
    background-image: linear-gradient(43deg, var(--primary) 0%, var(--background-card) 100%);
    background-clip: text;
    color: transparent;
    animation: gradient-animation 10s radial infinite;
}

@keyframes gradient-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.typewriter-label {
    font-size: 6rem;
    color: var(--primary);
    font-weight: bold;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from,
    to {
        color: transparent;
    }
    50% {
        color: var(--primary);
    }
}

.title-section {
    margin-bottom: 24px;
    font-weight: 200;
    font-size: clamp(1.6rem, 6vw, 1.8rem);
    color: var(--light-50);
    display: flex;
    justify-content: flex-start;
}

 .readtime {
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}
.readtime p {
    color: var(--light-50);
    font-weight: 400;
}

.title-card {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--primary);
}

.card-description,
.contact-info {
    list-style: none;
    font-size: clamp(1.4rem, 3vw, 1.6rem);
    color: var(--light);
    font-weight: 300;
    line-height: 1.5;
}

.card-description {
    margin-bottom: 16px;
}

.container-image {
    width: 100%;
}

.cards-container .title-card {
    margin-bottom: 8px;
}

.card-content .btn2 {
    background-color: var(--dark);
    margin: 0;
    color: var(--primary);
}

.card-content .btn2:hover {
    background-color: var(--primary);
    color: white;
}

.card-content .card-description {
    margin-bottom: 32px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping to new rows */
    justify-content: center;
    gap: 48px;
}

.card-container {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    padding: 24px;
    position: relative;
    flex: 1 1 calc(50% - 24px); /* Each card takes 50% width minus half the gap */
    max-width: calc(50% - 24px); /* Ensures a max width for better consistency */
    box-sizing: border-box;
}

.card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.img-container {
    width: 100%;
    height: 350px; /* Set a fixed height for the image container */
}

.project-img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover; /* Ensure the image covers the container */
}

.card-container:hover::before {
    opacity: 1;
}

.card-container::before {
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), var(--light-10), transparent 40%);
    border-radius: inherit;
    content: "";
    height: 100%;
    left: 0px;
    opacity: 0;
    position: absolute;
    top: 0px;
    transition: opacity 500ms;
    width: 100%;
    z-index: -2;
}

.button-project {
    display: flex;
    justify-content: flex-start;
    margin-top: auto; /* Ensure the button is at the bottom */
}

.button-project .btn2 {
    background-color: var(--dark);
    color: var(--primary);
}

.button-project .btn2:hover {
    background-color: var(--primary);
    color: white;
}

.my-image {
    max-width: 80%;
    z-index: 2;
    position: relative;
    background-color: var(--background-card);
    backdrop-filter: blur(4px);
    border-radius: 24px;
    min-width: 330px;
}

.shape {
    height: 100%;
    width: 80%;
    background-color: var(--background-card);
    border-radius: 24px;
    position: absolute;
    z-index: 1;
    top: 5%;
    left: 5%;
    min-width: 335px;
}

.content-about {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.left-container {
    display: flex;
    flex: 1;
    min-width: 350px;
    position: relative;
}

.right-container {
    display: flex;
    flex: 1;
}
.right-container .card-description h3{
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    padding-bottom: 16px;
}

.card-description p span,
.contact-info p span {
    font-weight: 600;
}

.contact-title {
    margin-bottom: 2rem;
}

.contact-title h2 {
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 700;
}

.contact-info p span{
    font-size: 2rem;
}

.contact-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 128px 128px;
    background-color: rgba(255, 255, 255, 0.02);
    gap: 4rem;
    border-radius: 24px;
    z-index: 5;
}
.button-contact{
    display: flex;
    gap:16px;
}
.button-contact a {
    width: 270px;
    text-align: center;
}

footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column;
    height: 100px;
    background-color: var(--dark);
}

.legals {
    background-color: var(--primary-10);
    display: flex;
    justify-content: center;
    text-align: center;
    padding: 16px 0;
    z-index: 1; /* Ensure legals are on top */
}

.legals p {
    font-size: 1rem;
}

@media (max-width: 1399.98px) {
    .nav-bar {
        padding: 8px 10%;
        transition: 0.4s;
    }
    section {
        padding: 80px 5%;
        transition: 0.4s;
    }
    .card-container {
        flex: 1 1 100%; /* Full width */
        max-width: 100%;
        height: fit-content;
    }
    .card-content{
        padding-bottom: 0px;
    }
    .img-container {
        height: 400px;
    }
}

@media (max-width: 767.98px) {
    .nav-bar .logo img {
        width: 30px;
    }
    .nav-bar {
        padding: 8px 5%;
    }

    .menu {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 60%;
        height: 100%;
        position: fixed;
        top: 0px;
        right: -100%;
        z-index: 1000;
        background-color: var(--dark); /* Set background color for the menu */
        transition: all 0.4s ease-in-out;
        scroll-behavior: none;
    }
    .menu li {
        margin-top: 64px;
        padding-left: 24px;
    }
    .menu li a {
        padding: 16px;
    }
    .open-menu,
    .close-menu {
        display: block;
        position: absolute;
        top: 30px;
        color: var(--primary);
        right: 5%;
        
    }
    span.menu {
        background-color: var(--dark);
        height: 100svh;
    }
    .close-menu {
        color: var (--primary);
        right: 8.5%;
        top: 16px;
    }
    #check:checked ~ .menu {
        right: 0;
    }
    .nav-bar {
        top: 0px;
    }

    .content-about {
        flex-direction: column;
        gap: 48px;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .content-about .left-container{
        min-width: 100%;
    }

    .language-select {
        padding-top: 50px;
        position: absolute;
        top: 90svh;
        right: 24px;
    }

    .home {
        transition: 0.3s ease-in-out;
        flex-direction: column;
        margin: 4rem 4rem;
    }
    section.home {
        min-height: 100svh;
        padding: 24px;
        margin: 16px;
    }

    section {
        transition: 0.3s ease-in-out;
        padding: 8px;
        margin: 128px 8px 0 8px;
    }

    h2 {
        font-size: clamp(2.4rem, 6vw, 3rem);
    }
    h3 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }
    p,
    li {
        font-size: clamp(1.4rem, 3vw, 1.6rem);
    }
    .typewriter-text,
    .typewriter-label {
        font-size: clamp(3.2rem, 6vw, 6rem);
    }
    .mouse {
        width: 16px;
        height: 32px;
        border: 1px solid var(--light);
        border-radius: 48px;
        position: absolute;
        bottom: 5%;
    }
    .mouse::before {
        position: absolute;
        content: "";
        width: 8px;
        height: 12px;
        background-color: var(--primary);
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 50px;
        animation: scroll 1s infinite;
    }
    @keyframes scroll {
        from {
            opacity: 1;
            top: 20px;
        }
        to {
            opacity: 0;
            top: 0px;
        }
    }
    .left-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        position: relative;
    }
    .my-image {
        max-width: 60%;
        position: relative;
        z-index: 2;
        background-color: var(--background-card);
        backdrop-filter: blur(4px);
        border-radius: 24px;
        min-width: 300px;
    }
    .shape {
        width: 60%;
        height: 100%;
        background-color: var(--background-card);
        border-radius: 24px;
        position: absolute;
        z-index: 1;
        min-width: 300px;
        top: 16px; /* Keep the 16px offset */
        left: 54%; /* Center it */
        transform: translateX(-50%); /* Ensure it stays centered */
    }

    .contact-title h2 {
        font-weight: 700;
        font-size: clamp(2.4rem, 6vw, 3rem);
    }
    .contact-container p span{
        font-size: clamp(1.6rem, 3vw, 2rem);
    }
    .contact-container {
        padding: 32px 24px;
        display: flex;
        margin: 0 0 100px 0;
    }
    .contact-text {
        margin: 0;
    }
    .btn,
    .btn2 {
        display: flex;
        justify-content: center;
        margin: 0;
        width: 100%; /* Make buttons cover all possible space horizontally */
    }

    .button-contact {
        display: flex;
        flex-direction: column; /* Stack buttons one under the other */
        gap: 16px; /* Add space between buttons */
        width: 100%;
    }

    .button-contact a {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .card-container {
        padding: 16px;
    }

    .img-container {
        min-width: 250px;
        height: 200px;
    }
}

