/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    color: white;
}

body::before {
    background: radial-gradient(circle, rgba(0, 0, 0, 1) 0%, rgb(40, 2, 109) 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    height: 100vh;
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

h1,
h2 {
    margin: 0;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

a {
    text-decoration: none;
    color: white;
}

p {
    font-size: 1rem;
}

/* Background Video */
#background-video {
    filter: grayscale(30%) hue-rotate(255deg) brightness(0.4);
    position: fixed;
    background-attachment: fixed;
    background-position: center;
    background-image: rgb(0, 0, 0);
    /* Fallback background image */
    background-repeat: no-repeat;
    background-size: cover;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    overflow: hidden;
}


canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Header */
header {
    position: absolute;
    z-index: 1;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 50px;
}

#nav-btns {
    display: flex;
    align-items: center;
    flex-direction: row;
    list-style: none;
    padding: 0;
    margin: 0 auto;
}

#nav-btns li {
    padding: 22px 12px;
    transition: transform 0.2s;
}

#nav-btns a {
    font-weight: 500;
    padding: 22px 12px;
    transition: transform 0.2s;
}

#nav-btns li:hover {
    color: #dcdcdc;
    transform: scale(1.10);
}

/* Language Selector */
#tab-container {
    position: absolute;
    right: 90px;
}

.tab-button {
    position: relative;
    display: inline-block;
}

.tab-button img {
    padding: 6px;
    width: 40px;
}

#tab-container:hover .tab-languages {
    display: block;
    z-index: 1;
}

.tab-languages {
    display: none;
    position: absolute;
    z-index: 1;
}

.language-btn {
    background-color: transparent;
    padding: 10px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: 0.2s;
}

.language-btn:hover {
    transform: scale(1.4);
}

.language-img {
    width: 30px;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(2px);
    text-align: center;
}

/* Sections */
section {
    margin-top: 20px;
    width: 80%;
}

section h2 {
    margin-bottom: 30px;
}

/* Buttons */
.projects-btn {
    padding-left: 40px !important;
}

.skills-btn {
    padding: 0px !important;
}

.contact-btn {
    padding-right: 40px !important;
}

/* About Section */
#about {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-evenly;
    align-items: center;
}

#about h1 {
    color: white;
    text-shadow: 3px 1px #222324, 2px 4px #222324, 3px 5px #222324;
    padding-top: 100px;
    font-size: 4rem;
    max-width: 90%;
}

#rol-text {
    text-shadow: 5px 2px #222324, 2px 4px #222324, 3px 5px #222324;
}

#rol-text::after {
    content: "|";
    font-weight: 100;
    font-size: 110%;
    animation: blink 1.1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Touch Button */
#getInTouchBtn {
    padding: 10px 30px;
    transition: transform 0.2s;
}

#getInTouchBtn:hover {
    transform: scale(1.05);
}

/* Arrow Icon */
.arrow {
    height: 20px;
    filter: invert(99%) sepia(7%) saturate(202%) hue-rotate(208deg) brightness(115%) contrast(100%);
}

/* Projects Container */
#projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.project {
    display: flex;
    align-items: center;
}

.project img {
    max-width: 50%;
    border-radius: 0 15px 15px 0;
}

.project {
    width: 90%;
    transition: transform 0.2s;
    background: url("./images/gifs/triangle-dimension.webp");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    border: 1px solid #ddd;
    margin: 10px;
    border-radius: 15px;
}

.project a {
    backdrop-filter: blur(3px);
    display: flex;
    cursor: pointer;
    border-radius: 15px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.project h2 {
    padding: 50px;
    font-size: 2.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project:hover {
    transform: scale(1.05);
}

/* Skills Section */
#skills {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75%;
}

.skills-container {
    display: grid;
    grid-template-columns: auto auto auto auto;
    gap: 15px;
    transition: 0.2s;
}

.skills-experience {
    display: flex;
    background: url(images/gifs/tv-interference.webp);
    background-size: cover;
    color: #000000;
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row: 1 / 3;
    border-radius: 20px;
}

.skills-experience div {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    opacity: 0.8;
    background-color: white;
    border-radius: 20px;
}

.skills-experience img {
    border-radius: 20px;
}


.skills-experience-button {
    margin-bottom: 30px;
    align-items: center;
    background-image: radial-gradient(100% 100% at 100% 0, #5adaff 0, #5468ff 100%);
    border: 0;
    border-radius: 6px;
    box-shadow: rgba(45, 35, 66, .4) 0 2px 4px, rgba(45, 35, 66, .3) 0 7px 13px -3px, rgba(58, 65, 111, .5) 0 -3px 0 inset;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 3.5rem;
    justify-content: center;
    overflow: hidden;
    transition: box-shadow .15s, transform .15s;
    width: 80%;
    font-size: 18px;
}

#skills-experience-button:hover {
    box-shadow: rgba(45, 35, 66, .4) 0 4px 8px, rgba(45, 35, 66, .3) 0 7px 13px -3px, #3c4fe0 0 -3px 0 inset;
    transform: translateY(-2px);
}

#skills-experience-button:active {
    box-shadow: #3c4fe0 0 3px 7px inset;
    transform: translateY(2px);
}

/* Invitation Section */
#invitation {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-radius: 15px;
    align-items: center;
    background: url(images/gifs/star-rain.webp);
    background-size: cover;
    grid-column-start: 3;
    grid-column-end: 4;
}

#invitation-text {
    margin: 0;
}

#invitation-button {
    color: #fff;
    padding: 15px 25px;
    margin-top: 10px;
    border-radius: 10px;
    background-color: #221c74;
    background-image: radial-gradient(93% 87% at 87% 89%, rgba(0, 0, 0, 0.23) 0%, transparent 86.18%), radial-gradient(66% 87% at 26% 20%, rgba(122, 122, 122, 0.41) 0%, rgba(255, 255, 255, 0) 69.79%, rgba(75, 75, 75, 0) 100%);
    box-shadow: 2px 19px 31px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 16px;
    border: 0;
    cursor: pointer;
}

/* Skill Learning */
#skill-learning {
    background: url(images/gifs/space-travel.webp);
    border-radius: 20px;
    background-position: center;
    background-size: cover;
    grid-column-start: 3;

}

#skill-learning div {
    padding: 30px;
    border-radius: 20px;
    height: 100%;
    backdrop-filter: contrast(0.7);
}

#skill-learning img {
    height: 100px;
}

#skill-learning-button {

    display: none;
    /* display: inline-block; */

    background-color: #1899D6;
    border: solid transparent;
    border-radius: 16px;
    border-width: 0 0 4px;
    box-sizing: border-box;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .8px;
    line-height: 20px;
    margin: 0;
    outline: none;
    overflow: visible;
    padding: 13px 16px;
    text-align: center;
    text-transform: uppercase;
    touch-action: manipulation;
    transform: translateZ(0);
    transition: filter .2s;
    vertical-align: middle;
    white-space: nowrap;
    width: 100%;
}

#skill-learning-button:after {
    background-clip: padding-box;
    background-color: #1CB0F6;
    border: solid transparent;
    border-radius: 16px;
    border-width: 0 0 4px;
    bottom: -4px;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
}


#skill-learning-button:active {
    border-width: 4px 0 0;
    background: none;
}


/* Contact Background */
.contact-background {
    border-radius: 30px;
    padding: 2px;
    background-color: #6f78ff;
    opacity: 1;
    background-image: repeating-radial-gradient(circle at 0 0, transparent 0, #6f78ff 10px), repeating-linear-gradient(#b6baff55, #b6baff);
}

/* Contact Form */
#contact {
    width: 60%;
}

#contact form {
    border-radius: 30px;
    display: flex;
    backdrop-filter: blur(2px);
    padding: 40px 40px;
    flex-direction: column;
    font-size: 1.3rem;
    font-weight: 700;
}

#form-inner {
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-wrap: wrap;
}

#contact-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#contact-row div {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 48%;
}

#contact-column {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
}

#contact label {
    align-self: flex-start;
    padding: 12px 0;
    margin-right: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
}

#contact input,
#contact textarea {
    padding: 12px;
    color: white;
    background-color: #130f25;
    border: 1px solid white;
    border-radius: 10px;
}

#contact input {
    width: 90%;
}

#contact textarea {
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
}

#contact button {
    font-size: 1.5rem;
    width: 100%;
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
}

#contact button:hover {
    transform: scale(1.01);
}

/* Footer */
footer {
    font-weight: 900;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(2px);
    display: flex;
    z-index: -2;
    justify-content: space-evenly;
    align-items: center;
    padding: 20px;
    color: white;
}

footer div {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

footer::before {
    content: "";
    z-index: -2;
    filter: blur(3px);
}

footer h2 {
    font-size: 1.5rem;
}

footer ul {
    list-style: none;
    width: 20%;
    display: flex;
    justify-content: space-evenly;
    margin: 0;
    padding: 0;
}

footer ul li a img {
    width: 50px;
    height: 50px;
}

/* Border Animation */
@property --bg-angle {
    inherits: false;
    initial-value: 0deg;
    syntax: "<angle>";
}

@keyframes spin {
    to {
        --bg-angle: 360deg;
    }
}

.border-animation {
    animation: 4s linear 0s infinite normal none running spin;
    background: linear-gradient(to bottom, oklch(0 0.2 240 / 2), oklch(0 0.2 240 / 2)) padding-box,
        conic-gradient(from var(--bg-angle), oklch(0.85 0.37 0), oklch(0.1 0.2 240)) border-box;
    box-shadow: oklch(0.1 0.37 315 / 0.25) 0.1rem 0.2rem 0.2rem 0.2rem;
    color: white;
    text-align: center;
    list-style: none;
    text-decoration: none;
    border: 2px solid transparent;
    font-size: 1.5rem;
    border-radius: 1rem;
}

/* Floating Button */
.to-top {
    align-items: center;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2;
    display: none;
    background-image: linear-gradient(144deg, #AF40FF, #5B42F3 50%, #00DDEB);
    border-radius: 8px;
    box-shadow: rgba(151, 65, 252, 0.2) 0 15px 30px -5px;
    box-sizing: border-box;
    color: #FFFFFF;
    display: flex;
    font-size: 30px;
    justify-content: center;
    padding: 10px;
    white-space: nowrap;
    cursor: pointer;
}

/* Media Queries for Tablets */
@media screen and (min-width: 601px) and (max-width: 1024px) {
    body {
        font-size: 2rem !important;
    }

    h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 1.75rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }

    #nav-btns {
        flex-direction: column;
        width: 100%;
    }

    #nav-btns li {
        padding: 15px 12px;
        transition: transform 0.2s;
    }

    #nav-btns li a {
        text-decoration: none;
        color: white;
        font-weight: 500;
        transition: transform 0.2s;
    }

    #about {
        margin-top: 110px;
        font-size: 4rem;
    }

    .project a {
        flex-direction: column;
    }

    .project a img {
        border-radius: 0 0 15px 15px;
        max-width: 100%;
    }

    .projects-btn {
        padding-left: 15px !important;
    }

    .contact-btn {
        padding-right: 15px !important;
    }

    #nav-btns a {
        padding: 15px;
        text-align: left;
    }

    #tab-container {
        display: none;
    }

    section {
        margin-top: 15px;
    }

    .skills-container {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        width: 90%;
    }

    .skills-experience img {
        display: none;
    }

    #skills-experience-button {
        width: 75%;
        margin-bottom: 10px;
        padding: 15px;
    }

    #contact {
        width: 75%;
    }

    #contact-row div {
        width: 100%;
    }

    footer div {
        width: 75%;
        flex-direction: row;
    }

    .to-top {
        display: none !important;
    }

    footer ul {
        flex-direction: row;
        justify-content: space-evenly;
        width: 100%;
    }
}

/* Media Queries for Phones L */
@media screen and (max-width: 600px) {
    body {
        font-size: 0.9rem;
    }

    header {
        flex-direction: column;
        justify-content: center;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.5rem;
    }

    nav {
        margin: 0;
        margin-top: 20px;
        flex-direction: column;
        width: 100%;
    }

    #nav-btns {
        flex-direction: column;
        width: 90%;
    }

    #nav-btns li {
        padding: 10px 12px;
        transition: transform 0.2s;
    }

    #nav-btns li a {
        padding: 5px 0;
        transition: transform 0.2s;
    }

    .projects-btn {
        padding-left: 0 !important;
    }

    .contact-btn {
        padding-right: 0 !important;
    }

    #tab-container {
        display: none;
    }

    main {
        padding: 5px;
    }

    section {
        width: 100%;
        margin-top: 10px;
    }

    #about {
        margin-top: 20px;
    }

    .project a {
        flex-direction: column;
    }

    .project a img {
        border-radius: 0 0 15px 15px;
        max-width: 100%;
    }

    .project h2 {
        padding: 50px;
        font-size: 2rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .skills-container {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        width: 90%;
    }

    .skills-experience div {
        width: 100%;
    }

    .skills-experience img {
        display: none;
    }

    #skill-learning button {
        width: 100%;
    }

    #contact {
        width: 90%;
    }

    #contact-row div {
        width: 100%;
    }

    #form-inner {
        padding: 0;
    }

    footer div {
        flex-direction: column;
        text-align: center;
    }

    .to-top {
        display: none !important;
    }

    footer ul {
        flex-direction: row;
        width: 100%;
        justify-content: space-evenly;
    }
}

/* Media Queries for Phones L */
@media screen and (max-width: 600px) {
    body {
        font-size: 0.9rem;
    }

    header {
        flex-direction: column;
        justify-content: center;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.5rem;
    }

    nav {
        margin: 0;
        margin-top: 20px;
        flex-direction: column;
        width: 100%;
    }

    #nav-btns {
        flex-direction: column;
        width: 90%;
    }

    #nav-btns li {
        padding: 10px 12px;
        transition: transform 0.2s;
    }

    #nav-btns li a {
        padding: 5px 0;
        transition: transform 0.2s;
    }

    .projects-btn {
        padding-left: 0 !important;
    }

    .contact-btn {
        padding-right: 0 !important;
    }

    #tab-container {
        display: none;
    }

    #about {
        margin-top: 70px;
    }

    .project a {
        flex-direction: column;
    }

    .project a img {
        border-radius: 0 0 15px 15px;
        max-width: 100%;
    }

    .project h2 {
        padding: 50px;
        font-size: 1.5rem;
    }

    .skills-container {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        width: 90%;
    }

    .skills-experience div {
        width: 100%;
    }

    .skills-experience img {
        display: none;
    }

    #skill-learning button {
        width: 100%;
    }

    #contact {
        width: 90%;
    }

    #contact-row div {
        width: 100%;
    }

    #form-inner {
        padding: 0;
    }

    footer h2 {
        font-size: 1.3rem;
        padding: 10px;
    }

    footer div {
        flex-direction: column;
        text-align: center;

    }

    .to-top {
        display: none !important;
    }

    footer ul {
        flex-direction: row;
        width: 100%;
        justify-content: space-evenly;
    }
}