/* ===================================================================
   COMMON
   =================================================================== */
@property --background {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(245, 249, 254);
}

@property --background-light {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(245, 249, 254, 0.5);
}

@property --blue-2 {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(175, 226, 255);
}

@property --blue-3 {
    syntax: "<color>";
    inherits: true;
    initial-value: rgba(45, 175, 236, 0.85);
}

@property --link {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(0, 102, 204);
}

@property --grey-1 {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(96, 105, 110);
}

@property --hover-link {
    syntax: "<color>";
    inherits: true;
    initial-value: rgb(152, 219, 29);
}

@property --radius-1 {
    syntax: "<length>";
    inherits: true;
    initial-value: 5px;
}

/*GLOBAL*/
:root {
    font-family: "Baloo Paaji 2", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1.2rem;

    /* Espaciado y profundidad (no tocan color) */
    --space-section: clamp(48px, 7vw, 80px);
    --card-pad: clamp(15px, 3dvw, 30px);
    --shadow-sm: 0 4px 16px rgba(13, 44, 64, 0.07);
    --shadow-md: 0 14px 34px rgba(13, 44, 64, 0.12);
}

*, *:before, *:after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior: none; /* evita el "pull-to-refresh" del navegador (táctil / scroll de 2 dedos) */
    background-color: var(--background);
    cursor: default;
}

html, body, header, main, footer, div, strong, span, svg, ul, h1, h2, h3, h4, h5, h6, p, a {
    margin: 0;
    padding: 0;
}

ul {
    list-style: none; /* Quita los puntos de la lista */
}

a {
    display: block;
    text-decoration: none; /* Quita el subrayado */
}

img {
    max-width: 100%;
}

svg {
    display: block;
}

/*SPECIFIC*/

main {
    display: flex;
    flex-direction: column;
    gap: var(--space-section);
}

section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

h1, h2, h3, h4 {
    display: flex;
    flex-direction: column;
    width: fit-content;
}

h1 {
    background-color: white;
    text-transform: uppercase;
    transition: background 0.3s ease, border-radius 0.3s ease-in-out;
}

h2 {
    background-color: white;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px clamp(20px, 2%, 30px);
    transition: background 0.3s ease, border-radius 0.3s ease-in-out;
}

h1 {
    font-size: calc(1.5rem + 2dvw);
}

h2 {
    font-size: calc(1.2rem + 1dvw);
}

h3 {
    font-size: calc(1rem + 0.5dvw);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

h4 {
    font-size: 1rem;
}

h1 a,
h2 a,
h3 a,
h4 a {
    color: inherit;
    font-size: inherit;
}

/*REUSABLE*/
.h2-mask {
    position: sticky;
    z-index: 3;
    top: 0;
    width: 100%;
    min-width: max-content; /*necesario para que la máscara se ajuste al contenido */
    display: flex;
    justify-content: center;
    align-self: start;
    transition: width 0.3s ease-in-out;
}

h2 > a {
    background: linear-gradient(45deg, #0233d1 12.5%, #00f7ff 37.5%, #00ff4c 62.5%, #d9ff00 87.5%);
    background-clip: text;
    background-size: 200%;
    background-position-x: 0%;
    background-repeat: repeat;
    color: transparent;
    transition: background-position 0.5s ease;
}

h2 > a:hover, h2 > a:focus {
    background-position-x: 100%;
}

.content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.visually-hidden {
    position: absolute;
    overflow: hidden;
    clip-path: inset(0);
    white-space: nowrap;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    outline: none;
}

.lat-pad-L {
    padding-left: clamp(5px, 10%, 250px);
    padding-right: clamp(5px, 10%, 250px);
}

.lat-pad-S {
    padding-left: clamp(5px, 3%, 250px);
    padding-right: clamp(5px, 3%, 250px);
}

.long-pad-L {
    padding-top: 50px;
    padding-bottom: 50px;
}

.long-pad-S {
    padding-top: 15px;
    padding-bottom: 15px;
}

/*JAVASCRIPT*/
.h2-mask.collapse {
    width: 0%; /*necesario para que la máscara se ajuste al contenido */
}

.h2-mask.collapse h2{
    border-radius: 0px 0px 1rem 0px;
}


/* ===================================================================
   HEADER
   =================================================================== */
header {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    width: 100%;
    justify-content: center;
    transition: opacity 0.3s ease, transform 0.3s ease, backdrop-filter 0.3s ease;
}

/*Add and Remove by JavaScript*/
header.hidden {
    opacity: 0;
    transform: translateY(-100%);
}

/*Add and Remove by JavaScript*/
header.opaque {
    backdrop-filter: blur(30px);
}

.header-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    text-wrap: nowrap;
    align-items: center;
    padding: 20px;
    gap: 10px;
}

.header-list > li {
    flex: 0.5 1 30%;
}

.header-list > li > a {
    font-weight: bold;
    background-color: white;
    border-radius: 1rem;
    padding: 0px 20px;
    transition: color 0.3s ease;
}

.header-list > li > a:hover,
.header-list > li > a:focus-visible {
    color: var(--hover-link);
}


/* ===================================================================
   BURGER-BUTTON
   =================================================================== */
.burger-button {
    position: fixed;
    top: 0;
    right: 0;
    cursor: pointer;
    width: 70px;
    margin-top: 10px;
    margin-right: 10px;
    padding: 0;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease, scale 0.3s ease;
}

.burger-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

/*Add and Remove by JavaScript*/
.burger-button.hidden {
    opacity: 0;
    transform: translateX(100%);
}

.line1, .line2, .line3 {
    transform-origin: 50% 25%;
    stroke: black;
    stroke-width: 15;
    stroke-linecap: round;
    transition: stroke 0.5s ease, transform 0.5s ease, opacity 0.5s ease;
}

.line1 {
    transform-origin: 50% 25%;
}

.line2 {
    transform-origin: 100% 50%;
}

.line3 {
    transform-origin: 50% 75%;
}

.active .line1 {
    transform: translate(0%, 25%) rotate(-45deg) scale(1.2);
    stroke: red;
}

.active .line2 {
    opacity: 0;
    transform: scale(0);
}

.active .line3 {
    transform: translate(0%, -25%) rotate(45deg) scale(1.2);
    stroke: red;
}


/* ===================================================================
   FOOTER
   =================================================================== */
footer {
    display: flex;
    flex-direction: column;
    padding-bottom: 20px;
    gap: 20px;
}

.message-container {
    background-color: white;
    width: fit-content;
    align-self: center;
    padding: 20px 30px;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.social-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: clamp(15px, 3%, 50px);
}

.social-list > li {
    width: clamp(75px, 10%, 100px);
    transition: transform 0.2s ease-in-out;
}

.social-list > li:hover{
    transform: translateY(-10%);
}

.social-list > li > a {
    line-height: 0;
}

.social-list > li > a > img {
    width: 100%;
}

.license-container {
    background-color: white;
    width: fit-content;
    align-self: center;
    padding: 5px 15px;
    border-radius: 1rem;
    color: var(--grey-1);
    font-size: 0.9rem;
}


/* ===================================================================
   KEYS
   =================================================================== */
.about-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.about-traits li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--background);
    font-size: 0.85rem;
    font-weight: 600;
    color: #0d2c40;
    transition: transform 0.2s ease;
}

.about-traits li:hover {
    transform: translateY(-2px);
}

.about-traits img {
    width: 1.15rem;
    height: 1.15rem;
}


/* ===================================================================
   HERO
   =================================================================== */
.hero-container {
    position: relative;
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    transition: height 0.5s ease;
}

.hero-svg {
    position: absolute;
    width: 100%;
    z-index: -1;
}

.hero-container-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background-color: white;
    border-radius: 1rem;
    padding: 16px 36px;
}

.hero-text {
    cursor: default;
    background: linear-gradient(45deg, #0233d1 12.5%, #00f7ff 37.5%, #00ff4c 62.5%, #d9ff00 87.5%);
    background-clip: text;
    background-size: 200%;
    background-position-x: 0%;
    background-repeat: repeat;
    color: transparent;
    text-align: center;
    line-height: 1.3;
    transition: background-position 0.5s ease;
}

.hero-text:hover {
    background-position-x: 100%;
}

.hero-title {
    font-weight: 600;
}

.hero-subtitle {
    text-transform: uppercase;
    font-size: calc(1.3rem + 1dvw);
    font-weight: 600;
    letter-spacing: 1px;
}


/* ===================================================================
   VIGNETTE
   =================================================================== */
.vignette-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 24px;
}

.vignette-list-item {
    display: flex;
    flex-wrap: wrap;
    background-color: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vignette-list-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.vignette-item-content {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--card-pad);
    gap: 18px;
}

.vignette-item-content h3 > a {
    transition: color 0.2s ease;
}

.vignette-item-content h3 > a:hover,
.vignette-item-content h3 > a:focus-visible {
    color: var(--hover-link);
}

.vignette-item-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 15px;
}

.vignette-item-info > ul {
    display: flex;
    flex-wrap: wrap;
    column-gap: 10px;
}

.vignette-item-info > ul > li {
    border-right: 2px solid;
    border-radius: 1rem;
    padding: 0px 10px 0px 0px;
    color: var(--grey-1);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-image: linear-gradient(0deg, #00f7ff 0%, #00ff4c 50%, #d9ff00 87.5%) 1;
}

.vignette-item-info > ul > li:last-child {
    border-right: none;
}

.vignette-item-links {
    display: flex;
    flex-wrap: wrap;
    width: fit-content;
    column-gap: 20px;
}

.vignette-item-links > a {
    color: var(--link);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.vignette-item-links > a:hover,
.vignette-item-links > a:focus-visible {
    color: var(--hover-link);
}

.vignette-item-media {
    flex: 1 1 max(450px, 50%); /*En 50% se aplica flex-grow, en 450px se aplica el flex-shrink*/
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 1rem;
}

.vignette-item-media * {
    border-radius: 1rem;
}

.vignette-item-media > p {
    padding: 20px;
    color: var(--grey-1);
}

.vignette-item-media > a {
    display: flex;
    overflow: hidden;
    border-radius: 1rem;
}

.vignette-item-media > a > img {
    /*aspect-ratio: 21 / 9;*/
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vignette-list-item:hover .vignette-item-media > a > img {
    transform: scale(1.04);
}

.vignette-item-media > iframe {
    width: 100%;
}

.vignette-item-media > iframe:fullscreen {
    border-radius: 0;
}


/* ===================================================================
   CODEPEN
   =================================================================== */
/* CodePen HTML embed style*/
.codepen {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.cp_embed_wrapper {
    width: 100%;
    height: 100%;
}

.cp_embed_iframe {
    width: 100%;
    height: 100%;
}


/* ===================================================================
   TOOLS
   =================================================================== */
.tools-groups {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.tool-group-title {
    align-self: center;
    font-size: 1rem;
    color: var(--grey-1);
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 8px;
}

.tool-group-title::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 40px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(45deg, #0233d1, #00f7ff, #00ff4c, #d9ff00);
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.tools-list > li {
    flex: 1 1 250px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tools-list > li > img {
    width: 4rem;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 1rem;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

.tool-info {
    display: flex;
    flex-direction: column;
    text-wrap: balance;
}

.tool-info :nth-child(1) {
    font-weight: 700;
}

.tool-info :nth-child(2) {
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--grey-1);
}


/* ===================================================================
   SKILLS
   =================================================================== */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.skills-list > li {
    position: relative;
    flex: 0.75 1 max(250px, 45%);
    display: flex;
    align-items: center;
    gap: 15px;
}

.skills-list > li:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: right;
}

.skills-list > li > img {
    width: 4rem;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 1rem;
    padding: 10px;
    box-shadow: var(--shadow-sm);
}

/* base para todos los after */
.skills-list > li::after {
    content: '';
    position: absolute;
    width: 60%;
    bottom: 0;
    margin-bottom: -5px;
    height: 2px;
    border-radius: 1rem;
}

/* variantes por elemento */
.skills-list > li.devops::after {
    background: linear-gradient(45deg,#1abc35 0%, #24612e 50%, #000000 100%);
}

.skills-list > li.fullstack::after {
    background: linear-gradient(45deg, #3367b1 0%, #1ec3e1 100%);
}

.skills-list > li.ai::after {
    background: linear-gradient(45deg, #7b2ff7 0%, #00c6ff 50%, #00ff4c 100%);
}

.skills-list > li.automation::after {
    background: linear-gradient(45deg, #ff2d95 0%, #ff8a00 50%, #ffd500 100%);
}

.skills-info {
    display: flex;
    flex-direction: column;
    text-wrap: balance;
}

.skills-info :nth-child(1) {
    font-weight: 700;
}

.skills-info :nth-child(2) {
    font-weight: 400;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--grey-1);
}


/* ===================================================================
   UI
   =================================================================== */
.btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-position 0.4s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(45deg, #0233d1 0%, #00c6ff 50%, #00ff4c 100%);
    background-size: 200%;
    background-position-x: 0%;
}

.btn-primary:hover {
    background-position-x: 100%;
}

.btn-ghost {
    color: #0d2c40;
    background: #fff;
    border: 2px solid #d0d7de;
}

.btn-ghost:hover {
    border-color: #0d2c40;
}


/* ===================================================================
   ABOUT
   =================================================================== */
.about-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: clamp(20px, 4%, 50px);
    background: #fff;
    border-radius: 1rem;
    padding: var(--card-pad);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

.about-photo {
    width: clamp(140px, 22%, 220px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1rem;
    flex-shrink: 0;
}

.about-text {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #0d2c40;
}

.about-text p {
    font-size: 1rem;
    line-height: 1.45;
}

.about-text strong {
    font-weight: 700;
}

.about-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}