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

  :root {
    --bg: #ffffff;
    --ink: #0a0a0a;
    --muted: #666;
    --light: #999;
    --line: rgba(10,10,10,0.1);
    --panel: #111111;
    --panel-text: #e8e8e8;
    --panel-muted: #888;
    --sidebar-w: 420px;
  }

  html, body { color-scheme: light only; height: 100%; }
  @media (prefers-color-scheme: dark) {
    html { background: #ffffff !important; }
    body { background: #ffffff !important; color: #0a0a0a !important; }
  }

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.75;
    overflow-x: hidden;
  }

  /* ── PAGE SYSTEM ── */
  .page { display: none; min-height: 100vh; }
  .page.active { display: flex; flex-direction: column; }

  /* ════════════════════════════
     INTRO PAGE
  ════════════════════════════ */
  #page-intro {
    background: #ffffff;
  }

  .intro-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 56px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }

  .intro-nav img {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
  }

  .btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--ink);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    text-decoration: none;
  }
  .btn-resume:hover { opacity: 0.75; }

  .intro-body {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  /* Left: identity */
  .intro-left {
    padding: 64px 56px;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }

  .intro-eyebrow {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--light);
    font-weight: 400;
    margin-bottom: 24px;
  }

  .intro-name {
    font-family: 'Oxanium', sans-serif;
    font-size: clamp(40px, 4.5vw, 72px);
    font-weight: 500;
    line-height: 1.0;
    letter-spacing: -0.03em;
    margin-bottom: 18px;
    white-space: nowrap;
  }

  .intro-title {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 40px;
  }

  .intro-bio {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.85;
    max-width: 400px;
    margin-bottom: 48px;
  }

  .intro-cta {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .btn-ghost {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
    background: none;
    cursor: pointer;
  }
  .btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

  /* Right: video */
  .intro-right {
    padding: 0;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding: 64px 56px;
  }

  .video-label {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--light);
    font-weight: 400;
    margin-bottom: 18px;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .video-label::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--light);
  }

  .video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--ink);
    overflow: hidden;
    cursor: pointer;
    max-height: 50vh;
  }

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

  .video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: opacity 0.25s;
  }
  .video-overlay.hidden { opacity: 0; pointer-events: none; }

  .play-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
  }
  .play-btn:hover { background: rgba(255,255,255,0.2); border-color: #fff; }

  .overlay-text {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
  }

  .fullscreen-btn {
    position: absolute;
    bottom: 12px; right: 12px;
    width: 30px; height: 30px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
  }
  .video-wrapper:hover .fullscreen-btn,
  .video-wrapper.playing .fullscreen-btn { opacity: 1; }
  .fullscreen-btn:hover { background: rgba(0,0,0,0.65); }

  /* ════════════════════════════
     RESUME PAGE
  ════════════════════════════ */
  #page-resume {
    flex-direction: column;
  }

  .resume-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    flex: 1;
  }

  /* Resume nav */
  .resume-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 56px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
    grid-column: 1 / -1;
  }

  .resume-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .resume-nav img {
    width: 32px; height: 32px;
    border-radius: 50%;
  }

  .resume-nav-name {
    font-family: 'Oxanium', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
  }

  .btn-back {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    padding: 0;
    text-decoration: none;
  }
  .btn-back:hover { color: var(--ink); }

  /* Main content */
  .resume-main {
    padding: 32px 56px 80px 56px;
    overflow-y: auto;
  }

  .exp-section { margin-bottom: 56px; }

  .exp-heading {
    font-size: 13px;
    color: var(--light);
    font-weight: 300;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
    max-width: 680px;
  }

  .exp-item { margin-bottom: 24px; }
  .exp-item + .exp-item { padding-top: 24px; border-top: 1px solid var(--line); }

  .exp-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
    max-width: 680px;
  }

  .exp-date {
    font-size: 12px;
    color: var(--light);
    font-weight: 300;
    margin-bottom: 12px;
  }

  .exp-desc {
    font-size: 14px;
    color: #444;
    line-height: 1.8;
    max-width: 680px;
  }
  .exp-desc p + p { margin-top: 12px; }

  /* Sidebar */
  .resume-sidebar {
    background: var(--panel);
    padding: 48px 36px;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .resume-sidebar::-webkit-scrollbar { width: 0; }

  .sidebar-heading {
    font-size: 13px;
    color: var(--panel-muted);
    font-weight: 300;
    margin-bottom: 14px;
  }

  .sidebar-body {
    font-size: 13px;
    color: var(--panel-text);
    line-height: 1.85;
    font-weight: 300;
  }
  .sidebar-body p + p { margin-top: 12px; }

  .skill-list { list-style: none; }
  .skill-list li {
    font-size: 13px;
    color: var(--panel-text);
    line-height: 2.1;
    font-weight: 300;
  }
  .skill-list li::before { content: "• "; color: var(--panel-muted); }

  .contact-link {
    display: block;
    color: var(--panel-text);
    text-decoration: none;
    font-size: 13px;
    line-height: 2.2;
    font-weight: 300;
    transition: color 0.2s;
  }
  .contact-link:hover { color: #fff; }

  .edu-school {
    font-family: 'Oxanium', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--panel-text);
    margin-bottom: 4px;
  }
  .edu-degree { font-size: 12px; color: var(--panel-muted); line-height: 1.6; }
  .edu-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--panel-muted);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1px;
    transition: color 0.2s;
  }
  .edu-link:hover { color: var(--panel-text); }

  /* Footer */
  .site-footer {
    border-top: 1px solid var(--line);
    padding: 20px 56px;
    display: flex;
    justify-content: space-between;
    color: var(--light);
    font-size: 11px;
    letter-spacing: 0.05em;
    grid-column: 1 / -1;
  }

  .colophon {
    position: relative;
    cursor: default;
  }

  .colophon-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--ink);
    color: var(--bg);
    font-size: 11px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    padding: 12px 16px;
    border-radius: 4px;
    line-height: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .colophon-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 12px;
    border: 5px solid transparent;
    border-top-color: var(--ink);
  }

  .colophon:hover .colophon-tip {
    opacity: 1;
  }

  /* ════════════════════════════
     GATEWAY PAGE
  ════════════════════════════ */
  #page-gateway {
    background: #0d0d0d;
    height: 100dvh;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }
  #page-gateway.active { display: flex; }

  .gateway-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    overflow: hidden;
  }

  /* Left panel — Classic */
  .gateway-classic {
    background: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    color: inherit;
  }
  .gateway-classic:hover { background: #f0f0f0; }

  .gateway-classic-label {
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #999;
    font-weight: 400;
    margin-bottom: 20px;
  }

  .gateway-classic-title {
    font-family: 'Oxanium', sans-serif;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 500;
    color: #0a0a0a;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
  }

  .gateway-classic-sub {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 320px;
  }

  /* Mini resume preview */
  .gateway-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 40px;
    max-width: 300px;
  }
  .preview-line {
    height: 8px;
    background: rgba(10,10,10,0.12);
    border-radius: 2px;
  }
  .preview-line.short { width: 55%; }
  .preview-line.medium { width: 75%; }
  .preview-line.full { width: 100%; }
  .preview-line.title { height: 14px; background: rgba(10,10,10,0.2); width: 65%; }

  .gateway-classic-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    color: #0a0a0a;
    text-decoration: none;
    border: 1px solid rgba(10,10,10,0.2);
    padding: 12px 24px;
    transition: background 0.2s, border-color 0.2s;
    cursor: pointer;
    background: none;
  }
  .gateway-classic-cta:hover {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
  }

  /* Divider */
  .gateway-divider {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10;
  }
  .gateway-divider::before,
  .gateway-divider::after {
    content: '';
    display: block;
    width: 1px;
    height: 80px;
    background: rgba(128,128,128,0.4);
  }
  .gateway-or {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #888;
    font-family: 'DM Sans', sans-serif;
    background: #888;
    color: #fff;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 400;
  }

  /* Right panel — VALLE+ */
  .gateway-streaming {
    background: #0d0d0d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
    color: inherit;
  }
  .gateway-streaming:hover { background: #111; }

  .gateway-bg-video {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.15;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: hue-rotate(140deg) saturate(1.6);
  }

  .gateway-streaming-content {
    position: relative;
    z-index: 2;
  }

  .gateway-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
  }

  .gateway-platform-logo {
    font-family: 'Space Grotesk', 'Oxanium', sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: #0072d2;
    text-shadow: 0 0 30px rgba(0,114,210,0.4);
  }

  .gateway-streaming-title {
    font-family: 'Syne', 'Oxanium', sans-serif;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    color: #f5f5f5;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 14px;
  }

  .gateway-streaming-tag {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 40px;
  }

  .gateway-streaming-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    background: #0072d2;
    border: 1px solid #0072d2;
    padding: 12px 28px;
    transition: background 0.2s, box-shadow 0.2s;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0,114,210,0.25);
  }
  .gateway-streaming-cta:hover {
    background: #0058a8;
    box-shadow: 0 0 35px rgba(0,114,210,0.45);
  }

  /* Gateway footer */
  .gateway-footer {
    padding: 20px 64px;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0d0d0d;
  }
  .gateway-footer-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
  }
  .gateway-footer-copy {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
  }

  @media (max-width: 768px) {
    .gateway-body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .gateway-classic,
    .gateway-streaming { padding: 36px 28px; overflow-y: auto; }
    .gateway-preview { display: none; }
    .gateway-divider { flex-direction: row; top: 50%; left: 0; right: 0; transform: translateY(-50%); width: 100%; justify-content: center; }
    .gateway-divider::before,
    .gateway-divider::after { width: 80px; height: 1px; }
    .gateway-footer { padding: 14px 24px; }
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 900px) {
    .intro-body { grid-template-columns: 1fr; }
    .intro-left { border-right: none; border-bottom: 1px solid var(--line); padding: 48px 24px; }
    .intro-right { padding: 48px 24px; }
    .intro-nav { padding: 20px 24px; }

    .resume-layout { grid-template-columns: 1fr; }
    .resume-nav { padding: 16px 24px; }
    .resume-main { padding: 40px 24px 60px; }
    .resume-sidebar {
      position: static;
      height: auto;
      padding: 40px 24px;
    }
    .site-footer { padding: 20px 24px; flex-direction: column; gap: 8px; }
  }

  @media (max-width: 480px) {
    .intro-nav { padding: 16px; }
    .intro-left { padding: 40px 16px; }
    .intro-right { padding: 36px 16px; }
    .intro-name { font-size: clamp(32px, 10vw, 48px); }
    .resume-nav { padding: 14px 16px; }
    .resume-main { padding: 32px 16px 48px; }
    .resume-sidebar { padding: 32px 16px; }
    .site-footer { padding: 16px; }
  }
