/*GENERALES*/
* {
    margin: 0px;
}

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



@font-face {
    font-family: fancy;
    src: url(../fonts/FancyCardText-eZmg.ttf);
}

@font-face {
    font-family: Bahnschrift;
    src: url(../fonts/BAHNSCHRIFT.TTF);
}

@font-face {
    font-family: American;
    src: url(../fonts/AmericanText.ttf);
}

@font-face {
    font-family: Pickyside;
    src: url(../fonts/PICKYSIDE.otf);
}

@font-face {
    font-family: Heritage;
    src: url(../fonts/Heritage-Display.otf);
}


/*header*/
header {
    position: relative;
    overflow: hidden;
    background-color: #161616;
}

canvas {
    width: 100%;
    height: auto;
}


header img {
    max-width: 100%;
    position: relative;
    z-index: 1;
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.nombre {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 190px;
    height: 210px;      /* reemplaza contribución del h1: 60px margin + ~150px height */
    overflow: hidden;   /* contiene cualquier overflow residual */
}

/* h1 dentro de .nombre es invisible y solo era un spacer de altura.
   display:none elimina su display:table + ::before/::after table-cell
   que generaban una tabla anónima más ancha que el viewport. */
.nombre h1 {
    display: none;
}

h1 {
    font-family: "Pickyside";
    font-size: 150px;
    font-weight: 100;
    font-style: normal;
    color: rgb(0, 0, 0);
    text-shadow: rgba(0, 0, 0, 0) 2px 0 10px;
    display: table;
    white-space: nowrap;
    position: relative;
    margin-top: 60px;
}

h1::before,
h1::after {
    border-top: 1px solid black;
    content: '';
    display: table-cell;
    position: relative;
    top: 0.6em;
    width: 45%;
}

h1::before {
    right: 1.5%;
}

h1::after {
    left: 1.5%;
}

/*nav*/

nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px;
    padding-bottom: 0;
    text-align: center;
    font-family: "Barlow", serif;
    font-style: normal;
    font-size: 20px;
    margin-top: -201px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin-top: 0;
    background-color: #000000;

}

nav ul li {
    display: inline-block;
}

nav ul a {
    background-color: #000000;
    height: 65px;
    line-height: 65px;
    padding: 10px 15px;
    color: #ffffff;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .3s ease;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.486);
}

nav a:hover {
    background-color: #c2c2c2;
    color: black;
}

.hamburger {
    display: none;
    font-size: 25px;
    background-color: #1a1a1a;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    box-shadow: none;
}

.nav-links.active {
    margin-top: 60px;
}


/* semblanza*/

.intro {
    background-color: #161616;
    padding: 50px;
}

.intro img {
    width: 100%;
}

.semblanza {
    padding: 130px 0px;
    align-items: center;
    color: white;
    font-family: "Oswald", serif;
    font-weight: 200;
    font-size: 19px;
}


/*Portafolio-Ilustración*/

.ilustracion {
    color: black;
    padding: 30px;
    text-align: center;
}

h2 {
    font-family: American;
    padding-top: 20px;
    animation: chroab 400ms ease-in both;
}

h3 {
    font-family: American;
    font-size: 50px;
    padding: 60px;
    text-align: center;
    animation: chroab 400ms ease-in both;
}

.ilustraciones {
    justify-content: space-between !important;
}

.ilustraciones .centro {
    text-align: -webkit-center;
}

.image-frame {

    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1/1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    box-shadow: 14px 15px 11px rgba(0, 0, 0, 0.384);
}

.img-thumbnail {
    border: none;
    padding: 0px
}

.image-frame img {
    aspect-ratio: 1/1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    border-radius: unset;
}

.image-frame img:hover {
    transform: scale(1.1);

}

h5 {
    font-family: American;
    font-size: 35px;
    animation: chroab 400ms ease-in both;
}

.fancybox__toolbar {
    display: none !important;
}

.carousel__viewport {
    display: none;
}

.fancybox__nav {
    color: #ff0000;
}

.izquierda {
    text-align: left;
    font-family: Bahnschrift;
}

.derecha {
    text-align: right;
    font-family: Bahnschrift;
}

.centro {
    font-family: Bahnschrift;
}

h6 {
    padding: 5px;
    font-family: American;
    font-size: 30px;
    animation: chroab 400ms ease-in both;
}

.loadMoreBtn {
    background-color: #353535;
    border-radius: 0;
    border: 0;
    padding: 15px 40px;
    text-decoration: none;
    font-family: "Barlow", serif;
    font-size: 14px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.486);
    transition: all .3s ease;
}

.loadMoreBtn:hover {
    background-color: #ffffff;
    color: black;
}

.loadMoreBtn:focus {
    background-color: #353535;
    color: white;
}

.hidden {
    display: none;
}

.fancybox__caption {
    font-size: 20px;
    color: #ff0000 !important;
    text-align: center;
    font-family: 'Bahnschrift';
}

.fancybox__caption h6 {
    font-size: 40px;
    animation: chroab 400ms ease-in both;

}


/* pop up al cargar*/

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

.show {
    display: block;
    animation: fadeIn 1.5s ease-in-out;
}


/*concept*/

.concept-title {
    color: white;
}

.concept {
    background-color: #1e1e1e;
    text-align: center;
    padding: 30px;
    overflow-x: hidden;
}

.concept .bg {
    pointer-events: none;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent url('../assets/noise-transparent.png') repeat 0 0;
    animation: bg-animation .2s infinite;
    opacity: 1;
    visibility: visible;
}

@keyframes bg-animation {
    0%   { background-position: 0 0; }
    10%  { background-position: -5% -5%; }
    20%  { background-position: -10% 5%; }
    30%  { background-position: 5% -10%; }
    40%  { background-position: -5% 15%; }
    50%  { background-position: -10% 5%; }
    60%  { background-position: 15% 0; }
    70%  { background-position: 0 10%; }
    80%  { background-position: -15% 0; }
    90%  { background-position: 10% 5%; }
    100% { background-position: 5% 0; }
}


.container-fluid.gallery {
    padding: 0;
}

.image-frame-concept {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-frame-concept img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: transparent;
    transition: transform 0.3s ease;
}

.image-frame-concept:hover img {
    transform: scale(1.1);
}

.image-frame-concept .description {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    text-align: center;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-frame-concept:hover .description {
    opacity: 1;
}


/*diseño*/
.design {

    text-align: center;

}

.masonry-gallery {
    width: 100%;
    margin: 0 auto;
}

.grid {
    display: flex;
    flex-wrap: wrap;

}

.grid-item {
    position: relative;
    overflow: hidden;
}

.grid-sizer,
.grid-item {
    width: calc(33.33% - 15px) !important;
    padding-left: 15px;
    margin-bottom: 15px;
    box-sizing: border-box;
}


.grid-item img {
    display: block;
    width: 100%;
    height: auto;
    border: none;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.1);
}

.grid-item:hover .overlay {
    opacity: 1;
}

.overlay-design {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-item:hover .overlay-design {
    opacity: 1;
}

/*contacto*/

.separador-contacto {
    color: white;
    background-color: #000000;
    text-align: center;
}

.separador-contacto h3 {
    padding: 30px 0px 30px;
    font-size: 40px;
    animation: chroab 400ms ease-in both;

}

h2 {
    text-align: center;
    padding: 30px;
}

.circle {
    font-size: 50px;
    width: 100px;
    height: 100px;
    background-color: black;
    border-radius: 50%;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.486);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.circle:hover {
    transform: scale(1.2);
    background-color: #ffffff;
    color: black;
    animation: chroab 400ms ease-in both;
}

.circle i {
    pointer-events: none;
    font-size: 40px;
    animation: chroab 400ms ease-in both;
}

.iconos-contacto {
    margin-top: 10%;
    color: white;
}

.iconos-contacto p {
    margin: 0;
    color: black;
    font-family: "Oswald", serif;
    font-weight: 400;
    font-size: 20px;
}

.iconos-contacto .row>[class*="col-"] {
    margin-bottom: 80px;

}

.skills {
    padding: 20px;
    background-color: #1e1e1e;
    margin-bottom: 20px;
}

.skills p {
    font-family: 'Oswald';
    margin-bottom: 10px;
    font-size: 20px;
    text-align: center;
    font-weight: 100;
    color: white;

    padding: 10px;
}

.aclaraciones {
    text-align: center;
    color: white;
    padding: 20px 54px 15px;
    margin-bottom: 15px;
    line-height: 2.5;
}

.aclaracion {
    background-color: #1e1e1e;
    font-family: 'Oswald', sans-serif;
    font-weight: 200;
    font-size: 20px;
    border: solid 1px;
    padding: 20px 30px 4px;
}

/*footer*/

footer {
    text-align: center;
    background: linear-gradient(to bottom, #fff, #000);
    color: #fff;
    padding: 40px 60px;
    font-size: 12px;
}

footer .Final {
    padding: 30px;
    color: #000;
}

footer .col {
    padding: 20px;
}

.footer-logo {
    width: auto;
    height: auto;
    text-align: right;
    padding-right: 50px;
}

.privacy-text {
    margin: 0;
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.trademark {
    margin: 0;
    font-size: 10px;
    text-align: left;
    padding-left: 20px;
}

/*media queries*/

@media (max-width: 2560px) {
    header img {
        height: 516px;
        width: 100%;
        object-fit: cover;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 150px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 40px;
    }

    header img {
        height: 200px;
        width: 100%;
        object-fit: cover;
    }

    nav {
        background-color: black;
        padding: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        background-color: #000000;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        text-align: center;
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        pointer-events: none;
    }

    .nav-links.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    nav ul li {
        display: block;
        margin: 5px 0;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 46px;
        right: 20px;
        z-index: 1000;
    }

    .iconos-contacto .row>[class*="col-"] {
        margin-bottom: 50px;
    }

    .circle {
        width: 80px;
        height: 80px;
    }

    .nombre {
        margin-top: 0px;
        margin-bottom: 160px;
        height: 190px;
    }

    .footer {
        padding: 60px 30px;
    }

    .footer-logo {
        padding: 0px;
    }

    .trademark {
        text-align: center !important;
        padding: 0px;
    }

    .footer .row>div {
        margin-bottom: 20px;
    }

    .grid-sizer,
    .grid-item {
        width: calc(50% - 15px) !important;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 130px;
    }

    h1 span {
        display: block;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 75px;
    }

    header img {
        height: 150px;
        width: 100%;
        object-fit: cover;
    }

    /* Más espacio para que el botón hamburger no se encime con el ASCII */
    .nombre {
        margin-top: 10px;
        margin-bottom: 290px;
        height: 135px;
    }
}



/* Reemplaza el img del header — mantiene la altura original */
.header-spacer {
    width: 100%;
    height: 516px;
    /* misma altura que tenía header img en desktop */
}


@media (max-width: 1280px) {
    .header-spacer {
        height: 300px;
    }
    .nombre {
        margin-bottom: 170px;
        height: 210px;
    }
}

@media (max-width: 768px) {
    .header-spacer {
        height: 390px;
    }
}

@media (max-width: 480px) {
    .header-spacer {
        height: 380px;
    }
}

/* ═══════════════════════════════════════
   ASCII HEADER
   Replica exacta del efecto original:
   - canvas auxiliar VISIBLE (provee el fondo negro pixelado)
   - pre con difference encima (provee los colores RGB)
   ═══════════════════════════════════════ */

:root {
    --ascii-pink: #ff6188;
    --ascii-orange: #fc9867;
    --ascii-yellow: #ffd866;
}

/* Contenedor del AsciiFilter — sin fondo propio.
   El tamaño y posición se controlan desde JS (getOverlaySize)
   en valores px, sin !important ni porcentajes. */
#inicio>div.ascii-overlay {
    position: absolute;
    background: transparent;
    z-index: 2;
}

/* Canvas auxiliar VISIBLE — es la capa visual base del efecto.
   Muestra el render Three.js pixelado (negro + texto coloreado).
   El CSS image-rendering lo hace nítido como el original. */
#inicio .ascii-overlay>canvas {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/*
   Pre con los caracteres ASCII + gradiente + difference.
   Se mezcla encima del canvas auxiliar creando el efecto RGB.

   Para mover verticalmente el texto ajusta --ascii-top:
   @media (max-width: 768px) { header pre { --ascii-top: 80px; } }
*/
header pre {
    overflow: hidden;
    --ascii-top: 0px;
    margin: 0;
    padding: 0;
    line-height: 1em;
    text-align: left;
    position: absolute;
    left: 0;
    top: var(--ascii-top);
    z-index: 2;
    background-image: radial-gradient(circle, var(--ascii-pink) 0%, var(--ascii-orange) 50%, var(--ascii-yellow) 100%);
    background-attachment: fixed;
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    mix-blend-mode: difference;
}