:root {
    --red: #E50914;
    --red-dark: #B20710;
    --black: #141414;
    --dark: #181818;
    --dark2: #232323;
    --dark3: #2a2a2a;
    --gray: #808080;
    --light-gray: #B3B3B3;
    --white: #FFFFFF;
  }

  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--black);
    color: var(--white);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ══════════════════════════════
     NAVBAR — identica a Netflix
  ══════════════════════════════ */
  nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 2.2rem;
    padding: 0 4%;
    height: 68px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, transparent 100%);
    transition: background 0.4s;
  }
  nav.scrolled { background: rgba(20,20,20,0.97); }

  /* LOGO NETFLIX */
  .nav-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.6rem;
    color: var(--red);
    letter-spacing: -1px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    text-shadow: none;
    line-height: 1;
  }

  .nav-links {
    display: flex;
    gap: 1.2rem;
    list-style: none;
  }
  .nav-links a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
  }
  .nav-links a:hover { color: var(--white); }
  .nav-links a.active { color: var(--white); font-weight: 700; }

  /* ══════════════════════════════
     HOMEPAGE — sezione principale
  ══════════════════════════════ */
  #home { display: block; }
  .section { display: none; }
  .section.active, #home.active { display: block; }

  /* HERO — a tutta schermata come Netflix */
  .hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
  }

  .hero-backdrop {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 45%, transparent 75%),
      linear-gradient(to top, rgb(20,20,20) 0%, rgba(20,20,20,0.8) 12%, transparent 35%);
    z-index: 1;
  }

  /* Sfondo hero */
  .hero-bg-image {
    position: absolute;
    inset: 0;
    background: url("assets/hf_20260529_193747_c7fd6db0-6f81-473c-8def-651867d76d95.png") center center / cover no-repeat;
    z-index: 0;
  }

  .hero-content {
    position: relative;
    z-index: 2;
    padding: 0 4% 3.5rem;
    max-width: 640px;
  }

  /* Titolo grande stile Netflix */
  .hero-show-tag {
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 0.6rem;
  }

  .hero-show-title {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    line-height: 1;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    text-shadow: 2px 4px 20px rgba(0,0,0,0.8);
  }

  .hero-show-title .name { color: var(--red); display: block; }

  .hero-show-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-bottom: 1.6rem;
    max-width: 520px;
    /* MODIFICA: scrivi la tua presentazione qui */
  }

  .hero-show-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
  }
  .hero-badge {
    border: 1.5px solid rgba(255,255,255,0.4);
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 2px;
    color: rgba(255,255,255,0.8);
  }
  .hero-badge.red { background: var(--red); border-color: var(--red); color: white; }

  /* Bottoni stile Netflix */
  .hero-btns { display: flex; gap: 0.8rem; flex-wrap: wrap; }

  .btn-play {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: black;
    border: none;
    padding: 10px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
  }
  .btn-play:hover { background: rgba(255,255,255,0.85); }
  .btn-play svg { width: 18px; height: 18px; fill: black; }

  .btn-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(109,109,110,0.7);
    color: white;
    border: none;
    padding: 10px 22px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.2s;
  }
  .btn-info:hover { background: rgba(109,109,110,0.5); }
  .btn-info svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 1.8; }

  /* ══════════════════════════════
     ROWS — righe orizzontali stile Netflix
  ══════════════════════════════ */
  .home-rows {
    position: relative;
    padding: 0 4% 60px;
    background: var(--black);
  }
  .home-rows::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, rgb(20,20,20));
    z-index: 10;
    pointer-events: none;
  }

  .row { margin-bottom: 2.5rem; }

  .row-header {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.7rem;
  }

  .row-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: color 0.2s;
  }
  .row-title:hover { color: var(--light-gray); }

  .row-explore {
    font-size: 0.72rem;
    font-weight: 600;
    color: #54b9c5;
    letter-spacing: 1px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .row:hover .row-explore { opacity: 1; }

  /* Scroll orizzontale */
  .row-scroll-wrapper { position: relative; }

  .row-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 38px 0 22px;
    margin-top: -30px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
  }
  .row-scroll::-webkit-scrollbar { display: none; }

  /* Frecce di scorrimento */
  .scroll-btn {
    position: absolute;
    top: 0; bottom: 16px;
    width: 48px;
    background: rgba(20,20,20,0.7);
    border: none;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
  }
  .row-scroll-wrapper:hover .scroll-btn { opacity: 1; }
  .scroll-btn.left  { left: -4%; border-radius: 0 3px 3px 0; }
  .scroll-btn.right { right: -4%; border-radius: 3px 0 0 3px; }
  .scroll-btn svg { width: 22px; height: 22px; stroke: white; fill: none; stroke-width: 2.5; }

  /* CARD Netflix */
  .nf-card {
    flex: 0 0 220px;
    height: 124px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s, z-index 0s 0.32s;
    background: var(--dark2);
  }

  .nf-card:hover {
    transform: scale(1.38) translateY(-12px);
    z-index: 50;
    box-shadow: 0 20px 60px rgba(0,0,0,0.92);
    transition: transform 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.32s, z-index 0s;
  }

  .row-scroll .nf-card:first-child { transform-origin: left center; }
  .row-scroll .nf-card:last-child  { transform-origin: right center; }

  .nf-card-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    color: rgba(255,255,255,0.07);
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--dark3) 0%, var(--dark2) 100%);
    border-radius: 4px;
    overflow: hidden;
  }

  .nf-card-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
  }

  .nf-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 10px 12px;
    transition: opacity 0.2s;
  }
  .nf-card:hover .nf-card-overlay { opacity: 0; }

  .nf-card-label {
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 3px;
  }

  .nf-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
  }

  /* Hover panel — rimane dentro la card */
  .nf-card-hover {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(20,20,20,1) 0%, rgba(20,20,20,0.92) 60%, transparent 100%);
    padding: 28px 12px 10px;
    border-radius: 0 0 4px 4px;
    opacity: 0;
    transition: opacity 0.25s 0.15s;
    z-index: 51;
  }
  .nf-card:hover .nf-card-hover { opacity: 1; }

  .nf-card-hover-desc {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .nf-card-hover-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
  }

  .nf-action-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.5);
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
  }
  .nf-action-btn:hover { border-color: white; }
  .nf-action-btn svg { width: 14px; height: 14px; stroke: white; fill: none; stroke-width: 1.8; }
  .nf-action-btn.play { background: white; border-color: white; }
  .nf-action-btn.play svg { stroke: black; }

  /* ══════════════════════════════
     SEZIONI INTERNE (non home)
  ══════════════════════════════ */
  .inner-section {
    padding: 100px 4% 60px;
    min-height: 100vh;
    animation: fadeIn 0.4s ease;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .section-header { margin-bottom: 2.5rem; }

  .section-header-tag {
    font-size: 0.58rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 6px;
  }

  .section-header-title {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 8px;
  }

  .section-header-sub {
    font-size: 0.85rem;
    color: var(--gray);
    max-width: 500px;
    line-height: 1.7;
  }

  /* Tabs sottosezione */
  .subsection-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--dark3);
  }
  .subsection-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
  }
  .subsection-tab.active { color: white; border-bottom-color: var(--red); }
  .subsection-tab:hover { color: var(--light-gray); }

  .subsection-panel { display: none; }
  .subsection-panel.active { display: block; animation: fadeIn 0.3s ease; }

  /* Cards griglia sezioni interne */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
  }

  .detail-card {
    background: var(--dark);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: default;
  }
  .detail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 0 1px rgba(229,9,20,0.25);
  }

  .detail-card-header {
    height: 80px;
    background: linear-gradient(135deg, var(--dark3), var(--dark2));
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 20px;
  }
  .detail-card-header-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--red);
  }
  .detail-card-year {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.2rem;
    color: rgba(255,255,255,0.1);
    position: absolute;
    right: 14px;
    letter-spacing: 1px;
  }
  .detail-card-icon {
    width: 38px; height: 38px;
    background: rgba(229,9,20,0.12);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
  }
  .detail-card-icon svg { width: 18px; height: 18px; stroke: var(--red); fill: none; stroke-width: 1.8; }

  .detail-card-body { padding: 16px 20px 20px; }
  .detail-card-label {
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    font-weight: 700;
    margin-bottom: 4px;
  }
  .detail-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
  }
  .detail-card-text {
    font-size: 0.8rem;
    color: var(--light-gray);
    line-height: 1.7;
    min-height: 75px;
    border-left: 2px solid var(--dark3);
    padding-left: 12px;
  }

  /* Competenze */
  .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
  }
  .skill-card {
    background: var(--dark);
    border-radius: 4px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.2s, border-color 0.2s;
  }
  .skill-card:hover { transform: translateY(-3px); border-color: rgba(229,9,20,0.3); }
  .skill-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
  }
  .skill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); flex-shrink: 0; }
  .skill-bar-bg { height: 3px; background: var(--dark3); border-radius: 2px; margin-bottom: 8px; overflow: hidden; }
  .skill-bar-fill { height: 100%; background: var(--red); border-radius: 2px; }
  .skill-desc { font-size: 0.75rem; color: var(--gray); line-height: 1.6; }

  .row-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--dark3);
  }

  /* About home */
  .about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  @media(max-width: 640px) { .about-grid { grid-template-columns: 1fr; } }
  .about-card {
    background: var(--dark);
    border-radius: 4px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.2s;
  }
  .about-card:hover { border-color: rgba(229,9,20,0.3); }
  .about-card-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--red);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 10px;
  }
  .about-card-title svg { width: 18px; height: 18px; stroke: var(--red); fill: none; stroke-width: 1.8; }
  .about-card p { font-size: 0.83rem; color: var(--light-gray); line-height: 1.8; }

  .section-anchor { scroll-margin-top: 80px; }
  .chisono-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--dark3) 20%, var(--dark3) 80%, transparent);
    margin: 3rem 0 4rem;
  }

  footer {
    padding: 36px 4%;
    border-top: 1px solid var(--dark3);
    margin-top: 20px;
  }
  .footer-logo { font-family: 'Bebas Neue', cursive; font-size: 1.1rem; color: var(--gray); letter-spacing: 2px; margin-bottom: 8px; }
  .footer-copy { font-size: 0.7rem; color: var(--gray); }

  .placeholder-text { font-style: italic; color: var(--gray); font-size: 0.8rem; }

  .empty-state {
    padding: 36px;
    border: 1px dashed var(--dark3);
    border-radius: 4px;
    text-align: center;
    color: var(--gray);
    font-size: 0.8rem;
    line-height: 1.7;
  }