@import "./base-styles.css";

@font-face {
  font-family: "Inter";
  src:
    url(../font/Inter-Bold.woff2) format("woff2"),
    url(../font/Inter-Bold.woff) format("woff");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src:
    url(../font/Inter-Medium.woff2) format("woff2"),
    url(../font/Inter-Medium.woff) format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src:
    url(../font/Inter-Regular.woff2) format("woff2"),
    url(../font/Inter-Regular.woff) format("woff");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Red Hat Display";
  src:
    url(../font/RedHatDisplay-Regular.woff2) format("woff2"),
    url(../font/RedHatDisplay-Regular.ttf) format("truetype");
  font-weight: 300;
  font-display: swap;
}

:root {
  --header-height-t: 60.6px;
  --header-height-b-m: 86px;
  --header-height-b-s: 67.5px;

  /* light */
  --show-sun: block;
  --show-moon: none;
  /* dark */
  --show-sun: none;
  --show-moon: block;
}

/*? ********** carousel */
:root {
  --item1-transform: translateX(-100%) translateY(-5%) scale(1.5);
  --item1-filter: blur(30px);
  --item1-zIndex: 11;
  --item1-opacity: 0;

  --item2-transform: translateX(0);
  --item2-filter: blur(0px);
  --item2-zIndex: 10;
  --item2-opacity: 1;

  --item3-transform: translate(50%, 10%) scale(0.8);
  --item3-filter: blur(10px);
  --item3-zIndex: 9;
  --item3-opacity: 1;

  --item4-transform: translate(90%, 20%) scale(0.5);
  --item4-filter: blur(30px);
  --item4-zIndex: 8;
  --item4-opacity: 1;

  --item5-transform: translate(120%, 30%) scale(0.3);
  --item5-filter: blur(40px);
  --item5-zIndex: 7;
  --item5-opacity: 0;
}

/* ********** Utilities ********** */

.container {
  max-width: var(--max-width);
  /* padding-bottom: var(--box-32-36); */
  margin-left: auto;
  margin-right: auto;
}

.title-second {
  font-size: var(--font-36);
  font-weight: 700;
  line-height: 50px;
  letter-spacing: -1.3px;
  margin-bottom: var(--box-15-17);

  margin-top: var(--box-32-36);

  @media (width > 768px) {
    font-size: var(--font-48);
  }

  @media (width > 1024px) {
    margin-top: var(--header-height-t);
  }
}

.none {
  display: none;
}

.btn-first {
  border-radius: var(--radius-full);
  background-color: var(--first-color);
  color: #fff;
  font-weight: 500;
  padding: 11px 32px;
  /* margin-top: 1.5rem; */
  font-size: var(--font-20);
  span {
    vertical-align: middle;
  }
  &:hover {
    opacity: 1;
  }
  &:hover {
    background-color: var(--first-color-hover);
    background-color: #001b3a;
  }
}
.btn-second {
  padding: 4px 10px 4.4px 12px;
  border-radius: var(--radius-full);
  background-color: #fffd;
  font-weight: 500;
  text-align: end;
  color: #0059b3;
}

/* ********** Opmitimizer ********** */

/* Optimiza secciones fuera del viewport */
.op-render {
  content-visibility: auto; /* Renderiza solo si es visible */
  contain-intrinsic-size: 100vh; /* Evita saltos; reserva espacio real */
  contain: layout paint; /* Aíslay y evita recalcular y dibujar afuera */
}

/* Optimiza elementos internos (cards/proyectos) */
.op-card {
  contain: content; /* layout + paint: acelera animaciones */
}

/* Aislamiento máximo para elementos estáticos */
.op-pd {
  contain: strict; /* layout + paint + size: máximo ahorro CPU */
}

/* ********** scroll-bar ********** */

::-webkit-scrollbar {
  width: 0.5rem;
  background-color: #1118;
  /* display: none; */
}
::-webkit-scrollbar-thumb {
  border: 0.5px solid #ffffff66;
  border-radius: var(--radius-s);
  background-color: #0008;

  &:active {
    border: 0.5px solid #999;
    background-color: #333;
  }
}
@media (hover: hover) {
  ::-webkit-scrollbar-thumb:hover {
    border: 0.5px solid #999;
    background-color: #333;
  }
}

/* ********** header ********** */

header {
  position: absolute;
  inset: 0;
  z-index: 2;
  height: 0;

  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 32px;

    .header-logo {
      color: var(--color-white);
    }
  }

  .header-flags {
    width: fit-content;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 100;

    .qr-wrapper {
      --qr-btn-bg: transparent;
      --qr-card-bg: #3339;
      --qr-card-color: #fff;
      --transition: 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
      position: relative;
      display: inline-block;

      &:hover .qr-card,
      &:focus-within .qr-card {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
        pointer-events: auto;
      }

      .qr-btn {
        width: 44px;
        height: 44px;
        cursor: pointer;
        background-color: var(--qr-btn-bg);
        transition:
          opacity var(--transition),
          transform var(--transition),
          box-shadow var(--transition);

        img {
          width: 100%;
        }

        &:hover {
          opacity: 0.75;
        }
      }

      /* TARJETA (ABAJO CENTRADA) */
      .qr-card {
        position: absolute;
        min-width: 160px;
        top: calc(100% + 12px);
        left: 50%;
        transform: translateX(-50%) translateY(-5px);
        background-color: var(--qr-card-bg);
        padding: 14px;
        border-radius: var(--radius-m);
        opacity: 0;
        pointer-events: none;
        transition:
          opacity var(--transition),
          transform var(--transition);

        p {
          text-align: center;
          color: var(--qr-card-color);
        }
        img {
          width: 140px;
          height: 140px;
          padding: 6px;
        }
      }

      @media (width < 768px) {
        display: none;
      }
    }

    .flags-item {
      width: 22px;
      filter: drop-shadow(var(--shadow-s));
      cursor: pointer;

      &:first-of-type {
        margin-left: 0.5rem;
        img {
          border-radius: 8px 0 0 8px;
        }
      }
      img {
        border-radius: 0 8px 8px 0;
        filter: grayscale(80%);
        &:hover,
        &:active {
          filter: brightness(2) drop-shadow(0 0 2px #fff9);
        }
      }
    }
  }
}

.menu {
  position: relative;
  display: flex;

  --bg-navbar: #e8e8edb8;
  --bg-navbar-borde: #f5f5f730;
  --color-navbar: var(--text-color);

  --bg-btn-active: var(--first-color);
  --color-btn-active: var(--color-white);
  --btn-navbar-active-border: #0003;

  --box-shadow-m: var(--shadow-m);

  ul {
    position: fixed;
    bottom: 0.5rem;
    left: 0;
    right: 0;
    width: max-content;
    display: flex;
    gap: 0px;
    margin: 0 auto;
    border-radius: var(--radius-full);
    padding: 4px;

    transform: scale(0.88);
    opacity: 0;
    will-change: transform, opacity, background-color, color;
    transition:
      opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
      background-color 0.5s ease,
      color 0.5s cubic-bezier(0.22, 1, 0.36, 1),
      transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;

    li a {
      display: flex;
      border-radius: var(--radius-full);
      transition: background-color var(--transition-s);
      color: #fff;

      span {
        display: none;
        letter-spacing: 0.4px;
      }
      svg {
        padding: var(--box-8-9);
        width: max-content;
        height: auto;
      }

      &.active,
      &:hover,
      &:active {
        background-color: var(--bg-btn-active);
        color: var(--color-btn-active);
        opacity: 1;
      }
      &:active {
        /* opacity: 0.75; */
        background-color: #19f;
      }
    }
  }

  &.scroll-menu {
    ul {
      border: 0.5px solid var(--bg-navbar-borde);
      background-color: var(--bg-navbar) !important;
      backdrop-filter: saturate(200%) blur(7px);
      -webkit-backdrop-filter: saturate(200%) blur(7px);

      transform: scale(1);
      opacity: 1;
      li a {
        color: var(--color-navbar);
        &.active,
        &:hover,
        &:active {
          color: var(--color-btn-active);
        }
      }
    }
    @media (width > 768px) {
      ul li a svg {
        opacity: 1;
      }
    }
    @media (width > 1024px) {
      ul {
        transform: translateY(5px);
      }
    }
  }

  @media (width > 768px) {
    ul li a svg {
      padding: var(--box-15-17);
      transform: scale(1.2);
    }
  }

  @media (width > 1024px) {
    ul {
      bottom: unset;
      padding: 4px;
      opacity: 1;

      li a {
        span {
          display: inline-block;
          padding: 0.8rem 1.6rem;
          font-weight: 500;
        }
        svg {
          display: none;
        }
      }
    }
  }
}

/* ********** Components ********** */

.home-hero {
  position: relative;
  min-height: 100dvh;
  background-color: #000;

  &::after {
    content: "";
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    background-color: #000;
    background-image: radial-gradient(circle, #fff0 13%, #000 100%);
    opacity: 0.4;
  }
  video {
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    margin: auto;
  }
}

.home {
  --section-background: radial-gradient(
    88.74% 117.03% at 0% 1.38%,
    #0e0f20 0%,
    #0e1023 18.95%,
    #0d0e20 31.35%,
    #0a0c19 51.86%,
    #000 68.84%
  );
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  z-index: 1;

  .home-info {
    position: relative;
    display: flex;
    align-items: center;
    flex-flow: column;
    margin: 0 var(--box-15-17);

    /* margin-top: clamp(40px, 15vw, 150px); */
    /* margin-top: clamp(40px, 10vw, 150px); */
    margin-top: clamp(10px, 25vw, 150px);

    padding-top: 64px;
    gap: var(--gab-20-16);

    .home-box-perfil {
      display: flex;
      gap: 8px;

      padding: 3px 11px 3px 4px;
      border-radius: var(--radius-full);

      border: 1.25px solid #fff3;
      background-color: #0007;
      backdrop-filter: saturate(200%) blur(7px);
      -webkit-backdrop-filter: saturate(200%) blur(7px);
      box-shadow:
        0 0 5px 1px #fff,
        -2px -1px 6px 1px #00d2ffd0,
        2px 1px 6px 1px #18cd,
        0 0 36px 7px var(--first-color);

      /* original 
      box-shadow:
        0 0 20px 2px #ff69b4,
        -15px -10px 45px 10px #6394ed,
        15px 10px 45px 10px #9470db,
        0 0 60px 15px #00ffff33; */

      .home-image {
        height: 30px;
      }

      .home-name_role {
        color: #fff;
        font-family: var(--font-red-hat);
        font-weight: 300;
        line-height: 29px;
        letter-spacing: 0.2px; /* 7px scale 400 */
        margin-top: 1px;
      }
    }

    .home-title-propuesta h1 {
      text-align: center;
      letter-spacing: -0.2px; /* 16px scale 400 */
      color: #fff;
      text-wrap: balance;
      text-shadow: 0 0 6px #e3f4ff80;

      @media (width > 768px) {
        font-size: var(--font-48);
        line-height: 57px;
      }
    }

    .home-subtitle-resumen {
      max-width: 800px;
      text-align: center;
      font-size: var(--font-18);
      line-height: 20px;
      font-weight: 500;
      letter-spacing: -0.2px; /* 7px scale 400 */
      text-wrap: balance;
      color: var(--text-color-alpha);

      b {
        letter-spacing: -0.25px;
        color: #18f;
        /* font-weight: normal; */
      }
      @media (width > 768px) {
        line-height: 23px;
      }
    }

    .home-competencias {
      padding: 4px 11px 4px 4px;
      border: 1.25px solid #fff4;
      border-radius: var(--radius-m);
      background-color: #0006;

      .image-check {
        width: 24px;
        height: 20px;
        margin-top: -0.3px;
        margin-top: -0.3px;
      }

      .home-competencias-box {
        display: flex;
        align-items: center;
        align-items: start;

        p {
          margin-left: 3px;
          font-family: var(--font-red-hat);
          line-height: 18px;
          letter-spacing: 0.2px; /* 7px scale 400 */
          color: var(--color-white);
        }
      }
    }

    .home-disponiblidad {
      display: flex;
      --margin-top-0-32: clamp(0rem, -0.8182rem + 3.6364vw, 2rem);
      margin-top: var(--margin-top-0-32);
      border: 1px solid #fff3;
      border-radius: var(--radius-s);

      padding: 2px 12px 2px 6px;
      background-color: #fff3;
      background-image: linear-gradient(279deg, #0007, #1b1b1b 50%, #0007);
      backdrop-filter: saturate(200%) blur(1px);
      svg {
        margin-right: 3px;
        min-width: 20px;
      }

      p {
        align-self: center;
        margin-bottom: 0;
        font-family: var(--font-red-hat);
        font-weight: 300;
        letter-spacing: 0.2px; /* 7px scale 400 */
        color: var(--color-white);
      }
    }
  }
}

.skills {
  padding-bottom: var(--box-25-28);
  margin: 0 var(--box-15-17);

  .skill-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    grid-gap: var(--gab-20-16);
    margin-top: var(--box-15-17);

    .skill-box {
      display: flex;
      flex-direction: column;

      .skill-title {
        margin-bottom: var(--box-15-17);
      }

      .skill-item {
        display: flex;
        padding: 4px;
        padding-left: 0;

        img {
          max-width: 59px;
          max-height: 59px;
          aspect-ratio: 1 / 1;
          object-fit: cover;
          border: 0.5px solid #7772;
          border-radius: var(--radius-m);
          corner-shape: squircle;
        }

        .skill-info {
          padding: 5px;

          h3 {
            font-size: var(--font-16);
            letter-spacing: 0.2px; /* 8px scale 400 */
          }
          p {
            color: var(--text-color-alpha);
            color: #0000008f;
            font-size: var(--font-14);
            letter-spacing: -0.2px; /* 7px scale 400 */
          }
        }
      }
    }
  }
}

/*? ********* carousel */
.carousel {
  --info-width: 90%;
  --img-width: calc(100% - 32px);
  --carousel-bg-color: #001b3a;
  --carousel-text-color: #fff;

  position: relative;
  min-height: 690px;
  background-color: var(--carousel-bg-color);
  color: var(--carousel-text-color);
  overflow: hidden;

  &::before {
    position: absolute;
    width: 100vw;
    height: 100vh;
    content: "";
    background-position: start;
    background-size: cover;
    opacity: 0.1;
    z-index: -1;
  }

  .list {
    position: absolute;
    left: 50%;
    width: 100%;
    max-width: 1140px;
    height: calc(100vh - 7.5rem);
    transform: translateX(-50%);

    .item {
      position: absolute;
      left: 0;
      width: 100%;
      height: 100%;
      will-change: transform, opacity, filter;
      transition:
        transform 0.45s ease,
        opacity 0.45s ease,
        filter 0.45s ease;

      &:first-child {
        transform: var(--item1-transform);
        filter: var(--item1-filter);
        z-index: var(--item1-zIndex);
        opacity: var(--item1-opacity);
        pointer-events: none;
      }
      &:nth-child(2) {
        z-index: 10;
        transform: translateX(0);
      }
      &:nth-child(3) {
        transform: var(--item3-transform);
        filter: var(--item3-filter);
        z-index: var(--item3-zIndex);
      }
      &:nth-child(4) {
        transform: var(--item4-transform);
        filter: var(--item4-filter);
        z-index: var(--item4-zIndex);
      }
      &:nth-child(5) {
        transform: var(--item5-transform);
        filter: var(--item5-filter);
        opacity: var(--item5-opacity);
        pointer-events: none;
      }
      &:nth-child(n + 6) {
        opacity: 0;
      }

      & > img {
        width: var(--img-width);
        margin-left: 1rem;
        object-fit: cover;
        aspect-ratio: 16/9;
        border-radius: var(--radius-l);
        width: var(--img-width);
        top: 0px;
      }

      .info {
        padding-left: 1rem;
        opacity: 0;
        pointer-events: none;
        --fluid-220-24: clamp(13.75rem, 12.438rem + 5.598vw, 15.125rem);

        .info-title {
          font-size: var(--font-25);
          line-height: 22px;
        }
        > p {
          font-size: var(--font-13);
          margin-bottom: var(--gab-10-8);
          color: #c3dbf4;
          font-family: var(--font-red-hat);
          letter-spacing: 0.4px;
        }
        .info-block {
          ul {
            margin-top: 4px;
            li {
              font-size: var(--font-16);
              letter-spacing: -0.2px;
              font-weight: 400;
              padding: 0;
              margin-left: 1rem;
              list-style: initial;
            }
          }
        }
        .info-link {
          margin-top: 1rem;
          padding: 4px 10px 4.4px 12px;
          border-radius: var(--radius-full);
          font-weight: 700;
          color: #000;
          background-color: #fff;
          background-color: var(--first-color);
          color: #fff;
          span {
            vertical-align: middle;
            font-size: 18px;
            padding-left: 2px;
          }
        }
      }

      &:nth-child(2) .info {
        opacity: 1;
        pointer-events: auto;
        transition: opacity 0.5s;

        /* .info-title, */
        .info-block h3,
        .info-block ul,
        .info-link {
          opacity: 0;
          animation: slideInCarousel 0.4s ease-in-out 1 forwards;
        }

        .info-title {
          animation-delay: 0.15s;
        }
        .info-block {
          h3 {
            animation-delay: 0.25s;
          }
          ul {
            animation-delay: 0.35s;
          }
          &:last-of-type h3 {
            animation-delay: 0.42s;
          }
          &:last-of-type ul {
            animation-delay: 0.5s;
          }
        }
        .info-link {
          animation-delay: 0.6s;
        }
      }
      &:nth-child(3) img {
        filter: brightness(0.7);
      }
    }
  }

  .arrows {
    position: absolute;
    bottom: 30px;
    display: flex;
    right: 10%;
    gap: 16px;
    button {
      --carousel-bg-color: #d2d2d7a3;
      --svg-color: #0000008f;
      --width-arrow: 36px;

      width: var(--width-arrow);
      height: var(--width-arrow);
      border-radius: var(--radius-full);

      background-color: var(--carousel-bg-color);
      border: none;
      display: flex;
      justify-content: center;
      align-items: center;

      svg {
        height: 14px;
        color: var(--svg-color);
      }
      &:hover {
        background-color: #dfdfe3b2;
      }
    }
    #prev svg {
      margin-right: 2px;
    }
    #next svg {
      margin-left: 2px;
    }
  }

  @media (width > 540px) {
    min-height: 795px;
  }
  @media (width > 768px) {
    --img-width: 65%;
    --info-width: 370px;
    --top-height-title: 60px;

    min-height: 100vh;

    .list {
      .item {
        height: 100vh;
        & > img {
          position: absolute;
          top: calc(20% + var(--top-height-title));

          right: 0;
          min-height: 380px;
          transform: translateY(-46%);
        }
        .info {
          min-height: 400px;
          background-color: var(--carousel-box-bg-color);
          border-radius: var(--radius-l);
        }
        &:nth-child(2) .info {
          position: absolute;
          top: calc(25% + var(--top-height-title));

          width: var(--info-width);
          transform: translateY(-56%);
        }
      }
    }
  }

  @media (height >= 1024px) {
    min-height: 840px;
  }
}

@keyframes slideInCarousel {
  from {
    transform: translateY(-18px);
    filter: blur(6px);
  }
  to {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

.about {
  --bg-box: linear-gradient(160deg, transparent 30%, #d4d7db);
  --bg-box: linear-gradient(160deg, transparent 46%, #d4d7db);

  justify-content: center;

  .about-box {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: var(--box-15-17);

    border-radius: var(--radius-l);

    .animate-logo {
      max-width: 60%;
      --s: 10px;
      --f: 1; /* initial scale */

      padding-top: calc(var(--s) / 5);
      border-radius: 0 0 999px 999px;
      --_g: 50% / calc(100% / var(--f)) 100% no-repeat content-box;
      --_o: calc((1 / var(--f) - 1) * var(--s) / 2 - 6px);
      outline-offset: var(--_o);
      background: radial-gradient(
          circle closest-side,
          #f4f4f7 calc(99% - 6px),
          #0002 calc(100% - 6px) 99%,
          #0000
        )
        var(--_g);
      -webkit-mask:
        linear-gradient(#000 0 0) no-repeat 50% calc(1px - var(--_o)) /
          calc(100% / var(--f) - 2 * 6px - 2px) 50%,
        radial-gradient(circle closest-side, #000 99%, #0000) var(--_g);
      mask:
        linear-gradient(#000 0 0) no-repeat 50% calc(1px - var(--_o)) /
          calc(100% / var(--f) - 2 * 6px - 2px) 50%,
        radial-gradient(circle closest-side, #000 99%, #0000) var(--_g);

      /* -webkit-mask: linear-gradient(#000 0 0) no-repeat 50%
          calc(1px - var(--_o)) / calc(100% / var(--f) - 2 * 6px - 2px) 50%,
        radial-gradient(circle closest-side, #000 99%, #0000) var(--_g); */
      transform: scale(var(--f));
      transition: 0.5s;
      &:hover {
        --f: 1.15;
      }
    }

    .about-text {
      .f-hidden {
        justify-content: start;
        .title-second {
          margin-top: 0;
        }
      }
      p {
        font-weight: 500;
        text-indent: 0.5rem;
        text-wrap: balance;
      }
    }
  }

  @media (width > 768px) {
    padding: var(--box-60-67) var(--box-32-36);

    .about-box {
      flex-direction: row;
      padding-top: 0;
      gap: var(--gab-20-16);
      background-image: var(--bg-box);
      img {
        width: 30%;
      }
    }
  }
}

.contact {
  --bg-footer: var(--color-black);
  --bg-footer: #001b3a;
  --bg-footer: #000;
  --color-footer: #f4f4f5;
  --color-footer: #fff;

  position: relative;
  min-height: 100dvh;
  padding-top: var(--box-25-28);
  background-color: var(--bg-footer);
  color: var(--color-footer);

  .footer-bg-glow {
    --bg-glow: radial-gradient(
      47.08% 45.75% at 50% 50%,
      #0d539b 0%,
      #0d539be8 33.36%,
      #482a6900 100%
    );

    position: absolute;
    z-index: 3;
    bottom: -80rem;
    left: 50%;
    transform: translateX(-50%);
    width: max(160%, 1068px);
    height: 106rem;
    background: var(--bg-glow);
    mix-blend-mode: screen;
    pointer-events: none;
    @media (width > 768px) {
      bottom: -76rem;
    }
  }

  .contact-info {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: var(--gab-20-16);
    max-width: 800px;

    .title-second {
      color: var(--color-footer);
      margin-bottom: 0;
      margin-top: 1rem;
    }

    .p-proyecto {
      margin-top: 50px;
      margin: var(--box-15-17) 0;
      padding: 0 1rem;
      font-size: var(--font-20);
      font-weight: 700;
      color: var(--text-color-alpha);
    }

    .contac-actions {
      display: flex;
      flex-direction: column;
      gap: 56px;
      gap: var(--box-60-67);
      .actions-contac {
        .contact-card {
          display: flex;
          gap: var(--gab-10-8);

          .contact-text-correo {
            line-height: 29px;
            font-size: var(--font-14);
            user-select: none;
            pointer-events: none;
          }
          .status-badge {
            display: inline-flex;
            align-items: center;
            margin-bottom: var(--gab-10-8);
            --color-disp: #4ad968;

            .status-badge-dot {
              width: 10px;
              height: 10px;
              border-radius: 10px;
              background-color: var(--color-disp);
            }
            p {
              font-weight: 500;
              padding-left: 5px;
              font-size: var(--font-14);
              line-height: 29px;
              color: var(--color-disp);
            }
          }
        }
      }
      .actions-portfolio {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--gab-10-8);
      }

      .contact-btn {
        width: fit-content;
        border-radius: var(--radius-full);
        font-weight: 700;
        color: #000;
        background-color: #fff;
        display: inline-flex;

        span {
          font-weight: 700;
        }

        &.btn-correo {
          padding: 3.5px 12px 5px 15px;
          font-size: var(--font-16);
          font-family: var(--font-base);
          max-height: 29px;
          #icoCopy {
            padding-left: 3px;
          }
        }
        &.btn-linkedin {
          align-items: center;
          padding: 4px 12px 5px 15px;
          max-height: 29px;
          gap: 4px;
        }
        &.btn-github {
          border: 1px solid #fff;
          padding: 4px 10px;
          background-color: transparent;
        }
        &.btn-cv-pdf {
          padding: 5px 12px 3.3px 15px;
          background-color: var(--first-color);
          color: #fff;
          span {
            vertical-align: middle;
            font-size: 18px;
          }
        }
      }
    }
  }

  small {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4.5rem;
    bottom: var(--header-height-b-s);
    text-align: center;
    letter-spacing: 0.4px;

    a {
      font-weight: 700;
      color: var(--first-color-hover);
      font-size: var(--font-11);
    }
  }

  @media (width > 768px) {
    padding-top: 68px;

    .p-proyecto {
      padding: 0 !important;
    }

    .contac-actions {
      width: 100%;
      flex-direction: row !important;
      justify-content: space-between;
      .actions-portfolio {
        align-items: end !important;
        margin-top: 24px;
      }
    }

    small {
      bottom: var(--header-height-b-m);
    }
  }
  @media (width > 1024px) {
    small {
      bottom: 0.5rem;
    }
  }
}

/* ********** animation ********** */

/*? ********* HOME */

.animation-zoom {
  position: absolute;
  top: 0px;
  --scale: calc(70vw / 190px);
  transform: scale(var(--scale)) translateY(10px);
  transform-origin: top center;
  animation: zoom-logo 0.5s cubic-bezier(0.75, 1, 1, 1) 0.45s forwards;

  @media (width > 768px) {
    --scale: calc(70vw / 250px);
  }
}

@keyframes zoom-logo {
  to {
    transform: scale(1) translateY(0);
  }
}

.animation-curtain {
  overflow: hidden;

  & > *:first-child {
    transform: translateY(var(--translate-y, 100%));
    animation: curtain-down var(--duration, 0.5s) var(--delay, 0s) forwards;
    opacity: 0;
  }

  header {
    --duration: 1.9s;
    --translate-y: -40px;
  }

  .home-title-propuesta {
    --delay: 1s;
    &.propuesta-two {
      --delay: 1.2s;
    }
  }
  .home-subtitle-resumen {
    --delay: 1.4s;
  }
}

@keyframes curtain-down {
  to {
    transform: translateY(0px);
    opacity: 1;
  }
}

.animation-opacity {
  opacity: 0;
  animation: show-opacity 1.7s ease-out 1.9s forwards;
}

@keyframes show-opacity {
  to {
    opacity: 1;
  }
}

/*? ********** carousel */

.carousel {
  &.next .list .item {
    animation: var(--anim-name) var(--duration) ease-in-out 1 forwards;
    &:nth-child(1) {
      --anim-name: transformFromPosition2;
      --duration: 0.45s;
    }
    &:nth-child(2) {
      --anim-name: transformFromPosition3;

      --duration: 0.5s;
    }
    &:nth-child(3) {
      --anim-name: transformFromPosition4;
      --duration: 0.55s;
    }
    &:nth-child(4) {
      --anim-name: transformFromPosition5;
      --duration: 0.6s;
    }
  }
  &.prev .list .item {
    animation: var(--anim-name) 0.45s ease 1 forwards;
    &:nth-child(5) {
      --anim-name: transformFromPosition4;
    }
    &:nth-child(4) {
      --anim-name: transformFromPosition3;
    }
    &:nth-child(3) {
      --anim-name: transformFromPosition2;
    }
    &:nth-child(2) {
      --anim-name: transformFromPosition1;
    }
  }
}

/* next click */
@keyframes transformFromPosition2 {
  from {
    transform: var(--item2-transform);
    filter: var(--item2-filter);
    opacity: var(--item2-opacity);
  }
}
@keyframes transformFromPosition3 {
  from {
    transform: var(--item3-transform);
    filter: var(--item3-filter);
    opacity: var(--item3-opacity);
  }
}
@keyframes transformFromPosition4 {
  from {
    transform: var(--item4-transform);
    filter: var(--item4-filter);
    opacity: var(--item4-opacity);
  }
}
@keyframes transformFromPosition5 {
  from {
    transform: var(--item5-transform);
    filter: var(--item5-filter);
    opacity: var(--item5-opacity);
  }
}
/* previous click */
@keyframes transformFromPosition1 {
  from {
    transform: var(--item1-transform);
    filter: var(--item1-filter);
    opacity: var(--item1-opacity);
  }
}

/*? ********** OVERLAP */

.scroll-overlap-fija {
  position: sticky;
  top: 0;
  min-height: 100dvh;
  z-index: 0;
}

.scroll-overlap-superpone {
  position: relative;
  z-index: 1;
}

/*? ********** GENERAL */

.f-hidden {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* efectos iniciales */
.animation {
  opacity: 0;

  /* 🔥 rendimiento */
  will-change: transform, opacity, clip-path;

  /* transición base */
  transition:
    transform var(--duration, 0.6s) ease,
    opacity var(--duration, 0.6s) ease,
    clip-path var(--duration, 0.8s) ease;

  /* efecto escalonado */
  &.stagger {
    /* --reveal-delay: 1s; */
    transition:
      opacity 0.4s ease calc(var(--reveal-delay, 0ms)),
      transform 0.4s ease calc(var(--reveal-delay, 0ms));
  }

  /* efectos iniciales */
  &.a-up,
  &.fade-up {
    transform: translateY(50px);
  }
  &.a-up_hidden,
  &.fade-up-hidden {
    opacity: 1;
    transform: translateY(97%);
    transform: translateY(80%);
    transform: translateY(77%);
    padding-bottom: 2px;
    --duration: 0.8s;
  }

  &.a-left,
  &.fade-left {
    transform: translateX(-50px);
  }

  &.a-right,
  &.fade-right {
    transform: translateX(50px);
  }

  &.a-zoom_in,
  &.zoom-in {
    transform: scale(0.88);
  }

  /* efecto persiana */
  &.a-curtain,
  &.curtain {
    clip-path: inset(0 0 89% 0); /* threshold: 0.1 */
    clip-path: inset(79% 0 0 0); /* threshold: 0.2 */
    clip-path: inset(0 0 79% 0); /* threshold: 0.2 */
  }

  /* delays manuales */
  &.delay-1 {
    transition-delay: 0ms;
  }
  &.delay-2 {
    transition-delay: 120ms;
  }
  &.delay-3 {
    transition-delay: 240ms;
  }
}

/* estado final */
/* .animation.appear, */
.animation.revealed {
  opacity: 1;
  transform: translate(0) scale(1);
  clip-path: inset(0 0 0 0);
}

/*? ********** Scroll - timeline */

.scroll-container {
  @media (width > 768px) {
    height: 350vh;
    view-timeline-name: --box;
    view-timeline-axis: block;
    overflow: clip;

    background-color: #000;

    background: linear-gradient(#000, #fff, #fff);
    background-image:
      linear-gradient(#0002, #0001, #fff9, #fff),
      url(../assets/fondo-hero-blur.jpg);

    .sticky-wrap {
      position: sticky;
      top: 0;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      overflow: hidden;

      .expanding-box {
        width: 100%;
        max-width: 60px;
        min-height: 99vh;
        background: #fff;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 16px;

        animation: expand linear both;
        animation-timeline: --box;
        animation-range: entry 10% exit 1%;
      }
    }
  }
}

/* Animación */
@keyframes expand {
  from {
    max-width: 760px;
    border-radius: var(--radius-l);
    margin: 60px 0;
    padding: 2rem;
  }
  to {
    max-width: 100vw;
    border-radius: 0;
    margin: 0;
  }
}
