/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 3.5rem;
    /*========== Colors ==========*/
    /*Color mode HSL(hue, saturation, lightness)*/
    /* 
         Change favorite color:

         Default (Purple): hsl(255, 60%, 64%)
         Blue: hsl(220, 60%, 64%) - Pink: hsl(300, 60%, 64%)
         Green: hsl(110, 60%, 64%) - Cyan: hsl(180, 60%, 64%)
         Orange: hsl(15, 60%, 64%) - Red: hsl(358, 60%, 64%)

         For more colors visit: https://htmlcolorcodes.com/
         -> Choose any color 
         -> Copy the color mode (HSL)
  */
    --hue: 110;
    --first-color: hsl(var(--hue), 60%, 64%);
    --first-color-alt: hsl(var(--hue), 80%, 56%);
    --first-color-alt-2: hsl(var(--hue), 60%, 56%);
    --first-color-light: hsl(var(--hue), 60%, 74%);
    --title-color: hsl(110, 8%, 95%);
    --text-color: hsl(110, 8%, 70%);
    --text-color-light: hsl(110, 8%, 50%);
    --body-color: hsl(110, 100%, 2%);
    --container-color: hsl(110, 8%, 6%);

    /*========== Font and typography ==========*/
    /*.5rem = 8px | 1rem = 16px ...*/
    --body-font: "Montserrat", sans-serif;
    --second-font: "Unbounded", sans-serif;
    --biggest-font-size: 2rem;
    --bigger-font-size: 1.75rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;

    /*========== Font weight ==========*/
    --font-regular: 400;
    --font-medium: 500;
    --font-semi-bold: 600;

    /*========== z index ==========*/
    --z-tooltip: 10;
    --z-fixed: 100;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1150px) {
    :root {
        --biggest-font-size: 3rem;
        --bigger-font-size: 2rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --normal-font-size: 1rem;
        --small-font-size: 0.875rem;
        --smaller-font-size: 0.813rem;
    }
}

::selection {
    background-color: var(--first-color);
    color: var(--body-color);
    text-shadow: none;
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body,
button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

body {
    background-color: var(--body-color);
    color: var(--text-color);
    cursor: none;
    overflow-x: hidden;
}

button {
    outline: none;
    border: none;
}

h1,
h2,
h3,
h4 {
    color: var(--title-color);
    font-family: var(--second-font);
    font-weight: var(--font-semi-bold);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/*=============== INTRO LOADER ===============*/
.intro-loader {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.intro-loader__bg {
    position: absolute;
    inset: 0;
    background-color: var(--body-color);
    z-index: 1;
}

.intro-loader__content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    pointer-events: none;
}

.intro-loader__word {
    position: absolute;
    font-size: clamp(2rem, 7vw, 5.5rem);
    font-family: var(--second-font);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: clamp(2px, 0.8vw, 10px);
    text-align: center;
    opacity: 0;
    transform: scale(0.85);
    background: linear-gradient(135deg, #fff 30%, var(--first-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
    white-space: nowrap;
}

.intro-loader__scroll {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.intro-loader__scroll-text {
    font-size: var(--smaller-font-size);
    font-family: var(--second-font);
    letter-spacing: 2px;
    color: var(--text-color-light);
    font-weight: var(--font-medium);
}

.intro-loader__scroll-indicator {
    width: 22px;
    height: 36px;
    border: 2px solid var(--text-color-light);
    border-radius: 11px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.intro-loader__scroll-wheel {
    width: 4px;
    height: 8px;
    background-color: var(--first-color);
    border-radius: 2px;
    animation: scrollWheelAnimate 1.6s infinite;
}

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

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(12px);
    }
}

.intro-loader__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.03);
    z-index: 2;
}

.intro-loader__progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--first-color);
    box-shadow: 0 0 12px var(--first-color);
}

.intro-loader__progress-num {
    position: absolute;
    bottom: 12px;
    right: 24px;
    font-family: var(--second-font);
    font-size: var(--small-font-size);
    color: var(--first-color);
    opacity: 0.8;
}

/* Lenis smooth scrolling config */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis-stopped {
    overflow: hidden;
}

.lenis-scrolling iframe {
    pointer-events: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1130px;
    margin-inline: 1.5rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    min-height: 100vh;
    display: grid;
    align-content: center;
    padding-block: 6rem 3rem;
}

/* Override tech-scroll from full 100vh height */
.tech-scroll {
    min-height: auto !important;
    padding-block: 4rem 2rem !important;
}

.section__title {
    text-align: center;
    font-size: var(--h1-font-size);
    margin-bottom: 3rem;
}

.section__title span {
    color: var(--first-color);
}

.main {
    overflow: hidden;
}

/*=============== BLOB ===============*/
/* Blob animate */
.blob-animate {
    width: 100px;
    height: 100px;
    background: linear-gradient(180deg,
            var(--first-color-alt) 20%,
            var(--first-color-light) 100%);
    border-radius: 50%;
    position: absolute;
    filter: blur(35px);
    z-index: -1;
    animation: animateBlob 5s linear infinite;
}

@keyframes animateBlob {
    0% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Blob */
.blob {
    width: 250px;
    height: 250px;
    background: linear-gradient(180deg,
            var(--first-color) 0%,
            var(--first-color-alt) 100%);
    border-radius: 50%;
    filter: blur(50px);
    position: absolute;
    z-index: -1;
}

/*=============== CUSTOM CURSOR ===============*/
.cursor {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    width: 25px;
    height: 25px;
    background-color: var(--first-color);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--first-color);
    mix-blend-mode: difference;
    pointer-events: none;
    transition:
        transform 0.1s ease-out,
        left 0.1s ease-out,
        top 0.1s ease-out,
        width 0.3s,
        height 0.3s;
}

/* Hide the custom cursor */
.hide-cursor {
    width: 0;
    height: 0;
}

/*=============== HEADER & NAV ===============*/
.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: transparent;
    z-index: var(--z-fixed);
    transition: background-color 0.4s, box-shadow 0.4s, top 0.4s, width 0.4s, border-radius 0.4s, padding 0.4s, border 0.4s;
}

/* Scroll Header Floating Pill Effect */
.scroll-header {
    background-color: rgba(10, 10, 10, 0.95); /* Solid high-opacity fallback for mobile to avoid fixed containing-block bug */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

@media screen and (min-width: 768px) {
    .scroll-header {
        top: 1rem;
        left: 0;
        right: 0;
        width: 90%;
        max-width: 1024px;
        margin-inline: auto;
        border-radius: 4rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding-inline: 1.5rem;
        /* Re-enable glassmorphic blur on screens >= 768px */
        background-color: rgba(10, 10, 10, 0.45);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

.header-blob {
    top: -3rem;
    left: -3rem;
}

.nav {
    display: flex;
    justify-content: center; /* Center logo on mobile top */
    align-items: center;
    padding-block: 1rem;
}

.nav__logo {
    font-family: var(--second-font);
    font-weight: var(--font-semi-bold);
    color: var(--text-color);
    transition: color 0.4s;
}

.nav__logo:hover {
    color: var(--first-color);
}

/* Mobile Bottom Tab Bar (max-width: 768px) */
.nav__menu {
    position: fixed;
    bottom: 1.5rem;
    left: 0;
    right: 0;
    width: 90%;
    max-width: 420px;
    margin-inline: auto;
    background-color: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: var(--z-fixed);
    transition: bottom 0.4s;
}

.nav__list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

.nav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 0.25rem;
    color: var(--text-color-light);
    font-size: 0.65rem;
    transition: color 0.4s, text-shadow 0.4s;
}

.nav__icon {
    font-size: 1.25rem;
    display: block;
}

.nav__name {
    display: block;
    font: var(--font-semi-bold) 0.65rem var(--second-font);
}

.nav__link:hover,
.active-link {
    color: var(--first-color);
    text-shadow: 0 8px 16px var(--first-color);
}

.nav__toggle,
.nav__close {
    display: none;
}

/*=============== HOME ===============*/
.home {
    position: relative;
    min-height: 100vh;
    display: grid;
    align-content: center;
    padding-block: var(--header-height) 2rem;
}

.home__container {
    position: relative;
    row-gap: 3rem;
}

.home__greeting {
    font-size: var(--h2-font-size);
    font-weight: var(--font-regular);
    color: var(--first-color);
}

.home__name {
    font-size: var(--biggest-font-size);
}

.home__image {
    position: relative;
    display: grid;
    overflow-y: clip;
}

.home__image .blob-animate {
    width: 250px;
    height: 250px;
    bottom: 0;
    justify-self: center;
}

.home__perfil {
  width: 370px;
  height: auto;
  aspect-ratio: 380 / 389;
  justify-self: center;
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}



.home__left {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 1.5rem;
  z-index: 2;
}

.home__right {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  row-gap: 1.5rem;
  z-index: 2;
}

.home__profession-box {
  position: relative;
  width: 100%;
  height: 40px;
  margin-top: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home__profession-1,
.home__profession-2 {
  position: absolute;
  font-size: var(--bigger-font-size);
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  width: max-content;
  color: var(--first-color);
}

.home__social {
  display: flex;
  column-gap: 1.25rem;
}

.home__social-link {
  color: var(--title-color);
  font-size: 1.25rem;
  transition: transform 0.4s, color 0.4s;
}

.home__social-link:hover {
  color: var(--first-color);
  transform: translateY(-3px);
}

.home__cv {
  color: var(--text-color);
  font: var(--font-medium) var(--small-font-size) var(--second-font);
  display: flex;
  align-items: center;
  column-gap: 0.5rem;
  transition: color 0.4s;
}

.home__cv i {
  font-size: 1rem;
}

.home__cv:hover {
  color: var(--first-color);
}

/*=============== TECH SCROLL ===============*/
.tech-scroll {
    overflow: hidden;
    position: relative;
    padding-block: 2rem;
}

.tech-scroll__container {
    display: grid;
    gap: 1.5rem;
}

.tech-row {
    overflow: hidden;
    position: relative;
}

.tech-track {
    display: flex;
    width: max-content;
    gap: 3rem;
    animation: scrollLeft 20s linear infinite;
}

.tech-row--right .tech-track {
    animation: scrollRight 20s linear infinite;
}

.tech-row:hover .tech-track {
    animation-play-state: paused;
}

.tech-icon {
    fill: var(--first-color);
}

.tech-track img {
    width: 60px;
    height: 60px;
    transition: 0.4s;
    filter: brightness(0) saturate(100%) invert(63%) sepia(58%) saturate(450%) hue-rotate(calc(var(--hue) * 1deg)) brightness(95%) contrast(90%);
    opacity: 0.85;
}

.tech-track img:hover {
    filter: none;
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scrollLeft {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.tech-row::before,
.tech-row::after {
    content: "";
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-row::before {
    left: 0;
    background: linear-gradient(to right, var(--body-color), transparent);
}

.tech-row::after {
    right: 0;
    background: linear-gradient(to left, var(--body-color), transparent);
}

/*=============== BUTTON ===============*/
.button {
    background-color: var(--body-color);
    border: 3px solid var(--first-color);
    color: var(--title-color);
    padding: 1rem 2rem;
    box-shadow:
        0 8px 32px hsla(var(--hue), 60%, 64%, 0.5),
        inset 8px -8px 30px var(--first-color-alt-2);
    border-radius: 4rem;
    font-family: var(--second-font);
    font-weight: var(--font-semi-bold);
    display: inline-flex;
    align-items: center;
    column-gap: 0.5rem;
    transition: box-shadow 0.4s;
}

.button i {
    font-weight: initial;
    font-size: 1rem;
}

.button:hover {
    box-shadow:
        0 8px 48px hsla(var(--hue), 60%, 64%, 0.75),
        inset 8px -8px 15px var(--first-color);
}

/*=============== ABOUT ===============*/
.about {
    position: relative;
}

.about__container {
    row-gap: 3rem;
    overflow-y: clip;
}

.about__data .section__title {
    margin-bottom: 1.5rem;
    text-align: initial;
}

.about__description {
    font-size: var(--h2-font-size);
    margin-bottom: 2rem;
}

.about__description b {
    color: var(--first-color);
    font-weight: var(--font-semi-bold);
}

.about__image {
    position: relative;
    justify-self: center;
}

.about__image .blob-animate:nth-child(1) {
    top: 1.5rem;
    left: 1rem;
}

.about__image .blob-animate:nth-child(2) {
    right: -0.5rem;
    bottom: 0.5rem;
}

.about__perfil {
    width: 220px;
    height: auto;
    aspect-ratio: 220 / 242;
}

.about__shadow {
    width: 100%;
    height: 250px;
    position: absolute;
    bottom: 1rem;
    z-index: 1;
    background: linear-gradient(180deg,
            hsla(240, 100%, 2%, 0) 60%,
            var(--body-color) 95%);
}

/*=============== PROJECTS ===============*/
.projects .section__title {
    text-align: initial;
    margin-left: 1.5rem;
}

.projects__card {
    position: relative;
    background-color: var(--container-color);
    padding: 1.5rem;
    border-radius: 3rem;
    overflow: hidden;
}

.projects .blob {
    z-index: 0;
    right: -7.75rem;
    bottom: 0;
}

.projects__number,
.projects__data,
.projects__image {
    position: relative;
    z-index: 1;
}

.projects__number {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.projects__number h1 {
    font-size: var(--biggest-font-size);
}

.projects__number h3 {
    font-weight: var(--font-regular);
    font-size: var(--h3-font-size);
}

.projects__data {
    margin-block: 2rem;
}

.projects__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}

.projects__subtitle {
    font-family: var(--second-font);
    font-size: var(--small-font-size);
    margin-bottom: 0.5rem;
}

.projects__description {
    font-size: var(--small-font-size);
}

.projects__img {
    width: 100%;
    height: auto;
    aspect-ratio: 302 / 180;
    object-fit: cover;
    border-radius: 1.5rem;
}

.projects__button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background-color: var(--body-color);
    border: 3px solid var(--first-color);
    color: var(--title-color);
    border-radius: 50%;
    font-size: 2rem;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    opacity: 0;
    pointer-events: none;
    transition:
        box-shadow 0.4s,
        opacity 0.4s;
}

.projects__button:hover {
    box-shadow: 0 0 24px var(--first-color);
}

.projects__image:hover .projects__button {
    opacity: 1;
    pointer-events: initial;
}

/* Swiper class */
.projects__swiper {
    margin-inline: initial;
    padding-bottom: 2rem;
}

.projects .swiper-pagination-bullets {
    bottom: 0;
}

.projects .swiper-pagination-bullet {
    background-color: var(--first-color);
    transition: opacity 0.4s;
}

/*=============== WORK ===============*/
.work__tabs {
    position: relative;
    background-color: var(--container-color);
    padding: 1.25rem 2rem;
    border-radius: 4rem;
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.work__blob {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 1rem);

    width: 0;
    left: 0;

    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4rem;

    transition:
        left 0.5s cubic-bezier(0.68, -0.6, 0.32, 1.6),
        width 0.7s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    z-index: -1;
}

/* ==> */
.work__button {
    position: relative;
    z-index: 2;
    flex: 1;
    justify-content: center;
    background: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    column-gap: 0.25rem;
    font-size: var(--small-font-size);
    font-family: var(--second-font);
    cursor: pointer;
    transition: color 0.4s;
}

.work__button i {
    font-size: 1rem;
}

.work__button:hover {
    color: var(--first-color);
}

.work__area {
    position: relative;
    padding-left: 1rem;
}

.work__content {
    display: grid;
    row-gap: 4rem;
    min-height: 400px; /* Prevent layout collapse before JSON load */
}

.work__card {
    display: grid;
    row-gap: 1rem;
}

.work__data {
    display: flex;
    justify-content: space-between;
}

.work__title {
    font-size: var(--h2-font-size);
    margin-bottom: 0.5rem;
}

.work__subtitle {
    font-size: var(--normal-font-size);
    font-weight: var(--font-regular);
    color: var(--first-color);
}

.work__year {
    font-size: var(--h1-font-size);
}

.work__line {
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
            hsla(var(--hue), 60%, 64%, 0),
            var(--first-color-alt-2));
    position: absolute;
    left: -0.25rem;
}

.work__line::after {
    content: "";
    width: 16px;
    height: 16px;
    background-color: var(--first-color-alt-2);
    border-radius: 50%;
    position: absolute;
    bottom: -1px;
    left: -6px;
}

/* Show & hide sections */
.work__area [data-content] {
    display: none;
}

.work-active[data-content] {
    display: grid;
}

/* Active tab */
.work__button.work-active {
    color: var(--first-color);
}

/*=============== SERVICES ===============*/
.services__container {
    row-gap: 2rem;
    perspective: 1000px;
    min-height: 380px; /* Prevent layout collapse before JSON load */
}

.services__card {
    position: relative;
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border-radius: 3rem;
    display: grid;
    row-gap: 1.5rem;
    overflow: hidden;
    transform-style: preserve-3d;
}

.services__card .blob {
    z-index: 0;
    top: -7.75rem;
    left: -7.75rem;
}

.services__container .services__card:nth-child(even) .blob {
    left: initial;
    right: -7.75rem;
}

.services__data,
.services__info,
.services__icon {
    position: relative;
    z-index: 1;
}

.services__title {
    font-size: var(--h2-font-size);
    margin-bottom: 0.5rem;
}

.services__subtitle {
    font-size: var(--small-font-size);
    font-weight: var(--font-regular);
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.services__skills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.25rem;
    margin-bottom: 1rem;
}

.services__skill {
    background-color: var(--container-color);
    color: var(--title-color);
    border: 1px solid var(--title-color);
    padding: 4px 10px;
    border-radius: 4rem;
    font-size: var(--smaller-font-size);
    font-family: var(--second-font);
}

.services__button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    background-color: var(--body-color);
    color: var(--title-color);
    border: 2px solid var(--first-color);
    border-radius: 0.5rem;
    font-size: 1.5rem;
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    cursor: pointer;
}

.services__button i {
    transition: rotate 0.4s;
}

/* Hide services info */
.services-close .services__info {
    height: 0;
    opacity: 0;
    overflow: hidden;
}

.services__info {
    overflow: hidden;
    transition:
        height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.services__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background-color: var(--container-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    font-size: 2rem;
    color: var(--first-color);
    margin-bottom: 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: 0.4s;
}

.services__card:hover .services__icon {
    background-color: var(--first-color);
    color: var(--body-color);
    transform: rotate(15deg);
}

/* Rotate icon */
.services__card.services-close .ri-arrow-down-s-line {
    transition: transform 0.4s;
}

.services__card.services-open .ri-arrow-down-s-line {
    transform: rotate(180deg);
}

/* .services-open .services__button i {
  rotate: -180deg;
} */

/*=============== TESTIMONIALS ===============*/

/* Infinite scroll animation */

/*=============== CONTACT ===============*/
.contact__container {
    row-gap: 4rem;
    padding-bottom: 2rem;
}

.contact .section__title {
    margin-bottom: 1rem;
}

.contact__data {
    text-align: center;
}

.contact__description {
    font-family: var(--second-font);
    margin-bottom: 1rem;
}

.contact__email {
    display: none;
}

.contact__button {
    cursor: pointer;
}

.contact__content {
    row-gap: 3rem;
}

.contact__info {
    row-gap: 1rem;
}

.contact__title {
    font-size: var(--h3-font-size);
    color: var(--first-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.contact__address {
    color: var(--title-color);
    font-style: normal;
    font-weight: var(--font-medium);
    text-align: center;
}

.contact__links {
    display: grid;
    grid-template-columns: max-content;
    justify-content: center;
    row-gap: 0.2rem;
}

.contact__link {
    color: var(--title-color);
    font-weight: var(--font-medium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    column-gap: 0.5rem;
    transition:
        transform 0.4s,
        color 0.4s;
}

.contact__link i {
    font-size: 1.5rem;
}

.contact__link:hover {
    transform: translateX(0.35rem);
    color: var(--text-color);
}

/*=============== FOOTER ===============*/
.footer {
    position: relative;
    background-color: var(--container-color);
    padding-block: 5rem 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.footer .blob-animate {
    left: -4rem;
    bottom: -4rem;
    opacity: 0.5;
}

.footer__container {
    row-gap: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 3rem;
}

.footer__content {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
}

.footer__logo {
    font-family: var(--second-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--title-color);
    transition: color 0.3s;
    width: max-content;
}

.footer__logo:hover {
    color: var(--first-color);
}

.footer__subtitle {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.footer__links {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
}

.footer__link-item {
    color: var(--text-color);
    font-size: var(--normal-font-size);
    transition: color 0.3s, transform 0.3s;
    width: max-content;
}

.footer__link-item:hover {
    color: var(--first-color);
    transform: translateX(5px);
}

.footer__social {
    display: flex;
    column-gap: 1.25rem;
}

.footer__social-icon {
    font-size: 1.5rem;
    color: var(--title-color);
    transition: color 0.3s, transform 0.3s;
}

.footer__social-icon:hover {
    color: var(--first-color);
    transform: translateY(-3px);
}

.footer__bottom {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    align-items: center;
    margin-top: 3rem;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    text-align: center;
}

.footer__copy span {
    color: var(--first-color);
    font-weight: var(--font-medium);
}

.footer__year span {
    font-family: var(--second-font);
}

/* Footer Media Queries for Desktop layout */
@media screen and (min-width: 768px) {
    .footer__container {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
        align-items: center;
    }

    .footer__content {
        justify-self: flex-start;
    }

    .footer__social {
        justify-self: flex-end;
    }

    .footer__bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/*=============== SCROLL BAR ===============*/
::-webkit-scrollbar {
    width: 0.6rem;
    background-color: hsl(110, 6%, 12%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb {
    background-color: hsl(110, 96%, 15%);
    border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
    background-color: hsl(109, 96%, 22%);
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
    .intro-loader .name {
        font-size: clamp(1rem, 8vw, 1rem);
        letter-spacing: 1px;
    }

    .container {
        margin-inline: 1rem;
    }

    .blob,
    .home__image .blob-animate {
        width: 220px;
        height: 220px;
    }

    .projects__card {
        padding-inline: 1rem;
    }

    .work__tabs {
        padding-inline: 1rem;
    }
}

/* For medium devices */
@media screen and (min-width: 540px) {
    .home__container {
        width: 460px;
        margin-inline: auto;
    }

    .home__perfil {
        width: 320px;
    }

    .about__container,
    .work__container,
    .services__container {
        grid-template-columns: 460px;
        justify-content: center;
    }

    .about__data,
    .about__data .section__title {
        text-align: center;
    }

    :is(.projects) .section__title {
        text-align: center;
        margin-left: 0;
    }

    .projects__card {
        width: 350px;
    }

    .work__tabs {
        width: 330px;
        justify-self: center;
    }

    /* .contact__container {
    grid-template-columns: 460px;
    justify-content: center;
  } */
}

@media screen and (min-width: 768px) {
    .home__container {
        width: 600px;
        margin-inline: auto;
        padding-top: 0;
    }

    .home__perfil {
        width: 350px;
    }

    .home__left {
        align-items: center;
        text-align: center;
    }

    .home__social {
        flex-direction: row;
        row-gap: 0;
        column-gap: 1.5rem;
    }

    .home__right {
        align-items: center;
        text-align: center;
    }

    .work__container {
        grid-template-columns: 600px;
    }

    .work__area {
        padding-left: 0;
    }

    .work__card {
        grid-template-columns: repeat(2, 270px);
        justify-content: center;
        column-gap: 3rem;
    }

    .work__line {
        left: 0;
        right: 0;
        margin-inline: auto;
    }

    .services__container {
        grid-template-columns: repeat(2, 350px);
        align-items: flex-start;
    }
}

/* For intermediate desktop/large tablet screens */
@media screen and (min-width: 992px) {
    .home__container {
        grid-template-columns: 1fr 380px 1fr;
        align-items: center;
        column-gap: 1.5rem;
        width: 100%;
        max-width: 960px;
        margin-inline: auto;
        padding-top: 0;
    }

    .home__perfil {
        width: 380px;
    }

    .home__left {
        align-items: flex-start;
        text-align: left;
    }

    .home__social {
        flex-direction: column;
        row-gap: 1rem;
        column-gap: 0;
    }

    .home__right {
        align-items: flex-end;
        text-align: right;
    }
}

/* Tablet Hamburger Menu (768px to 1150px) */
@media screen and (min-width: 768px) and (max-width: 1150px) {
    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-block: 1.5rem;
    }

    .nav__logo {
        display: block;
    }

    .nav__menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.3);
        width: 85%;
        max-width: 420px;
        height: auto;
        background-color: hsla(240, 100%, 2%, 0.95);
        backdrop-filter: blur(15px);
        padding: 4rem 3rem;
        border-radius: 50%; /* Circular drop initial shape */
        opacity: 0;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
        z-index: var(--z-fixed);
        border: 1px solid rgba(255, 255, 255, 0.08);
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
                    border-radius 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), 
                    opacity 0.6s ease;
        pointer-events: none;
        left: 50% !important;
        right: initial !important;
        bottom: initial !important;
    }

    .show-menu {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 1 !important;
        border-radius: 2rem !important; /* Turns into rounded capsule card */
        pointer-events: auto;
    }

    .nav__list {
        flex-direction: column;
        row-gap: 2rem;
        align-items: center;
        width: 100%;
    }

    .nav__list li {
        transform: scale(0.5) translateY(20px);
        opacity: 0;
        transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.6s;
    }

    .show-menu .nav__list li {
        transform: scale(1) translateY(0);
        opacity: 1;
    }

    .show-menu .nav__list li:nth-child(1) { transition-delay: 0.1s; }
    .show-menu .nav__list li:nth-child(2) { transition-delay: 0.15s; }
    .show-menu .nav__list li:nth-child(3) { transition-delay: 0.2s; }
    .show-menu .nav__list li:nth-child(4) { transition-delay: 0.25s; }
    .show-menu .nav__list li:nth-child(5) { transition-delay: 0.3s; }
    .show-menu .nav__list li:nth-child(6) { transition-delay: 0.35s; }
    .show-menu .nav__list li:nth-child(7) { transition-delay: 0.4s; }

    .nav__link {
        display: flex;
        flex-direction: row;
        align-items: center;
        column-gap: 1rem;
        font-size: 1.25rem;
        color: var(--title-color);
        transition: color 0.3s;
    }

    .nav__icon {
        font-size: 1.5rem;
        display: block;
        color: var(--first-color);
    }

    .nav__link .nav__name {
        display: block;
        font-size: 1.15rem;
    }

    .nav__toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--title-color);
        cursor: pointer;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.75rem;
        color: var(--title-color);
        cursor: pointer;
        transition: transform 0.3s;
    }

    .nav__close:hover {
        transform: rotate(90deg);
    }
}

/* For large devices */
@media screen and (min-width: 1150px) {
    .container {
        margin-inline: auto;
    }

    .section {
        min-height: 100vh;
        padding-block: 7rem 3rem;
    }

    .section__title {
        padding-bottom: 4rem;
    }

    .blob {
        width: 300px;
        height: 300px;
    }

    .nav {
        height: calc(var(--header-height) + 2rem);
        align-items: center;
        justify-content: space-between;
        padding-block: 0;
    }

    .nav__logo {
        align-self: initial;
    }

    .nav__menu {
        position: initial;
        width: initial;
        height: initial;
        background-color: transparent;
        backdrop-filter: none;
        border: none;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
        max-width: initial;
        transform: none !important;
        transition: none !important;
    }

    .nav__list {
        flex-direction: row;
        column-gap: 2.25rem;
    }

    .nav__list li {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }

    .nav__link {
        flex-direction: row;
        font-size: var(--normal-font-size);
    }

    .nav__toggle,
    .nav__close,
    .nav__icon {
        display: none;
    }

    .home__container {
        grid-template-columns: 1fr 550px 1fr;
        column-gap: 3rem;
        max-width: 1130px;
        width: 100%;
        padding-top: 0;
    }

    .home__perfil {
        width: 550px;
    }

    .home__image .blob-animate {
        width: 380px;
        height: 380px;
        bottom: 2rem;
        filter: blur(50px);
    }



    .home__split {
        font-size: var(--h2-font-size);
    }

    .home__profession-box {
        justify-content: flex-end;
        height: 60px;
    }

    .home__profession-1,
    .home__profession-2 {
        font-size: var(--biggest-font-size);
        text-align: right;
    }

    .home__social-link {
        font-size: 1.5rem;
    }

    .home__cv {
        font-size: var(--normal-font-size);
    }

    .about__container {
        grid-template-columns: repeat(2, 500px);
        align-items: center;
        column-gap: 5.5rem;
        padding-top: 2rem;
    }

    .about__data,
    .about__data .section__title {
        text-align: initial;
        z-index: 2;
        margin-bottom: 3rem;
    }

    .about__description {
        margin-bottom: 3rem;
    }

    .about__perfil {
        width: 500px;
    }

    .about__image {
        order: -1;
    }

    .about__image .blob-animate {
        width: 200px;
        height: 200px;
        filter: blur(50px);
    }

    .about__image .blob-animate:nth-child(1) {
        left: 4rem;
        top: 4rem;
    }

    .about__image .blob-animate:nth-child(2) {
        right: -1rem;
        bottom: 3rem;
    }

    .about__shadow {
        height: 600px;
        bottom: 0;
    }

    .projects {
        padding-block: 9rem 4rem;
    }

    .projects__swiper {
        padding-bottom: 4rem;
    }

    .projects__container {
        max-width: 1380px;
    }

    .projects__card {
        width: 440px;
        padding: 2.5rem;
        border-radius: 4rem;
    }

    .projects__subtitle,
    .projects__description {
        font-size: var(--normal-font-size);
    }

    .projects__img {
        border-radius: 2rem;
    }

    .projects__button {
        top: 1.5rem;
        right: 1.5rem;
    }

    .work__container {
        grid-template-columns: 1050px;
        row-gap: 3rem;
    }

    .work__content {
        row-gap: 5rem;
    }

    .work__card {
        grid-template-columns: repeat(2, 450px);
        column-gap: 9rem;
    }

    .work__title {
        font-size: var(--bigger-font-size);
    }

    .work__subtitle,
    .work__description {
        font-size: var(--h3-font-size);
    }

    .services__container {
        grid-template-columns: repeat(2, 455px);
        column-gap: 5rem;
    }

    .services__card {
        padding: 3rem 3rem 4rem 3rem;
        border-radius: 4rem;
        row-gap: 2rem;
    }

    .services__title {
        font-size: var(--h1-font-size);
        margin-bottom: 1rw;
    }

    .services__button {
        right: 2rem;
        bottom: 2rem;
    }

    .contact {
        padding-block: 9rem 4rem;
    }

    .contact__container {
        row-gap: 8rem;
    }

    .contact__description {
        font-size: var(--h2-font-size);
    }

    .contact__content {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact__info {
        row-gap: 1.5rem;
        justify-self: flex-start;
    }

    .contact__write {
        justify-self: flex-end;
    }

    .contact__title {
        margin-bottom: 0.75rem;
    }

    .contact__links {
        row-gap: 0.5rem;
    }

    .contact__link {
        font-size: 1.25rem;
    }
}

/* For 2K resolutions (2048 x 1152, 2048 x 1536) */
@media screen and (min-width: 2048px) {
    body {
        zoom: 1.4;
    }
}

/* Custom cursor is hidden for mobile devices */
@media (pointer: coarse) {
    .cursor {
        display: none;
    }

    body {
        cursor: auto;
    }
}

/* Lock scrolling during preloader */
body.preloader-active {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Preloader Background Marquee Styling */
.intro-loader__marquee-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding-block: 5vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0.08;
    /* subtle background opacity */
    user-select: none;
}

.intro-loader__marquee {
    width: 100%;
    overflow: hidden;
    display: flex;
    white-space: nowrap;
}

.intro-loader__marquee-track {
    display: flex;
    white-space: nowrap;
}

.intro-loader__marquee-track span {
    font-family: var(--second-font);
    font-size: clamp(2.5rem, 5vw, 6rem);
    font-weight: 900;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 1px var(--title-color);
    padding-right: 3rem;
    letter-spacing: 4px;
}

/* Contact Form Styling */
.contact__form {
    margin-top: 2rem;
    display: grid;
    row-gap: 1.25rem;
    text-align: left;
    max-width: 580px;
    margin-inline: auto;
    width: 100%;
}

.contact__form-div {
    position: relative;
    height: 58px;
    background-color: var(--container-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    padding: 1.15rem 1rem 0.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact__form-tag {
    position: absolute;
    top: 0.5rem;
    left: 1rem;
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact__form-input {
    width: 100%;
    background: none;
    color: var(--title-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    border: none;
    outline: none;
    padding-top: 0.25rem;
}

.contact__form-area {
    height: 120px;
}

.contact__form-area textarea {
    resize: none;
    height: 80px;
}

.contact__form-div:focus-within {
    border-color: var(--first-color);
    box-shadow: 0 0 10px rgba(var(--hue), 60%, 64%, 0.15);
}

.contact__form-button {
    justify-self: center;
    cursor: pointer;
}

/* Contact Email Copy Box */
.contact__email-box {
    margin-top: 1rem;
    text-align: center;
}

.contact__email-wrapper {
    display: inline-flex;
    align-items: center;
    column-gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background-color: var(--container-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    transition: background-color 0.3s, border-color 0.3s;
    margin-top: 0.5rem;
}

.contact__email-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--first-color);
}

.contact__copy-icon {
    font-size: 1rem;
    color: var(--first-color);
}

/* Spinner Animation for Form Sending state */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* Chrome/Safari Autofill Styles override to match dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    border: none !important;
    -webkit-text-fill-color: var(--title-color) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--container-color) inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 3rem;
    bottom: -50%;
    background-color: var(--container-color);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    padding: 10px;
    font-size: 1.25rem;
    color: var(--title-color);
    border-radius: 0.5rem;
    z-index: 100;
    transition: bottom 0.4s, transform 0.4s, background-color 0.3s, border-color 0.3s, color 0.3s;
}

.scrollup:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--first-color);
    color: var(--first-color);
}

/* Show Scroll Up */
.show-scroll {
    bottom: 3rem;
}

/* Responsive Scroll Up */
@media screen and (max-width: 767px) {
    .scrollup {
        right: 1.5rem;
    }

    .show-scroll {
        bottom: 6rem;
    }

    /* Prevent content collision with floating bottom nav bar */
    .section {
        padding-bottom: 7rem !important;
    }

    /* Fix hero section picture sizing on mobile to prevent overflow */
    .home__perfil {
        width: 280px;
    }
    
    .home__image .blob-animate {
        width: 200px;
        height: 200px;
    }

    /* Fix bottom navigation bar overflow on mobile */
    .nav__name {
        display: none;
    }

    .nav__link {
        row-gap: 0;
        padding: 0.25rem;
    }

    .nav__icon {
        font-size: 1.35rem;
    }
}

/*=============== SKILLS ===============*/
.skills__container {
  row-gap: 2rem;
  perspective: 1000px;
}

.skills__card {
  position: relative;
  background-color: var(--container-color);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2.5rem 2rem;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: border-color 0.4s;
  transform-style: preserve-3d;
}

.skills__card:hover {
  border-color: var(--first-color);
}

.skills__card .blob {
  position: absolute;
  width: 150px;
  height: 150px;
  background: var(--first-color);
  bottom: -4rem;
  right: -4rem;
  filter: blur(80px);
  opacity: 0.15;
  transition: opacity 0.4s;
}

.skills__card:hover .blob {
  opacity: 0.3;
}

.skills__header {
  display: flex;
  align-items: center;
  column-gap: 0.75rem;
  margin-bottom: 2rem;
}

.skills__icon {
  font-size: 2rem;
  color: var(--first-color);
}

.skills__title {
  font-size: var(--h3-font-size);
  color: var(--title-color);
}

.skills__list {
  display: grid;
  row-gap: 1.25rem;
}

.skills__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.skills__item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--hue), 60%, 64%, 0.3);
  transform: translateX(5px);
}

.skills__item-data {
  display: flex;
  align-items: center;
  column-gap: 0.75rem;
}

.skills__item-icon {
  font-size: 1.5rem;
  color: var(--first-color);
}

.skills__name {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
}

.skills__level {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
}

/* Skills Media Queries */
@media screen and (min-width: 768px) {
  .skills__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1150px) {
  .skills__container {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2.5rem;
  }
}

/*=============== BACKGROUND CANVAS PARTICLES ===============*/
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/*=============== CURSOR TRAIL GLOWS ===============*/
.cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--first-color);
    opacity: 0.15;
    filter: blur(4px);
    z-index: 10000;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.cursor-trail-2 {
    width: 10px;
    height: 10px;
    opacity: 0.1;
    filter: blur(2px);
}

/*=============== 3D PARALLAX DEPTH ===============*/
.skills__card *,
.services__card * {
    transform-style: preserve-3d;
}

.skills__card .skills__blob,
.skills__card .skills__group i,
.services__card .services__icon,
.services__card .blob {
    transform: translateZ(45px);
    transition: transform 0.4s ease;
}

.skills__card .skills__title,
.skills__card .skills__list,
.services__card .services__title,
.services__card .services__description,
.services__card .services__button {
    transform: translateZ(25px);
    transition: transform 0.4s ease;
}