:root {
  /* Layout & Brand */
  --radius-lg: 36px;
  --radius-md: 24px;
  --max: 1200px;
  --amber: #fcd34d;
  --amber-2: #f59e0b;
  --orange: #f97316;
  --primary: #ff7a00;
  --cream: #ffd9b5;
  --brown: #7a4c25;
  --shadow-glow: 0 20px 40px rgba(245, 158, 11, 0.16);

  /* DARK THEME (Default) */
  --bg-main: #0c0a09;
  --bg-surface: #1c1917;
  --bg-card: #262220;
  --text-main: #fafaf9;
  --text-muted: #a8a29e;
  --text-light: #ffffff;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

:root.light-theme {
  /* LIGHT THEME */
  --bg-main: #ffffff;
  --bg-surface: #fafaf9;
  --bg-card: #ffffff;
  --text-main: #1c1917;
  --text-muted: #6b625d;
  --text-light: #ffffff;
  --line: #e7e5e4;
  --shadow: 0 4px 6px -1px rgba(28, 25, 23, 0.05), 0 10px 15px -3px rgba(28, 25, 23, 0.08), 0 20px 25px -5px rgba(28, 25, 23, 0.12), 0 30px 50px -10px rgba(28, 25, 23, 0.15);
}

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      overflow-wrap: break-word;
    }

    html {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) var(--bg);
      overflow-x: clip;
    }

    html.lenis,
html.lenis body {
      height: auto;
    }

    .lenis.lenis-smooth {
      scroll-behavior: auto !important;
    }

    .lenis.lenis-smooth [data-lenis-prevent] {
      overscroll-behavior: contain;
    }

    .lenis.lenis-stopped {
      overflow: hidden;
    }

    .lenis.lenis-scrolling iframe {
      pointer-events: none;
    }

    body {
      font-family: 'Archivo', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
      color: var(--text-main);
      background: var(--bg-main);
      line-height: 1.6;
      overflow-x: clip;
      -webkit-overflow-scrolling: touch;
      text-wrap: pretty;
    }

    img {
      -webkit-user-drag: none;
    }

    h1,
h2,
h3,
h4,
h5,
.brand-title,
.brand-mark,
.stat-number,
.pill,
.tag,
.eyebrow {
      font-family: 'Space Grotesk', sans-serif;
      letter-spacing: -0.01em;
    }

    /* Custom Scrollbar matching the warm brand aesthetic */
    ::-webkit-scrollbar {
      width: 12px;
      height: 12px;
    }

    ::-webkit-scrollbar-track {
      background: #141210;
      border-left: 1px solid var(--line);
    }

    ::-webkit-scrollbar-thumb {
      background-color: rgba(122, 76, 37, 0.25);
      border-radius: 999px;
      border: 3px solid var(--bg-surface);
      transition: background-color 0.2s ease;
    }

    ::-webkit-scrollbar-thumb:hover {
      background-color: var(--brown);
    }

    ::selection {
      background: var(--amber);
      color: var(--text-main);
    }

    /* ── Focus Visible / Accessibility ── */
    :focus-visible {
      outline: 2px solid var(--amber);
      outline-offset: 3px;
      border-radius: 6px;
    }

    a:focus-visible,
button:focus-visible {
      outline: 2px solid var(--amber);
      outline-offset: 4px;
      border-radius: 12px;
    }

    img {
      display: block;
      max-width: 100%;
    }

    /* Lenis only pauses its own loop — the document still scrolls behind an
       open modal on touch and with the keyboard without this. */
    body.modal-open {
      overflow: hidden;
      touch-action: none;
    }

    .visually-hidden {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
      border: 0;
    }

    .portfolio-loader {
      grid-column: 1 / -1;
      display: flex;
      justify-content: center;
      padding: var(--space-16) 0;
    }

    .portfolio-loader-spinner {
      width: 32px;
      height: 32px;
      border: 3px solid var(--line);
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 0.9s linear infinite;
      opacity: 0.7;
    }

    /* ── Skip link — first tab stop,
visible only when focused ── */
    .skip-link {
      position: absolute;
      left: 50%;
      top: 0;
      transform: translate(-50%, -120%);
      z-index: var(--z-max);
      padding: var(--space-3) var(--space-6);
      background: var(--primary);
      color: #100c07;
      font-weight: 700;
      border-radius: 0 0 14px 14px;
      transition: transform var(--dur-fast) var(--ease-out);
    }

    .skip-link:focus-visible {
      transform: translate(-50%, 0);
      outline-offset: -4px;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    button {
      font: inherit;
    }

    .container {
      width: min(100% - 40px, var(--max));
      margin: 0 auto;
    }

    .site-header {
      position: fixed;
      inset: 0 0 auto 0;
      z-index: 100;
      border-bottom: 1px solid rgba(255,255,255,.1);
      background: rgba(12, 10, 9, .76);
      backdrop-filter: blur(18px);
    }

    .nav-wrap {
      height: 78px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--text-light);
      min-width: max-content;
    }

    .brand-mark {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      border-radius: 18px;
      background: linear-gradient(135deg, var(--amber), var(--orange));
      color: var(--bg-main);
      font-weight: 900;
      box-shadow: 0 18px 45px rgba(249, 115, 22, .22);
    }

    .brand-title {
      display: block;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: .22em;
      text-transform: uppercase;
    }

    .brand-subtitle {
      display: block;
      color: rgba(255,255,255,.55);
      font-size: 12px;
    }

    .main-nav {
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .main-nav a {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      color: rgba(255,255,255,.72);
      padding: 0 14px;
      border-radius: 999px;
      font-size: 14px;
      font-weight: 650;
      transition: color var(--dur-fast) var(--ease-out),
                  background var(--dur-fast) var(--ease-out);
    }

    .main-nav a:hover,
.main-nav a.active {
      color: var(--text-light);
      background: rgba(255,255,255,.1);
    }

    .header-cta {
      border-radius: 999px;
      background: linear-gradient(135deg, var(--amber), var(--orange));
      color: #1c1917;
      padding: 11px 18px;
      font-size: 14px;
      font-weight: 800;
      transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
      white-space: nowrap;
    }

    .header-cta {
      transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) + var(--lift, 0px))) scale(var(--press, 1));
    }

    .header-cta:hover {
      background: linear-gradient(135deg, var(--orange), var(--amber));
      --lift: -1px;
      box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
    }

    .menu-btn {
      display: none;
      width: 46px;
      height: 46px;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 16px;
      color: var(--text-light);
      background: transparent;
      cursor: pointer;
    }

    .mobile-nav {
      display: none;
      position: fixed;
      top: 78px;
      left: 0;
      width: 100vw;
      height: calc(100vh - 78px);
      background: var(--bg-main);
      border-top: 1px solid rgba(255,255,255,.1);
      padding: 24px 0;
      overflow-y: auto;
    }
    .mobile-nav .container {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    @keyframes mobileNavSlide {
      from { opacity: 0; transform: translateY(-8px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .mobile-nav a {
      display: block;
      color: rgba(255,255,255,.76);
      padding: 12px 18px;
      border-radius: 16px;
      font-weight: 700;
    }

    .mobile-nav a:hover,
.mobile-nav a.active {
      background: rgba(255,255,255,.1);
      color: var(--text-light);
    }

    .scroll-progress {
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 2px;
      background: linear-gradient(90deg, var(--amber), var(--orange));
      box-shadow: 0 0 18px rgba(252,211,77,.5);
      transform: scaleX(0);
      transform-origin: 0 50%;
      will-change: transform;
    }

    .hero {
      position: relative;
      min-height: 100vh;
      overflow: hidden;
      background: var(--bg-main);
      color: var(--text-light);
      padding-top: 118px;
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      background:
        radial-gradient(circle at 15% 10%, rgba(251,191,36,.34), transparent 36%),
        radial-gradient(circle at 85% 80%, rgba(249,115,22,.18), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(252,211,77,.08), transparent 60%),
        linear-gradient(135deg, #0c0a09, #1c1917 40%, #292524 70%, #0c0a09);
    }

    .hero-grid {
      position: relative;
      min-height: calc(100vh - 118px);
      display: grid;
      grid-template-columns: 1.05fr .95fr;
      gap: 48px;
      align-items: center;
      padding-bottom: 72px;
    }

    .pill {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 15px;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 999px;
      background: rgba(255,255,255,.1);
      backdrop-filter: blur(16px);
      color: rgba(255,255,255,.76);
      font-size: 14px;
      font-weight: 650;
    }

    .hero h1 {
      margin-top: 24px;
      max-width: 840px;
      font-size: clamp(54px, 9vw, 104px);
      line-height: .92;
      letter-spacing: -.04em;
      font-weight: 850;
      text-wrap: balance;
    }

    /* Fix #3: hero content above grain texture z-index */
    .hero-content {
      position: relative;
      z-index: 2;
    }

    .hero-visual {
      position: relative;
      z-index: 2;
    }

    .gradient-text {
      background: linear-gradient(90deg, #fde68a, #fdba74, #fda4af);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }

    /* Vietnamese single-syllable words orphan far more than English,
so the
       measure is capped in ch and paragraphs use text-wrap: pretty. */
    .hero-copy {
      max-width: min(680px, var(--measure));
      margin-top: 26px;
      color: rgba(255,255,255,.7);
      font-size: var(--text-xl);
      line-height: var(--leading-relaxed);
      text-wrap: pretty;
    }

    .hero-actions {
      margin-top: 34px;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }

    /* The magnetic-hover JS used to write an inline `transform`,
which beat the
       :active rule in the cascade,
so pressing a primary CTA showed no
       feedback at all. JS now writes --mag-x/--mag-y and the transform is
       composed here,
so lift,
magnet pull and press all coexist. */
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      border-radius: 999px;
      padding: 15px 24px;
      font-size: 14px;
      font-weight: 850;
      border: none;
      cursor: pointer;
      transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) + var(--lift, 0px))) scale(var(--press, 1));
      transition: transform var(--dur-base) var(--ease-out),
                  background var(--dur-base) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out),
                  color var(--dur-base) var(--ease-out);
    }

    .btn-primary {
      background: var(--amber);
      color: var(--bg-main);
      box-shadow: 0 18px 45px rgba(245, 158, 11, .22);
    }

    .btn-primary:hover,
.btn-glass:hover,
.btn-dark:hover,
.btn-light:hover {
      --lift: -2px;
    }

    .btn-primary:hover {
      background: #fde68a;
    }

    .btn-glass {
      border: 1px solid rgba(255,255,255,.15);
      background: rgba(255,255,255,.1);
      color: var(--text-light);
      backdrop-filter: blur(16px);
    }

    .stats {
      max-width: 660px;
      margin-top: 46px;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }

    .stat-card {
      border: 1px solid rgba(255,255,255,.15);
      background: rgba(255,255,255,.1);
      border-radius: 24px;
      padding: 20px;
      backdrop-filter: blur(16px);
    }

    .stat-number {
      display: block;
      color: var(--text-light);
      font-size: 32px;
      line-height: 1;
      font-weight: 900;
    }

    .stat-label {
      display: block;
      margin-top: 6px;
      color: rgba(255,255,255,.68);
      font-size: 14px;
    }

    .hero-visual {
      position: relative;
    }

    .hero-visual::before {
      content: "";
      position: absolute;
      inset: -20px;
      border-radius: 52px;
      background: linear-gradient(135deg, rgba(251,191,36,.24), rgba(249,115,22,.08), rgba(255,255,255,.05));
      filter: blur(26px);
    }

    .portrait-card {
      position: relative;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 52px;
      background: rgba(255,255,255,.1);
      padding: 14px;
      box-shadow: 0 35px 120px rgba(0,0,0,.35);
      backdrop-filter: blur(16px);
    }

    .portrait-card img {
      width: 100%;
      aspect-ratio: 4 / 5;
      object-fit: cover;
      border-radius: 40px;
    }

    /* ── Labs — lưới dự án mã nguồn mở ───────────────────────────────── */
    .labs-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
      gap: var(--space-5);
    }

    .lab-tile {
      display: flex;
      flex-direction: column;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 28px;
      background: var(--bg-card);
      transition: transform var(--dur-base) var(--ease-out),
                  border-color var(--dur-base) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out);
    }

    .lab-tile:hover {
      transform: translateY(-6px);
      border-color: rgba(245, 158, 11, .42);
      box-shadow: var(--shadow), var(--glow-amber-strong);
    }

    .lab-tile:active { transform: translateY(-2px) scale(.99); }

    .lab-tile-shot {
      aspect-ratio: 2 / 1;
      overflow: hidden;
      background: var(--bg-surface);
      border-bottom: 1px solid var(--line);
    }

    .lab-tile-shot img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scale(1.02);
      transition: transform var(--dur-slow) var(--ease-out);
    }

    .lab-tile:hover .lab-tile-shot img { transform: scale(1.06); }

    .lab-tile-body {
      display: flex;
      flex-direction: column;
      gap: var(--space-2);
      padding: var(--space-5) var(--space-5) var(--space-6);
    }

    .lab-tile-kind {
      font-size: var(--text-xs);
      font-weight: 850;
      letter-spacing: var(--tracking-widest);
      text-transform: uppercase;
      color: var(--amber);
    }

    .lab-tile h3 {
      font-size: var(--text-xl);
      font-weight: 800;
      letter-spacing: var(--tracking-tight);
    }

    .lab-tile p {
      flex: 1;
      font-size: var(--text-sm);
      line-height: var(--leading-relaxed);
      color: var(--text-muted);
      text-wrap: pretty;
    }

    .lab-tile-tech {
      margin-top: var(--space-2);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      font-size: var(--text-xs);
      letter-spacing: .04em;
      color: var(--text-muted);
      opacity: .8;
    }

    /* Thẻ mở tab mới — báo trước bằng một dấu hiệu, không để người dùng
       bị bất ngờ khi tab mới bật ra. */
    .lab-tile-kind::after {
      content: " ↗";
      opacity: .55;
      font-size: .9em;
    }

    .labs-foot {
      margin-top: var(--space-8);
      text-align: center;
    }

    .labs-foot a {
      display: inline-flex;
      align-items: center;
      min-height: 44px;
      padding: 0 var(--space-5);
      border: 1px solid var(--line);
      border-radius: 999px;
      font-weight: 800;
      font-size: var(--text-sm);
      color: var(--text-muted);
      transition: color var(--dur-fast) var(--ease-out),
                  border-color var(--dur-fast) var(--ease-out),
                  background var(--dur-fast) var(--ease-out);
    }

    .labs-foot a:hover {
      color: var(--text-main);
      border-color: rgba(245, 158, 11, .5);
      background: var(--bg-card);
    }

    /* ── Kinetic band ───────────────────────────────────────────────────
       Two rows of outlined display type running against each other. Outlined
       rather than filled so it reads as texture between sections instead of
       competing with the headlines on either side. */
    .kinetic-band {
      position: relative;
      overflow: hidden;
      padding: clamp(28px, 5vw, 56px) 0;
      background: var(--bg-surface);
      border-top: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      transform: rotate(-1.6deg) scale(1.06);
      margin: clamp(48px, 8vw, 96px) 0;
      -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
      mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    }

    .kinetic-row {
      display: flex;
      width: max-content;
      animation: kineticScroll 34s linear infinite;
    }

    .kinetic-row--reverse {
      animation-direction: reverse;
      animation-duration: 42s;
    }

    .kinetic-band:hover .kinetic-row { animation-play-state: paused; }

    @keyframes kineticScroll {
      from { transform: translateX(0); }
      to { transform: translateX(-50%); }
    }

    .kinetic-track {
      display: flex;
      align-items: center;
      gap: clamp(16px, 2vw, 32px);
      padding-right: clamp(16px, 2vw, 32px);
      font-family: 'Space Grotesk', sans-serif;
      font-size: clamp(1.75rem, 5.5vw, 4rem);
      font-weight: 850;
      letter-spacing: var(--tracking-tight);
      line-height: 1.1;
      white-space: nowrap;
    }

    .kinetic-track > span,
.kinetic-dup > span {
      color: transparent;
      -webkit-text-stroke: 1px rgba(255, 255, 255, 0.28);
      transition: color var(--dur-base) var(--ease-out),
                  -webkit-text-stroke-color var(--dur-base) var(--ease-out);
    }

    .kinetic-track > span:hover,
.kinetic-dup > span:hover {
      color: var(--amber);
      -webkit-text-stroke-color: transparent;
    }

    .kinetic-track > i,
.kinetic-dup > i {
      font-style: normal;
      color: var(--primary);
      opacity: .55;
      font-size: .45em;
    }

    .kinetic-dup {
      display: flex;
      align-items: center;
      gap: clamp(16px, 2vw, 32px);
      padding-right: clamp(16px, 2vw, 32px);
    }

    /* Outlined type on a light background needs a darker stroke to survive. */
    :root.light-theme .kinetic-track > span,
:root.light-theme .kinetic-dup > span {
      -webkit-text-stroke-color: rgba(28, 25, 23, 0.32);
    }

    :root.light-theme .kinetic-track > span:hover,
:root.light-theme .kinetic-dup > span:hover {
      color: var(--orange);
    }

    /* An endlessly travelling wall of type is the clearest vestibular trigger
       on the page,
so it stops. It must still read as a designed strip and
       not as a stray pile of words — keep the outlined type,
the rows,
the
       rhythm and the rule lines; only the travel goes. */
    

    .floating-note {
      position: absolute;
      left: 34px;
      right: 34px;
      bottom: 34px;
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 26px;
      background: rgba(12,10,9,.68);
      padding: 18px;
      backdrop-filter: blur(18px);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .floating-note small {
      display: block;
      color: rgba(255,255,255,.58);
    }

    .floating-note strong {
      display: block;
      margin-top: 4px;
      color: var(--text-light);
    }

    section {
      scroll-margin-top: 78px;
    }

    .section-pad {
      padding: 96px 0;
    }

    .bg-soft {
      background: var(--bg-surface);
      border-bottom: 1px solid var(--line);
    }

    .bg-white {
      background: var(--bg-card);
      border-bottom: 1px solid var(--line);
    }

    .section-title {
      max-width: 760px;
      margin: 0 auto 48px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .eyebrow {
      display: inline-flex;
      margin-bottom: 16px;
      border-radius: 999px;
      background: rgba(252,211,77,.2);
      color: #92400e;
      padding: 5px 15px;
      font-size: 14px;
      font-weight: 850;
      border: 1px solid rgba(252,211,77,.3);
    }

    :root:not(.light-theme) .eyebrow {
      background: rgba(252,211,77,.15);
      color: var(--amber);
      border-color: rgba(252,211,77,.2);
    }

    .section-title h2 {
      display: block;
      width: 100%;
      font-size: clamp(34px, 5vw, 56px);
      line-height: 1.02;
      letter-spacing: -.045em;
      font-weight: 850;
      text-wrap: balance;
    }

    .section-title p {
      margin-top: 18px;
      max-width: var(--measure);
      margin-inline: auto;
      color: var(--text-muted);
      font-size: var(--text-lg);
      line-height: 1.8;
      text-wrap: pretty;
    }

    .about-grid {
      display: grid;
      grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
      gap: 56px;
      align-items: center;
    }

    .about-image {
      position: relative;
    }

    .about-image::before {
      content: "";
      position: absolute;
      width: 160px;
      height: 160px;
      left: -22px;
      top: -22px;
      border-radius: 999px;
      background: #fde68a;
      filter: blur(40px);
    }

    .about-image-inner {
      position: relative;
      overflow: hidden;
      padding: 12px;
      background: var(--bg-card);
      border-radius: 44px;
      box-shadow: var(--shadow);
    }

    .about-image-inner img {
      width: 100%;
      aspect-ratio: 4 / 5;
      object-fit: cover;
      border-radius: 34px;
    }

    .about-content h2 {
      font-size: clamp(36px, 5vw, 62px);
      line-height: 1.03;
      letter-spacing: -.03em;
      font-weight: 850;
      text-wrap: balance;
    }

    .about-text {
      margin-top: 24px;
      color: var(--text-muted);
      font-size: 18px;
      line-height: 1.85;
    }

    .about-text p + p {
      margin-top: 16px;
    }

    .skills {
      margin-top: 34px;
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
    }

    .skill-card {
      min-height: 148px;
      border: 1px solid var(--line);
      border-radius: 26px;
      background: var(--bg-card);
      padding: 22px;
      box-shadow: 0 8px 30px rgba(28,25,23,.04);
    }

    .skill-card .icon {
      margin-bottom: 14px;
      font-size: 24px;
    }

    .skill-card p {
      color: var(--text-main);
      font-size: 14px;
      line-height: 1.65;
      font-weight: 750;
    }

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

    .service-card {
      position: relative;
      border: 1px solid var(--line);
      border-radius: 32px;
      background: var(--bg-surface);
      padding: 28px;
      transition: transform var(--dur-base) var(--ease-out),
                  border-color var(--dur-base) var(--ease-out),
                  background var(--dur-base) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out);
    }

    .service-card:hover {
      transform: translateY(-6px);
      border-color: rgba(245, 158, 11, .6);
      background: var(--bg-card);
      box-shadow: var(--shadow), var(--glow-amber-strong);
    }

    .service-icon {
      width: 56px;
      height: 56px;
      display: grid;
      place-items: center;
      margin-bottom: 26px;
      border-radius: 19px;
      background: var(--bg-main);
      color: var(--amber);
      font-size: 25px;
      transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
    }

    .service-card:hover .service-icon {
      transform: rotate(4deg);
      background: var(--amber);
      color: var(--bg-main);
    }

    .service-card h3 {
      font-size: 22px;
      line-height: 1.2;
      text-wrap: balance;
    }

    .service-card p {
      margin-top: 13px;
      font-size: 15px;
      color: var(--text-muted);
      line-height: 1.75;
    }

    .experience {
      background: var(--bg-main);
      color: var(--text-light);
      border-bottom: 1px solid var(--line);
    }

    .experience .eyebrow {
      background: rgba(252,211,77,.12);
      border: 1px solid rgba(252,211,77,.18);
      color: var(--amber);
    }

    .experience .section-title h2 {
      color: var(--text-light);
      text-wrap: balance;
    }

    .experience .section-title p {
      color: rgba(255,255,255,.62);
    }

    /* ── Experience timeline ────────────────────────────────────────────
       A single column with a rail down the left. Two columns of cards read
       as a catalogue of jobs; one column with a rail reads as a career,
which is what the section heading promises. */
    .experience-grid {
      position: relative;
      display: grid;
      grid-template-columns: 1fr;
      gap: clamp(20px, 3vw, 30px);
      padding-left: 62px;
      max-width: 860px;
      margin-inline: auto;
    }

    /* The unfilled rail. */
    .experience-grid::before {
      content: '';
      position: absolute;
      left: 21px;
      top: 8px;
      bottom: 8px;
      width: 2px;
      background: var(--line);
      border-radius: 2px;
    }

    /* The filled rail,
drawn as the section scrolls past. Scaled from the
       top so it grows downward; a height animation would relayout. */
    .experience-grid::after {
      content: '';
      position: absolute;
      left: 21px;
      top: 8px;
      bottom: 8px;
      width: 2px;
      border-radius: 2px;
      background: linear-gradient(to bottom, var(--amber), var(--primary));
      box-shadow: 0 0 14px rgba(252, 211, 77, .45);
      transform-origin: 50% 0;
      transform: scaleY(var(--rail-progress, 0));
    }

    .experience-card {
      position: relative;
      overflow: visible;
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 28px;
      background: rgba(255,255,255,.04);
      transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
    }

    /* Node on the rail,
level with the card's logo. */
    .experience-card::before {
      content: '';
      position: absolute;
      left: -48px;
      top: 42px;
      width: 13px;
      height: 13px;
      border-radius: 50%;
      background: var(--bg-main);
      border: 2px solid var(--line);
      transform: scale(.6);
      transition: transform var(--dur-base) var(--ease-back),
                  background var(--dur-base) var(--ease-out),
                  border-color var(--dur-base) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out);
    }

    /* Lands when the card itself reveals,
so the node and the card arrive
       together rather than the rail running ahead of its content. */
    .experience-card.revealed::before,
.experience-card.show::before {
      transform: scale(1);
      background: var(--amber);
      border-color: var(--primary);
      box-shadow: 0 0 0 5px rgba(252, 211, 77, .14), 0 0 16px rgba(252, 211, 77, .55);
    }

    .experience-card:hover {
      transform: translateX(5px);
      border-color: rgba(252,211,77,.42);
      background: rgba(255,255,255,.07);
    }

    .experience-card:hover::before {
      transform: scale(1.25);
    }

    .experience-card-inner { border-radius: inherit; overflow: hidden; }

    @media (max-width: 719px) {
      .experience-grid { padding-left: 40px; }
      .experience-grid::before,
.experience-grid::after { left: 13px; }
      .experience-card::before { left: -33px; top: 32px; width: 11px; height: 11px; }
    }

    /* Rail draw is decorative; without motion it is simply already full. */
    

    .experience-card-inner {
      padding: 32px;
      display: flex;
      flex-direction: column;
      height: 100%;
      box-sizing: border-box;
    }

    .experience-header {
      display: flex;
      align-items: center;
      gap: 20px;
      margin-bottom: 22px;
      position: relative;
      width: 100%;
    }

    .experience-logo-box {
      width: 58px;
      height: 58px;
      min-width: 58px;
      border-radius: 16px;
      background: #ffffff;
      border: 1px solid rgba(255, 255, 255, 0.1);
      display: grid;
      place-items: center;
      padding: 7px;
      box-sizing: border-box;
      transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .experience-logo-box img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      transition: transform 0.4s ease;
      filter: none; /* Keep original colors */
    }

    .experience-title-area {
      display: flex;
      flex-direction: column;
      gap: 4px;
      flex-grow: 1;
    }

    .experience-title-area h3 {
      font-size: 19px;
      font-weight: 700;
      color: var(--text-light);
      margin: 0 ;
      line-height: 1.3;
      text-wrap: balance;
    }

    .experience-role {
      font-size: 13.5px;
      color: rgba(255, 255, 255, 0.5);
    }

    .experience-year {
      font-size: 12.5px;
      font-weight: 800;
      color: var(--amber);
      background: rgba(252, 211, 77, 0.09);
      padding: 6px 14px;
      border-radius: 99px;
      white-space: nowrap;
    }

    .experience-body {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      flex-grow: 1;
    }

    .experience-body p {
      font-size: 14.5px;
      line-height: 1.65;
      color: rgba(255, 255, 255, 0.62);
      margin: 0 0 20px 0;
    }

    .link-line {
      color: var(--amber);
      font-size: 13.5px;
      font-weight: 750;
      transition: transform 0.3s ease;
      display: inline-flex;
      align-items: center;
    }

    .experience-card:hover .experience-logo-box {
      background: #ffffff;
      border-color: rgba(252, 211, 77, 0.8);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    }

    .experience-card:hover .experience-logo-box img {
      transform: scale(1.08);
    }

    .filter-row {
      margin-bottom: 38px;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px;
    }

    .filter-btn {
      display: inline-flex;
      align-items: center;
      min-height: 44px; /* WCAG 2.5.5 target size */
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--bg-card);
      color: var(--text-muted);
      padding: 0 20px;
      font-size: var(--text-sm);
      font-weight: 800;
      white-space: nowrap;
      cursor: pointer;
      transition: color var(--dur-fast) var(--ease-out),
                  border-color var(--dur-fast) var(--ease-out),
                  background var(--dur-fast) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out);
    }

    .filter-btn:hover {
      border-color: rgba(245,158,11,.5);
      color: var(--text-main);
    }

    .filter-btn[aria-pressed="true"] {
      border-color: var(--primary);
      background: var(--primary);
      color: #140f09;
      box-shadow: var(--glow-amber-soft);
    }

    /* Intrinsic columns: the card decides how many fit,
so there is no
       breakpoint to keep in sync and no !important override to bust a CDN
       cache with. 260px is the width below which a 16:9 thumbnail stops
       reading as a piece of work. */
    .portfolio-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
      gap: var(--space-5);
    }

    .portfolio-card {
      display: block;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 32px;
      background: var(--bg-card);
      isolation: isolate;
      -webkit-mask-image: -webkit-radial-gradient(white, black);
      transition: opacity var(--dur-slow) var(--ease-out),
                  transform var(--dur-slow) var(--ease-out),
                  box-shadow var(--dur-base) var(--ease-out),
                  border-color var(--dur-base) var(--ease-out);
      opacity: 0;
      transform: translateY(16px);
      will-change: opacity, transform;
    }

    .portfolio-card.show {
      opacity: 1;
      transform: translateY(0);
    }

    .portfolio-card.hide-anim {
      opacity: 0;
      transform: translateY(16px) scale(0.96);
      pointer-events: none;
    }

    .portfolio-card.hide {
      display: none ;
    }

    .portfolio-card:hover {
      transform: translateY(-6px);
      border-color: rgba(245, 158, 11, .4);
      box-shadow: var(--shadow), var(--glow-amber-strong);
    }

    /* ── Video card affordance ──────────────────────────────────────────
       Only rendered on cards that actually open a player. Scales in from
       0.7 rather than 0 — nothing in the real world appears from nothing. */
    .thumb-play {
      position: absolute;
      z-index: 4;
      left: 50%;
      top: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 54px;
      height: 54px;
      margin: -27px 0 0 -27px;
      border-radius: 50%;
      background: rgba(12, 10, 9, .62);
      border: 1px solid rgba(255, 255, 255, .28);
      backdrop-filter: blur(8px);
      color: #fff;
      opacity: 0;
      transform: scale(.7);
      transition: opacity var(--dur-base) var(--ease-out),
                  transform var(--dur-base) var(--ease-back),
                  background var(--dur-base) var(--ease-out);
    }

    .thumb-play svg { margin-left: 3px; } /* optical centring of a triangle */

    .portfolio-card.has-video:hover .thumb-play,
.portfolio-card.has-video:focus-visible .thumb-play {
      opacity: 1;
      transform: scale(1);
    }

    .portfolio-card.has-video:hover .thumb-play {
      background: var(--primary);
      border-color: transparent;
      color: #140f09;
    }

    /* Scrub line — reads as "this is footage" without pretending to know a
       real duration. */
    .thumb-scrub {
      position: absolute;
      z-index: 4;
      left: 0;
      right: 0;
      bottom: 0;
      height: 3px;
      background: var(--primary);
      transform: scaleX(0);
      transform-origin: 0 50%;
      transition: transform var(--dur-deliberate) var(--ease-out);
    }

    .portfolio-card.has-video:hover .thumb-scrub,
.portfolio-card.has-video:focus-visible .thumb-scrub {
      transform: scaleX(1);
    }

    /* Touch has no hover to reveal it,
so the affordance is simply on. */
    @media (hover: none) {
      .thumb-play { opacity: 1; transform: scale(.86); }
      .thumb-scrub { display: none; }
    }
    

    /* Pointer spotlight — JS only writes --mx/--my,
the paint stays in CSS.
       Also covers .service-card,
which uses the same two custom properties. */
    .portfolio-card::before,
.service-card::before {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      opacity: 0;
      border-radius: inherit;
      transition: opacity var(--dur-base) var(--ease-out);
      background: radial-gradient(
        280px circle at var(--mx, 50%) var(--my, 50%),
        var(--spotlight-tint),
        transparent 68%
      );
    }

    .portfolio-card { position: relative; }

    .portfolio-card:hover::before,
.service-card:hover::before {
      opacity: 1;
    }

    @media (hover: none) {
      .portfolio-card::before,
.service-card::before { display: none; }
    }

    .portfolio-thumb {
      position: relative;
      aspect-ratio: 16 / 9;
      overflow: hidden;
      background: #e7e5e4;
    }

    .portfolio-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transform: scale(1.04);
      transition: transform var(--dur-slow) var(--ease-out);
    }

    .portfolio-card:hover .portfolio-thumb img {
      transform: scale(1.1);
    }

    .portfolio-thumb::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(12,10,9,.82), rgba(12,10,9,.08), transparent);
      z-index: 1;
      pointer-events: none;
    }

    /* ── Photography: pure image card,
no text body ── */
    .portfolio-card.photo-only {
      background: transparent;
      border: none;
      box-shadow: none;
      border-radius: 16px;
      overflow: hidden;
    }
    .portfolio-card.photo-only .portfolio-thumb {
      aspect-ratio: 4 / 3;
      border-radius: 16px;
    }
    .portfolio-card.photo-only .portfolio-thumb::after {
      background: linear-gradient(to top, rgba(12,10,9,.35), transparent 50%);
    }
    .portfolio-card.photo-only:hover {
      box-shadow: 0 12px 40px rgba(0,0,0,.35);
      transform: translateY(-4px);
    }

    .tag {
      position: absolute;
      left: 18px;
      top: 18px;
      z-index: 2;
      border-radius: 999px;
      background: rgba(255,255,255,.92);
      color: #1c1917;
      padding: 5px 11px;
      font-size: 12px;
      font-weight: 900;
      backdrop-filter: blur(10px);
    }

    .portfolio-body {
      padding: 22px;
    }

    /* amber-700 on the dark card measured 3.2:1 — below the 4.5:1 floor for
       11–14px text. amber-500 keeps the warm read at ~6.9:1. */
    .client {
      color: #f59e0b;
      font-size: var(--text-sm);
      font-weight: 850;
      letter-spacing: var(--tracking-wide);
    }

    .portfolio-body h3 {
      margin-top: 7px;
      color: var(--text-main);
      font-size: 20px;
      line-height: 1.35;
      text-wrap: balance;
    }

    .contact-section {
      background: #0a0806; /* Very dark rich brown */
      color: var(--cream);
      padding: 96px 0;
      border-top: 1px solid rgba(252, 211, 77, 0.15);
      border-bottom: 1px solid rgba(252, 211, 77, 0.05);
      transition: background-color 0.4s ease, color 0.4s ease;
    }
    
    :root.light-theme .contact-section {
      background: var(--cream);
      color: var(--brown);
      border-top: none;
    }

    .contact-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
      gap: 42px;
      align-items: center;
    }

    .contact-copy h2 {
      font-size: clamp(42px, 7vw, 74px);
      line-height: .98;
      letter-spacing: -.06em;
      font-weight: 900;
      text-wrap: balance;
    }

    .contact-copy p {
      max-width: 680px;
      margin-top: 24px;
      color: var(--text-muted);
      font-size: 18px;
      line-height: 1.85;
    }

    .contact-actions {
      margin-top: 30px;
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
    }

    .btn-dark {
      background: #1c1917;
      color: #ffffff;
    }

    .btn-light {
      border: 1px solid rgba(122,76,37,.18);
      background: var(--cream);
      color: var(--brown);
    }

    
/* Global btn-dark light-theme override */
:root.light-theme .btn-dark {
  background: #1c1917;
  color: #ffffff;
}
:root.light-theme .btn-dark:hover {
  background: #292524;
  transform: translateY(-2px);
}
:root.light-theme .contact-section .btn-dark {
      background: var(--brown);
      color: #ffffff;
    }

    :root.light-theme .contact-section .btn-dark:hover {
      background: #1c1917;
    }

    :root.light-theme .contact-section .btn-light {
      border: 1px solid rgba(122,76,37,.35);
      background: rgba(255,255,255,.8);
      color: var(--brown);
    }

    .contact-card {
      border: 1px solid rgba(122,76,37,.18);
      border-radius: 42px;
      background: rgba(255,255,255,.8);
      padding: 28px;
      box-shadow: 0 28px 80px rgba(185,133,83,.22);
      backdrop-filter: blur(16px);
    }

    :root:not(.light-theme) .contact-card {
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(30, 25, 20, 0.8);
    }

    :root:not(.light-theme) .contact-form input,
:root:not(.light-theme) .contact-form textarea {
      background: rgba(255,255,255,0.06);
      color: var(--cream);
      border-color: rgba(252, 211, 77, 0.15);
    }

    :root:not(.light-theme) .contact-form input::placeholder,
:root:not(.light-theme) .contact-form textarea::placeholder {
      color: rgba(255, 217, 181, 0.45);
    }

    .contact-form {
      display: grid;
      gap: var(--space-2);
      margin-bottom: 18px;
    }

    .contact-form label {
      font-size: var(--text-sm);
      font-weight: 700;
      letter-spacing: var(--tracking-wide);
      color: var(--brown);
      margin-top: var(--space-2);
    }

    :root:not(.light-theme) .contact-form label {
      color: rgba(255, 217, 181, 0.85);
    }

    .contact-form button[type="submit"] {
      margin-top: var(--space-3);
    }

    /* Honeypot — off-screen rather than display:none,
which some bots skip */
    .hp-field {
      position: absolute;
      width: 1px;
      height: 1px;
      overflow: hidden;
      clip-path: inset(50%);
      white-space: nowrap;
    }

    .contact-form input,
.contact-form textarea {
      width: 100%;
      border: 1px solid rgba(122,76,37,.25);
      border-radius: 18px;
      background: rgba(255,255,255,0.75);
      color: #1c1917;
      padding: 14px 16px;
      outline: none;
      font: inherit;
      transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
    }

    .contact-form input::placeholder,
.contact-form textarea::placeholder {
      color: rgba(122, 76, 37, 0.55);
    }

    .contact-form textarea {
      min-height: 110px;
      resize: vertical;
    }

    .contact-form input:focus,
.contact-form textarea:focus {
      border-color: var(--amber-2);
      box-shadow: 0 0 0 4px rgba(245,158,11,.14);
    }

    .form-note {
      display: block;
      max-height: 0;
      opacity: 0;
      overflow: hidden;
      border-radius: 18px;
      padding: 0 14px;
      font-size: 14px;
      font-weight: 750;
      transition: max-height var(--dur-slow) var(--ease-out),
                  padding var(--dur-slow) var(--ease-out),
                  opacity var(--dur-slow) var(--ease-out);
      border: 1px solid transparent;
      box-sizing: border-box;
    }

    .form-note.show {
      max-height: 120px;
      opacity: 1;
      padding: 12px 14px;
      margin-top: 8px;
    }

    /* Light theme reads dark ink on a pale tint; dark theme has to invert or
       the success/error message sits at ~2:1 against the card. */
    .form-note.success {
      background: rgba(16, 185, 129, 0.12);
      color: #065f46;
      border-color: rgba(16, 185, 129, 0.3);
    }

    .form-note.error {
      background: rgba(239, 68, 68, 0.12);
      color: #991b1b;
      border-color: rgba(239, 68, 68, 0.3);
    }

    .form-note:not(.success):not(.error) {
      background: rgba(252, 211, 77, 0.36);
      color: #4a2d13;
      border-color: rgba(252, 211, 77, 0.5);
    }

    :root:not(.light-theme) .form-note.success {
      background: rgba(16, 185, 129, 0.16);
      color: #6ee7b7;
      border-color: rgba(16, 185, 129, 0.4);
    }

    :root:not(.light-theme) .form-note.error {
      background: rgba(239, 68, 68, 0.16);
      color: #fca5a5;
      border-color: rgba(239, 68, 68, 0.4);
    }

    :root:not(.light-theme) .form-note:not(.success):not(.error) {
      background: rgba(252, 211, 77, 0.1);
      color: rgba(255, 226, 178, 0.92);
      border-color: rgba(252, 211, 77, 0.28);
    }

    .contact-list {
      display: grid;
      gap: 14px;
    }

    .contact-item {
      display: flex;
      gap: 15px;
      border-radius: 26px;
      background: var(--bg-card);
      padding: 18px;
      color: var(--text-main);
    }

    .contact-item .ci-icon {
      color: #b45309;
      font-size: 20px;
      line-height: 1;
    }

    .contact-item small {
      display: block;
      color: #78716c;
      font-weight: 800;
    }

    .contact-item strong,
.contact-item a {
      display: block;
      margin-top: 2px;
      color: var(--text-main);
      font-weight: 900;
      line-height: 1.45;
    }

    /* mailto:/tel: are the two highest-intent taps on the page and were only
       23px tall. Padding keeps the visual rhythm while the hit area clears 44px. */
    .contact-item a {
      display: flex;
      align-items: center;
      min-height: 40px;
      margin-top: 0;
      padding: 2px 0;
      text-decoration-color: rgba(252, 211, 77, 0.4);
      text-underline-offset: 3px;
    }

    .contact-item a:hover,
.contact-item a:focus-visible {
      text-decoration: underline;
    }

    .social-grid {
      margin-top: 18px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 10px;
    }

    .social-grid a {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 44px; /* WCAG 2.5.5 */
      border-radius: 18px;
      background: var(--bg-main);
      color: var(--text-light);
      text-align: center;
      padding: 10px;
      font-size: 14px;
      font-weight: 850;
      transition: background var(--dur-fast) var(--ease-out),
                  color var(--dur-fast) var(--ease-out),
                  transform var(--dur-fast) var(--ease-out);
    }

    .social-grid a:hover {
      transform: translateY(-2px);
      background: var(--amber-2);
      color: var(--bg-main);
    }

    .back-to-top {
      position: fixed;
      right: 22px;
      bottom: 22px;
      z-index: 120;
      width: 52px;
      height: 52px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 999px;
      background: var(--bg-main);
      color: var(--amber);
      box-shadow: 0 18px 50px rgba(12,10,9,.28);
      cursor: pointer;
      opacity: 0;
      visibility: hidden;
      transform: translateY(14px) scale(.96);
      transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
    }

    .back-to-top.show {
      opacity: 1;
      visibility: visible;
      transform: translateY(0) scale(1);
    }

    .back-to-top:hover {
      background: var(--amber);
      color: var(--bg-main);
      transform: translateY(-3px) scale(1.02);
    }

    .site-footer {
      background: var(--bg-main);
      color: var(--text-muted);
      padding: 30px 0;
      font-size: 14px;
    }

    .footer-inner {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
    }

/* ==========================================================================
   RESPONSIVE SYSTEM — 5 BREAKPOINTS (CLEAN,
NO DUPLICATES)
   xl: 1280px+  |  lg: 1024–1279px  |  md: 768–1023px  |  sm: 480–767px  |  xs: 0–479px
   ========================================================================== */

/* ── lg + md: Tablet + small laptop (≤ 1024px) ── */
@media (max-width: 1024px) {
  /* Navigation */
  .main-nav,
  .header-cta {
    display: none;
  }
  .menu-btn {
    display: grid;
    place-items: center;
  }
  .mobile-nav.open {
    display: block;
    animation: mobileNavSlide 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }
  .desktop-lang {
    display: none;
  }
  .mobile-lang-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
  }
  .mobile-nav {
    padding: 24px 0;
  }

  /* Hero — single centered column */
  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-grid > div,
  .about-grid > div,
  .contact-grid > div {
    min-width: 0;
  }

  /* Center hero content */
  .hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    order: 1;
  }
  .hero-copy { text-align: center; }
  .hero-actions { justify-content: center; }
  .stats { justify-content: center; max-width: 100%; }

  /* Hero visual below content */
  .hero-visual {
    order: 2;
    max-width: min(90vw, 500px);
    margin: 40px auto 0;
  }

  /* About: image ABOVE text on tablet */
  .about-image {
    order: -1;
    max-width: min(90vw, 500px);
    margin: 0 auto 40px;
  }

  .hero-grid {
    padding-top: 64px;
    padding-bottom: 48px;
    min-height: auto;
  }

  /* Grids */
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr; }
  .experience-header { flex-wrap: wrap; gap: 12px; }
  .experience-year { margin-left: 0; }
  .tools-grid-wrapper { grid-template-columns: 1fr; gap: 32px; }
}

/* ── sm: Large mobile (≤ 767px) ── */
@media (max-width: 767px) {
  /* Modal full-screen */
  .modal-content-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  /* Portfolio keeps 2 columns */
  /* Collapse grids */
  .services-grid { grid-template-columns: 1fr; }
  .tools-grid-wrapper { grid-template-columns: 1fr; gap: 28px; }
  /* Social grid 2 cols */
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  /* Footer stack */
  .footer-inner { flex-direction: column; text-align: center; }
}

/* ── xs: All mobile (≤ 719px) ── */
@media (max-width: 719px) {
  .container { width: min(100% - 32px, var(--max)); }
  .brand-text { display: none; }

  /* Hero */
  .hero { padding-top: 90px; }
  .hero-grid { padding-top: 36px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(38px, 13vw, 64px); text-wrap: balance; }
  .hero-copy,
  .section-title p,
  .about-text,
  .contact-copy p { font-size: 16px; }
  .hero-visual,
  .about-image { max-width: min(85vw, 380px); }

  .stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }

  .section-pad, .contact-section { padding: 60px 0; }

  .floating-note { left: 16px; right: 16px; bottom: 16px; padding: 12px 16px; border-radius: 20px; align-items: center; gap: 12px; }
  .floating-note small { font-size: 12px; }
  .floating-note strong { font-size: 14px; margin-top: 2px; }
  .floating-note span { font-size: 20px; }

  .services-grid { grid-template-columns: 1fr; }

  .back-to-top {
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    width: 48px;
    height: 48px;
  }

  .service-card, .portfolio-body { padding: 20px; }
  .experience-card-inner { padding: 24px 20px; }

  .experience-logo-box { width: 48px; height: 48px; min-width: 48px; border-radius: 12px; padding: 5px; }
  .experience-header { gap: 14px; margin-bottom: 16px; }
  .experience-title-area h3 { font-size: 17px; }
  .experience-role { font-size: 13px; }
  .experience-year { font-size: 11.5px; padding: 4px 10px; }
  .experience-body p { font-size: 13.5px; line-height: 1.5; margin-bottom: 16px; }

  .portfolio-body h3 { font-size: 18px; margin-top: 4px; }
  .client { font-size: 13px; }
  .portfolio-card .tag { font-size: 11px; padding: 4px 10px; left: 14px; top: 14px; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tool-item { padding: 14px 10px; gap: 8px; min-height: auto; flex-direction: column; align-items: center; text-align: center; }
  .tool-item img, .tool-item svg { width: 36px; height: 36px; }
  .tool-info span { display: none; }
  .tool-info h5 { font-size: 14px; }

  .filter-row { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; -ms-overflow-style: none; }
  .filter-row::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; padding: 0 18px; }

  .showcase-slider { border-radius: 22px; }
  .showcase-info { display: none !important; }
  .slider-dots { bottom: 12px; }
  .slider-btn { width: 35px; height: 35px; font-size: 14px; }

  .compact-grid { grid-template-columns: repeat(2, 1fr); }
  .partners-section { padding: 35px 0; }
  .logo-item { height: 70px; }
  .marquee-track { gap: 50px; }
  .skill-card { padding: 18px; }
  .skills { grid-template-columns: 1fr; }
}

/* ── xs-small: Tiny phones (≤ 479px) ── */
@media (max-width: 479px) {
  .hero h1 { font-size: clamp(34px, 11vw, 52px); text-wrap: balance; }

  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .stat-card { padding: 14px 8px; text-align: center; }
  .stat-number { font-size: 22px; }
  .stat-label { font-size: 10px; }

  .section-title h2 { font-size: clamp(26px, 9vw, 40px); text-wrap: balance; }
  .contact-copy h2 { font-size: clamp(32px, 12vw, 52px); text-wrap: balance; }
  .about-content h2 { font-size: clamp(28px, 10vw, 46px); text-wrap: balance; }

  .pill { font-size: 11px; padding: 6px 10px; }
  .btn { padding: 13px 18px; font-size: 13px; }

  .service-card, .portfolio-body { padding: 16px; }
  .experience-card-inner { padding: 18px 16px; }
  .experience-logo-box { width: 40px; height: 40px; min-width: 40px; border-radius: 10px; padding: 4px; }
  .experience-header { gap: 12px; margin-bottom: 14px; }
  .experience-title-area h3 { font-size: 15px; }
  .experience-role { font-size: 12px; }
  .experience-body p { font-size: 13px; margin-bottom: 14px; }
  .link-line { font-size: 13px; }

  /* 1 cột trên tiny phones — card đủ rộng để đọc tiêu đề */
  .portfolio-body h3 { font-size: 15px; margin-top: 4px; }
  .client { font-size: 11px; }
  .portfolio-card .tag { font-size: 10px; padding: 3px 8px; left: 12px; top: 12px; }

  .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tool-item { padding: 12px 8px; gap: 6px; }
  .tool-item img, .tool-item svg { width: 32px; height: 32px; }
  .tool-info h5 { font-size: 13px; }

  .contact-form input,
  .contact-form textarea { font-size: 16px; }

  .compact-grid { grid-template-columns: 1fr; }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .section-pad, .contact-section { padding: 48px 0; }
  .skill-card { padding: 16px; }
  .skills { grid-template-columns: 1fr; }
}

/* ── Safe Area Insets (notch / home indicator) ── */
.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}
.site-footer {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
}
.back-to-top {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  right: calc(env(safe-area-inset-right, 0px) + 22px);
}
.mobile-nav {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
}

/* ── Scrollbar — hide on touch devices ── */
@media (hover: none) {
  ::-webkit-scrollbar { display: none; }
  html { scrollbar-width: none; }
}

/* ── Disable stuck hover on touch devices ── */
@media (hover: none) {
  .service-card:hover,
  .experience-card:hover,
  .portfolio-card:hover,
  .tool-item:hover,
  .skill-card:hover,
  .contact-item:hover {
    transform: none !important;
    box-shadow: none !important;
  }
  .service-card:hover .service-icon {
    transform: none !important;
    background: var(--bg-main) !important;
    color: var(--amber) !important;
  }
  .portfolio-card:hover .portfolio-thumb img {
    transform: scale(1.04) !important;
  }
  .about-image-inner:hover::before { opacity: 0; }
}

/* ── Touch target minimum 44px ── */
.lang-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 0.2s ease;
  border-radius: 8px;
}
.lang-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}
.lang-btn.active {
  color: var(--amber);
  font-weight: 800;
}

.mobile-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* ── Modal: full-screen on mobile ── */
@media (max-width: 767px) {
  .case-study-modal .modal-content-wrapper {
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* ==========================================================================
   COMPONENT STYLES (Avatar,
Source tiles,
Slider,
Partners,
Tools,
Modal)
   ========================================================================== */

/* Avatar card */
.avatar-panel {
  height: auto;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 40px;
  background:
    radial-gradient(circle at 28% 18%, rgba(252, 211, 77, .72), transparent 28%),
    radial-gradient(circle at 75% 72%, rgba(249, 115, 22, .5), transparent 30%),
    linear-gradient(135deg, rgba(28, 25, 23, .95), rgba(68, 64, 60, .88));
  color: var(--text-light);
  text-align: center;
  box-shadow: inset 0 0 80px rgba(255, 255, 255, .08);
  overflow: hidden;
}
.avatar-panel img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.light-avatar .avatar-panel {
  background:
    radial-gradient(circle at 18% 20%, rgba(252, 211, 77, .8), transparent 26%),
    linear-gradient(135deg, #fff7ed, #fed7aa 48%, #0c0a09 49%, #292524);
  color: var(--bg-main);
}

/* Source tiles */

/* Featured video */

/* Compact grid */
.compact-grid { grid-template-columns: repeat(3, 1fr); }

/* ── Lightbox Modal ── */
.lightbox-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.lightbox-modal.show { display: flex; opacity: 1; }
.lightbox-content { max-width: 90%; max-height: 90%; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.5); transform: scale(0.95); transition: transform 0.3s ease; }
.lightbox-content-wrapper { display: none; width: 90%; max-width: 960px; aspect-ratio: 16 / 9; position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.lightbox-content-wrapper iframe { width: 100%; height: 100%; border: 0; }
.lightbox-modal.show .lightbox-content { transform: scale(1); }
/* <button>,
so the browser's default button chrome has to be reset explicitly */
.lightbox-close { position: absolute; top: 20px; right: 35px; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; background: none; border: 0; color: #fff; font-size: 40px; line-height: 1; font-weight: bold; cursor: pointer; transition: color var(--dur-fast) var(--ease-out); z-index: var(--z-max); }
.lightbox-close:hover,
.lightbox-close:focus-visible { color: #bbb; }
.lightbox-loader { border: 4px solid rgba(255,255,255,0.3); border-top: 4px solid #fff; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; position: absolute; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ── Showcase Slider ── */
.showcase-slider { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 auto 34px; border-radius: 34px; overflow: hidden; background: var(--bg-main); box-shadow: var(--shadow); border: 1px solid var(--line); touch-action: pan-y; }
.showcase-slides { position: relative; width: 100%; height: 100%; }
.showcase-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: opacity var(--dur-deliberate) var(--ease-out), transform var(--dur-deliberate) var(--ease-out), visibility var(--dur-deliberate) var(--ease-out); display: flex; align-items: center; justify-content: center; }
.showcase-slide { transform: scale(1.015); }
.showcase-slide.active { opacity: 1; visibility: visible; transform: scale(1); }
.showcase-slide iframe { width: 100%; height: 100%; border: 0; }
.showcase-img-wrap { position: relative; width: 100%; height: 100%; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.showcase-bg-blur { position: absolute; top: -20px; left: -20px; right: -20px; bottom: -20px; background-size: cover; background-position: center; filter: blur(24px) brightness(0.32) saturate(1.2); z-index: 1; pointer-events: none; }
.showcase-img-wrap img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s ease; }
.showcase-info { position: absolute; left: 30px; bottom: 30px; background: rgba(0,0,0,0.7); backdrop-filter: blur(10px); padding: 15px 25px; border-radius: 18px; color: #fff; max-width: 70%; border: 1px solid rgba(255,255,255,0.1); pointer-events: none; z-index: 10; }
.showcase-info .tag { position: relative; top: auto; left: auto; display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 20px; background: var(--orange); color: var(--text-light); margin-bottom: 6px; }
.showcase-info h3 { font-size: 18px; font-weight: 600; margin: 0; text-wrap: balance; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1); color: #fff; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out); z-index: 20; }
.slider-btn:hover { background: rgba(0,0,0,0.8); transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 20; }
.slider-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.slider-dot.active { background: #fff; width: 25px; border-radius: 10px; }

/* ── Partners & Marquee ── */
.partners-title { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); margin-bottom: 20px; font-weight: 700; }
.partners-section { padding: 25px 0 35px 0; background: #12100e; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.marquee-wrapper { overflow: hidden; display: flex; width: 100%; position: relative; -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
/* Two identical sets translated by exactly -50% = seamless loop.
   The old markup repeated the set 6x and shifted -16.667%,
which only
   happened to line up; any change to the set count broke the seam. */
.marquee-track { display: flex; align-items: center; gap: 80px; width: max-content; margin: 0; padding: 0 80px 0 0; list-style: none; animation: scrollMarquee 30s linear infinite; }
.marquee-track:hover,
.marquee-track:focus-within { animation-play-state: paused; }
@keyframes scrollMarquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 40px)); } }

/* An endlessly looping strip is exactly what motion sensitivity flags. */

.logo-item { height: 100px; display: flex; align-items: center; justify-content: center; transition: filter var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); filter: brightness(0) invert(1); opacity: 0.8; flex: 0 0 auto; }
.logo-item:hover { filter: none; opacity: 1; transform: scale(1.08); }
.logo-item img { max-height: 70%; max-width: 100%; width: auto; object-fit: contain; }

/* ── Tools & Tech Stack ── */
.tools-container { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 64px; }
.tools-title { font-size: 24px; font-weight: 850; letter-spacing: -0.02em; margin-bottom: 36px; display: flex; align-items: center; gap: 12px; color: var(--text-main); }
.tools-grid-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.tools-group { display: flex; flex-direction: column; gap: 20px; }
.tools-group-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); border-bottom: 2px solid var(--line); padding-bottom: 10px; margin-bottom: 4px; }
.tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tool-item { display: flex; align-items: center; gap: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 20px; padding: 16px 20px; min-height: 92px; transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); box-shadow: 0 4px 15px rgba(28,25,23,0.015); }
.tool-item:hover { transform: translateY(-3px); border-color: rgba(249,115,22,0.3); box-shadow: 0 12px 30px rgba(28,25,23,0.08); }
.tool-item img,
.tool-item svg { width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; }
.tool-info { display: flex; flex-direction: column; gap: 3px; }
.tool-info h5 { font-size: 15.5px; font-weight: 750; color: var(--text-main); }
.tool-info span { font-size: 12.5px; color: var(--text-muted); font-weight: 550; }

@media (max-width: 990px) { .tools-grid-wrapper { grid-template-columns: 1fr; gap: 32px; } }

/* ── Interactive feedback ── */
/* Press feedback: subtle scale on anything pressable,
fast on the way down. */
.btn:active,
.header-cta:active { --press: 0.96; }

.menu-btn:active,
.filter-btn:active,
.back-to-top:active,
.social-grid a:active,
.portfolio-card:active,
.service-card:active,
.tool-item:active,
.experience-card:active {
  transform: scale(0.97);
  transition: transform var(--dur-instant) var(--ease-out);
}

/* ── YouTube Facade ── */
.yt-facade { position: relative; width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: filter 0.3s ease; z-index: 2; }
.yt-facade::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.25); transition: background 0.3s ease; z-index: 1; }
.yt-facade:hover::after { background: rgba(0,0,0,0.45); }
.yt-play-btn { position: relative; z-index: 2; width: 72px; height: 48px; background-color: rgba(229,9,20,0.9); border-radius: 14px; display: grid; place-items: center; transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275), background-color 0.3s ease; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
.yt-facade:hover .yt-play-btn { transform: scale(1.15); background-color: #ff0000; }
.yt-play-btn svg { width: 22px; height: 22px; fill: var(--bg-card); }

/* ==========================================================================
   LANGUAGE TOGGLE,
CASE STUDY MODAL,
THEME CONTROLS
   ========================================================================== */

.lang-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); margin-right: 1.5rem; }
.lang-sep { opacity: 0.5; }

/* Lucide Icons */

/* Case Study Modal */
.case-study-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.case-study-modal.active { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(12,10,9,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal-content-wrapper { position: relative; width: 92%; max-width: 1200px; height: 88vh; background: rgba(20,18,17,0.97); border: 1px solid rgba(255,255,255,0.1); border-radius: 1.5rem; overflow: hidden; display: flex; flex-direction: column; transform: translateY(20px) scale(0.98); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
.case-study-modal.active .modal-content-wrapper { transform: translateY(0) scale(1); }
.close-modal-btn { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 10; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); color: var(--text-light); width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(4px); transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.close-modal-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
.toggle-info-btn { display: none; }
.modal-layout { display: flex; flex-direction: row; flex: 1; min-height: 0; }
.modal-media { flex: 1 1 100%; background: #000; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.modal-media-blur { position: absolute; top: -10%; left: -10%; width: 120%; height: 120%; background-size: cover; background-position: center; filter: blur(50px) brightness(0.4); transform: scale(1.5); z-index: 1; }
.modal-media iframe,
.modal-media img { width: 100%; height: 100%; object-fit: contain; border: none; position: relative; z-index: 2; }
.modal-yt-btn { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 10; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,0,0,0.88); color: #fff; font-size: 14px; font-weight: 700; padding: 10px 22px; border-radius: 999px; text-decoration: none; backdrop-filter: blur(8px); transition: background 0.2s, transform 0.2s; white-space: nowrap; }
.modal-yt-btn:hover { background: #ff0000; transform: translateX(-50%) scale(1.05); }

.modal-info { display: none; }

/* Mobile Header Controls */
.header-controls { display: flex; align-items: center; }
.desktop-lang { display: flex; }
.mobile-lang-row { display: none; }

/* ── Theme Toggle Button ── */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #ffffff; cursor: pointer; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); padding: 0; margin-right: 1rem; }
.theme-toggle:hover { background: rgba(255,255,255,0.15); transform: scale(1.05); }
:root.light-theme .theme-toggle { background: rgba(28,25,23,0.05); border: 1px solid rgba(28,25,23,0.1); color: var(--text-main); }
:root.light-theme .theme-toggle:hover { background: rgba(28,25,23,0.1); }
.theme-toggle .sun-icon { display: block; }
.theme-toggle .moon-icon { display: none; }
:root.light-theme .theme-toggle .sun-icon { display: none; }
:root.light-theme .theme-toggle .moon-icon { display: block; }

/* ── Scroll word reveal ── */
.reveal-word-mask { display: inline-block; overflow: hidden; vertical-align: bottom; padding-top: 0.25em; margin-top: -0.25em; padding-bottom: 0.15em; margin-bottom: -0.15em; }
.reveal-word { display: inline-block; transform: translateY(100%); transition: transform 0.8s cubic-bezier(0.16,1,0.3,1); }

/* ── Cinematic Loader ── */
.cinematic-loader { position: fixed; inset: 0; background: var(--bg-main); z-index: 99999; display: flex; align-items: center; justify-content: center; transition: opacity 0.6s cubic-bezier(0.77,0,0.175,1), visibility 0.6s; visibility: visible; opacity: 1; }
.cinematic-loader.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo-wrap { width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.loader-logo-svg { width: 100%; height: 100%; }
.logo-path { stroke-dasharray: 400; stroke-dashoffset: 400; animation: strokeAnim 1.4s cubic-bezier(0.4,0,0.2,1) forwards; }
@keyframes strokeAnim { 0% { stroke-dashoffset: 400; fill: rgba(255,122,0,0); } 60% { stroke-dashoffset: 0; fill: rgba(255,122,0,0); } 100% { stroke-dashoffset: 0; fill: rgba(255,122,0,0.12); } }
@keyframes auroraMove1 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(150px,80px) scale(1.1); } 100% { transform: translate(70px,150px) scale(0.95); } }
@keyframes auroraMove2 { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(-120px,-100px) scale(0.9); } 100% { transform: translate(-50px,-200px) scale(1.05); } }

/* ── CV Modal ── */
/* visibility is deliberately NOT transitioned: while it interpolates,
the
   dialog is briefly unfocusable and the close button cannot take focus on
   open. Only opacity fades. */
#cvModal { z-index: var(--z-modal); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity var(--dur-base) var(--ease-out); }
#cvModal.active { opacity: 1; visibility: visible; }
.cv-modal-content { width: 90vw; max-width: 1000px; height: 90vh; background: transparent; border-radius: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: none; transform: translateY(20px) scale(0.98); transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out); border: none; }
#cvModal.active .cv-modal-content { transform: translateY(0) scale(1); }
.cv-modal-content iframe { width: 100%; height: 100%; border: none; background: transparent; }
#cvModal .lightbox-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: rgba(0,0,0,0.6); border: 0; border-radius: 50%; top: 16px; right: 16px; font-size: 28px; z-index: var(--z-max); text-decoration: none; }
@media (max-width: 767px) { #cvModal .lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 24px; } }

/* ==========================================================================
   LIGHT THEME — ALL OVERRIDES CONSOLIDATED
   ========================================================================== */

/* Header */
:root.light-theme .site-header { background: rgba(255,255,255,0.8); border-bottom: 1px solid var(--line); }
:root.light-theme .brand { color: #1c1917; }
:root.light-theme .brand-subtitle { color: rgba(28,25,23,0.6); }
:root.light-theme .main-nav a { color: rgba(28,25,23,0.7); }
:root.light-theme .main-nav a:hover,
:root.light-theme .main-nav a.active { color: #1c1917; background: rgba(28,25,23,0.08); }
:root.light-theme .header-cta { background: #1c1917; color: #ffffff; }
:root.light-theme .header-cta:hover { background: var(--orange); color: #ffffff; }
:root.light-theme .menu-btn { color: #1c1917; border-color: rgba(28,25,23,0.15); }
:root.light-theme .mobile-nav { background: var(--bg-main); border-top: 1px solid var(--line); }
:root.light-theme .mobile-nav a { color: var(--text-muted); }
:root.light-theme .mobile-nav a:hover,
:root.light-theme .mobile-nav a.active { background: rgba(28,25,23,0.05); color: var(--text-main); }

/* Hero */
:root.light-theme .hero { background: var(--bg-main); color: var(--text-main); }
:root.light-theme .hero-bg { background: linear-gradient(135deg, #fafaf9, #f5f5f4 40%, #e7e5e4 70%, #fafaf9); }
:root.light-theme .hero-copy { color: var(--text-muted); }
:root.light-theme .hero h1 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .stat-card { background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow); }
:root.light-theme .stat-number { color: var(--text-main); }
:root.light-theme .stat-label { color: var(--text-muted); }
:root.light-theme .pill { background: rgba(28,25,23,0.05); border: 1px solid rgba(28,25,23,0.1); color: var(--text-muted); }
:root.light-theme .btn-glass { background: rgba(28,25,23,0.05); border: 1px solid rgba(28,25,23,0.1); color: var(--text-main); }
:root.light-theme .btn-glass:hover { background: rgba(28,25,23,0.1); }
:root.light-theme .floating-note { background: rgba(255,255,255,0.85); border: 1px solid var(--line); box-shadow: var(--shadow); }
:root.light-theme .floating-note strong { color: var(--text-main); }
:root.light-theme .floating-note small { color: var(--text-muted); }
:root.light-theme .btn-primary { background: #1c1917; color: #ffffff; }
:root.light-theme .btn-primary:hover { background: #292524; }
:root.light-theme .btn-dark { background: #1c1917; color: #ffffff; }
:root.light-theme .btn-dark:hover { background: #292524; transform: translateY(-2px); }

/* About */
:root.light-theme .about-content h2 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .about-text { color: var(--text-muted); }
:root.light-theme .about-image-inner { background: #ffffff; box-shadow: 0 8px 40px rgba(0,0,0,0.10); }
:root.light-theme .skill-card { background: #ffffff; border-color: rgba(28,25,23,0.09); box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
:root.light-theme .skill-card p { color: var(--text-main); }

/* Experience */
:root.light-theme .experience { background: #f5f5f4; color: var(--text-main); }
:root.light-theme .experience .eyebrow { background: rgba(252,211,77,0.2); border-color: rgba(252,211,77,0.35); color: #92400e; }
:root.light-theme .experience .section-title h2 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .experience .section-title p { color: var(--text-muted); }
:root.light-theme .experience-card { border: 1px solid rgba(28,25,23,0.1); background: #ffffff; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
:root.light-theme .experience-card:hover { border-color: rgba(245,158,11,0.5); background: #fffbf5; box-shadow: 0 8px 32px rgba(245,158,11,0.12); }
:root.light-theme .experience-title-area h3 { color: var(--text-main); }
:root.light-theme .experience-role { color: var(--text-muted); }
:root.light-theme .experience-year { color: #92400e; background: rgba(252,211,77,0.18); }
:root.light-theme .experience-body p { color: var(--text-muted); }
:root.light-theme .link-line { color: #b45309; }
:root.light-theme .experience-logo-box { background: #f9fafb; border-color: rgba(28,25,23,0.1); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* Filter + Services + Portfolio + Tools + Contact + Social + Footer */
:root.light-theme .filter-btn { border-color: rgba(28,25,23,0.12); background: #ffffff; color: var(--text-muted); }
:root.light-theme .filter-btn:hover { border-color: rgba(245,158,11,0.5); color: var(--text-main); background: #fffbf5; }
:root.light-theme .filter-btn[aria-pressed="true"] { border-color: #1c1917; background: #1c1917; color: #ffffff; box-shadow: 0 6px 20px rgba(28,25,23,0.2); }
:root.light-theme .service-card { background: #ffffff; border-color: rgba(28,25,23,0.09); box-shadow: 0 2px 16px rgba(0,0,0,0.05); }
:root.light-theme .service-card:hover { border-color: rgba(245,158,11,0.5); background: #fffbf5; box-shadow: 0 8px 32px rgba(245,158,11,0.12); }
:root.light-theme .service-icon { background: #f5f5f4; color: #b45309; }
:root.light-theme .service-card:hover .service-icon { background: var(--amber); color: #1c1917; }
:root.light-theme .service-card h3 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .service-card p { color: var(--text-muted); }
:root.light-theme .portfolio-card { background: #ffffff; border: 1px solid rgba(28,25,23,0.09); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
:root.light-theme .portfolio-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
:root.light-theme .portfolio-body { background: #ffffff; }
:root.light-theme .portfolio-body h3 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .client { color: #a16207; }
:root.light-theme .portfolio-thumb::after { background: linear-gradient(to top, rgba(28,25,23,0.7), rgba(28,25,23,0.04), transparent); }
:root.light-theme .tag { background: rgba(255,255,255,0.95); color: #1c1917; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
:root.light-theme #portfolio,
:root.light-theme #portfolio .section-title h2 { color: var(--text-main); }
:root.light-theme #portfolio { background: #f5f5f4; }
:root.light-theme .section-title h2 { color: var(--text-main); text-wrap: balance; }
:root.light-theme .section-title p { color: var(--text-muted); }
:root.light-theme .bg-soft { background: #f5f5f4; }
:root.light-theme .bg-white { background: #ffffff; }
:root.light-theme .tool-item { background: #ffffff; border: 1px solid rgba(28,25,23,0.09); box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
:root.light-theme .tool-item:hover { border-color: rgba(245,158,11,0.4); box-shadow: 0 6px 24px rgba(245,158,11,0.1); }
:root.light-theme .tool-info h5 { color: var(--text-main); }
:root.light-theme .tool-info span { color: var(--text-muted); }
:root.light-theme .tools-group-title { color: var(--text-muted); border-bottom-color: rgba(28,25,23,0.1); }
:root.light-theme .contact-item { background: rgba(255,255,255,0.7); border: 1px solid rgba(28,25,23,0.08); }
:root.light-theme .contact-item .ci-icon { color: var(--brown); }
:root.light-theme .contact-item small { color: #92400e; }
:root.light-theme .contact-item strong,
:root.light-theme .contact-item a { color: var(--brown); }
:root.light-theme .contact-section .eyebrow { background: rgba(122,76,37,0.12); border-color: rgba(122,76,37,0.2); color: var(--brown); }
:root.light-theme .contact-section .btn-dark { background: var(--brown); color: #ffffff; }
:root.light-theme .contact-section .btn-dark:hover { background: #1c1917; }
:root.light-theme .contact-section .btn-light { border: 1px solid rgba(122,76,37,.35); background: rgba(255,255,255,.8); color: var(--brown); }
:root.light-theme .contact-form input,
:root.light-theme .contact-form textarea { background: rgba(255,255,255,0.8); border-color: rgba(122,76,37,0.2); color: var(--brown); }
:root.light-theme .contact-form input::placeholder,
:root.light-theme .contact-form textarea::placeholder { color: rgba(122,76,37,0.5); }
:root.light-theme .contact-form input:focus,
:root.light-theme .contact-form textarea:focus { border-color: var(--brown); background: #ffffff; }
:root.light-theme .social-grid a { background: rgba(255,255,255,0.6); color: var(--brown); border: 1px solid rgba(122,76,37,0.15); }
:root.light-theme .social-grid a:hover { background: var(--amber); color: #1c1917; border-color: transparent; }
:root.light-theme .site-footer { background: var(--bg-main); color: var(--text-muted); border-top: 1px solid var(--line); }
:root.light-theme .back-to-top { background: #1c1917; color: #fcd34d; border-color: #1c1917; }
:root.light-theme .back-to-top:hover { background: var(--brown); }
:root.light-theme #services .eyebrow,
:root.light-theme #about .eyebrow,
:root.light-theme #tools .eyebrow,
:root.light-theme #portfolio .eyebrow { background: rgba(252,211,77,0.2); border-color: rgba(252,211,77,0.35); color: #92400e; }

/* Showcase light */
:root.light-theme .showcase-slider { background: #ffffff; border: 1px solid rgba(28,25,23,0.09); }
:root.light-theme .showcase-info { background: rgba(255,255,255,0.92); color: #1c1917; border: 1px solid rgba(28,25,23,0.12); box-shadow: 0 4px 24px rgba(0,0,0,0.10); }
:root.light-theme .showcase-info h3 { color: #1c1917; text-wrap: balance; }
:root.light-theme .showcase-info .tag { background: var(--orange); color: #ffffff; }
:root.light-theme .showcase-bg-blur { filter: blur(24px) brightness(0.85) saturate(0.8); opacity: 0.4; }
:root.light-theme .slider-btn { background: rgba(255,255,255,0.85); color: #1c1917; border: 1px solid rgba(28,25,23,0.15); box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
:root.light-theme .slider-btn:hover { background: #ffffff; color: #1c1917; }
:root.light-theme .slider-dot { background: rgba(28,25,23,0.2); }
:root.light-theme .slider-dot.active { background: #1c1917; }
:root.light-theme .partners-section { background: #f5f5f4; border-top: 1px solid #e7e5e4; border-bottom: 1px solid #e7e5e4; }
:root.light-theme .partners-title { color: rgba(28,25,23,0.4); }
:root.light-theme .logo-item { filter: grayscale(100%) brightness(0.2); opacity: 0.6; }
:root.light-theme .logo-item:hover { filter: grayscale(0%); opacity: 1; }
:root.light-theme .lang-btn { color: var(--text-muted); }
:root.light-theme .lang-btn:hover { color: var(--text-main); }
:root.light-theme .lang-btn.active { color: var(--orange); font-weight: 800; }
:root.light-theme .lang-sep { color: var(--text-muted); }
:root.light-theme .cursor-spotlight { background: radial-gradient(circle, rgba(245,120,0,0.25) 0%, transparent 70%); mix-blend-mode: multiply; }
:root.light-theme .scroll-progress { background: var(--orange); }
:root.light-theme .modal-content-wrapper { background: rgba(255,255,255,0.97); border: 1px solid var(--line); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15); }
:root.light-theme .close-modal-btn { background: rgba(28,25,23,0.05); border: 1px solid rgba(28,25,23,0.1); color: var(--text-main); }
:root.light-theme .close-modal-btn:hover { background: rgba(28,25,23,0.1); }
:root.light-theme .cv-social-btn { background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1); color: #1c1917; }
:root.light-theme .cv-social-btn:hover { background: rgba(0,0,0,0.08); }
:root.light-theme .cv-item-date { color: #c2410c; background: rgba(234,88,12,0.15); }
