:root {
    color-scheme: only light;
}

html, body {
    margin: 0;
    background-color: #4002A2;
    background: radial-gradient(circle at top left, #6D2BF5, #1A0040);    color: #FFDE59;
    font-family: 'Alice', serif;
    overflow-x: hidden;
}

/* NAV BAR */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5em 0 2em;
    height: 56px;
    max-width: 990px;
    margin: 0;
}

.nav-left {
    font-size: 1.6rem;
    font-weight: bolder;
}

.nav-right {
    display: flex;
    gap: 1em;
}

.nav-icon {
    height: 28px;
    width: 28px;
    transition: opacity 0.2s ease;
}

.nav-icon:hover {
    transform: scale(1.4);
}

/* HERO */
.hero {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 2em 2em;
    gap: 2em;
    max-width: 1000px;
    margin: 0;
}

.hero-text {
    max-width: 615px;
    flex: 1;
}

.hero-title {
    font-family: 'Lora', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #FFDE59;
    margin: 0 0 1em;
    line-height: 1.2;
}

.hero-subtext {
    font-size: 1.25rem;
    color: #FFDE59;
    max-width: 500px;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-image-wrapper {
    aspect-ratio: 1;
    max-width: 400px;
    min-width: 300px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    position: relative;
    padding: 6px;
    overflow: visible;
}

.hero-image img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-width: 300px;
    min-height: 300px;
    object-fit: contain;
    border-radius: 50%;
    background-color: transparent;
    display: block;
}

.hero-image-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid #FFDE59;
    transform: translate(-50%, -50%);
    z-index: 1;
    box-sizing: border-box;
    pointer-events: none;
}

@media (max-width: 700px) {
    .hero {
        min-width: 420px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 2em;
    }

    .hero-image-wrapper {
        display: none;
    }

    .hero-image {
        display: none;
    }

    .hero-text {
        max-width: 360px;
        width: 100%;
    }
}

/* PROFICIENCIES */
.proficiencies {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    justify-items: center;
    align-items: center;
    gap: 1em;
    padding: 2em 1em;
    max-width: 990px;
    margin: 0;
}

.skill-wrapper {
    padding: 15px;
    background: #5527B1;
    border-radius: 20px;
    box-shadow:
            inset 0 1px 3px rgba(255, 255, 255, 0.05),
            0 6px 16px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.skill-wrapper:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.skill-wrapper:active {
    transform: scale(0.8);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.skill-wrapper.selected {
    outline: 2px solid #FFDE59;
    outline-offset: 4px;
    background: #5527B1;
    box-shadow: 0 0 10px rgba(255, 222, 89, 0.5);
    transform: scale(1);
}

.skill-icon {
    width: 56px;
    height: 56px;
}

@media (max-width: 700px) {
    .proficiencies {
        grid-template-columns: repeat(3, 2fr);
    }
}

/* CARDS */
#project {
    display: flex;
    justify-content: center;
    padding: 2em 1em;
    max-width: 1000px;
    margin: 0;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2em;
    max-width: 1000px;
    min-width: 360px;
    width: 90%;
}

.project-card {
    perspective: 1000px;
    width: 100%;
}

.card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.project-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-back {
    background-color: #FFDE59;
    color: #4002A2;
    transform: rotateY(180deg);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content {
    flex: 1;
    padding: 1em 1em 4em 1em;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.card-content::-webkit-scrollbar {
    display: none;
}

.card-back h3 {
    padding: 0 0.25em;
    font-size: 1.9em;
    margin: 0 0 0.5em 0;
}

.card-back p {
    line-height: 1.4;
    margin: 0;
    padding: 0 0.25em;
    font-size: 1.5em;
}

.card-back a img {
    width: clamp(21px, 3vw, 28px);
    height: clamp(21px, 3vw, 28px);
    object-fit: contain;
    vertical-align: middle;
}

.card-back a img:hover {
    transform: scale(1.4);
}

.card-back .tool-icon {
    padding: 0 1em;
    width: clamp(21px, 3vw, 28px);
    height: clamp(21px, 3vw, 28px);
}

.card-back .tool-icon:hover {
    transform: scale(1.4);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1em 0 1em;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.card-footer .tools {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.card-footer .tool-icon {
    width: clamp(21px, 3vw, 28px);
    height: clamp(21px, 3vw, 28px);
    padding: 0 0.25em;
}

.card-footer .tool-icon:hover {
    transform: scale(1.4);
}

.card-footer .github-link img {
    width: clamp(21px, 3vw, 28px);
    height: clamp(21px, 3vw, 28px);
    object-fit: contain;
    vertical-align: middle;
}

.card-footer .github-link img:hover {
    transform: scale(1.4);
}

@media (max-width: 1000px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr)
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 1.9rem;
    }
    .card-back p {
        font-size: 1.5rem;
    }
    .card-footer .tool-icon {
        width: 30px;
        height: 30px;
    }
    .card-footer .github-link img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr)
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 1.6rem;
    }
    .card-back p {
        font-size: 1.35rem;
    }
    .card-footer .tool-icon {
        width: 29px;
        height: 29px;
    }
    .card-footer .github-link img {
        width: 28.5px;
        height: 28.5px;
    }
}

@media (max-width: 800px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr)
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 1.36rem;
    }
    .card-back p {
        font-size: 1.175rem;
    }
    .card-footer .tool-icon {
        width: 27px;
        height: 27px;
    }
    .card-footer .github-link img {
        width: 27px;
        height: 27px;
    }
}

@media (max-width: 700px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 1.15rem;
    }
    .card-back p {
        font-size: .9rem;
    }
    .card-footer {
        height: 10%
    }
    .card-footer .tool-icon {
        width: 24px;
        height: 24px;
    }
    .card-footer .github-link img {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 2.2rem;
    }
    .card-back p {
        font-size: 1.38rem;
    }
    .card-footer {
        height: 10%
    }
    .card-footer .tool-icon {
        width: 33px;
        height: 33px;
    }
    .card-footer .github-link img {
        width: 33px;
        height: 33px;
    }
}

@media (max-width: 500px) {
    .project-grid {
        grid-template-columns: repeat(1, 1fr)
    }
    .project-card {
        width: 100%
    }
    .card-back h3 {
        font-size: 1.9rem;
    }
    .card-back p {
        font-size: 1.33rem;
    }
    .card-footer {
        height: 10%
    }
    .card-footer .tool-icon {
        width: 30px;
        height: 30px;
    }
    .card-footer .github-link img {
        width: 30px;
        height: 30px;
    }
}