@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Source+Code+Pro:wght@400&display=swap');

/* ====================================================
C O M M O D O R E  6 4  —  PALETTE & SETUP GLOBALE
==================================================== */
:root {
    --c64-blue: #3d4be8;
    --c64-red: #e73c2a;
    --c64-yellow: #ffb008;
    --c64-green: #5ee67e;
    --c64-white: #f0f0f0;
    --c64-black: #1a1a1a;
    --c64-cyan: #7dd4df;
    --c64-orange: #f8984e;
    --c64-purple: #352879;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--c64-blue);
    color: var(--c64-white);
    font-family: 'Press Start 2P', monospace;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
}

/* ====================================================
E F F E T T O  C R T  —  S C A N L I N E S
==================================================== */
.section-wrapper {
    position: relative;
}

.section-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1' height='2'%3E%3Crect width='1' height='1' fill='rgba(0,0,0,0.15)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 1px 2px;
    pointer-events: none;
    z-index: 10;
}

/* ====================================================
R O B O T  —  A N I M A Z I O N I
==================================================== */
@keyframes swing-right {

    0%,
    100% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(-8deg);
    }

    65% {
        transform: rotate(8deg);
    }
}

@keyframes swing-left {

    0%,
    100% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(8deg);
    }

    65% {
        transform: rotate(-8deg);
    }
}

@keyframes swing-right-hand {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    35% {
        transform: translateY(-8.7px) rotate(-18deg);
    }

    65% {
        transform: translateY(8.7px) rotate(18deg);
    }
}

@keyframes swing-left-hand {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    35% {
        transform: translateY(8.7px) rotate(18deg);
    }

    65% {
        transform: translateY(-8.7px) rotate(-18deg);
    }
}

#braccio_dx,
#braccioin_dx {
    transform-origin: left center;
    transform-box: fill-box;
    animation: swing-right 2.8s ease-in-out infinite;
}

#mano_dx {
    transform-origin: left center;
    transform-box: fill-box;
    animation: swing-right-hand 2.8s ease-in-out infinite;
}

#braccio_sx,
#braccioin_sx {
    transform-origin: right center;
    transform-box: fill-box;
    animation: swing-left 2.8s ease-in-out infinite;
}

#mano_sx {
    transform-origin: right center;
    transform-box: fill-box;
    animation: swing-left-hand 2.8s ease-in-out infinite;
}

.dente_even,
.dente_odd {
    stroke-linejoin: round;
    stroke: #2B3E50;
    stroke-linecap: round;
}

.dente_even {
    fill: #008080;
    animation: even 3s infinite;
}

.dente_odd {
    fill: #ffcc00;
    animation: odd 3s infinite;
}

@keyframes even {
    0% {
        fill: #008080;
    }

    25% {
        fill: #ffcc00;
    }

    50% {
        fill: #008080;
    }

    75% {
        fill: #ffcc00;
    }

    100% {
        fill: #008080;
    }
}

@keyframes odd {
    0% {
        fill: #ffcc00;
    }

    25% {
        fill: #008080;
    }

    50% {
        fill: #ffcc00;
    }

    75% {
        fill: #008080;
    }

    100% {
        fill: #ffcc00;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

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

    50% {
        transform: rotate(-360deg);
    }

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

#piede1,
#piede2,
#piede3,
#piede4 {
    transform-origin: center center;
    transform-box: fill-box;
    animation: roll 6s infinite linear;
}

#occhio_dx {
    transform-origin: center center;
    transform-box: fill-box;
    animation: rotate 8s infinite 0.8s linear reverse;
}

#testa {
    animation: testa 3s infinite;
}

#bocca {
    animation: bocca 1s infinite;
}

@keyframes testa {
    0% {
        transform: translateY(-6px);
    }

    25%,
    50% {
        transform: translateY(-3px);
    }

    75%,
    100% {
        transform: translateY(0);
    }
}

@keyframes bocca {
    0% {
        transform: translateY(+8px);
    }

    25%,
    50% {
        transform: translateY(+4px);
    }

    75%,
    100% {
        transform: translateY(0);
    }
}

#heart {
    animation: heartbit 1s infinite;
}

@keyframes heartbit {

    0%,
    25%,
    50%,
    75%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes bounce {

    0%,
    25%,
    50%,
    75%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-12px);
    }

    60% {
        transform: translateY(-6px);
    }
}

#robot {
    animation: mover 3s infinite alternate;
    filter: drop-shadow(3px 3px 0 rgba(124, 164, 222, 0.8));
    margin-bottom: 20px;
}

@keyframes mover {
    0% {
        transform: translateX(20px);
    }

    100% {
        transform: translateX(-20px);
    }
}

#blk_2 img:hover {
    transform: translate(0, -50px);
}

/* ====================================================
G A T T O  A S C I I
==================================================== */
#cat {
    position: fixed;
    color: #a0a0f0;
    font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
    font-size: clamp(10px, 0.9vw, 18px);
    line-height: 1.2;
    white-space: pre;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    z-index: 9999;
    pointer-events: none;
    margin-top: 20px;
    overflow: hidden;
    max-width: 100vw;
    max-height: 100vh;
    letter-spacing: 0;
    word-spacing: 0;
    font-variant-ligatures: none;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: none;
}

#cats {
    font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
    font-size: clamp(10px, 1.1vw, 20px);
    line-height: 1.2;
    white-space: pre;
    overflow: hidden;
    max-width: 100%;
    max-height: 90vh;
    letter-spacing: 0;
    word-spacing: 0;
    font-variant-ligatures: none;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: none;
}

/* ====================================================
M E S S A G G I  T Y P E D . J S
==================================================== */
#messages {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    color: var(--c64-white);
    text-shadow: 3px 3px 0 var(--c64-red), 6px 6px 0 var(--c64-cyan);
    letter-spacing: 0.04em;
}

.typed-cursor {
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--c64-white);
    text-shadow: 3px 3px 0 var(--c64-red), 6px 6px 0 var(--c64-cyan);
    animation: cursor-blink 0.7s infinite;
}

@keyframes cursor-blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

/* ====================================================
L A Y O U T
==================================================== */
.main-wrapper {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.main-wrapper::-webkit-scrollbar {
    display: none;
}

.section-wrapper {
    height: 100vh;
}

.section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    scroll-snap-align: center;
    padding: 20px;
}

#cat-section {
    height: 100vh;
    background-color: #4040e0;
    color: #a0a0f0;
}

.profile {
    background-color: var(--c64-purple);
}

.profile-texts {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ====================================================
A N I M A T E D  G R A D I E N T  B O R D E R
==================================================== */
.main-wrapper {
    border: 3px solid transparent;
    background-image:
        linear-gradient(#ffb008, #ffb008),
        linear-gradient(135deg, #00ffff, #ff00ff, #ffcc00, #00ffff);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 300% 300%;
    animation: border-spin 4s linear infinite;
}

@keyframes border-spin {
    0% {
        background-position: 100% 100%, 0% 50%;
    }

    50% {
        background-position: 100% 100%, 100% 50%;
    }

    100% {
        background-position: 100% 100%, 0% 50%;
    }
}

/* ====================================================
T E S T O  G L I T C H
==================================================== */
.glitch-text {
    position: relative;
    display: inline-block;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.8rem;
    color: var(--c64-white);
    text-shadow: 3px 3px 0 var(--c64-red), 6px 6px 0 var(--c64-cyan);
    letter-spacing: 0.04em;
    line-height: 1.8;
    margin-top: 2%;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    background: transparent;
    clip-path: inset(0 0 100% 0);
}

.glitch-text::before {
    left: 3px;
    color: var(--c64-cyan);
    animation: glitch-clip-1 5s steps(1) infinite;
    text-shadow: 3px 3px 0 var(--c64-black);
}

.glitch-text::after {
    left: -3px;
    color: var(--c64-red);
    animation: glitch-clip-2 5s steps(1) infinite;
    text-shadow: 3px 3px 0 var(--c64-black);
}

@keyframes glitch-clip-1 {

    0%,
    82%,
    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }

    83% {
        clip-path: inset(10% 0 75% 0);
        transform: translate(-5px, 0);
    }

    84% {
        clip-path: inset(45% 0 38% 0);
        transform: translate(6px, 0);
    }

    85% {
        clip-path: inset(70% 0 18% 0);
        transform: translate(-4px, 0);
    }

    86% {
        clip-path: inset(28% 0 58% 0);
        transform: translate(5px, 0);
    }

    87% {
        clip-path: inset(55% 0 28% 0);
        transform: translate(-6px, 0);
    }

    88% {
        clip-path: inset(82% 0 8% 0);
        transform: translate(3px, 0);
    }

    89% {
        clip-path: inset(5% 0 82% 0);
        transform: translate(-5px, 0);
    }

    90% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }
}

@keyframes glitch-clip-2 {

    0%,
    82%,
    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }

    83% {
        clip-path: inset(32% 0 52% 0);
        transform: translate(6px, 0);
    }

    84% {
        clip-path: inset(62% 0 22% 0);
        transform: translate(-5px, 0);
    }

    85% {
        clip-path: inset(18% 0 68% 0);
        transform: translate(4px, 0);
    }

    86% {
        clip-path: inset(50% 0 34% 0);
        transform: translate(-6px, 0);
    }

    87% {
        clip-path: inset(75% 0 15% 0);
        transform: translate(5px, 0);
    }

    88% {
        clip-path: inset(8% 0 78% 0);
        transform: translate(-3px, 0);
    }

    89% {
        clip-path: inset(40% 0 44% 0);
        transform: translate(6px, 0);
    }

    90% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }
}

/* ====================================================
I M M A G I N E  P R O F I L O  G L I T C H
==================================================== */
.glitch-img {
    position: relative;
    display: inline-block;
    border-radius: 50%;
    border: 4px solid #ffb008;
    background: #2b3e50;
    margin-bottom: 20px;
    box-shadow:
        0 0 0 1px #7dd4df,
        0 0 30px rgba(255, 176, 8, 0.6),
        inset 0 0 20px rgba(61, 75, 232, 0.4);
    filter: brightness(1.1) contrast(1.2);
    width: clamp(140px, 55vw, 240px);
    aspect-ratio: 1 / 1;
}

.glitch-img img {
    display: block;
    position: relative;
    z-index: 1;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glitch-img::before,
.glitch-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: var(--gi-src);
    background-size: cover;
    background-position: center;
    clip-path: inset(0 0 100% 0);
    z-index: 2;
}

.glitch-img::before {
    left: 5px;
    background-color: #00ffff;
    mix-blend-mode: screen;
    animation: glitch-img-1 7s steps(1) infinite;
}

.glitch-img::after {
    left: -5px;
    background-color: #ff00ff;
    mix-blend-mode: screen;
    animation: glitch-img-2 7s steps(1) infinite;
}

.glitch-img:hover::before {
    animation: glitch-img-1 0.8s steps(1) infinite;
}

.glitch-img:hover::after {
    animation: glitch-img-2 0.8s steps(1) infinite;
}

@keyframes glitch-img-1 {

    0%,
    78%,
    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }

    79% {
        clip-path: inset(6% 0 82% 0);
        transform: translate(-9px, 0);
    }

    80% {
        clip-path: inset(42% 0 40% 0);
        transform: translate(10px, 0);
    }

    81% {
        clip-path: inset(68% 0 20% 0);
        transform: translate(-7px, 0);
    }

    82% {
        clip-path: inset(22% 0 62% 0);
        transform: translate(8px, 0);
    }

    83% {
        clip-path: inset(52% 0 32% 0);
        transform: translate(-10px, 0);
    }

    84% {
        clip-path: inset(80% 0 8% 0);
        transform: translate(6px, 0);
    }

    85% {
        clip-path: inset(12% 0 72% 0);
        transform: translate(-8px, 0);
    }

    86% {
        clip-path: inset(35% 0 48% 0);
        transform: translate(9px, 0);
    }

    87% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }
}

@keyframes glitch-img-2 {

    0%,
    78%,
    100% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }

    79% {
        clip-path: inset(28% 0 56% 0);
        transform: translate(10px, 0);
    }

    80% {
        clip-path: inset(58% 0 26% 0);
        transform: translate(-9px, 0);
    }

    81% {
        clip-path: inset(14% 0 72% 0);
        transform: translate(7px, 0);
    }

    82% {
        clip-path: inset(46% 0 36% 0);
        transform: translate(-8px, 0);
    }

    83% {
        clip-path: inset(74% 0 14% 0);
        transform: translate(10px, 0);
    }

    84% {
        clip-path: inset(4% 0 84% 0);
        transform: translate(-6px, 0);
    }

    85% {
        clip-path: inset(62% 0 24% 0);
        transform: translate(8px, 0);
    }

    86% {
        clip-path: inset(20% 0 65% 0);
        transform: translate(-9px, 0);
    }

    87% {
        clip-path: inset(0 0 100% 0);
        transform: translate(0);
    }
}

/* ====================================================
F O O T E R  B A S I C  C 6 4
==================================================== */
#footer-section {
    background-color: #3333AA;
    overflow: hidden;
    scroll-snap-align: start;
}

#footer-inner {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 0 !important;
    overflow: hidden;
}

.c64-basic {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.28rem, 2.5vw, 0.5rem);
    color: #7B7BFF;
    line-height: 2;
    margin: 0;
    padding: 4vh 4vw;
    white-space: pre;
    text-align: left;
    display: block;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

.c64b-link {
    color: #7B7BFF;
    text-decoration: none;
}

.c64b-link:hover {
    color: var(--c64-yellow);
}

.c64b-cursor {
    display: inline-block;
    width: 0.65em;
    height: 0.85em;
    background-color: #7B7BFF;
    vertical-align: -0.05em;
    margin-left: 2px;
    animation: cursor-blink 0.7s infinite;
}

/* ====================================================
M E D I A  Q U E R I E S
==================================================== */

/*
    BREAKPOINT MAP
    ─────────────────────────────────────────────────
    < 400px      portrait tiny (es. iPhone SE)
    400–480px    portrait small
    480–767px    portrait medio
    576px+       tablet piccolo / landscape mobile
    768px+       tablet
    992px+       desktop small
    1200px+      desktop
    1400px+      desktop large
    1920px+      Full HD / widescreen
    2560px+      2K / QHD
    3840px+      4K / UHD
    ─────────────────────────────────────────────────
    I font di #messages, .glitch-text, .typed-cursor
    usano clamp() fluido — niente step fissi.
    Il .c64-basic usa clamp() per ogni breakpoint.
    white-space e word-break vengono ereditati dal
    base: non si ripetono in ogni query.
*/

/* --------------------------------------------------
   BASE  –  proprietà ereditate da tutti i breakpoint
-------------------------------------------------- */
.c64-basic {
    white-space: pre-wrap;
    word-break: break-word;
}

/* --------------------------------------------------
   FONT  –  #messages / .glitch-text / .typed-cursor
   clamp(min, fluid, max)
   fluid = ~1vw + costante per salita graduale
-------------------------------------------------- */
#messages,
.glitch-text,
.typed-cursor {
    font-size: clamp(0.75rem, 0.5rem + 1.5vw, 2.8rem);
}

/* --------------------------------------------------
   #cat  –  overlay fisso, fluido
   #cats –  font a step con clamp() per fluidità
   TV Hisense: viewport=1280px, DPR=1.5 → ~14px ✓
-------------------------------------------------- */
@media (min-width: 576px) {
    #cats {
        font-size: clamp(13px, 1.5vw, 15px);
    }
}

@media (min-width: 768px) {
    #cats {
        font-size: clamp(14px, 1.6vw, 16px);
    }
}

@media (min-width: 992px) {
    #cats {
        font-size: clamp(15px, 1.6vw, 17px);
    }
}

@media (min-width: 1200px) {
    #cats {
        font-size: clamp(16px, 1.5vw, 19px);
    }
}

@media (min-width: 1400px) {
    #cats {
        font-size: clamp(18px, 1.4vw, 21px);
    }
}

@media (min-width: 1920px) {
    #cat {
        font-size: clamp(14px, 1.0vw, 22px);
    }

    #cats {
        font-size: clamp(20px, 1.2vw, 26px);
        max-height: 80vh;
    }
}

@media (min-width: 2560px) {
    #cat {
        font-size: clamp(18px, 1.0vw, 28px);
    }

    #cats {
        font-size: clamp(24px, 1.2vw, 32px);
    }
}

@media (min-width: 3840px) {
    #cat {
        font-size: clamp(22px, 1.0vw, 34px);
    }

    #cats {
        font-size: clamp(28px, 1.2vw, 40px);
    }
}

/* --------------------------------------------------
   IMMAGINI  –  schermi bassi
-------------------------------------------------- */
@media (max-height: 400px) {
    .img-fluid {
        max-height: 80%;
    }
}

/* --------------------------------------------------
   FOOTER  .c64-basic  –  Portrait
-------------------------------------------------- */
@media (max-width: 399px) {
    .c64-basic {
        font-size: clamp(0.28rem, 2.5vw, 0.5rem);
        padding: 3vh 3vw;
    }
}

@media (min-width: 400px) and (max-width: 479px) {
    .c64-basic {
        font-size: clamp(0.32rem, 2vh, 0.5rem);
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .c64-basic {
        font-size: clamp(0.32rem, 2.3vw, 0.8rem);
        padding: 3.5vh 3.5vw;
    }
}

@media (min-width: 768px) {
    .c64-basic {
        font-size: clamp(0.45rem, 3.2vw, 1.1rem);
        padding: 4vh 4vw;
    }
}

@media (min-width: 992px) {
    .c64-basic {
        font-size: clamp(0.55rem, 3.5vw, 1.4rem);
    }
}

@media (min-width: 1200px) {
    .c64-basic {
        font-size: clamp(0.65rem, 3.8vw, 1.65rem);
    }
}

@media (min-width: 1400px) {
    .c64-basic {
        font-size: clamp(0.75rem, 4vw, 1.85rem);
    }
}

/* --------------------------------------------------
   W I D E S C R E E N  +  4 K
-------------------------------------------------- */

/* Full HD — 1920px */
@media (min-width: 1920px) {
    .c64-basic {
        font-size: clamp(1rem, 2.2vw, 2.2rem);
        padding: 5vh 5vw;
    }

    /* foto profilo: contenuta in wide, non tocca il landscape */
    .glitch-img {
        width: clamp(200px, 14vw, 300px);
    }

    #robot {
        height: clamp(400px, 38vh, 520px);
        width: auto;
    }
}

/* 2K / QHD — 2560px */
@media (min-width: 2560px) {
    .c64-basic {
        font-size: clamp(2rem, 2.2vw, 3.8rem);
        padding: 5vh 5vw;
    }

    .glitch-img {
        width: clamp(280px, 13vw, 420px);
    }

    #robot {
        height: clamp(520px, 46vh, 680px);
        width: auto;
    }

    body {
        font-size: 18px;
    }

    .glitch-text,
    #messages,
    .typed-cursor {
        font-size: clamp(2rem, 1.6vw + 0.8rem, 4.4rem);
        text-shadow: 6px 6px 0 var(--c64-red), 12px 12px 0 var(--c64-cyan);
    }
}

/* 4K / UHD — 3840px */
@media (min-width: 3840px) {
    .c64-basic {
        font-size: clamp(2.2rem, 2.4vw, 4rem);
        padding: 5vh 5vw;
        line-height: 2.2;
    }

    .glitch-img {
        width: clamp(320px, 12vw, 500px);
    }

    #robot {
        height: clamp(620px, 50vh, 800px);
        width: auto;
    }

    body {
        font-size: 22px;
    }

    .section {
        padding: 40px;
    }

    .glitch-text,
    #messages,
    .typed-cursor {
        font-size: clamp(2.2rem, 1.8vw + 1rem, 5rem);
        text-shadow: 8px 8px 0 var(--c64-red), 16px 16px 0 var(--c64-cyan);
    }
}

/* --------------------------------------------------
   L A N D S C A P E  –  mobile (h ≤ 520px)
-------------------------------------------------- */
@media (orientation: landscape) and (max-height: 520px) {
    .section-wrapper {
        height: 100vh;
    }

    .section {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 10px 24px;
        height: 100vh;
        overflow: hidden;
    }

    .section>div:has(#robot) {
        flex: 0 0 auto;
    }

    #robot {
        height: clamp(150px, 60vh, 280px);
        width: auto;
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .section>div:has(#messages) {
        flex: 0 0 350px;
        min-width: 0;
        overflow: hidden;
        text-align: left;
    }

    #messages,
    .typed-cursor {
        font-size: 1rem;
        white-space: nowrap;
        display: inline-block;
    }

    .glitch-img {
        width: clamp(150px, 60vh, 250px);
        flex: 0 0 auto;
        margin-bottom: 0;
    }

    .profile-texts {
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
        gap: 12px;
        text-align: left;
    }

    .glitch-text {
        font-size: 1rem;
        display: block;
        text-align: left;
    }

    #cats {
        font-size: clamp(8px, 1.5vh, 11px);
        line-height: 1.1;
    }

    .c64-basic {
        font-size: clamp(0.55rem, 2.2vh, 0.85rem);
        line-height: 1.7;
        padding: 4vh 5vw;
        white-space: pre;
    }

    .c64b-cursor {
        width: 0.6em;
        height: 0.85em;
    }
}

/* --------------------------------------------------
   L A N D S C A P E  –  tablet e desktop
-------------------------------------------------- */
@media (orientation: landscape) and (max-height: 540px) {
    .c64-basic {
        font-size: clamp(0.6rem, 2vh, 0.8rem);
    }
}

@media (orientation: landscape) and (min-height: 541px) and (max-height: 600px) {
    .c64-basic {
        font-size: clamp(0.6rem, 2.2vh, 0.9rem);
    }
}

@media (orientation: landscape) and (min-width: 768px) {
    .c64-basic {
        font-size: clamp(0.6rem, 2vh, 1rem);
    }
}

@media (orientation: landscape) and (min-width: 1280px) {
    .c64-basic {
        font-size: clamp(0.7rem, 2.3vh, 1.5rem);
    }
}

@media (orientation: landscape) and (min-width: 1400px) {
    .c64-basic {
        font-size: clamp(0.9rem, 2.3vh, 1.75rem);
    }
}

@media (orientation: landscape) and (min-width: 1920px) {
    .c64-basic {
        font-size: clamp(1.1rem, 2.4vh, 1.80rem);
    }
}

@media (orientation: landscape) and (min-width: 2560px) {
    .c64-basic {
        font-size: clamp(1.2rem, 2.5vh, 1.90rem);
    }
}

@media (orientation: landscape) and (min-width: 3840px) {
    .c64-basic {
        font-size: clamp(1.4rem, 2.6vh, 2.1rem);
    }
}