  /* === Fuente de marca (cambiala aqui en un solo sitio) === */
  :root{ --font-display: 'Modern Gothic', 'Helvetica Neue', Helvetica, Arial, sans-serif; }
  @font-face{ font-family:'Modern Gothic'; font-weight:400; font-style:normal; font-display:swap;
    src:url('../fonts/ModernGothic-Regular.woff2') format('woff2'),
        url('../fonts/ModernGothic-Regular.otf')  format('opentype'); }
  @font-face{ font-family:'Modern Gothic'; font-weight:700; font-style:normal; font-display:swap;
    src:url('../fonts/ModernGothic-Bold.woff2') format('woff2'),
        url('../fonts/ModernGothic-Bold.otf')  format('opentype'); }


  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

  :root {
    --bg: #ffffff;
    --ink: #0a0a0a;
    --ink-soft: rgba(10,10,10,0.55);

    /* Mobile (portrait <=680px) */
    --mob-card-w: 32;       /* vw */
    --mob-card-h: 30;       /* vw */
    --mob-radius: 55;       /* vw */
    --mob-perspective: 85;  /* vw */
    --mob-speed: 0.07;

    /* Tablet portrait (681px+ portrait) */
    --tab-card-h: 26;       /* vw */
    --tab-radius: 47;       /* vw */
    --tab-perspective: 60;  /* vh */
    --tab-speed: 0.12;

    /* Desktop landscape */
    --desk-card-h: 17;      /* vw */
    --desk-radius: 30;      /* percent of viewport width */
    --desk-perspective: 140;/* vh */
    --desk-speed: 0.15;
    --desk-tilt: -7;        /* deg */
  }

  html, body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-display);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
  }

  /* ─── Layout shell (full-viewport carousel, chrome floats above) ─ */
  .shell {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: block;
  }

  /* ─── Top bar ────────────────────────────────────────── */
  .topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    padding: 1.5rem 2rem 0;
    gap: 1rem;
    pointer-events: none;
  }
  .topbar > * { pointer-events: auto; }
  .clock {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
  }
  .logo {
    font-size: clamp(36px, 3.8vw, 52px);
    font-weight: 900;
    letter-spacing: -0.01em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
  }
  .tagline {
    justify-self: end;
    text-align: right;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.35;
    text-transform: uppercase;
    white-space: nowrap;
  }

  /* ─── Stage (carousel lives here, fills the viewport) ──── */
  .stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .caption {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.8;
  }
  .caption .year {
    display: block;
    font-weight: 400;
    margin-top: 0.25rem;
  }

  /* ─── Bottom bar ───────────────────────────────────────── */
  .bottombar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    padding: 0 2rem 1.5rem;
    gap: 1rem;
    pointer-events: none;
  }
  .bottombar > * { pointer-events: auto; }
  .nav {
    display: flex;
    gap: 1.75rem;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
  }
  .nav a {
    color: var(--ink);
    text-decoration: none;
    padding-bottom: 3px;
    position: relative;
  }
  .nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  }
  .nav a:hover::after { transform: scaleX(1); }
  .copy-btn-wrap {
    display: flex;
    justify-content: center;
  }
  .copy-btn {
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(10,10,10,0.06);
  }
  .copy-btn:hover { background: rgba(10,10,10,0.1); }
  .copy-btn svg { width: 12px; height: 12px; }
  .email {
    justify-self: end;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
  }
  .email::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--ink);
    transform: scaleX(1);
    transform-origin: right center;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1);
  }
  .email:hover::after {
    transform: scaleX(0);
  }

  /* ─── Carousel 3D (from provided code, tuned) ──────────── */
  .carousel-scene {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    cursor: grab;
  }
  .carousel-scene:active { cursor: grabbing; }

  .carousel-perspective {
    position: absolute;
    inset: 0;
    perspective: 100vw;
    perspective-origin: 50% 50%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ─── Desktop landscape default ─── */
  .carousel-tilt {
    position: relative;
    width: 1px;
    height: calc(var(--desk-card-h) * 1vw);
    transform-style: preserve-3d;
    transform: rotateX(-7deg);
    will-change: transform;
  }
  .carousel-perspective {
    perspective: calc(var(--desk-perspective) * 1vh);
  }

  .carousel-ring {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    will-change: transform;
  }

  .carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    /* each card keeps its natural ratio: height fills the tilt, width from aspect-ratio */
    height: 100%;
    width: auto;
    aspect-ratio: var(--ratio, 0.75);
    background: transparent;
    overflow: hidden;
    will-change: transform;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  }
  /* Horizontal cards (ratio > 1) shrink so they don't overwhelm the ring */
  .carousel-item--wide {
    height: 70%;
  }
  .carousel-item--image { backface-visibility: visible; }
  .carousel-item--image img,
  .carousel-item--video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
  }
  .carousel-item--video { backface-visibility: visible; }
  .carousel-item--text {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 1.8vw;
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.02em;
    backface-visibility: hidden;
    box-shadow: none;
  }

  .hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--ink);
    opacity: 0.35;
    font-size: 10px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    pointer-events: none;
    z-index: 10;
  }

  /* Tablet portrait */
  @media (orientation: portrait) and (min-width: 681px) {
    .carousel-perspective { perspective: calc(var(--tab-perspective) * 1vh); }
    .carousel-tilt {
      width: 1px;
      height: calc(var(--tab-card-h) * 1vw);
      transform: rotateX(0deg);
    }
    .carousel-item--text { font-size: 9vw; }
  }

  @media (max-width: 680px) {
    /* Carousel becomes a full-viewport background layer */
    .shell {
      min-height: 100vh;
      min-height: 100dvh;
      display: block;
      position: relative;
    }
    .topbar {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 5;
      grid-template-columns: 1fr;
      grid-template-areas: "logo";
      padding: 1.5rem 0.625rem 0;
    }
    .topbar .clock    { display: none; }
    .topbar .tagline  { display: none; }
    .topbar .logo     { grid-area: logo; justify-self: center; text-align: center; }

    /* Stage fills the viewport behind everything */
    .stage {
      position: absolute;
      inset: 0;
      min-height: 0;
      padding: 0;
      z-index: 1;
    }
    .carousel-scene {
      height: 100vh;
      height: 100dvh;
    }
    .carousel-perspective { perspective: calc(var(--mob-perspective) * 1vw); }
    .carousel-tilt {
      width: 1px;
      height: calc(var(--mob-card-h) * 1vw);
    }
    .carousel-item--text { font-size: 7vw; }

    /* Footer floats on top */
    .bottombar {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 5;
      grid-template-columns: auto 1fr;
      grid-template-areas: "nav email";
      align-items: center;
      column-gap: 1rem;
      padding: 0 0.625rem 1.5rem;
    }
    .bottombar .nav   { grid-area: nav;   justify-self: start; font-size: 12px; gap: 0.85rem; line-height: 1; }
    .bottombar .email { grid-area: email; justify-self: end;   font-size: 11px; line-height: 1; }

    .logo { font-size: 28px; }
  }

  /* ─── Tweaks panel (all viewports) ───────────────────── */
  .tweaks {
    display: block;
    position: fixed;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(10,10,10,0.12);
    border-radius: 10px;
    padding: 0.85rem 0.9rem;
    font-size: 11px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    width: 210px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .tweaks.collapsed {
    transform: translateY(-50%) translateX(calc(100% - 34px));
    opacity: 0.92;
  }
  .tweaks__toggle {
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    color: var(--ink);
  }
  .tweaks__title {
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    padding-left: 1.2rem;
  }
  .tweaks__viewport {
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(10,10,10,0.55);
    padding-left: 1.2rem;
    margin-bottom: 0.7rem;
  }
  .tweaks__viewport b {
    color: var(--ink);
    font-weight: 700;
  }
  .tweaks__row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 0.6rem;
  }
  .tweaks__row:last-of-type { margin-bottom: 0; }
  .tweaks__row[hidden] { display: none; }
  .tweaks__label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .tweaks__label span:last-child {
    font-weight: 700;
    color: var(--ink);
  }
  .tweaks input[type="range"] {
    width: 100%;
    accent-color: var(--ink);
  }
  .tweaks__dump {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px dashed rgba(10,10,10,0.2);
    font-size: 9.5px;
    line-height: 1.5;
    color: rgba(10,10,10,0.7);
    word-break: break-all;
  }


  /* ─── About (popup / overlay) — esqueleto, disenar luego ─── */
  .about-overlay { position: fixed; inset: 0; z-index: 100; background: var(--bg); color: var(--ink);
    overflow-y: auto; padding: 6rem 2rem; }
  .about-overlay[hidden] { display: none; }
  .about-close { position: fixed; top: 1.25rem; right: 1.5rem; z-index: 101; font-size: 2rem; line-height: 1;
    background: none; border: 0; color: inherit; cursor: pointer; font-family: var(--font-display); }
  .about-content { max-width: 720px; margin: 0 auto; }

  /* ─── Texto del header y footer en negro puro ─── */
  .topbar, .topbar .clock, .topbar .logo, .topbar .tagline,
  .bottombar, .bottombar .nav a, .bottombar .email { color: #000; }
