/* Fonts are declared in css/fonts.css and self-hosted (synced from @fontsource) */

/* Default theme — works without JavaScript */
:root {
    --background: #111111;
    --color-text: #f0f0f0;
    --contrast: #f0f0f0;
    --fontPrimary: 'Be Vietnam Pro', sans-serif;
    --fontSecond: 'VT323', monospace;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    --fontPrimary: 'Be Vietnam Pro', sans-serif;
    --fontSecond: 'VT323', monospace;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* Allow text selection in main content; disable only on decorative marquees */
.text, .about-me, .contact .text, .footer-contact, .cards, .card-portafolio {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
.sub-banner .projects-title,
.animation-header {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::-webkit-scrollbar {
    display: none;
}

body{
    background-color: var(--background);
    font-family: var(--fontPrimary);
    /* border:solid var(--contrast) 3px; */
    overflow-x: hidden;
    text-transform:uppercase
}

/* //////SCREEN-1 */
.banner{
    height: 100vh;
    color: var(--color-text);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    background-color: var(--background);
    /* border: solid red; */
}
.header{
    display: flex;
    justify-content: space-evenly;
    width: 100vw;
    height: 10vh;
    overflow: hidden;
    align-items: center;
    font-size: 10pt;
    z-index: 100;
}
.logo{
    width: 30%;
}
.logo p{
    font-family: var(--fontSecond);
    font-size:18pt;
    position: relative;
    left: 2vw;
}
.animation-header{
    text-align: center;
    width: 40%;
    display: flex;
    justify-content: center;
}
.content-animation-header{
    width: 60%;
    height: 25pt;
    padding: 5px 10px;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    border: solid var(--contrast);
}
.content-animation-header p{
    font-family: var(--fontSecond);
    font-size:15pt;
    color: var(--color-text);
    font-weight: 500;
    position: absolute;
    margin: auto auto;
    animation: translate 2s infinite;
    white-space: nowrap;
    min-width: 100%;
    height: 100%;
}
.content-animation-header p .slide{
    display: inline-block;
    padding-left: 100%;
    text-align: center;
    white-space: nowrap;
    height: 100%;
    line-height: 0pt;
    animation: slide 10s linear infinite;
}

.slide-2{
    animation-delay: 5s !important;
}
.menu{
    width: 30%;
    display: flex;
    justify-content: end;
    padding-right: 3vw;
}
.menu i{
    display:flex;
    justify-content:center;
    align-items:center;
    font-size: 15pt;
    width:50px;
    height:50px;
}
.menu ul{
    display: flex;
    justify-content: end;
    position: relative;
    right: 2vw;
}
.colors{
    width: 50px;
    height: 25px;
    position: relative;
    overflow: hidden;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.ee-active .colors{
    height: 50px;
}
/* Easter egg: B&W on all visuals when TESTING mode active (hero model excluded) */
.ee-active img,
.ee-active model-viewer,
.ee-active .card-portafolio {
    filter: grayscale(1) contrast(1.1);
    transition: filter 0.6s ease;
}
.ee-active #model-viewer,
.ee-active .hero-model-wrap {
    filter: none;
}
.colors .color {
    width: 25px;
    height: 25px;
    border: solid 1px var(--contrast);
    position: absolute;
    z-index: 20;
    transition: all 0.3s ease;
    /* Reset <button> defaults */
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    outline-offset: 2px;
}
.colors .color:hover {
    z-index: 30;
    transform: scale(1.5);
    border-radius: 50%;
}
.colors .color:focus-visible {
    outline: 2px solid var(--contrast);
}
.color-1{
    top:0;
    left:0;
    background: #111111;
}
.color-2{
    top:0;
    right:0;
    background: #f0f0f0;
}
.color-3{
    top:25px;
    left:0;
    background: #0a0a0a;
}
.color-4{
    top:25px;
    right:0;
    background: #C8A82A;
}
/* ── Audio indicator (left margin, mirrors section-indicator) ───────────────── */
.audio-indicator { display: none !important; }
.ee-active .audio-indicator { display: none; }
@media (min-width: 621px) {
    .ee-active .audio-indicator {
        display: flex !important;
        align-items: center;
        gap: 0.6rem;
        position: fixed;
        left: 1.2rem;
        top: 50%;
        transform: translateY(-50%);
        writing-mode: vertical-rl;
        background: none;
        border: none;
        padding: 0.5rem 0.25rem;
        cursor: pointer;
        color: var(--color-text);
        opacity: 0.38;
        transition: opacity 0.4s ease;
        z-index: 9990;
        -webkit-appearance: none;
        appearance: none;
    }
    .audio-indicator:hover {
        opacity: 0.75;
    }
    .audio-indicator:focus-visible {
        outline: 1px solid var(--contrast);
        outline-offset: 4px;
    }
}
.audio-label {
    font-family: var(--fontSecond);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    color: var(--color-text);
    pointer-events: none;
}
.audio-eq {
    display: flex;
    gap: 2px;
    writing-mode: horizontal-tb;
    align-items: flex-end;
    height: 14px;
    pointer-events: none;
}
.audio-eq-bar {
    display: block;
    width: 2px;
    background: var(--contrast);
    border-radius: 1px;
    animation: eq-bounce 1.2s ease-in-out infinite alternate;
}
.audio-eq-bar:nth-child(1) { height: 4px; animation-delay: 0s; }
.audio-eq-bar:nth-child(2) { height: 10px; animation-delay: 0.2s; }
.audio-eq-bar:nth-child(3) { height: 6px; animation-delay: 0.4s; }
.audio-eq-bar:nth-child(4) { height: 12px; animation-delay: 0.15s; }
@keyframes eq-bounce {
    0%   { height: 2px; }
    100% { height: 14px; }
}
/* Muted state — bars freeze at min height */
.audio-indicator[aria-pressed="true"] .audio-eq-bar {
    animation: none;
    height: 2px;
    transition: height 0.3s ease;
}
.audio-indicator[aria-pressed="true"] .audio-label {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}
.audio-indicator[aria-pressed="true"] {
    opacity: 0.22;
}
@media (max-width: 620px) {
    .ee-active .audio-indicator {
        display: flex !important;
        align-items: center;
        gap: 0.4rem;
        position: fixed;
        bottom: 1.2rem;
        left: 1rem;
        top: auto;
        transform: none;
        writing-mode: horizontal-tb;
        background: none;
        border: none;
        padding: 0.4rem;
        cursor: pointer;
        color: var(--color-text);
        opacity: 0.32;
        z-index: 9990;
        -webkit-appearance: none;
        appearance: none;
    }
    .audio-indicator:active { opacity: 0.7; }
    .audio-eq { height: 12px; }
    .audio-label { font-size: 0.55rem; }
}
li{
    list-style: none;
    margin: 0 10px;
}

.content-banner{
    display: flex;
    width: 100vw;
    height: 90vh;
}
.text-banner {
    width: 50vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -10vh;
    position: relative;
}
.text-banner h1{
    width: 70%;
    font-size: 45pt;
    font-weight: 400;
    z-index: 500;
    font-size:50pt
}
.text-banner h1 span{
    font-weight: 800;
}
.model-viewer{
    width: 50vw;
    height: 90vh;
    background-color: var(--background);
    display: flex;
    align-items: center;
    position: relative;
    perspective: 1400px;
}
.model-viewer model-viewer {
    transform-style: preserve-3d;
}
.black-screen{
    position: absolute;
    width: 50vw;
    height: 90vh;
    background-color: var(--background);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 1.2s ease-out;
}
.black-index{
    z-index: 100;
    opacity: 1;
}
.opacity-model-viewer{
    opacity: 1;
}

/* Hero: wrapper animado para que la entrada sea visible (no se pisa con el render del model-viewer) */
.hero-model-wrap {
    position: relative;
    width: 50vw;
    height: 150vh;
    opacity: 0;
    transform: translateX(48%) scale(0.88);
    transform-origin: center center;
    will-change: transform, opacity;
}
.hero-model-wrap model-viewer {
    display: block;
}

model-viewer {
    width: 50vw;
    height: 150vh;
    z-index: 20;
    cursor: grab;
}
model-viewer:active {
    cursor: grabbing;
}

.model-viewer-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--fontPrimary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid var(--contrast);
    border-radius: 4px;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.4s ease;
    z-index: 25;
}
.model-viewer-hint--hidden {
    opacity: 0;
    pointer-events: none;
}

/* .text-banner consolidated above */

.text-banner .rss{
    position: absolute;
    bottom: 5vh;
    left: -48vw;
}
.text-banner .rss ul{
    display: flex;
}
.text-banner .rss ul li{
    font-size: 10pt;
}
.text-banner .rss ul li a{
    color:var(--color-text);
    text-decoration:none;
}

.about-me{
    position: absolute;
    width: 30vw;
    text-align: center;
    left: -50vw;
    top: 48vh;   /* ~50vh minus half the text height → visually centered */
}

.about-me h2,
.about-me h1 {
    font-size: 18pt;
    font-weight: 400;
}
.about-me span{
    font-size: 30pt;
    font-weight: 600;
    text-decoration: underline;
    line-height: 50px;
}

.about-me-2{
    position: absolute;
    width: 25vw;
    text-align: end;
    left: 150vw;
    top: 25vh;
    text-align: justify;
    font-size: 10pt;
}
.rss{
    z-index: 20;
}





/* //////SCREEN-2 */
.sub-banner{
    width: 100%;
    height: 400px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    /* border: solid blue; */
}
/* Marquee rows — <p> elements filled by JS via data-marquee-text */
.projects-title {
    color: var(--color-text);
    font-size: 80pt;
    font-weight: 900;
    width: 100%;
    white-space: nowrap;
    line-height: 1;
    display: block;
}
.projects-title span {
    color: var(--background);
    -webkit-text-stroke: 1px var(--contrast);
}







/* //////SCREENS-APPS */
.portafolio{
    overflow: visible;
    display: flex;
    justify-content: flex-end;
    width: 100vw;
    flex-direction: column;
    /* border: salmon solid; */
}
.projects-title-1,.projects-title-3{
    margin-left: -200vw;
}
.app{
    position: relative;
    width: 100vw;
    min-height: 100vh;
    color: var(--color-text);
    display: flex;
    justify-content: center;
    flex-direction: column;
    /* border: solid beige; */
    align-items: flex-start;
    position: relative;
}
.app .content{
    width: 100%;
    height: 100vh;
    display: flex;
    position: relative;
    /* border: solid greenyellow; */
}

.app .content .model-3d{
    width: 48vw;
    flex-shrink: 0;
    overflow: visible;
    /* border: solid blueviolet; */
    position: relative;
}
.app .content .model-3d model-viewer {
    height: 150%;
    width: 40vw;
    position: absolute;
    cursor: grab;
}
.app .content .model-3d model-viewer:active {
    cursor: grabbing;
}

.app .content .model-3d .gsap-2, .app .content .model-3d .gsap-3,.app .content .model-3d .gsap-4,.app .content .model-3d .gsap-5,.app .content .model-3d .gsap-6{
    top: 0;
    bottom: 0;
    left: -30px;
    right: 0;
    margin: auto;
}

.app .content .model-3d .gsap-3{
    width: 45vw;
}

.app .content .model-3d .gsap-4,.app .content .model-3d .gsap-5,.app .content .model-3d .gsap-6 {
    width: 50vw;
}

.app .content .cards{
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* border: solid blueviolet; */
}
.app .content .cards .card-scroll {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}
.app .content .cards .card-scroll::-webkit-scrollbar { display: none; }
.app .content .cards .card-scroll.is-dragging    { cursor: grabbing; }
/* Mockup tipo móvil: ancho fijo, alto de “pantalla” + scroll interno (capturas largas) */
.app .content .cards .card-portafolio-app {
    scroll-snap-align: center;
    margin: 0;
    width: 150px;
    max-width: 150px;
    height: 280px;
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--contrast) 18%, transparent);
    background: rgba(0, 0, 0, 0.3);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--contrast) 40%, transparent) rgba(0, 0, 0, 0.2);
}

.app .content .cards .card-portafolio-app::-webkit-scrollbar {
    display: block;
    width: 5px;
}

.app .content .cards .card-portafolio-app::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--contrast) 32%, transparent);
    border-radius: 4px;
}

.app .content .cards .card-scroll .card-portafolio-app img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
}

/* Capturas tipo “viewport de web”: alto fijo + scroll vertical dentro del recuadro */
.app .content .cards .card-portafolio-web-slide {
    border-radius: 10px;
    margin: 0;
    scroll-snap-align: center;
    width: 100%;
    max-width: 450px;
    height: 300px;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--contrast) 22%, transparent);
    background: rgba(0, 0, 0, 0.35);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--contrast) 45%, transparent) rgba(0, 0, 0, 0.2);
}

.app .content .cards .card-portafolio-web-slide::-webkit-scrollbar {
    display: block;
    width: 6px;
}

.app .content .cards .card-portafolio-web-slide::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--contrast) 35%, transparent);
    border-radius: 4px;
}

.app .content .cards .card-portafolio-web-slide::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.app .content .cards .card-portafolio-web-slide img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    max-width: none;
    display: block;
}

/* LearUp: una sola pieza grande, sin recorte tipo navegador */
.app.learup .content .cards .card-portafolio-web-slide {
    height: auto;
    max-height: none;
    overflow: visible;
    border: none;
    background: transparent;
}

/* LearUp: no 3D, link top-right like other projects, centered image */
.app.learup .content.learup-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
}
.app.learup .content.learup-content .project-meta {
    position: sticky;
    top: 1rem;
    margin: 0 2rem 0 0;
    align-self: flex-end;
}
.app.learup .cards.cards-learup {
    width: 100%;
    max-width: min(95vw, 1100px);
    display: flex;
    justify-content: center;
}
.app.learup .cards-learup .card-scroll {
    justify-content: center;
}
.app.learup .cards-learup .card-portafolio-web-slide {
    max-width: 100%;
    max-height: none;
    width: 100%;
    margin: 0 auto;
}
.app.learup .cards-learup .card-portafolio-web-slide img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}








/* ///////////////////////CONTACT */
.contact {
    width: calc(100vw - 6px);
    min-height: 100vh;
    color: var(--color-text);
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    text-transform: uppercase;
    position: relative;
    z-index: 200;
}

.contact h2,
.contact h1 {
    font-size: 100pt;
    font-weight: 200;
    font-style: oblique;
    padding: 20px;
}

.contact h2 span,
.contact h1 span {
    font-size: 100pt;
    font-weight: 800;
    font-style: normal;
}

.contact .aaron{
    max-width: 300px;
    position: absolute;
    right: 0;
    text-align: end;
    padding: 20px;
    font-style: oblique;
    font-weight: 100;
    top: 5vh;
}

.contact .social{
    position:absolute;
    top:15vh;
    right:0;
    text-align: start;
    padding: 20px;
    opacity:0
}

.contact footer{
    width:100%;
    height:15vh;
    position: absolute;
    bottom: 0;
    padding:20px;
    display:flex;
    justify-content: space-between;
    align-items:flex-end;
}


.contact footer a{
    color: var(--color-text);
    padding:20px;
    text-decoration: none;
}

.project-meta {
    font-size: 0.9em;
    color: var(--color-text);
    opacity: 0.9;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    text-align: right;
    z-index: 20;
    max-width: 260px;
    line-height: 1.4;
}
.project-meta a {
    color: var(--color-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0.2em 0.1em;
    margin: 0 -0.1em;
    border-radius: 2px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, text-underline-offset 0.2s ease;
}
.project-meta a:hover {
    color: var(--contrast);
    text-underline-offset: 5px;
    background-color: color-mix(in srgb, var(--contrast) 12%, transparent);
}
.project-meta a:focus-visible {
    outline: 2px solid var(--contrast);
    outline-offset: 2px;
}

/* ── Cinematic Preloader ───────────────────────────────────────────────────── */
.preload {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Exit slide handled by GSAP (translateY -100vh) — no CSS transition needed */
}
.preload.preload--done {
    pointer-events: none;
}

/* Giant VT323 counter — full-viewport number */
.preload-counter {
    font-family: var(--fontSecond);
    font-size: clamp(18vw, 22vw, 28vh);
    line-height: 0.85;
    color: var(--color-text);
    letter-spacing: -0.02em;
    user-select: none;
    will-change: transform;
}

/* Identity line below counter */
.preload-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
    opacity: 0.55;
}
.preload-name,
.preload-role {
    font-family: var(--fontPrimary);
    font-size: clamp(0.6rem, 1.1vw, 0.85rem);
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text);
}
.preload-sep {
    color: var(--color-text);
    font-size: 0.7rem;
    opacity: 0.4;
}

/* Thin progress line pinned to bottom */
.preload-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
}
.preload-line-fill {
    height: 100%;
    width: 0%;
    background: var(--contrast);
    transition: width 0.12s linear;
    transform-origin: left center;
}















/* ── Word-reveal helpers (used by app.js splitWordsForReveal) ──────────────
   .word-wrap  — overflow-hidden container that clips the sliding word
   .word-inner — the actual element GSAP moves (yPercent: 115 → 0)
   padding/margin trick prevents descender clipping without layout shift.  */
.word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.12em;
    margin-bottom: -0.12em;
}
.word-inner {
    display: inline-block;
    will-change: transform;
}

/* //////////////////////////CURSORS */
/* JS cursor follower handles visual on pointer devices — hide OS cursor */
@media (pointer: fine) {
    * { cursor: none !important; }
}
@media (pointer: coarse) {
    * { cursor: auto; }
    a, button, .swatch { cursor: pointer; }
}

a:hover { text-decoration: underline !important; }

/* ── JS Cursor Follower ────────────────────────────────────────────────────── */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    z-index: 999999;
    will-change: transform;
}
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--contrast);
    top: -4px; left: -4px;
    transition: opacity 0.3s ease, scale 0.15s ease, background-color 0.3s ease;
}
.cursor-ring {
    width: 36px; height: 36px;
    border: 1.5px solid var(--contrast);
    top: -18px; left: -18px;
    mix-blend-mode: difference;
    transition: opacity 0.3s ease, scale 0.22s cubic-bezier(0.34,1.56,0.64,1), border-color 0.3s ease;
}
/* Scale states are handled in cursor.js via the transform string to avoid
   the CSS individual-scale / transform-origin drift bug.                    */

/* ── Scroll Progress Bar ───────────────────────────────────────────────────── */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0%;
    background: var(--contrast);
    z-index: 9998;
    pointer-events: none;
    transition: width 0.04s linear;
}

/* ── Section Indicator (right margin, desktop only) ───────────────────────── */
.section-indicator { display: none; }
@media (min-width: 621px) {
    .section-indicator {
        display: block;
        position: fixed;
        right: 1.2rem;
        top: 50%;
        transform: translateY(-50%);
        writing-mode: vertical-rl;
        font-family: var(--fontSecond);
        font-size: 0.62rem;
        letter-spacing: 0.25em;
        color: var(--color-text);
        opacity: 0.38;
        pointer-events: none;
        z-index: 500;
        transition: opacity 0.4s ease;
    }
}
.section-indicator-text {
    display: block;
    transition: opacity 0.25s ease;
}
.section-indicator-text.fade { opacity: 0; }

/* ── Scroll CTA (animated line in hero) ────────────────────────────────────── */
.scroll-cta {
    position: absolute;
    bottom: 1.8rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.scroll-cta--hidden { opacity: 0; pointer-events: none; }
.scroll-cta-label {
    font-family: var(--fontSecond);
    font-size: 0.68rem;
    letter-spacing: 0.35em;
    color: var(--color-text);
    opacity: 0.55;
}
.scroll-cta-line {
    width: 1px; height: 40px;
    background: color-mix(in srgb, var(--contrast) 20%, transparent);
    position: relative;
    overflow: hidden;
}
.scroll-cta-line::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--contrast);
    animation: scroll-cta-drop 1.6s ease-in-out infinite;
}
@keyframes scroll-cta-drop {
    0%   { transform: translateY(-100%); opacity: 1; }
    70%  { transform: translateY(100%);  opacity: 1; }
    100% { transform: translateY(100%);  opacity: 0; }
}
@media (max-width: 620px) { .scroll-cta { bottom: 1rem; } }

/* ── Easter egg — TESTING glitch modal ──────────────────────────────────────── */
.ee-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
    cursor: pointer;
    overflow: hidden;
}
.ee-modal.ee-open { display: flex; }

/* Hero cover with RGB-split glitch */
.ee-cover {
    position: relative;
    width: min(40vw, 55vh, 320px);
    aspect-ratio: 9/16;
    background: url('../img/media/flacko-hero.webp') center/cover no-repeat;
    z-index: 2;
    animation: ee-jitter 0.12s steps(2) infinite;
}

/* Flash images — scattered ASAP photos that appear during modal entrance */
.ee-img-flash {
    position: absolute;
    background-size: cover;
    background-position: center;
    filter: grayscale(1) contrast(1.4);
    mix-blend-mode: screen;
    opacity: 0;
    z-index: 1;
}
.ee-img-f1 { width: 18vw; height: 18vw; top: 5%; left: 5%;  background-image: url('../img/media/asap-1.webp'); }
.ee-img-f2 { width: 22vw; height: 15vw; top: 8%; right: 8%; background-image: url('../img/media/asap-5.webp'); transform: skewX(-4deg); }
.ee-img-f3 { width: 16vw; height: 20vw; bottom: 10%; left: 8%; background-image: url('../img/media/asap-3.webp'); }
.ee-img-f4 { width: 20vw; height: 14vw; bottom: 8%; right: 5%; background-image: url('../img/media/asap-8.webp'); transform: skewX(3deg); }
.ee-img-f5 { width: 14vw; height: 14vw; top: 40%; left: 70%;  background-image: url('../img/media/asap-2.webp'); }
.ee-cover::before,
.ee-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
}
.ee-cover::before {
    mix-blend-mode: multiply;
    background-color: rgba(255, 0, 50, 0.4);
    animation: ee-slice-a 2.8s steps(1) infinite;
}
.ee-cover::after {
    mix-blend-mode: multiply;
    background-color: rgba(0, 255, 200, 0.4);
    animation: ee-slice-b 2.2s steps(1) infinite reverse;
}
@keyframes ee-jitter {
    0%  { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-1px, 1px) scale(1.001); }
    50% { transform: translate(1px, 0) scale(0.999); }
    75% { transform: translate(0, -1px) scale(1.001); }
}
@keyframes ee-slice-a {
    0%   { clip-path: inset(42% 0 40% 0); transform: translate(-5px, 0); }
    8%   { clip-path: inset(10% 0 82% 0); transform: translate(4px, 0); }
    16%  { clip-path: inset(68% 0 5% 0);  transform: translate(-3px, 0); }
    24%  { clip-path: inset(0% 0 0% 0);   transform: translate(0, 0); }
    32%  { clip-path: inset(25% 0 55% 0); transform: translate(6px, 0); }
    40%  { clip-path: inset(75% 0 12% 0); transform: translate(-4px, 0); }
    48%  { clip-path: inset(0% 0 0% 0);   transform: translate(0, 0); }
    56%  { clip-path: inset(55% 0 30% 0); transform: translate(5px, 0); }
    64%  { clip-path: inset(8% 0 78% 0);  transform: translate(-3px, 0); }
    72%  { clip-path: inset(0% 0 0% 0);   transform: translate(0, 0); }
    80%  { clip-path: inset(88% 0 2% 0);  transform: translate(4px, 0); }
    88%  { clip-path: inset(35% 0 50% 0); transform: translate(-6px, 0); }
    100% { clip-path: inset(42% 0 40% 0); transform: translate(-5px, 0); }
}
@keyframes ee-slice-b {
    0%   { clip-path: inset(60% 0 20% 0); transform: translate(4px, 0); }
    12%  { clip-path: inset(15% 0 70% 0); transform: translate(-5px, 0); }
    24%  { clip-path: inset(0% 0 0% 0);   transform: translate(0, 0); }
    36%  { clip-path: inset(80% 0 5% 0);  transform: translate(3px, 0); }
    48%  { clip-path: inset(30% 0 45% 0); transform: translate(-4px, 0); }
    60%  { clip-path: inset(0% 0 0% 0);   transform: translate(0, 0); }
    72%  { clip-path: inset(48% 0 35% 0); transform: translate(5px, 0); }
    84%  { clip-path: inset(5% 0 85% 0);  transform: translate(-3px, 0); }
    100% { clip-path: inset(60% 0 20% 0); transform: translate(4px, 0); }
}

/* TESTING text with RGB text-shadow glitch */
.ee-text {
    font-family: var(--fontSecond);
    font-size: clamp(2.5rem, 10vw, 6rem);
    color: #C8A82A;
    letter-spacing: 0.35em;
    z-index: 2;
    pointer-events: none;
    animation: ee-text-glitch 0.25s steps(2) infinite;
}
@keyframes ee-text-glitch {
    0%   { text-shadow: 4px 0 #ff0040, -4px 0 #00ffc8; transform: translate(0, 0); }
    25%  { text-shadow: -3px 0 #ff0040, 3px 0 #00ffc8;  transform: translate(2px, -1px); }
    50%  { text-shadow: 4px 0 #ff0040, -4px 0 #00ffc8;  transform: translate(-1px, 0); }
    75%  { text-shadow: -3px 0 #ff0040, 5px 0 #00ffc8;  transform: translate(0, 1px); }
}

/* Close hint */
.ee-hint {
    font-family: var(--fontSecond);
    font-size: 0.72rem;
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 0.3);
    z-index: 2;
    pointer-events: none;
}

/* CRT scanlines */
.ee-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    pointer-events: none;
    z-index: 3;
}

/* Noise/static overlay */
.ee-noise {
    position: absolute;
    inset: -50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.12;
    animation: ee-noise-shift 0.15s steps(4) infinite;
    pointer-events: none;
    z-index: 4;
}
@keyframes ee-noise-shift {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-10px, 8px); }
    50%  { transform: translate(8px, -5px); }
    75%  { transform: translate(-5px, -8px); }
}

/* ── Site-wide beat-synced glitch overlay ───────────────────────────────────── */
.ee-site-glitch {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9988;
    opacity: 0;
    mix-blend-mode: screen;
}
.ee-site-glitch.ee-flash-active {
    opacity: 1;
}
.ee-site-glitch-img {
    position: absolute;
    background-size: cover;
    background-position: center;
    filter: grayscale(1) contrast(1.6) brightness(0.7);
    opacity: 0.45;
}
.ee-site-glitch.ee-flash-active .ee-site-glitch-img {
    animation: ee-site-flash 0.12s steps(2) forwards;
}
@keyframes ee-site-flash {
    0%   { opacity: 0.5; clip-path: inset(0 0 60% 0); transform: translate(-3px, 0); }
    25%  { opacity: 0.35; clip-path: inset(30% 0 20% 0); transform: translate(4px, 0); }
    50%  { opacity: 0.5; clip-path: inset(0 0 0 0); transform: translate(-2px, 0); }
    75%  { opacity: 0.3; clip-path: inset(50% 0 10% 0); transform: translate(3px, 0); }
    100% { opacity: 0; }
}

/* ── Per-element glitch (fixed-position over product cards & 3D models) ────── */
.ee-element-glitch {
    position: fixed;
    pointer-events: none;
    z-index: 9987;
    background-size: cover;
    background-position: center;
    filter: grayscale(1) contrast(1.5);
}
.ee-element-glitch.ee-el-flash {
    animation: ee-el-flash 0.14s steps(3) forwards;
}
@keyframes ee-el-flash {
    0%   { opacity: 0.85; clip-path: inset(0 0 40% 0); transform: translate(-4px, 0); }
    33%  { opacity: 0.55; clip-path: inset(25% 0 15% 0); transform: translate(5px, 0); }
    66%  { opacity: 0.9; clip-path: inset(0); transform: translate(-2px, 0); }
    100% { opacity: 0; }
}

/* ── Easter egg trigger hover scramble ─────────────────────────────────────── */
#ee-trigger {
    transition: color 0.25s ease;
}
#ee-trigger.ee-trigger-hover {
    color: #C8A82A !important;
    text-shadow: 0 0 8px rgba(200, 168, 42, 0.4);
}

/* ── Film grain / noise overlay ────────────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.028;
    pointer-events: none;
    z-index: 9989;
}

/* ── Theme transition overlay ──────────────────────────────────────────────── */
#theme-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 9990;
}

/* ── Magnetic elements ─────────────────────────────────────────────────────── */
.magnetic { display: inline-block; }

/* ── Project description ───────────────────────────────────────────────────── */
.project-desc {
    font-size: 0.65rem;
    opacity: 0.5;
    font-weight: 300;
    letter-spacing: 0.04em;
    max-width: 26ch;
    line-height: 1.55;
    position: absolute;
    top: 3.6rem;
    right: 1.5rem;
    text-align: right;
    z-index: 20;
}
@media (max-width: 620px) {
    .project-meta,
    .project-desc {
        position: static;
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
        right: auto;
    }
    .project-desc {
        font-size: clamp(0.58rem, 2.4vw, 0.72rem);
        margin-top: 0.3rem;
    }
}

























@keyframes slide {
    0%{
        transform: translate(0,0);
    }
    100%{
        transform: translate(-100%,0);
    }
}



@media (max-width: 620px) { 


    /* ////////////////////////CONTACTO */

    .contact h2,
    .contact h1 {
        font-size: clamp(1.75rem, 9vw, 2.65rem);
        padding: 14px 16px 8px;
        line-height: 1.05;
    }

    .contact h2 span,
    .contact h1 span {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .contact {
        width: 100%;
        max-width: 100vw;
        padding-bottom: clamp(120px, 28vh, 200px);
        box-sizing: border-box;
    }

    .contact .text {
        width: 100%;
        max-width: 100%;
        padding-right: 0.5rem;
    }

    .contact .aaron {
        top: auto;
        position: relative;
        max-width: 100%;
        width: 100%;
        text-align: start;
        padding: 1rem 1.1rem 0;
        font-size: clamp(0.65rem, 2.8vw, 0.85rem);
        line-height: 1.45;
    }

    .contact footer {
        flex-wrap: wrap;
        gap: 0.35rem;
        height: auto;
        min-height: auto;
        padding: 12px 14px 20px;
        align-items: flex-end;
        justify-content: space-between;
    }

    .contact footer a {
        padding: 10px 12px;
        font-size: clamp(0.5rem, 2.1vw, 0.62rem);
        line-height: 1.25;
        flex: 1 1 auto;
        min-width: min(100%, 140px);
        text-align: center;
    }

    .rss-hidden{
        display:none;
        visibility:hidden;
    }

    /* ///////////////PORTAFOLIO — 3D a ancho útil + carrusel (evita 30vw en móvil) */

    .sub-banner {
        height: clamp(160px, 28vw, 220px);
    }

    .sub-banner .projects-title,
    .sub-banner h1 {
        font-size: clamp(1.45rem, 8.5vw, 2.35rem);
    }

    .portafolio .app {
        min-height: auto;
    }

    .portafolio .app .content {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: auto;
        padding: 0.5rem 0 1.15rem;
        gap: 0;
        position: relative;
    }

    .portafolio .app .content .model-3d {
        width: 100%;
        max-width: 100vw;
        /* vh: en portrait vmin ≈ ancho y encoge el stage; vh da altura útil */
        min-height: clamp(300px, 44vh, 620px);
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0.35rem 0.5rem 0.2rem;
        overflow: visible;
    }

    .portafolio .app .content .model-3d model-viewer {
        width: min(100%, 580px) !important;
        max-width: 100%;
        height: clamp(300px, 40vh, 560px) !important;
        min-height: 280px;
        position: relative !important;
        left: auto !important;
        margin-left: auto;
        margin-right: auto;
    }

    .portafolio .app .content .model-3d .gsap-2,
    .portafolio .app .content .model-3d .gsap-3,
    .portafolio .app .content .model-3d .gsap-4,
    .portafolio .app .content .model-3d .gsap-5,
    .portafolio .app .content .model-3d .gsap-6 {
        width: min(100%, 580px) !important;
        max-width: 100%;
        height: clamp(300px, 40vh, 560px) !important;
        min-height: 280px;
        position: relative !important;
        left: 0 !important;
        right: auto;
        top: auto;
        bottom: auto;
        margin: 0 auto;
    }

    .portafolio .app .content .model-3d .model-viewer-hint {
        bottom: 0.4rem;
        font-size: clamp(0.58rem, 2.4vw, 0.72rem);
    }

    .portafolio .app .content .cards {
        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: auto;
        flex: 1 1 auto;
        padding: 0.45rem 0.5rem 0.65rem;
        display: flex;
        justify-content: flex-start;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .portafolio .app .content .cards .card-scroll {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.65rem;
        width: max-content;
        min-width: 100%;
        height: auto;
        padding: 0.2rem 0.35rem 0.45rem;
    }

    .portafolio .app .content .cards .card-portafolio-app {
        margin: 0;
        width: min(46vw, 200px);
        max-width: min(46vw, 200px);
        height: clamp(260px, 42vh, 420px);
        max-height: clamp(260px, 42vh, 420px);
        min-height: 0;
        flex: 0 0 auto;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 10px;
        border: 1px solid color-mix(in srgb, var(--contrast) 20%, transparent);
        background: rgba(0, 0, 0, 0.35);
        scrollbar-width: thin;
        scrollbar-color: color-mix(in srgb, var(--contrast) 45%, transparent) rgba(0, 0, 0, 0.2);
    }

    .portafolio .app .content .cards .card-portafolio-app::-webkit-scrollbar {
        display: block;
        width: 5px;
    }

    .portafolio .app .content .cards .card-portafolio-app::-webkit-scrollbar-thumb {
        background: color-mix(in srgb, var(--contrast) 35%, transparent);
        border-radius: 4px;
    }

    .portafolio .app .content .cards .card-scroll .card-portafolio-app img {
        width: 100%;
        height: auto;
        max-width: none;
        display: block;
        border-radius: 8px;
    }

    .portafolio .app .content .cards .card-portafolio-web-slide {
        width: min(90vw, 460px);
        max-width: min(90vw, 460px);
        height: clamp(240px, 38vh, 360px);
        max-height: clamp(240px, 38vh, 360px);
        flex: 0 0 auto;
        margin: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid color-mix(in srgb, var(--contrast) 22%, transparent);
        background: rgba(0, 0, 0, 0.35);
    }

    .portafolio .app .content .cards .card-portafolio-web-slide img {
        width: 100%;
        height: auto;
        max-width: none;
        display: block;
    }

    .portafolio .app.learup .content .cards .card-portafolio-web-slide {
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        overflow: visible;
        border: none;
        background: transparent;
    }

    .portafolio .app.learup .content .cards .card-portafolio-web-slide img {
        object-fit: contain;
    }

    .portafolio .app .content .project-meta {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        align-self: stretch;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0.4rem 1rem 0.15rem;
        text-align: center;
        font-size: clamp(0.65rem, 2.9vw, 0.82rem);
    }

    .card-portafolio-qr-access-1 {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: min(92vw, 460px);
    }

    .app.learup .content .cards {
        justify-content: center;
    }
    
    
    
    
    
    
    
    
    
    
    
    
    /* ///////BANNER — stack title → 3D → links; full-width model (no desktop offsets) */

    .banner {
        min-height: 100dvh;
        min-height: 100vh;
    }

    .header {
        font-size: 8pt;
        height: auto;
        min-height: 52px;
        padding: 0.4rem 0.65rem;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .logo {
        width: auto;
        flex: 0 1 auto;
        max-width: 28%;
        min-width: 0;
    }

    .logo p {
        left: 0;
        font-size: clamp(0.62rem, 3vw, 0.88rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .animation-header {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
        max-width: 58%;
    }

    .content-animation-header {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 30px;
        padding: 4px 12px;
    }

    .content-animation-header p {
        font-size: clamp(0.58rem, 2.4vw, 0.78rem);
        line-height: 1.25;
    }

    .menu {
        width: auto;
        flex: 0 0 auto;
        padding-right: 0.25rem;
    }

    .content-banner {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100vw;
        min-height: auto;
        height: auto;
        padding-bottom: 0.35rem;
    }

    .text-banner {
        order: 1;
        position: relative;
        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: 0;
        margin-top: 0;
        padding: 0.5rem 1rem 0.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .text-banner h1 {
        width: 100%;
        max-width: 18ch;
        font-size: clamp(1.45rem, 6.5vw, 2.15rem);
        font-weight: 400;
        margin-top: 0;
        line-height: 1.08;
        hyphens: auto;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .text-banner .rss {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 0.65rem;
        margin-bottom: 0;
    }

    .text-banner .rss ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem 1.25rem;
    }

    .text-banner .rss ul li {
        font-size: clamp(0.55rem, 2.8vw, 0.75rem);
        margin: 0;
    }

    .model-viewer {
        order: 2;
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: 42vh;
        max-height: 52vh;
        flex: 0 1 auto;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.15rem 0.35rem 0;
        overflow: visible;
    }

    .hero-model-wrap {
        width: 100%;
        max-width: min(100vw, 560px);
        height: 100%;
        min-height: 40vh;
        max-height: 50vh;
        margin: 0 auto;
        transform: translateX(4%) scale(0.94);
        transform-origin: center center;
    }

    .model-viewer model-viewer,
    .hero-model-wrap model-viewer {
        width: 100% !important;
        height: 100% !important;
        min-height: 38vh;
        max-height: 48vh;
    }

    model-viewer {
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 38vh;
        max-height: 48vh;
    }

    .model-viewer-hint {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
        bottom: 0.5rem;
        max-width: calc(100% - 1rem);
        text-align: center;
    }

    .black-screen {
        position: absolute;
        inset: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 100%;
        top: 0;
        left: 0;
    }

    .about-me {
        position: relative;
        order: 3;
        width: 100%;
        max-width: 100vw;
        left: auto;
        top: auto;
        padding: 0.35rem 1rem 0.5rem;
        margin-top: 0;
        text-align: center;
        opacity: 1;
    }

    .about-me h1 {
        font-size: clamp(0.75rem, 3.2vw, 1rem);
        line-height: 1.35;
    }
}

/* Tablet / small desktop: ease oversized type and hero offset */
@media (max-width: 900px) and (min-width: 621px) {
    .text-banner h1 {
        font-size: clamp(2rem, 4.2vw, 2.75rem);
    }

    .hero-model-wrap {
        transform: translateX(22%) scale(0.9);
    }

    .header {
        padding: 0 0.75rem;
    }

    .content-animation-header p {
        font-size: clamp(0.75rem, 1.4vw, 0.95rem);
    }

    .sub-banner h1 {
        font-size: clamp(1.85rem, 5vw, 3rem);
    }

    .sub-banner {
        height: clamp(220px, 32vw, 320px);
    }

    .portafolio .app {
        min-height: auto;
    }

    .portafolio .app .content {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 0.65rem 0 1.35rem;
    }

    .portafolio .app .content .model-3d {
        width: 100%;
        min-height: clamp(320px, 48vh, 560px);
    }

    .portafolio .app .content .model-3d model-viewer,
    .portafolio .app .content .model-3d .gsap-2,
    .portafolio .app .content .model-3d .gsap-3,
    .portafolio .app .content .model-3d .gsap-4,
    .portafolio .app .content .model-3d .gsap-5,
    .portafolio .app .content .model-3d .gsap-6 {
        width: min(100%, 640px) !important;
        height: clamp(300px, 46vh, 520px) !important;
        position: relative !important;
        left: 0 !important;
        margin-left: auto;
        margin-right: auto;
    }

    .portafolio .app .content .cards {
        width: 100%;
        padding: 0.5rem 0.85rem 0.85rem;
        overflow-x: auto;
    }

    .portafolio .app .content .cards .card-scroll {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.75rem;
        justify-content: flex-start;
        width: max-content;
        min-width: 100%;
    }

    .portafolio .app .content .cards .card-portafolio-app {
        width: min(200px, 32vw);
        max-width: min(200px, 32vw);
        height: clamp(300px, 44vh, 420px);
        max-height: clamp(300px, 44vh, 420px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .portafolio .app .content .cards .card-scroll .card-portafolio-app img {
        width: 100%;
        height: auto;
        max-width: none;
        display: block;
    }

    .portafolio .app .content .cards .card-portafolio-web-slide {
        width: min(72vw, 520px);
        max-width: min(72vw, 520px);
        height: clamp(280px, 42vh, 400px);
        max-height: clamp(280px, 42vh, 400px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .portafolio .app.learup .content .cards .card-portafolio-web-slide {
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .portafolio .app .content .project-meta {
        position: relative;
        width: 100%;
        text-align: center;
        padding: 0.35rem 1rem;
    }

    .contact {
        padding-bottom: clamp(100px, 22vh, 180px);
    }

    .contact h1 {
        font-size: clamp(2.5rem, 6.5vw, 4rem);
        padding: 18px;
    }

    .contact h1 span {
        font-size: clamp(2.75rem, 7vw, 4.5rem);
    }

    .contact .aaron {
        max-width: min(420px, 88vw);
        padding: 18px;
        font-size: clamp(0.75rem, 1.6vw, 0.9rem);
    }

    .contact footer {
        flex-wrap: wrap;
        gap: 0.5rem;
        height: auto;
        min-height: 15vh;
        padding: 16px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   ABOUT / BIO SECTION
   Grid layout: year marker (left) + statement + stack chips (right)
   ═══════════════════════════════════════════════════════════════════════════ */
.about-section {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 12vh 8vw;
    position: relative;
    overflow: hidden;
    color: var(--color-text);
}

.about-inner {
    display: grid;
    grid-template-columns: 180px 1fr;
    grid-template-rows: auto auto;
    gap: 2.5rem 5vw;
    max-width: 1100px;
    width: 100%;
}

/* Year block — decorative, left column spanning both rows */
.about-year-block {
    grid-column: 1;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 0.4rem;
}

.about-year-num {
    font-family: var(--fontSecond);
    font-size: clamp(5rem, 10vw, 13rem);
    color: var(--contrast);
    line-height: 0.82;
    opacity: 0.07;
    letter-spacing: -0.02em;
    display: block;
    user-select: none;
}

.about-year-label {
    font-family: var(--fontPrimary);
    font-size: 0.58rem;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    opacity: 0.28;
    margin-top: 0.7rem;
    color: var(--contrast);
}

/* Statement block — right column, row 1 */
.about-statement {
    grid-column: 2;
    grid-row: 1;
}

.about-heading {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.about-line {
    font-family: var(--fontPrimary);
    font-size: clamp(2.8rem, 6vw, 7.5rem);
    font-weight: 700;
    line-height: 0.92;
    color: var(--contrast);
    display: block;
    overflow: hidden;   /* enables GSAP yPercent clip reveal */
}

.about-line--dim { opacity: 0.18; }

.about-bio {
    font-family: var(--fontPrimary);
    font-size: clamp(0.88rem, 1.25vw, 1.02rem);
    line-height: 1.78;
    max-width: 46ch;
    opacity: 0.58;
    color: var(--contrast);
    margin-top: 2rem;
}

/* Stack chips — right column, row 2 */
.about-stack {
    grid-column: 2;
    grid-row: 2;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
}

.about-stack li {
    font-family: var(--fontPrimary);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid color-mix(in srgb, var(--contrast) 28%, transparent);
    color: var(--contrast);
    padding: 0.35rem 0.85rem;
    opacity: 0.42;
    transition: opacity 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

.about-stack li:hover {
    opacity: 1;
    border-color: var(--contrast);
}

/* About — mobile */
@media (max-width: 620px) {
    .about-section {
        padding: 8vh 5vw 6vh;
        min-height: auto;
    }
    .about-inner {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.8rem;
    }
    .about-year-block {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        align-items: baseline;
        gap: 0.7rem;
    }
    .about-year-num  { font-size: clamp(3.5rem, 16vw, 6rem); }
    .about-statement { grid-column: 1; grid-row: 2; }
    .about-line      { font-size: clamp(2rem, 9.5vw, 3.2rem); }
    .about-bio       { max-width: 100%; font-size: clamp(0.85rem, 3.8vw, 1rem); margin-top: 1.4rem; }
    .about-stack     { grid-column: 1; grid-row: 3; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT IMPACT METRICS
   Positioned absolute in desktop (bottom-right of .content).
   Static + horizontal row on mobile.
   ═══════════════════════════════════════════════════════════════════════════ */
.project-metrics {
    position: absolute;
    bottom: 2.2rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    z-index: 20;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.08rem;
}

.metric-value {
    font-family: var(--fontSecond);
    font-size: clamp(1.5rem, 2.2vw, 2.8rem);
    color: var(--contrast);
    line-height: 1;
    margin: 0;
    opacity: 0.85;
}

.metric-label {
    font-family: var(--fontPrimary);
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.38;
    color: var(--contrast);
    text-align: right;
}

/* Metrics — mobile: static horizontal row */
@media (max-width: 620px) {
    .project-metrics {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-start;
        gap: 1.2rem 2rem;
        padding: 0.9rem 1rem 0.4rem;
        border-top: 1px solid color-mix(in srgb, var(--contrast) 10%, transparent);
        margin: 0.5rem 0.5rem 0;
    }
    .metric          { align-items: center; }
    .metric-value    { font-size: clamp(1.4rem, 6vw, 2rem); text-align: center; }
    .metric-label    { text-align: center; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT TECH STACK CHIPS
   Horizontal chip row beneath project-desc — real stack, not decorative.
   Subtle opacity so they don't compete with the 3D model or metrics.
   ═══════════════════════════════════════════════════════════════════════════ */
.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem 0.42rem;
    list-style: none;
    margin: 0.55rem 0 0;
    padding: 0;
}

.project-stack li {
    font-family: var(--fontPrimary);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--contrast);
    opacity: 0.38;
    border: 1px solid color-mix(in srgb, var(--contrast) 15%, transparent);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
    transition: opacity 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

.project-stack li:hover {
    opacity: 0.82;
    border-color: color-mix(in srgb, var(--contrast) 45%, transparent);
}

@media (max-width: 620px) {
    .project-stack { margin-top: 0.5rem; gap: 0.28rem 0.38rem; }
    .project-stack li { font-size: 0.52rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   FILM GRAIN OVERLAY
   Fixed pseudo-layer over the entire page. SVG feTurbulence fractal noise
   animated with steps(1) — random translate jumps create real film grain.
   opacity: 0.032 — barely perceptible, adds tactile depth.
   inset: -50% / 200% ensures no visible edge when translating.
   ═══════════════════════════════════════════════════════════════════════════ */
.grain {
    position: fixed;
    inset: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 9500; /* below cursor (9999), above everything else */
    opacity: 0.032;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 192px 192px;
    animation: grain-shift 0.6s steps(1) infinite;
    will-change: transform;
}

@keyframes grain-shift {
    0%   { transform: translate(0,    0);   }
    14%  { transform: translate(-4%, -5%);  }
    28%  { transform: translate(-7%,  3%);  }
    42%  { transform: translate( 4%, -4%);  }
    57%  { transform: translate(-3%,  5%);  }
    71%  { transform: translate( 6%, -2%);  }
    85%  { transform: translate(-2%,  4%);  }
}

@media (prefers-reduced-motion: reduce) {
    .grain { animation: none; }
}

