:root{
    --win95-bg:#c0c0c0;
    --win95-dk:#808080;
    --win95-lt:#ffffff;
    --win95-blue:#000080;
    --win95-teal:#008080;
    --bsod-blue:#0000aa;
}
*{box-sizing:border-box}
body, html{
    margin:0; padding:0;
    font-family:"Tahoma", sans-serif;
    background:#000;
    overflow-x:hidden;
    scroll-behavior:smooth;
}

/* SEZIONI */
.section{
    position:relative;
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

/* PARALLASSE ORIGINALE (pagina2.html) */
.bg-container{
    position:absolute;
    top:0; left:0;
    width:100%; height:100%;
    z-index:1;
    pointer-events:none;
}
.parallax-bg{
    position:absolute;
    top:-10%;
    left:0;
    width:100%;
    height:120%;
    background-size:cover;
    background-position:center;
    will-change:transform;
}

/* SFONDI */
.bg-clouds{
    background:linear-gradient(
            180deg,
            #7bb7e7 0%,
            #a9d6f3 30%,
            #cceaf8 60%,
            #ffffff 100%
    );
}
.bg-monkey{
    background-image:url('monkeyprince.png');
    background-size:110%;
    background-position:center;
    filter:brightness(0.7) contrast(1.1);
}
.bg-doom{
    background-image:url('dukedoom.png');
    background-size:110%;
    background-position:center;
    filter:brightness(0.7) contrast(1.1);
}
.bg-teal{ background-color:var(--win95-teal); }
.bg-bsod{ background-color:var(--bsod-blue); }

/* VIDEO BACKGROUND */
.video-bg{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    z-index:1;
    pointer-events:none;
}

/* Finestre stile Win95 */
.window{
    position:relative;
    z-index:100;
    background-color:var(--win95-bg)!important;
    border:2px solid var(--win95-dk);
    border-right-color:var(--win95-lt);
    border-bottom-color:var(--win95-lt);
    box-shadow:inset 1px 1px 0 var(--win95-lt), 15px 15px 0 rgba(0,0,0,0.5);
    width:min(90%,650px);
    isolation:isolate;
}
.title-bar{
    background:linear-gradient(90deg, var(--win95-blue), #1084d0);
    color:#fff;
    padding:4px 8px;
    font-weight:bold;
    font-size:14px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.window-body{ padding:25px; background-color:var(--win95-bg)!important; color:#000; }

/* BSOD */
.bsod-content{
    position:relative;
    z-index:100;
    color:#fff;
    font-family:"Courier New", monospace;
    padding:40px;
    max-width:900px;
}
.bsod-header{
    background:#aaa;
    color:var(--bsod-blue);
    padding:0 10px;
    font-weight:bold;
    margin-bottom:20px;
}

/* TASKBAR */
.taskbar{
    position:fixed;
    bottom:0; left:0; right:0;
    height:38px;
    background:var(--win95-bg);
    border-top:2px solid var(--win95-lt);
    display:flex;
    align-items:center;
    padding:2px 5px;
    z-index:2000;
}
.start-btn{
    font-weight:bold;
    padding:2px 12px;
    border:2px solid var(--win95-dk);
    border-right-color:var(--win95-lt);
    border-bottom-color:var(--win95-lt);
    cursor:pointer;
    background:var(--win95-bg);
}
.start-menu{
    position:absolute;
    bottom:38px; left:0;
    width:220px;
    background:var(--win95-bg);
    border:2px solid var(--win95-dk);
    display:none;
    flex-direction:column;
    box-shadow:4px -4px 10px rgba(0,0,0,0.5);
}
.start-menu.show{ display:flex; }
.menu-item{
    padding:12px;
    text-decoration:none;
    color:#000;
    border-bottom:1px solid #aaa;
}
.menu-item:hover{ background:var(--win95-blue); color:white; }
.clock{ margin-left:auto; padding:2px 10px; border:2px inset var(--win95-dk); }

.video-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(90%, 420px);
    padding: 26px 22px 22px;

    /* SUPER TRASPARENTE */
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);

    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.32);
    box-shadow: 0 12px 50px rgba(0,0,0,0.45);

    text-align: center;
    color: #000;
    z-index: 300;
}

.video-popup-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    border-radius: 16px;

    /* Immagine della tastiera MIDI (metti la tua PNG/SVG) */
    background-image: url('midi-keyboard-icon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    /* leggero sfondo glass come macOS */
    background-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}

.video-popup h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 700;
    color: #000;
}

.video-popup p {
    margin: 0;
    font-size: 14px;
    color: #222;
    line-height: 1.45;
    opacity: 0.9;
}

/* ====== Sezione RETRO (Monkey + Doom unificati con pixel-transition) ====== */
#retro .parallax-bg{
    /* usiamo elementi <img> interni + canvas, non background-image CSS */
    background:none;
}
.retro-stage{
    position:absolute; inset:0; z-index:1; pointer-events:none;
}
.retro-stage img{
    position:absolute; inset:0; width:100%; height:100%;
    object-fit:cover;
    image-rendering: auto; /* normale */
    transition: opacity .25s linear;
}
.retro-stage canvas{
    position:absolute; inset:0; width:100%; height:100%;
    image-rendering: pixelated; /* blocchi grossi, look 8/16-bit */
    display:none;
}
@media (prefers-reduced-motion: reduce){
    .video-popup, .retro-stage canvas { transition:none !important; animation:none !important; }
}

/* =========================
    SEZIONE MS-DOS PROMPT
    ========================= */
.dos-section {
    background-color: #000; /* schermata nera */
    color: #00ff66;         /* verde fosforescente */
    font-family: "Courier New", Courier, monospace;
    padding: 40px 24px;
    width: 100%;
    max-width: 1000px;
    z-index: 100;
    line-height: 1.45;
}
.dos-inner {
    width: 100%;
    margin: 0 auto;
}
.dos-line {
    white-space: pre-wrap;
    word-break: break-word;
}
.dos-cursor {
    display: inline-block;
    width: 8px;
    background: currentColor;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* Effetto “scanlines” leggero (disattivato se preferisce ridotto) */
.dos-scanlines::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
            to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 1px,
            transparent 1px, transparent 3px
    );
    pointer-events: none;
    mix-blend-mode: overlay;
    opacity: 0.12;
}
@media (prefers-reduced-motion: reduce) {
    .dos-cursor { animation: none; }
    .dos-scanlines::before { display: none; }
}

/* Stato iniziale: taskbar nascosta sotto lo schermo */
.taskbar {
    transform: translateY(120%);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(.18,.89,.32,1.28),
    opacity 0.45s ease-out;
}
.taskbar.visible {
    transform: translateY(0%);
    opacity: 1;
}
/* Retro: i <img> sono SOLO sorgenti. Niente opacity/transition per evitare paint imprevisti */
.retro-stage img{
    display: none !important;
}

/* Canvas visibile e pixel look */
.retro-stage canvas{
    position:absolute; inset:0; width:100%; height:100%;
    image-rendering: pixelated;
    display:block;           /* sempre visibile */
    pointer-events:none;
}

.linkedin-more-links {
    color:#9bc4ff;
    font-size:14px;
    text-decoration:none;
    letter-spacing:0.5px;
}

/* -------------------------- */
/*   BSOD MODE VISUAL STYLE   */
/* -------------------------- */

.bsod-mode .window {
    background: #0000aa !important;
    border: 2px solid #000066 !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

.bsod-mode .title-bar {
    background: #0000aa !important;
    color: #ffffff !important;
}

.bsod-mode .window-body {
    background: #0000aa !important;
    color: #ffffff !important;
}

.bsod-mode h1,
.bsod-mode h2,
.bsod-mode p,
.bsod-mode span,
.bsod-mode strong {
    color: #ffffff !important;
}

.bsod-mode .title-bar span:last-child {
    display:none; /* nasconde il pulsante X */
}

.bsod-mode .window {
    transform: translateY(0);
    transition: background 0.25s linear, color 0.25s linear;
}
/* ----- BSOD MODE FOR FROM EARLY DAYS SECTION ----- */

#from-early-days.bsod-mode .window {
    background: #0000aa !important;
    border: 2px solid #000066 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

#from-early-days.bsod-mode .title-bar {
    background: #0000aa !important;
    color: #ffffff !important;
}

#from-early-days.bsod-mode .window-body {
    background: #0000aa !important;
    color: #ffffff !important;
}

#from-early-days.bsod-mode h1,
#from-early-days.bsod-mode p,
#from-early-days.bsod-mode strong {
    color: #ffffff !important;
}

#from-early-days.bsod-mode .title-bar span:last-child {
    display:none; /* hide the “X” in BSOD mode */
}

/* =========================================================
   FULL-BSOD MODE FOR ENTIRE WINDOWS 95 SECTION (from-early-days)
   ========================================================= */
#from-early-days.bsod-full {
    background: #0000aa !important;
}

#from-early-days.bsod-full .bg-container,
#from-early-days.bsod-full .parallax-bg {
    display: none !important; /* nasconde clouds / parallasse */
}

#from-early-days.bsod-full .window {
    background: #0000aa !important;
    border: none !important;
    box-shadow: none !important;
    color: #ffffff !important;
}

#from-early-days.bsod-full .title-bar {
    background: #0000aa !important;
    color: #ffffff !important;
    border: none !important;
}

#from-early-days.bsod-full .window-body {
    background: #0000aa !important;
    color: #ffffff !important;
}

#from-early-days.bsod-full h1,
#from-early-days.bsod-full p,
#from-early-days.bsod-full strong {
    color: #ffffff !important;
}

#from-early-days.bsod-full .title-bar span:last-child {
    display: none !important; /* nasconde la X */
}

/* =========================================================
   FULL BSOD per l'intera sezione #from-early-days
   ========================================================= */
#from-early-days.bsod-full {
    background: #0000aa !important;
}

#from-early-days.bsod-full .bg-container,
#from-early-days.bsod-full .parallax-bg {
    display: none !important;   /* rimuove nuvole / parallasse */
}

#from-early-days.bsod-full .window {
    background: #0000aa !important;
    border: none !important;
    box-shadow: none !important;
}

#from-early-days.bsod-full .title-bar,
#from-early-days.bsod-full .window-body {
    background: #0000aa !important;
    color: #ffffff !important;
}

#from-early-days.bsod-full h1,
#from-early-days.bsod-full p,
#from-early-days.bsod-full strong,
#from-early-days.bsod-full span {
    color: #ffffff !important;
}

#from-early-days.bsod-full .title-bar span:last-child {
    display:none !important; /* nasconde la X */
}

/* FULL BSOD MODE FOR #from-early-days */
#from-early-days.bsod-full {
    background: #0000aa !important;
}

#from-early-days.bsod-full .bg-container,
#from-early-days.bsod-full .parallax-bg {
    display: none !important;
}

#from-early-days.bsod-full .window,
#from-early-days.bsod-full .title-bar,
#from-early-days.bsod-full .window-body {
    background: #0000aa !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

#from-early-days.bsod-full h1,
#from-early-days.bsod-full p,
#from-early-days.bsod-full strong,
#from-early-days.bsod-full span {
    color: #ffffff !important;
}

/* =========================================================
   TRUE BSOD STYLE FOR ENTIRE SECTION #from-early-days
   (matches exactly the last "error" section)
   ========================================================= */
#from-early-days.bsod-true {
    background: var(--bsod-blue) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#from-early-days.bsod-true .bg-container,
#from-early-days.bsod-true .parallax-bg,
#from-early-days.bsod-true .window {
    display: none !important;
}

/* BSOD content container cloned from last section */
#from-early-days .bsod-clone {
    display: none;
}

#from-early-days.bsod-true .bsod-clone {
    display: block;
    font-family: "Courier New", monospace;
    color: #fff;
    max-width: 900px;
    z-index: 200;
    padding: 40px;
    text-align: left;
}

#from-early-days.bsod-true .bsod-clone .bsod-header {
    background:#aaa;
    color:#0000aa;
    font-weight:bold;
    padding: 0 10px;
    margin-bottom:20px;
    display:inline-block;
}

/* ============================
   BUTTON WIN95 HOVER ANIMATION
   ============================ */

.win95-btn {
    background: var(--win95-bg);
    border: 2px solid var(--win95-dk);
    border-right-color: var(--win95-lt);
    border-bottom-color: var(--win95-lt);
    padding: 6px 14px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 90ms linear;
}

.win95-btn:hover {
    border: 2px solid var(--win95-lt);
    border-right-color: var(--win95-dk);
    border-bottom-color: var(--win95-dk);
    background: #dfdfdf;
    box-shadow: inset 1px 1px 0 #fff;
    transform: translateY(-1px);
}

.win95-btn:active {
    background: #bfbfbf;
    transform: translateY(1px);
}

/* ============================
   BSOD BUTTON STYLE (flat, Courier)
   ============================ */
.bsod-btn {
    background: transparent;
    color: #ffffff;
    font-family: "Courier New", monospace;
    font-size: 16px;
    border: 2px solid #ffffff;
    padding: 8px 18px;
    cursor: pointer;
    margin-top: 22px;
    letter-spacing: 0.5px;
    transition: background 0.15s linear, color 0.15s linear;
}

/* Hover → leggerissimo invert semitrasparente, stile BSOD */
.bsod-btn:hover {
    background: rgba(255,255,255,0.12);
}

#left-block-container {
    position:relative;
    z-index:3;
    width:90%;
    max-width:1500px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:40px;
    padding:40px 20px;
    flex-wrap:wrap;
}

#left-block {
    flex:1 1 500px;
    max-width:700px;
}

#left-block-paragraph {
    color:#9ee7c4;
    font-size:14px;
    letter-spacing:1px;
    margin:0 0 18px;
    text-transform:uppercase
}

#left-header {
    margin:0;
    font-size:clamp(42px,9vw,95px);
    font-weight:900;
    line-height:0.95;
    color:#ffffff;"
}

#right-block-container {
    flex:1 1 360px;
    max-width:480px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

#image-video-container {
    width:100%;
    aspect-ratio:16/9;
    border-radius:14px;
    overflow:hidden;
    background:#000;
    box-shadow:0 16px 40px rgba(0,0,0,.45);
}

.right-block-paragraph {
    font-size:17px; color:#e6e6e6; line-height:1.5; margin-top:0; margin-bottom:20px;
}

.span-right-block {
    font-family:'Times New Roman', serif; font-style:italic; font-size:20px;
}

#goBlueBtn {
    margin-top:18px;
    padding:6px 14px;
    font-size:14px;
    font-weight:bold;
    cursor:pointer;
    border:2px solid var(--win95-dk);
    border-right-color:var(--win95-lt);
    border-bottom-color:var(--win95-lt);
    background:var(--win95-bg);
}

#video {
    position: relative;
}

#taskbar {
    position:relative;
}

#introduction {
    position:relative;
    background:#0d0d0d;
}

#intro-prof-container {
    position:absolute; inset:0;
    background:linear-gradient(180deg,#0d0d0d 0%, #121212 90%);
    z-index:1;
}

#image-video {
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center 80%;
}

#start-caption {
    margin-left:10px;font-size:12px;
}

/* =====================================================
   MODERN SECTIONS (NON RETRO)
   ===================================================== */

.modern-section {
    background: #0d0d0d;
    color: #ffffff;
}

.modern-container {
    position: relative;
    z-index: 3;
    width: 90%;
    max-width: 1500px;
    padding: 90px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 90px;
    align-items: flex-start;
}

/* Desktop & laptop: keep horizontal layout */
@media (min-width: 1024px) {
    .modern-container {
        flex-wrap: nowrap;
    }
}

.modern-text-block {
    flex: 1 1 auto;
    max-width: clamp(440px, 40vw, 640px);
}

.modern-card {
    flex: 1 1 auto;
    max-width: clamp(420px, 45vw, 700px);
}

.modern-eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    margin-bottom: 18px;
    color: #9ee7c4;
}

.modern-eyebrow.accent-blue {
    color: #9bc4ff;
}

.modern-eyebrow.accent-red {
    color: #ffb3b3;
}

.modern-eyebrow.muted {
    color: #cccccc;
}

.modern-title {
    font-size: 42px;
    line-height: 1.1;
    margin: 0 0 28px;
}

.modern-subtitle {
    font-size: 28px;
    margin: 0 0 16px;
}

.modern-subtitle.large {
    font-size: 34px;
}

.modern-text {
    font-size: 18px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.modern-text em {
    font-family: "Times New Roman", serif;
}

.modern-video {
    margin: 22px 0 26px;
    display: flex;
    justify-content: flex-start;
}

.modern-video video {
    width: 100%;
    max-width: 360px;
    border-radius: 14px;
    background: #000;
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}

/* ===============================
   MODERN SECTIONS: PAGE-LIKE LAYOUT
   =============================== */

/* Override del centering verticale */
.section.modern-section {
    align-items: flex-start;   /* ✅ non più center */
}

/* Punto di partenza verticale fisso */
.section.modern-section .modern-container {
    padding-top: 120px;        /* ✅ stesso offset per tutte */
}

/* =====================================================
   UNIFIED PAGE BACKGROUND FOR INTRO + MODERN SECTIONS
   ===================================================== */

/* Background uniforme per tutte le “pagine” principali */
#introduction,
.section.modern-section {
    background: linear-gradient(
            180deg,
            #0d0d0d 0%,
            #121212 90%
    );
}

/* Rimuove duplicazioni */
#intro-prof-container {
    background: none;
}


.section.modern-section .modern-container,
#introduction #left-block-container {
    padding-top: 120px;
    padding-bottom: 120px;
}

/* Testo body coerente su tutte le sezioni */
.modern-section .right-block-paragraph,
.modern-section .modern-text {
    font-size: 17px;
    line-height: 1.5;
    color: #e6e6e6;
    margin-bottom: 20px;
}
/* =====================================================
   SECTION NAVIGATOR (DOT SLIDESHOW)
   ===================================================== */

.section-navigator {
    position: fixed;
    bottom: 64px;               /* sopra taskbar */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 2500;
}

.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    position: relative;
    transition: transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* Hover */
.nav-dot:hover {
    background: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.12);
}

/* Tooltip */
.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    bottom: 160%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;

    background: rgba(0,0,0,0.85);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Tooltip arrow */
.nav-dot::before {
    content: "";
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.85);

    opacity: 0;
    transition: opacity 0.15s ease;
}

.nav-dot:hover::after,
.nav-dot:hover::before {
    opacity: 1;
}

/* =====================================================
   GLOBAL SECTION NAVIGATOR (DOTS)
   ===================================================== */

.section-navigator {
    position: fixed;
    bottom: 64px;               /* sopra taskbar */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 14px;
    z-index: 2500;

    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

/* quando taskbar è visibile → nascondi navigator */
.taskbar.visible ~ .section-navigator {
    opacity: 0;
    pointer-events: none;
}

/* dot base */
.nav-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    position: relative;
    transition: transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

/* hover */
.nav-dot:hover {
    background: #ffffff;
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.12);
}

/* tooltip */
.nav-dot::after {
    content: attr(data-label);
    position: absolute;
    bottom: 160%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;

    background: rgba(0,0,0,0.85);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* tooltip arrow */
.nav-dot::before {
    content: "";
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0,0,0,0.85);

    opacity: 0;
    transition: opacity 0.15s ease;
}

.nav-dot:hover::after,
.nav-dot:hover::before {
    opacity: 1;
}

/* dot attivo */
.nav-dot.active {
    background: #ffffff;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.18);
}

/* =====================================================
   MUSIC & TECHNOLOGY SECTION
   ===================================================== */

.music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.music-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}

.music-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.music-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;

    background: linear-gradient(
            to top,
            rgba(0,0,0,0.85),
            rgba(0,0,0,0)
    );

    color: #ffffff;
    font-size: 14px;
    letter-spacing: 0.4px;
}

/* Responsive */
@media (max-width: 900px) {
    .music-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   BSOD MODE FOR GAMING SECTION
   ===================================================== */

#retro.bsod-true {
    background: var(--bsod-blue) !important;
}

#retro.bsod-true .bg-container,
#retro.bsod-true .window {
    display: none !important;
}

#retro .bsod-clone {
    display: none;
}

#retro.bsod-true .bsod-clone {
    display: block;
    font-family: "Courier New", monospace;
    color: #ffffff;
    max-width: 900px;
    padding: 40px;
    z-index: 200;
}

/* =====================================================
   MUSIC VIDEO HOVER AUDIO INDICATOR
   ===================================================== */

#music-experiment .music-card {
    position: relative;
}

/* Icona altoparlante */
#music-experiment .music-audio-indicator {
    position: absolute;
    bottom: 42px;
    right: 14px;

    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transform: scale(0.9);

    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;

    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Visibile solo quando l’audio è attivo */
#music-experiment .music-card.audio-on .music-audio-indicator {
    opacity: 1;
    transform: scale(1);
}

/* =====================================================
   MUSIC & TECHNOLOGY — CONSTRAINED LAYOUT
   ===================================================== */

/* colonna video come stack verticale */
.music-stack {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* card video */
.music-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);

    /* ✅ vincolo dimensioni */
    max-width: 420px;
    aspect-ratio: 16 / 9;
}

/* video sempre contenuto */
.music-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* caption */
.music-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 14px;

    background: linear-gradient(
            to top,
            rgba(0,0,0,0.85),
            rgba(0,0,0,0)
    );

    color: #ffffff;
    font-size: 13px;
    letter-spacing: 0.4px;
}

/* =====================================================
   MUSIC (desktop mosaic + mobile centered stack)
   Scoped to #music-experiment to avoid conflicts
   ===================================================== */

#music-experiment .music-mosaic{
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

/* --- Desktop sizing baseline --- */
#music-experiment{
    --music-w: 360px;   /* width of each horizontal video card */
    --music-gap: 18px;  /* gap between the two horizontals */
}

/* Left column: 2 horizontals stacked */
#music-experiment .music-mosaic-left{
    display: flex;
    flex-direction: column;
    gap: var(--music-gap);
    width: var(--music-w);
}

/* Base card styling (keep your existing look) */
#music-experiment .music-card{
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}

/* Horizontal cards */
#music-experiment .music-card.horizontal{
    width: var(--music-w);
    aspect-ratio: 16 / 9;
}

/* Vertical card:
   height = (horizontalHeight * 2) + gap
   and width computed to keep 9:16 ratio */
#music-experiment .music-card.vertical{
    height: calc((var(--music-w) * 9 / 16) * 2 + var(--music-gap));
    width:  calc((((var(--music-w) * 9 / 16) * 2 + var(--music-gap)) * 9) / 16);
    border-radius: 14px;
}

/* Videos always fit */
#music-experiment .music-card video{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Caption (reuses your style) */
#music-experiment .music-card-caption{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
    color: #fff;
    font-size: 13px;
    letter-spacing: 0.4px;
}

/* Speaker icon positioning (keep consistent) */
#music-experiment .music-audio-indicator{
    position: absolute;
    bottom: 42px;
    right: 14px;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transform: scale(0.9);
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 6px 8px;
    border-radius: 6px;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#music-experiment .music-card.audio-on .music-audio-indicator{
    opacity: 1;
    transform: scale(1);
}

/* -----------------------------------------------------
   Mobile: same as before (stack), centered horizontally
   ----------------------------------------------------- */
@media (max-width: 900px){
    #music-experiment .music-mosaic{
        flex-direction: column;
        align-items: center;    /* ✅ center horizontally */
    }
    #music-experiment .music-mosaic-left{
        width: 100%;
        align-items: center;    /* ✅ center the two horizontals */
    }
    #music-experiment .music-card.horizontal,
    #music-experiment .music-card.vertical{
        width: min(420px, 100%);
        height: auto;
        aspect-ratio: 16 / 9;   /* ✅ match current mobile look */
    }
}

/* =====================================================
   MUSIC — AUDIO ENABLE HINT
   ===================================================== */

#music-experiment .music-audio-hint{
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9ee7c4;          /* stesso tono degli eyebrow */
    opacity: 0.85;
    user-select: none;
    pointer-events: none;   /* non intercetta click */
    transition: opacity .25s ease, transform .25s ease;
}

/* quando l’audio è sbloccato → nascondi */
#music-experiment.audio-unlocked .music-audio-hint{
    opacity: 0;
    transform: translateY(-4px);
}

/* =====================================================
   MOBILE — REDUCE TOP SPACING (INTRO + FIRST VIEW)
   ===================================================== */
@media (max-width: 768px) {

    /* Prima sezione: riduci drasticamente lo spazio sopra */
    #introduction #left-block-container {
        padding-top: 40px;     /* era ~120px */
        padding-bottom: 60px;
    }

    /* Allinea il titolo più in alto */
    #left-block {
        margin-top: 0;
    }

    /* Riduci distanza tra headline e immagine */
    #image-video-container {
        margin-top: 12px;
    }

}

/* =====================================================
   MOBILE — COMPACT VERTICAL SPACING (ALL SECTIONS)
   ===================================================== */
@media (max-width: 768px) {

    /* Tutte le sezioni: niente hero forzata */
    .section {
        min-height: auto;
        align-items: flex-start;
    }

    /* Container principali: riduci padding verticali */
    .modern-container,
    #left-block-container {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    /* Prima sezione: ancora più compatta */
    #introduction #left-block-container {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    /* Evita margini “fantasma” sopra i blocchi */
    .modern-offset {
        margin-top: 0;
    }

    /* Titoli più vicini all’inizio viewport */
    .modern-title,
    #left-header {
        margin-top: 0;
    }
}

/* =====================================================
   MOBILE — COMPACT VERTICAL SPACING (ALL BUT GAMING)
   ===================================================== */
@media (max-width: 768px) {

    /* ✅ Tutte le sezioni TRANNE Gaming */
    .section:not(#retro) {
        min-height: auto;
        align-items: flex-start;
    }

    /* ✅ Container principali, TRANNE Gaming */
    .section:not(#retro) .modern-container,
    #introduction #left-block-container {
        padding-top: 40px;
        padding-bottom: 60px;
    }

    /* Intro ancora più compatta */
    #introduction #left-block-container {
        padding-top: 32px;
        padding-bottom: 48px;
    }

    /* Evita margini fantasma (non gaming) */
    .section:not(#retro) .modern-offset {
        margin-top: 0;
    }

    /* Titoli più vicini all’inizio viewport */
    .section:not(#retro) .modern-title,
    #left-header {
        margin-top: 0;
    }
}

/* =====================================================
   MOBILE — GAMING SECTION EXTRA BREATHING SPACE
   ===================================================== */
@media (max-width: 768px) {

    /* Solo sezione Gaming */
    #retro {
        padding-top: 80px;
        padding-bottom: 120px;
        min-height: 100vh;          /* mantiene feeling immersivo */
        align-items: flex-start;   /* evita centratura forzata */
    }

    /* Centra meglio la finestra Win95 nel viewport */
    #retro .window {
        margin-top: 40px;
        margin-bottom: 40px;
    }
}

@media (max-width: 1440px) {
    .modern-text-block {
        max-width: 440px;
    }
}