  :root {
    --bg: #030308;
    --fg: #f0ede6;
    --accent: #ff4d00;
    --accent2: #00d4ff;
    --accent3: #b8ff3c;
    --mid: #1a1a2e;
    --glow: rgba(255, 77, 0, 0.4);
  }

  /* ═══════════════════════════════
   PAGE LOADER
═══════════════════════════════ */
  #loader {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition: opacity 0.65s cubic-bezier(0.76, 0, 0.24, 1),
      visibility 0.65s;
    overflow: hidden;
  }

  #loader.ld-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  /* Moving scan line */
  #ld-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 77, 0, 0.7),
        rgba(0, 212, 255, 0.7),
        transparent);
    animation: ldScan 2.2s linear infinite;
    pointer-events: none;
    z-index: 1;
  }

  @keyframes ldScan {
    0% {
      top: -2px;
    }

    100% {
      top: 100%;
    }
  }

  /* Noise grain on loader */
  #loader::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
  }

  /* Brand mark */
  .ld-brand-mark {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 44px;
    letter-spacing: 8px;
    color: var(--fg);
    z-index: 2;
    animation: ldFadeUp 0.6s 0.1s both;
  }

  .ld-brand-mark span {
    color: var(--accent);
  }

  /* Editor window */
  .ld-window {
    width: min(540px, 92vw);
    background: #0b0b18;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
      0 32px 80px rgba(0, 0, 0, 0.7),
      0 0 0 1px rgba(255, 77, 0, 0.05),
      0 0 80px rgba(0, 212, 255, 0.04);
    z-index: 2;
    animation: ldFadeUp 0.6s 0.2s both;
  }

  /* Title bar */
  .ld-titlebar {
    background: #12121f;
    padding: 11px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .ld-traffic {
    display: flex;
    gap: 7px;
    align-items: center;
  }

  .ld-trafdot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
  }

  .ld-winlabel {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(240, 237, 230, 0.35);
    letter-spacing: 0.5px;
  }

  /* Toolbar */
  .ld-tools {
    display: flex;
    gap: 6px;
  }

  .ld-tool {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    width: 20px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(240, 237, 230, 0.32);
    border-radius: 3px;
    transition: color 0.25s, background 0.25s;
  }

  .ld-tool.active {
    color: var(--accent);
    background: rgba(255, 77, 0, 0.14);
    box-shadow: 0 0 0 1px rgba(255, 77, 0, 0.25) inset;
  }

  /* Workspace = layers panel + design canvas */
  .ld-workspace {
    display: flex;
    min-height: 210px;
    max-height: 240px;
    background: #0b0b18;
  }

  .ld-layers {
    width: 132px;
    padding: 10px 8px;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
  }

  .ld-layers-title {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.28);
    padding: 0 4px 8px;
  }

  .ld-layer-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .ld-layer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 5px;
    border-radius: 3px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: rgba(240, 237, 230, 0.55);
    opacity: 0;
    transform: translateX(-6px);
    animation: ldLayerIn 0.28s forwards;
  }

  .ld-layer.active {
    background: rgba(0, 212, 255, 0.10);
    color: var(--fg);
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.22);
  }

  .ld-layer-ico {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--accent);
    flex-shrink: 0;
    opacity: 0.85;
  }

  .ld-layer-ico.ico-frame   { background: transparent; box-shadow: inset 0 0 0 1px var(--accent); }
  .ld-layer-ico.ico-text    { background: var(--accent3); }
  .ld-layer-ico.ico-button  { background: var(--accent); border-radius: 4px; }
  .ld-layer-ico.ico-image   { background: linear-gradient(135deg, var(--accent2), var(--accent)); }
  .ld-layer-ico.ico-card    { background: rgba(240,237,230,0.18); box-shadow: inset 0 0 0 1px rgba(240,237,230,0.3); }
  .ld-layer-ico.ico-flow    { background: var(--accent2); border-radius: 50%; }

  @keyframes ldLayerIn {
    to { opacity: 1; transform: none; }
  }

  /* Design canvas */
  .ld-canvas {
    position: relative;
    flex: 1;
    padding: 10px 12px;
    background:
      radial-gradient(circle at 50% 50%, rgba(255,77,0,0.04), transparent 70%),
      repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 16px),
      repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 1px, transparent 1px 16px);
  }

  #ld-art {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
  }

  #ld-art .draw {
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: ldDraw 0.55s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  }

  #ld-art .pop {
    opacity: 0;
    transform-origin: center;
    transform-box: fill-box;
    animation: ldPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  }

  #ld-art .fade {
    opacity: 0;
    animation: ldFade 0.32s forwards;
  }

  @keyframes ldDraw { to { stroke-dashoffset: 0; } }
  @keyframes ldPop  { 0% { opacity: 0; transform: scale(0.55); } 100% { opacity: 1; transform: scale(1); } }
  @keyframes ldFade { to { opacity: 1; } }

  /* Figma-style cursor pointer */
  .ld-figcursor {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    pointer-events: none;
    z-index: 3;
    transition:
      left 0.42s cubic-bezier(0.5, 1.4, 0.4, 1),
      top  0.42s cubic-bezier(0.5, 1.4, 0.4, 1);
    filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.55));
  }

  .ld-figcursor::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-left: 10px solid var(--accent2);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    transform: rotate(38deg);
  }

  .ld-figcursor::after {
    content: 'VN';
    position: absolute;
    left: 12px;
    top: 12px;
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    padding: 2px 5px;
    background: var(--accent2);
    color: #03030a;
    border-radius: 3px;
    white-space: nowrap;
    font-weight: 700;
  }

  /* Footer */
  .ld-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #09091a;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }

  .ld-status {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.38);
    flex-shrink: 0;
    min-width: 140px;
    transition: color 0.3s;
  }

  .ld-progress-wrap {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: visible;
    position: relative;
  }

  .ld-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.3s ease;
    position: relative;
  }

  .ld-progress::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--accent2);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent2);
  }

  .ld-pct {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    min-width: 44px;
    text-align: right;
  }

  /* Skip hint */
  .ld-hint {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.18);
    z-index: 2;
    animation: ldFadeUp 0.6s 0.4s both;
  }

  @keyframes ldFadeUp {
    from {
      opacity: 0;
      transform: translateY(16px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Responsive */
  @media (max-width: 480px) {
    .ld-winlabel { display: none; }
    .ld-layers { width: 96px; }
    .ld-layer { font-size: 9px; }
  }

  /* ─────────────────────────────── */

  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: 'Space Mono', monospace;
    overflow-x: hidden;
    cursor: none;
  }

  /* CUSTOM CURSOR */
  #cursor {
    position: fixed;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
    z-index: 9999;
    mix-blend-mode: difference;
  }

  #cursor-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    background: var(--accent2);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    mix-blend-mode: screen;
    transition: all 0.05s;
  }

  /* CANVAS BG */
  #bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  /* NAV */
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 60px;
    mix-blend-mode: normal;
    transition: background 0.4s;
  }

  nav.scrolled {
    background: rgba(3, 3, 8, 0.85);
    backdrop-filter: blur(12px);
  }

  .nav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 4px;
    color: var(--fg);
    text-decoration: none;
  }

  .nav-logo span {
    color: var(--accent);
  }

  .nav-links {
    display: flex;
    gap: 36px;
  }

  .nav-links a {
    color: var(--fg);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
  }

  .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
  }

  .nav-links a:hover {
    color: var(--accent);
  }

  .nav-links a:hover::after {
    width: 100%;
  }

  /* SECTIONS */
  section {
    position: relative;
    z-index: 1;
  }

  /* ─── HERO ─── */
  #hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    overflow: hidden;
    padding: 0 40px;
  }

  .hero-eyebrow {
    font-size: 11px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.3s forwards;
  }

  .hero-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(72px, 12vw, 180px);
    line-height: 0.9;
    letter-spacing: -2px;
    color: var(--fg);
    opacity: 0;
    transform: translateY(60px);
    animation: fadeUp 1s 0.5s forwards;
    position: relative;
  }

  .hero-name .accent {
    color: var(--accent);
  }

  .hero-name .outline {
    -webkit-text-stroke: 2px var(--fg);
    color: transparent;
  }

  .hero-role {
    font-family: 'Syne', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 400;
    color: rgba(240, 237, 230, 0.6);
    margin-top: 20px;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 0.9s forwards;
  }

  .hero-stats {
    display: flex;
    gap: 60px;
    margin-top: 60px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 1.2s forwards;
  }

  .stat {
    text-align: center;
  }

  .stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 52px;
    color: var(--accent);
    line-height: 1;
  }

  .stat-label {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.5);
    margin-top: 4px;
  }

  .hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    animation: bounce 2s infinite 2s;
  }

  .hero-scroll span {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
  }

  .scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollGrow 2s infinite;
  }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bounce {

    0%,
    100% {
      transform: translateX(-50%) translateY(0);
    }

    50% {
      transform: translateX(-50%) translateY(8px);
    }
  }

  @keyframes scrollGrow {
    0% {
      transform: scaleY(0);
      transform-origin: top;
    }

    50% {
      transform: scaleY(1);
      transform-origin: top;
    }

    100% {
      transform: scaleY(0);
      transform-origin: bottom;
    }
  }

  /* ─── PARALLAX MARQUEE ─── */
  .marquee-wrap {
    overflow: hidden;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 77, 0, 0.04);
  }

  .marquee-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: marquee 30s linear infinite;
  }

  .marquee-item {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 6px;
    white-space: nowrap;
    color: rgba(240, 237, 230, 0.15);
  }

  .marquee-item.accent {
    color: var(--accent);
    opacity: 0.7;
  }

  @keyframes marquee {
    to {
      transform: translateX(-50%);
    }
  }

  /* ─── ABOUT ─── */
  #about {
    padding: 160px 60px;
    display: grid;
    gap: 80px;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
  }

  .about-left {
    position: relative;
  }

  .about-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-width: 420px;
  }

  .about-img-bg {
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    opacity: 0.15;
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    transition: clip-path 0.6s ease;
  }

  .about-img-wrap:hover .about-img-bg {
    clip-path: polygon(10% 0, 100% 10%, 90% 100%, 0 90%);
  }

  .about-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 140px;
    color: rgba(255, 77, 0, 0.2);
    clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 8% 100%, 0 92%);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 77, 0, 0.2);
  }

  .about-avatar::before {
    content: 'VN';
    position: relative;
    z-index: 1;
  }

  .about-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0, 212, 255, 0.1));
  }

  .about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 14px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 75%, 85% 100%, 0 100%);
  }

  .about-years {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    display: block;
    line-height: 1;
  }

  .section-label {
    font-size: 10px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .section-label::before {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
  }

  .about-heading {
    font-family: 'Syne', sans-serif;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 28px;
  }

  .about-heading em {
    font-style: normal;
    color: var(--accent);
  }

  .about-text {
    color: rgba(240, 237, 230, 0.65);
    line-height: 1.9;
    font-size: 14px;
    margin-bottom: 20px;
  }

  .skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
  }

  .skill-tag {
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.7);
    clip-path: polygon(0 0, 100% 0, 100% 60%, 90% 100%, 0 100%);
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
    cursor: default;
  }

  .skill-tag:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    clip-path: polygon(10% 0, 100% 0, 100% 100%, 90% 100%, 0 40%);
  }

  /* ─── EXPERIENCE ─── */
  #experience {
    padding: 160px 60px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .exp-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 80px;
  }

  .section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(60px, 8vw, 120px);
    line-height: 0.9;
    letter-spacing: -1px;
  }

  .section-heading .outline {
    -webkit-text-stroke: 1px rgba(240, 237, 230, 0.2);
    color: transparent;
    display: block;
  }

  .timeline {
    position: relative;
    padding-left: 40px;
  }

  .timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), transparent);
  }

  .exp-item {
    position: relative;
    margin-bottom: 70px;
    transform: translateX(60px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .exp-item.visible {
    transform: translateX(0);
    opacity: 1;
  }

  .exp-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 8px;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: var(--bg);
    transition: background 0.3s;
  }

  .exp-item:hover::before {
    background: var(--accent);
  }

  .exp-company {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    letter-spacing: 2px;
    color: var(--fg);
    margin-bottom: 4px;
  }

  .exp-role {
    color: var(--accent2);
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  .exp-period {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(240, 237, 230, 0.35);
    margin-bottom: 16px;
  }

  .exp-desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(240, 237, 230, 0.6);
    max-width: 680px;
  }

  .exp-award {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 8px 16px;
    background: rgba(184, 255, 60, 0.08);
    border: 1px solid rgba(184, 255, 60, 0.3);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent3);
  }

  /* ─── PROJECTS / BIG PARALLAX ─── */
  #projects {
    padding: 80px 0 160px;
    overflow: hidden;
    position: relative;
  }

  /* ── Lottie fixed overlay (screen-blend over dark scenes) ── */
  #proj-lottie-fixed {
    position: fixed;
    inset: 0;
    z-index: 4;
    /* above scenes (z:1) but below nav */
    pointer-events: none;
    mix-blend-mode: screen;
    /* glows over dark backgrounds, invisible on black */
    opacity: 0;
    transition: opacity 0.7s ease;
    will-change: opacity;
  }

  #proj-lottie-fixed.lottie-active {
    opacity: 1;
  }

  #proj-lottie-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130vmin;
    height: 130vmin;
  }

  /* lottie-web creates the canvas INSIDE #proj-lottie-container */
  #proj-lottie-container canvas {
    width: 100% !important;
    height: 100% !important;
  }

  #proj-lottie-vignette {
    position: absolute;
    inset: 0;
    /* screen-blend safe vignette – radial dark mask (black = invisible with screen) */
    background: radial-gradient(ellipse 55% 50% at 50% 50%,
        transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    mix-blend-mode: multiply;
    /* darkens edges without affecting screen result */
  }

  .projects-header {
    padding: 0 60px;
    margin-bottom: 80px;
  }

  .project-parallax-scene {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 4px;
    z-index: 1;
    /* above Lottie layer */
  }

  .proj-bg-layer {
    position: absolute;
    inset: -20%;
    background-size: cover;
    background-position: center;
    transform: translateY(var(--parallax-y, 0px));
    will-change: transform;
    transition: transform 0.02s linear;
  }

  .proj-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px;
  }

  .proj-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 180px;
    color: rgba(255, 77, 0, 0.08);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: -6px;
  }

  .proj-card {
    background: rgba(3, 3, 8, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 60px;
    clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
    max-width: 1000px;
    transform: translateY(60px);
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .proj-card.visible {
    transform: translateY(0);
    opacity: 1;
  }

  .proj-tag {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 20px;
    display: block;
  }

  .proj-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .proj-text {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(240, 237, 230, 0.6);
  }

  .proj-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
  }

  .proj-tech span {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    color: var(--accent2);
  }

  /* SCENE BACKGROUNDS */
  .scene-1 {
    background: radial-gradient(ellipse at 30% 50%, #1a0a00 0%, #030308 70%), url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff4d00' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }

  .scene-2 {
    background: radial-gradient(ellipse at 70% 50%, #00101a 0%, #030308 70%);
  }

  .scene-3 {
    background: radial-gradient(ellipse at 50% 30%, #0a1a00 0%, #030308 70%);
  }

  /* ─── SKILLS VISUAL ─── */
  #skills {
    padding: 160px 60px;
    max-width: 1400px;
    margin: 0 auto;
  }

  .skills-bars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 60px;
    margin-top: 60px;
  }

  .skill-bar-item {
    will-change: transform, opacity;
    /* GSAP controls reveal — no CSS opacity:0 here */
  }

  .skill-bar-item.visible {
    transform: translateX(0);
    opacity: 1;
  }

  .skill-bar-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .skill-bar-name {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  .skill-bar-pct {
    font-size: 11px;
    color: var(--accent);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
  }

  .skill-bar-track {
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    position: relative;
    overflow: hidden;
  }

  .skill-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, var(--accent), var(--accent2));
    transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
  }

  .skill-bar-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--accent2);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent2);
  }

  /* ─── AI TOOLS ─── */
  #ai-tools {
    padding: 80px 60px 160px;
    overflow: hidden;
  }

  .ai-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 60px;
  }

  .ai-card {
    padding: 40px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: default;
    /* hidden until observer fires */
    opacity: 0;
    transform: translateY(60px) scale(0.88);
    transition:
      opacity    0.7s cubic-bezier(0.16, 1, 0.3, 1),
      transform  0.7s cubic-bezier(0.16, 1, 0.3, 1),
      box-shadow 0.35s ease,
      border-color 0.35s ease;
  }

  /* CSS stagger — 110ms between cards */
  .ai-card:nth-child(1) { transition-delay: 0s; }
  .ai-card:nth-child(2) { transition-delay: 0.11s; }
  .ai-card:nth-child(3) { transition-delay: 0.22s; }
  .ai-card:nth-child(4) { transition-delay: 0.33s; }
  .ai-card:nth-child(5) { transition-delay: 0.44s; }

  /* revealed state */
  .ai-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 77, 0, 0.1);
  }

  /* hover only once visible so hidden cards don't jump */
  .ai-card.visible:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: rgba(255, 77, 0, 0.5);
    box-shadow:
      0 28px 60px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 77, 0, 0.4),
      0 0 40px rgba(255, 77, 0, 0.1);
    transition-delay: 0s;
  }

  /* shimmer overlay on hover */
  .ai-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    opacity: 0;
    transition: opacity 0.4s;
  }
  .ai-card.visible:hover::before { opacity: 0.08; }

  /* top accent line grows on reveal */
  .ai-card::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: inherit;
  }
  .ai-card.visible::after { width: 55%; }
  .ai-card.visible:hover::after { width: 100%; transition-delay: 0s; }

  /* icon — always visible, pulse on hover */
  .ai-icon {
    font-size: 44px;
    margin-bottom: 18px;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .ai-card.visible:hover .ai-icon {
    animation: iconPulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  @keyframes iconPulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
  }

  /* name & desc — always visible, no independent opacity */
  .ai-name {
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
    color: var(--fg);
  }
  .ai-desc {
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(240, 237, 230, 0.45);
    position: relative;
    z-index: 1;
    line-height: 1.6;
  }

  /* ─── CONTACT ─── */
  #contact {
    padding: 160px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
  }

  #contact::before {
    content: 'HELLO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(100px, 18vw, 280px);
    color: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 20px;
  }

  .contact-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(52px, 8vw, 110px);
    line-height: 1;
    margin-bottom: 28px;
    position: relative;
  }

  .contact-sub {
    color: rgba(240, 237, 230, 0.5);
    font-size: 14px;
    line-height: 1.8;
    max-width: 500px;
    margin: 0 auto 48px;
    position: relative;
  }

  .contact-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
  }

  .contact-link {
    padding: 16px 36px;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: color 0.3s;
  }

  .contact-link.primary {
    background: var(--accent);
    color: #fff;
    clip-path: polygon(0 0, 90% 0, 100% 30%, 100% 100%, 10% 100%, 0 70%);
  }

  .contact-link.secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--fg);
  }

  .contact-link.secondary:hover {
    border-color: var(--accent2);
    color: var(--accent2);
  }

  /* FOOTER */
  footer {
    padding: 40px 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
  }

  .footer-copy {
    font-size: 11px;
    color: rgba(240, 237, 230, 0.3);
    letter-spacing: 2px;
  }

  .footer-built {
    font-size: 10px;
    color: rgba(240, 237, 230, 0.2);
    letter-spacing: 1px;
  }

  /* PARALLAX IMAGE CROP EFFECT */
  .crop-scene {
    height: 60vh;
    overflow: hidden;
    position: relative;
    margin: 0;
  }

  .crop-inner {
    position: absolute;
    inset: -30%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a00 50%, #001a0a 100%);
    will-change: transform;
  }

  .crop-text-giant {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(80px, 15vw, 220px);
    letter-spacing: -4px;
    background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.7;
    white-space: nowrap;
    will-change: transform;
  }

  .crop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg) 0%, transparent 20%, transparent 80%, var(--bg) 100%);
    pointer-events: none;
    z-index: 2;
  }

  /* FLOATING ELEMENTS */
  .float-el {
    position: absolute;
    animation: float 6s ease-in-out infinite;
    opacity: 0.4;
    pointer-events: none;
  }

  @keyframes float {

    0%,
    100% {
      transform: translateY(0) rotate(0deg);
    }

    50% {
      transform: translateY(-20px) rotate(5deg);
    }
  }

  /* GRAIN OVERLAY */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1000;
  }

  /* SCROLL REVEAL BASE */
  .reveal {
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal.visible {
    transform: translateY(0);
    opacity: 1;
  }

  /* ─── PORTFOLIO GALLERY ─── */
  #portfolio {
    padding: 160px 60px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
  }

  .portfolio-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 80px;
    gap: 40px;
    flex-wrap: wrap;
  }

  .portfolio-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .filter-btn {
    padding: 8px 22px;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(240, 237, 230, 0.5);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Space Mono', monospace;
  }

  .filter-btn:hover,
  .filter-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 77, 0, 0.07);
  }

  /* MASONRY-STYLE GRID */
  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .port-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transform: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    text-decoration: none;
  }

  .port-item:hover {
    border-color: rgba(255, 77, 0, 0.35);
  }

  .port-item,
  .port-item.visible {
    opacity: 1 !important;
  }

  .port-item > * {
    pointer-events: auto;
  }

  /* Uniform 3-column layout — no spanning */
  .port-img {
    width: 100%;
    height: 220px;
    flex: 0 0 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .port-img img {
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .port-item:hover .port-img img {
    transform: scale(1.06);
  }

  /* SVG-generated placeholder images with unique visual designs */
  .port-img svg {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
  }

  /* Always-visible meta panel below the image (no hover-only reveal) */
  .port-overlay {
    position: static;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 1;
    display: flex;
    flex-direction: column;
    padding: 18px 20px 20px;
    z-index: 2;
  }

  .port-tag {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
  }

  .port-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(15px, 2vw, 20px);
    font-weight: 800;
    line-height: 1.25;
    color: var(--fg);
  }

  .port-stack {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
  }

  .port-stack span {
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(240, 237, 230, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .port-corner {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transform: scale(0.7) rotate(-45deg);
    transition: opacity 0.3s 0.1s, transform 0.3s 0.1s;
    z-index: 3;
  }

  .port-item:hover .port-corner {
    opacity: 1;
    transform: scale(1) rotate(0);
  }

  /* Numbered label top-left on each card */
  .port-num {
    position: absolute;
    top: 16px;
    left: 16px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.25);
    z-index: 3;
  }

  /* Lightbox */
  #lightbox {
    position: fixed;
    inset: 0;
    background: rgba(3, 3, 8, 0.96);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
    backdrop-filter: blur(12px);
  }

  #lightbox.open {
    opacity: 1;
    pointer-events: all;
  }

  .lb-inner {
    max-width: 1100px;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  #lightbox.open .lb-inner {
    transform: scale(1);
  }

  .lb-img-wrap {
    width: 100%;
    max-height: 70vh;
    min-height: 320px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050510;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
  }

  .lb-img-wrap svg {
    width: 100%;
    height: 100%;
  }

  .lb-meta {
    padding: 28px 0 0;
    display: flex;
    gap: 32px;
    align-items: flex-start;
  }

  .lb-text {
    flex: 1;
    min-width: 0;
  }

  .lb-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800;
  }

  .lb-desc {
    font-size: 13px;
    color: rgba(240, 237, 230, 0.55);
    line-height: 1.8;
    margin-top: 10px;
    max-width: 580px;
  }

  .lb-close {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--fg);
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s;
    font-family: 'Space Mono', monospace;
  }

  .lb-close:hover {
    background: var(--accent);
    border-color: var(--accent);
  }

  /* ── Lightbox action buttons (right column) ── */
  .lb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
    min-width: 200px;
    align-items: stretch;
  }

  .lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: transform 0.25s ease, background 0.25s, border-color 0.25s, color 0.25s;
    line-height: 1;
    white-space: nowrap;
  }

  .lb-btn span {
    font-size: 14px;
    line-height: 1;
  }

  .lb-btn-visit {
    background: var(--accent);
    color: #03030a;
    border-color: var(--accent);
  }

  .lb-btn-visit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 77, 0, 0.35);
  }

  .lb-btn-gallery {
    background: transparent;
    color: var(--fg);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .lb-btn-gallery:hover {
    border-color: var(--accent2);
    color: var(--accent2);
    transform: translateY(-2px);
  }

  .lb-btn-disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(240, 237, 230, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
    pointer-events: none;
    cursor: default;
  }

  /* ── Lightbox image nav arrows + counter ── */
  .lb-img-wrap { position: relative; }

  .lb-img-wrap img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }

  .lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(3, 3, 8, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--fg);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
  }

  .lb-nav:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #03030a;
  }

  .lb-prev { left: 14px; }
  .lb-next { right: 14px; }

  .lb-counter {
    position: absolute;
    bottom: 14px;
    right: 14px;
    padding: 4px 10px;
    background: rgba(3, 3, 8, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(240, 237, 230, 0.7);
    z-index: 5;
    backdrop-filter: blur(8px);
  }

  /* On narrow screens, stack actions under the text */
  @media (max-width: 640px) {
    .lb-meta { flex-direction: column; gap: 18px; }
    .lb-actions { width: 100%; min-width: 0; }
  }

  @media (max-width: 768px) {
    nav {
      padding: 20px 24px;
    }

    .nav-links {
      display: none;
    }

    #about {
      padding: 80px 24px;
    }

    #experience,
    #skills,
    #ai-tools,
    #contact,
    #portfolio {
      padding: 80px 24px;
    }

    .hero-stats {
      gap: 32px;
    }

    .skills-bars {
      grid-template-columns: 1fr;
    }

    .ai-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    #projects .proj-card {
      padding: 36px 24px;
    }

    footer {
      flex-direction: column;
      gap: 12px;
      text-align: center;
    }

    .portfolio-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 18px;
    }
  }

  @media (max-width: 560px) {
    .portfolio-grid {
      grid-template-columns: 1fr;
    }
  }

  .port-img img {
    width: 100%;
    height: 100%;
  }

  .portfolio-grid a {
    display: block;
    width: 100%;
  }

  /* ─── SCROLL FRAME SEQUENCE ─── */
  #scroll-seq-wrapper {
    /* tall enough to scroll through all 56 frames: 1 frame per ~60px = ~3500px */
    height: 3600px;
    position: relative;
    z-index: 1;
  }

  #scroll-seq-sticky {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
  }

  #scroll-seq-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* ─── Overlay text ─── */
  #scroll-seq-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    pointer-events: none;
    padding: 0 40px 72px;
    z-index: 10;
  }

  .seq-label {
    font-size: 11px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent2);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .seq-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(64px, 12vw, 160px);
    line-height: 0.9;
    letter-spacing: -2px;
    color: var(--fg);
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .seq-outline {
    -webkit-text-stroke: 2px var(--accent);
    color: transparent;
    display: block;
  }

  .seq-sub {
    font-family: 'Syne', sans-serif;
    font-size: clamp(14px, 2vw, 20px);
    color: rgba(240, 237, 230, 0.6);
    margin-top: 24px;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
  }

  /* Visible state toggled by JS */
  #scroll-seq-overlay.text-visible .seq-label,
  #scroll-seq-overlay.text-visible .seq-heading,
  #scroll-seq-overlay.text-visible .seq-sub {
    opacity: 1;
    transform: translateY(0);
  }

  #scroll-seq-overlay.text-phase2 .seq-label {
    opacity: 0;
    transform: translateY(-20px);
  }

  #scroll-seq-overlay.text-phase2 .seq-heading {
    opacity: 0;
    transform: translateY(-40px);
  }

  #scroll-seq-overlay.text-phase2 .seq-sub {
    opacity: 0;
    transform: translateY(-20px);
  }

  /* ─── Progress bar ─── */
  #scroll-seq-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 20;
  }

  #scroll-seq-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent), var(--accent2));
    transition: width 0.05s linear;
    position: relative;
  }

  #scroll-seq-bar::after {
    content: '';
    position: absolute;
    right: -1px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--accent2);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent2);
  }

  /* ─── Scroll hint ─── */
  .seq-scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 20;
    transition: opacity 0.5s;
  }

  .seq-scroll-hint span {
    font-size: 9px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(240, 237, 230, 0.5);
  }

  .seq-scroll-arrow {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 77, 0, 0.8), transparent);
    animation: seqArrow 1.5s ease-in-out infinite;
  }

  @keyframes seqArrow {
    0% {
      transform: scaleY(0);
      transform-origin: top;
      opacity: 1;
    }

    50% {
      transform: scaleY(1);
      transform-origin: top;
      opacity: 1;
    }

    100% {
      transform: scaleY(1);
      transform-origin: bottom;
      opacity: 0;
    }
  }

  .seq-scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
  }

  /* Vignette overlay on top of canvas */
  #scroll-seq-sticky::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 5;
    pointer-events: none;
  }

  /* ─── Responsive ─── */
  @media (max-width: 768px) {
    #scroll-seq-wrapper {
      height: 2800px;
    }

    .seq-heading {
      font-size: 64px;
    }
  }

  /* ══════════════════════════════════════════════╗
     GSAP + MOTION ONE  — animation support styles
  ╚══════════════════════════════════════════════ */

  /* Section heading clip-path start (GSAP controls the reveal scrub) */
  .section-heading {
    will-change: clip-path, transform, opacity;
  }

  /* Char / word split helpers injected by scroll-animations.js */
  .gsap-char,
  .gsap-inner {
    display: inline-block;
    will-change: transform, opacity;
  }
  .gsap-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
  }

  /* Ensure port images have overflow hidden for parallax scrub */
  .port-img {
    overflow: hidden;
  }
  .port-img img {
    will-change: transform;
    transform-origin: center center;
  }

  /* Skill bar fill — transition guard (Motion One will control it) */
  .skill-bar-fill {
    will-change: width;
    transition: none !important; /* let GSAP/Motion handle it */
  }

  /* AI card 3-D  perspective context */
  .ai-grid {
    perspective: 900px;
  }
  .ai-card {
    will-change: transform, opacity;
    backface-visibility: hidden;
  }

  /* Proj card perspective context */
  .timeline {
    perspective: 1000px;
  }
  .exp-item {
    will-change: transform, opacity;
    /* Remove CSS transition — GSAP takes over */
    transition: none !important;
  }

  /* Experience award badge pop on hover */
  .exp-award {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .exp-award:hover {
    transform: translateX(4px);
    box-shadow: -4px 0 0 var(--accent3);
  }

  /* Filter button ripple */
  .filter-btn {
    position: relative;
    overflow: hidden;
  }
  .filter-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,77,0,0.3), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
  }
  .filter-btn:active::after {
    opacity: 1;
  }

  /* Crop parallax giant text — Motion One letter-spacing will override */
  .crop-text-giant {
    will-change: letter-spacing, transform, opacity;
  }

  /* Scroll progress bar glow pulse */
  @keyframes progressPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,212,255,0.6); }
    50%       { box-shadow: 0 0 18px rgba(255,77,0,0.7); }
  }
  #gsap-progress-bar {
    animation: progressPulse 2.5s ease-in-out infinite;
  }

  /* Proj card — remove CSS transform so we don't fight GSAP */
  .proj-card {
    will-change: transform, opacity;
  }

  /* ══════════════════════════════════════════════════════════
     APPLE-STYLE SCROLL EFFECTS — CSS
  ══════════════════════════════════════════════════════════ */

  /* ── HERO ZOOM WRAP ── */
  #hero {
    clip-path: inset(0% 0% 0% 0% round 0px);
    will-change: clip-path;
  }

  #hero-zoom-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    will-change: transform, opacity, filter;
  }

  #hero-zoom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    transform-origin: center center;
    will-change: transform, opacity, filter;
  }

  /* ── WORD SCRUB SECTION ── */
  #word-scrub-section {
    position: relative;
    background: var(--bg);
    padding: 0;
    /* Height controls how long the pin lasts */
    height: 280vh;
    z-index: 1;
  }

  #word-scrub-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(24px, 8vw, 180px);
  }

  #word-scrub-text {
    font-family: 'Syne', sans-serif;
    font-size: clamp(22px, 3.8vw, 58px);
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    max-width: 1100px;
    color: rgba(240,237,230,0.15);
    margin: 0;
  }

  .ws-word {
    display: inline-block;
    color: rgba(240,237,230,0.15);
    transition: color 0s; /* GSAP handles this */
    will-change: opacity, color;
  }

  /* ── PINNED FEATURE SHOWCASE ── */
  #feature-showcase {
    position: relative;
    background: var(--bg);
    z-index: 1;
    /* Height is controlled by GSAP pinSpacing:true — do NOT set min-height here */
  }

  #feature-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0;
    overflow: hidden;
    padding: 80px clamp(24px, 6vw, 100px);
  }

  /* Visual side */
  #feature-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
  }

  .feature-bg-circle {
    position: absolute;
    width: 540px;
    height: 540px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,77,0,0.12) 0%, transparent 70%);
    pointer-events: none;
    transition: background 0.6s ease;
  }

  #feature-icon-wrap {
    position: relative;
    width: 200px;
    height: 200px;
    z-index: 2;
  }

  .feature-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    filter: drop-shadow(0 0 40px currentColor);
    will-change: transform, opacity;
    line-height: 1;
  }

  #feature-ring {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(255,77,0,0.3);
    animation: featureRingSpin 8s linear infinite;
    pointer-events: none;
    z-index: 1;
  }

  @keyframes featureRingSpin {
    to { transform: rotate(360deg); }
  }

  /* Content side */
  #feature-content {
    position: relative;
    height: 360px;
    padding-left: clamp(20px, 4vw, 60px);
  }

  .feature-step {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    will-change: transform, opacity;
    /* All steps start hidden — GSAP activates them one by one */
    opacity: 0;
    pointer-events: none;
  }

  /* Step 0 visible by default (GSAP will take over immediately) */
  .feature-step[data-step="0"] {
    opacity: 1;
    pointer-events: auto;
  }

  .feature-label {
    font-size: 10px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
  }

  .feature-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 1px;
    background: var(--accent);
  }

  .feature-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(48px, 6vw, 96px);
    line-height: 0.9;
    margin-bottom: 28px;
    color: var(--fg);
  }

  .feature-title span {
    color: var(--accent2);
    display: block;
  }

  .feature-desc {
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.85;
    color: rgba(240,237,230,0.6);
    max-width: 480px;
    margin-bottom: 28px;
  }

  .feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .feature-tags span {
    padding: 5px 14px;
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(240,237,230,0.55);
    border-radius: 2px;
    background: rgba(255,255,255,0.03);
  }

  #feature-progress {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
  }

  #feature-showcase:is(:focus-within, :hover) #feature-progress,
  #feature-progress.visible {
    opacity: 1;
  }

  #feature-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    border-radius: 2px;
    transition: width 0.1s linear;
  }

  /* ── SELECTED WORKS — simple responsive grid ── */
  #hscroll-section {
    position: relative;
    background: var(--bg);
    z-index: 1;
    padding: 100px 60px;
    height: auto !important; /* override any inline JS-set height */
  }

  #hscroll-sticky {
    position: static;
    height: auto;
    display: block;
    overflow: visible;
    padding-top: 0;
  }

  #hscroll-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(240,237,230,0.35);
    margin-bottom: 32px;
  }

  #hscroll-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    transform: none !important; /* kill any GSAP transform */
    cursor: default;
  }

  #hscroll-pagination { display: none !important; }

  .hscroll-card {
    width: 100%;
    height: auto;
    min-height: 380px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: border-color 0.4s, transform 0.3s;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    opacity: 1 !important; /* prevent GSAP fade-out */
  }

  @media (max-width: 960px) {
    #hscroll-section { padding: 80px 24px; }
    #hscroll-track { grid-template-columns: repeat(2, 1fr); }
  }

  @media (max-width: 560px) {
    #hscroll-track { grid-template-columns: 1fr; }
  }

  .hscroll-card:hover {
    border-color: rgba(255,77,0,0.35);
  }

  .hscroll-card-img {
    flex: 1;
    overflow: hidden;
    position: relative;
  }

  .hscroll-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
  }

  .hscroll-card:hover .hscroll-card-img img {
    transform: scale(1.06);
  }

  .hscroll-card-num {
    position: absolute;
    top: 20px;
    left: 24px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 72px;
    color: rgba(255,255,255,0.05);
    line-height: 1;
    pointer-events: none;
    z-index: 2;
  }

  .hscroll-card-body {
    padding: 20px 24px 24px;
    background: rgba(3,3,8,0.9);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .hscroll-card-tag {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
  }

  .hscroll-card-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(16px, 1.6vw, 22px);
    font-weight: 800;
    color: var(--fg);
    line-height: 1.2;
  }

  /* Link arrow indicator */
  .hscroll-card-arrow {
    font-size: 18px;
    color: var(--accent);
    opacity: 0;
    transform: translate(-4px, 4px);
    transition: opacity 0.3s, transform 0.3s;
    margin-top: 6px;
    align-self: flex-end;
    line-height: 1;
  }

  .hscroll-card:hover .hscroll-card-arrow {
    opacity: 1;
    transform: translate(0, 0);
  }

  /* Mobile app cards — slightly different indicator */
  .hscroll-card-arrow--app {
    font-size: 16px;
    color: rgba(240,237,230,0.4);
  }

  #hscroll-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 28px;
    padding-bottom: 20px;
  }

  .hscroll-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: all 0.35s ease;
    cursor: pointer;
  }

  .hscroll-dot.active {
    width: 24px;
    border-radius: 3px;
    background: var(--accent);
  }

  /* ── STATS SECTION ── */
  #stats-section {
    position: relative;
    z-index: 1;
    background: var(--bg);
    padding: 120px 60px;
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    overflow: hidden;
  }

  #stats-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(255,77,0,0.06) 0%, transparent 70%);
    pointer-events: none;
  }

  #stats-sticky {
    position: relative;
    z-index: 2;
  }

  .stats-label {
    font-size: 10px;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
    margin-bottom: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
  }

  .stats-label::before,
  .stats-label::after {
    content: '';
    display: block;
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
  }

  .stats-label::after {
    background: linear-gradient(90deg, var(--accent), transparent);
  }

  .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .apl-stat {
    text-align: center;
    position: relative;
  }

  .apl-stat::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.06);
  }

  .apl-stat:last-child::after { display: none; }

  .apl-stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(64px, 9vw, 130px);
    line-height: 0.9;
    color: var(--fg);
    display: inline-block;
    will-change: transform, opacity;
  }

  .apl-stat-plus {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(40px, 5vw, 72px);
    color: var(--accent);
    display: inline-block;
    vertical-align: top;
    margin-top: 6px;
  }

  .apl-stat-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(240,237,230,0.4);
    margin-top: 12px;
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 960px) {
    #feature-sticky {
      grid-template-columns: 1fr;
      padding: 80px 32px 40px;
    }

    #feature-visual {
      height: 200px;
      margin-bottom: 20px;
    }

    .feature-bg-circle { width: 260px; height: 260px; }
    #feature-ring { width: 200px; height: 200px; }
    #feature-icon-wrap { width: 100px; height: 100px; }
    .feature-icon { font-size: 56px; }

    #feature-content {
      height: auto;
      padding-left: 0;
    }

    .feature-step {
      position: relative;
      inset: auto;
    }

    .stats-row {
      grid-template-columns: repeat(2, 1fr);
    }

    .apl-stat::after { display: none; }

    #hscroll-label { padding: 0 24px; }
    #hscroll-track { padding: 0 24px; }
    .hscroll-card { width: 78vw; }
  }

  @media (max-width: 600px) {
    #word-scrub-text {
      font-size: clamp(18px, 5vw, 28px);
    }

    .stats-row {
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }

    .apl-stat-num { font-size: 52px; }

    #stats-section { padding: 80px 24px; }
  }

  /* ════════════════════════════════════════════════════════════
     MOBILE RESPONSIVE PATCH — 2026 fixes
     Targeted overrides so the layout breathes on phones & tablets.
  ════════════════════════════════════════════════════════════ */

  /* Touch / coarse pointer — kill the custom cursor + heavy effects */
  @media (hover: none), (pointer: coarse) {
    #cursor,
    #cursor-trail { display: none !important; }
    html, body { cursor: auto !important; }
    * { cursor: auto !important; }
  }

  /* ───── ≤ 1024px (small laptop / tablet landscape) ───── */
  @media (max-width: 1024px) {
    #hero { padding: 100px 24px 60px; }
    .hero-name { font-size: clamp(60px, 11vw, 140px); letter-spacing: -1px; }
    .hero-role { font-size: 14px; letter-spacing: 1.4px; }
    .section-heading { font-size: clamp(48px, 9vw, 120px); }
    .about-heading,
    .contact-heading { font-size: clamp(40px, 8vw, 96px); }
    .crop-text-giant { font-size: clamp(48px, 11vw, 140px); letter-spacing: -1px; white-space: nowrap; }
    .ai-grid { grid-template-columns: repeat(3, 1fr); }
  }

  /* ───── ≤ 900px (tablet portrait) ───── */
  @media (max-width: 900px) {
    /* Feature showcase — stack vertically instead of side-by-side */
    #feature-sticky {
      grid-template-columns: 1fr;
      gap: 24px;
      padding: 60px 24px;
      align-content: center;
      overflow-y: auto;
    }
    #feature-visual { height: 220px; min-height: 220px; }
    .feature-bg-circle { width: 280px; height: 280px; }
    #feature-icon-wrap { width: 140px; height: 140px; }
    .feature-icon { font-size: 64px; }
    #feature-ring { width: 200px; height: 200px; }
    #feature-content { height: auto; min-height: 240px; padding-left: 0; text-align: center; }
    .feature-title { font-size: clamp(36px, 7vw, 56px) !important; line-height: 1; }
    .feature-desc { font-size: 14px; }
    .feature-tags { justify-content: center; }

    /* Word scrub statement */
    #word-scrub-text { font-size: clamp(22px, 5vw, 36px); padding: 0 20px; line-height: 1.3; }

    /* Scroll seq */
    #scroll-seq-wrapper { height: 2400px; }
    .seq-heading { font-size: clamp(48px, 10vw, 80px); line-height: 0.95; }
    .seq-sub { font-size: 13px; }
    #scroll-seq-overlay { padding: 24px; }

    /* Lightbox */
    .lb-inner { flex-direction: column; max-width: 96vw; max-height: 96vh; }
    .lb-img-wrap { min-height: 50vh; max-height: 55vh; }
    .lb-meta { padding: 20px; max-width: 100%; }
    .lb-nav { width: 36px; height: 36px; font-size: 22px; }
    .lb-title { font-size: 24px; }
    .lb-desc { font-size: 13px; }
  }

  /* ───── ≤ 768px (large phone / small tablet) ───── */
  @media (max-width: 768px) {
    /* Hero */
    #hero { padding: 90px 20px 40px; min-height: 100vh; }
    .hero-eyebrow { font-size: 11px; letter-spacing: 1.2px; }
    .hero-name { font-size: clamp(54px, 14vw, 96px); letter-spacing: -1px; }
    .hero-role { font-size: 12px; letter-spacing: 1px; margin-top: 16px; line-height: 1.6; }
    .hero-stats { gap: 28px; margin-top: 40px; flex-wrap: wrap; }
    .stat-num { font-size: 36px; }
    .stat-label { font-size: 11px; letter-spacing: 1px; }
    #hero-zoom-inner { padding: 0 4px; }
    .hero-scroll { bottom: 24px; font-size: 10px; }

    /* Marquee — calmer on small screens */
    .marquee-item { font-size: 28px; padding: 0 14px; }
    .marquee-wrap { padding: 18px 0; }

    /* Section labels & headings */
    .section-label { font-size: 11px; letter-spacing: 2px; }
    .section-heading { font-size: clamp(40px, 11vw, 78px); }
    .about-heading { font-size: clamp(34px, 9vw, 64px); }
    .contact-heading { font-size: clamp(40px, 11vw, 80px); }
    .about-text { font-size: 14px; line-height: 1.7; }

    /* Sections padding compact */
    #about, #experience, #skills, #ai-tools, #contact, #portfolio { padding: 70px 20px; }
    #word-scrub-section, #feature-showcase, #stats-section { padding-left: 0; padding-right: 0; }

    /* Skills bar / chips */
    .skill-tag { font-size: 11px; padding: 6px 12px; }
    .skills-grid { gap: 8px; }
    .skill-bar-name { font-size: 13px; }
    .skill-bar-pct { font-size: 12px; }

    /* AI grid */
    .ai-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .ai-card { padding: 22px 18px; }
    .ai-icon { font-size: 32px; }
    .ai-name { font-size: 14px; }
    .ai-desc { font-size: 11px; }

    /* Experience timeline */
    .timeline { padding-left: 0; }
    .exp-item { padding: 28px 20px; }
    .exp-company { font-size: 22px; line-height: 1.2; }
    .exp-role { font-size: 13px; }
    .exp-period { font-size: 11px; letter-spacing: 1px; }
    .exp-desc { font-size: 13px; line-height: 1.7; }
    .exp-award { font-size: 12px; padding: 12px 16px; }

    /* Crop parallax bands */
    .crop-scene { min-height: 50vh; }
    .crop-text-giant { font-size: clamp(38px, 13vw, 80px); letter-spacing: -0.5px; white-space: normal; padding: 0 16px; }

    /* Projects parallax */
    .project-parallax-scene { min-height: 90vh; padding: 60px 20px; }
    .proj-card { padding: 28px 20px; max-width: 100%; }
    .proj-title { font-size: clamp(28px, 7vw, 44px); line-height: 1.1; }
    .proj-text { font-size: 13px; line-height: 1.7; }
    .proj-tag { font-size: 10px; letter-spacing: 1.4px; }
    .proj-tech { gap: 6px; }
    .proj-tech span { font-size: 10px; padding: 4px 10px; }
    .proj-num { font-size: clamp(80px, 22vw, 140px); }
    .proj-bg-layer { opacity: 0.35; }

    /* Portfolio header + filter */
    .portfolio-header { flex-direction: column; gap: 24px; align-items: flex-start; }
    .portfolio-filter { flex-wrap: wrap; gap: 6px; }
    .filter-btn { font-size: 11px; padding: 8px 14px; letter-spacing: 1px; }

    /* Lottie overlay (projects) — calmer on mobile */
    #proj-lottie-fixed { opacity: 0.5; }

    /* Stats counter row */
    .stats-row { grid-template-columns: 1fr 1fr; gap: 24px; }
    .apl-stat-num { font-size: 48px; }
    .apl-stat-label { font-size: 11px; letter-spacing: 1.2px; }
    .stats-label { font-size: 11px; }

    /* Contact */
    .contact-sub { font-size: 14px; line-height: 1.7; padding: 0 8px; }
    .contact-links { flex-direction: column; gap: 12px; width: 100%; }
    .contact-link { width: 100%; justify-content: center; text-align: center; font-size: 13px; padding: 14px 20px; }

    /* Footer */
    footer { padding: 32px 20px; font-size: 10px; }

    /* Loader — keep it on-screen */
    #loader .ld-window { width: min(94vw, 480px); }
    .ld-brand-mark { font-size: 36px; }
    .ld-workspace { grid-template-columns: 1fr; }
    .ld-layers { display: none; }
    .ld-canvas { min-height: 200px; }

    /* Disable heavy 3D perspectives that lag on mobile */
    .timeline, .ai-grid { perspective: none; }
    .exp-item, .ai-card { will-change: auto; }
  }

  /* ───── ≤ 560px (phones) ───── */
  @media (max-width: 560px) {
    .hero-stats { gap: 18px; justify-content: space-between; width: 100%; }
    .hero-stats .stat { flex: 1 1 30%; min-width: 0; }
    .stat-num { font-size: 30px; }
    .marquee-item { font-size: 22px; }
    .marquee-item.accent { font-size: 16px; }

    .section-heading { font-size: clamp(36px, 13vw, 60px); }
    .about-heading { font-size: clamp(30px, 10vw, 50px); }
    .contact-heading { font-size: clamp(36px, 13vw, 60px); }

    .seq-heading { font-size: clamp(36px, 11vw, 56px) !important; }
    .crop-text-giant { font-size: clamp(30px, 12vw, 56px); }

    .ai-grid { grid-template-columns: 1fr; }

    .proj-title { font-size: clamp(24px, 7vw, 34px); }
    .proj-num { font-size: 64px; top: 16px; right: 16px; }

    .lb-img-wrap { min-height: 42vh; }
    .lb-counter { font-size: 10px; padding: 4px 10px; }
    .lb-close { top: 8px; right: 8px; width: 36px; height: 36px; font-size: 16px; }

    /* Stop horizontal overflow */
    html, body { overflow-x: hidden; }
    section, footer, .marquee-wrap, .crop-scene { max-width: 100vw; overflow-x: hidden; }
  }

  /* ───── ≤ 400px (tiny phones) ───── */
  @media (max-width: 400px) {
    .hero-name { font-size: clamp(44px, 13vw, 64px); }
    .hero-role { font-size: 11px; letter-spacing: 0.5px; }
    .stat-num { font-size: 26px; }
    .stat-label { font-size: 10px; }
    .section-heading { font-size: clamp(32px, 14vw, 52px); }
    .marquee-item { font-size: 18px; }
    .exp-company { font-size: 19px; }
    .proj-title { font-size: 22px; }
    nav { padding: 14px 18px; }
    .nav-logo { font-size: 18px; }
  }

  /* ───── Landscape phones — avoid letterboxing the hero ───── */
  @media (max-height: 520px) and (orientation: landscape) {
    #hero { min-height: auto; padding: 80px 24px 40px; }
    .hero-stats { margin-top: 24px; gap: 32px; }
    #feature-sticky { height: auto; min-height: 100vh; padding: 60px 24px; }
    #scroll-seq-wrapper { height: 2000px; }
  }
