* {
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.75);
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: "Poppins", sans-serif;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.card-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    gap: 8px;
}

.card-wrapper {
    display: flex;
    position: relative;
    pointer-events: auto;
    max-width: 90%;
}

.card {
    width: 250px;
    padding: 17px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: white;
    transition: all 0.5s ease;
    overflow: hidden;
}

@media (min-width: 768px) {
    .card.expanded {
        width: 520px;
    }

    .card.expanded .about-me {
        opacity: 1;
        transform: translateX(0);
        /* height: auto; */
    }

    .card-content {
        display: flex;
        transition: transform 0.5s ease;
        width: 100%;
    }

    .main-content {
        flex: 0 0 250px;
        width: 250px;
    }

    .about-me {
        flex: 0 0 250px;
        width: 250px;
        margin-top: -7px;
        height: 0;
        padding-left: 20px;
        text-align: left;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.5s ease;
    }

    .expand-toggle .expand-icon {
        transform: rotate(45deg);
    }

    .expand-toggle.expanded .expand-icon {
        transform: rotate(225deg);
        margin-right: -5px;
    }
}

@media (max-width: 767px) {
    .card {
        width: 60vw;
        max-width: 280px;
    }

    .card.expanded {
        height: auto;
    }

    .card-content {
        display: block;
    }

    .main-content {
        width: 100%;
    }

    .about-me {
        width: 100%;
        text-align: left;
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        overflow: hidden;
        visibility: hidden;
        transition: all 0.5s ease;
    }

    .card.expanded .about-me {
        max-height: 290px;
        opacity: 1;
        margin-top: 15px;
        visibility: visible;
        transition: all 0.5s ease;
    }

    .expand-toggle {
        bottom: -15px;
        top: auto;
        right: 50%;
        transform: translateX(50%);
    }

    .expand-toggle .expand-icon {
        transform: rotate(135deg);
        margin-bottom: 5px;
    }

    .expand-toggle.expanded .expand-icon {
        transform: rotate(315deg);
        margin-bottom: -5px;
    }
}

.expand-toggle {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
}

.expand-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.expand-icon {
    width: 10px;
    height: 10px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.5s ease;
    margin-right: 5px;
}

.title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.85;
    margin: 0 0 24px 0;
}

.skill-icons {
    margin: 16px 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-icons img {
    border-radius: 8px;
    width: 28px;
    height: 28px;
    transition: transform 0.2s ease;
    filter: grayscale(100%) brightness(0.9);
}

.skill-icons img:hover {
    transform: translateY(-3px);
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.button {
    flex: 1;
    padding: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    color: white;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font: inherit;
    opacity: 60%;
}

.button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.about-me-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.about-me-text {
    font-size: 13.5px;
    line-height: 1.5;
    opacity: 0.8;
}

footer {
    text-align: right;
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0.7;
}

.projects-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(30px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: white;
    padding: 10px;
    width: 440px;
    max-width: 90vw;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.projects-box.visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.projects-box-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
}

.projects-container {
    display: flex;
    justify-content: center;
    gap: 12px;
}

@media (max-width: 500px) {
    .projects-container {
        flex-direction: column;
    }

    .projects-box {
        width: 80vw;
    }
}

.project-item {
    flex: 1;
    /* min-width: 10px; */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.project-item:hover {
    transform: translateY(-3px);
}

.project-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px;
    font-size: 20px;
    font-weight: 700;
    font-family: "Bodoni Moda", serif;
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.project-description {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-button {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 11px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.overlay.visible {
    opacity: 1;
    visibility: visible;
}