@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-color: #030303;
  --text-main: #ffffff;
  --text-muted: #888888;

  /* True Frosted Dark Glass */
  --bento-bg: rgba(255, 255, 255, 0.04);
  --bento-border: rgba(255, 255, 255, 0.08);
  --bento-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.04);

  /* Reduced blur intensity: 16px is visually indistinguishable from 24px but 60% cheaper for WebKit compositing */
  --glass-blur: blur(16px) saturate(1.4);
  --accent: #ffffff;
  --selection-bg: rgba(30, 144, 255, 0.4);
  --nav-bg: rgba(20, 20, 22, 0.15);

  /* Dynamic Mesh Glow */
  --mesh-1: rgba(30, 144, 255, 0.12);
  --mesh-2: rgba(138, 43, 226, 0.12);
  --mesh-3: rgba(0, 255, 170, 0.08);
}

[data-theme="light"] {
  --bg-color: #fafafa;
  --text-main: #111111;
  --text-muted: #555555;

  /* Frosted White Glass */
  --bento-bg: rgba(255, 255, 255, 0.7);
  --bento-border: rgba(255, 255, 255, 1);
  --bento-shadow: inset 0 1px 1px rgba(255, 255, 255, 1),
    0 24px 48px rgba(0, 0, 0, 0.03),
    0 0 0 1px rgba(0, 0, 0, 0.02);

  --accent: #111111;
  --selection-bg: rgba(30, 144, 255, 0.2);
  --nav-bg: rgba(255, 255, 255, 0.55);

  --mesh-1: rgba(30, 144, 255, 0.15);
  --mesh-2: rgba(138, 43, 226, 0.15);
  --mesh-3: rgba(0, 255, 170, 0.1);
}

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

/* Safari: eliminate 300ms tap delay on ALL interactive-looking elements globally */
a, button, [onclick], [role="button"], .btn-sm, .btn-primary, .btn-secondary,
.social-icon, .bento-box, .brand-box, .gear-box, .resource-box, .reel-box,
.content-box, .magnetic, .magnetic-brand, .nav-link, .mobile-nav-link,
.hamburger, #theme-toggle {
  touch-action: manipulation;
  -webkit-touch-callout: none;
}

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

/* Scrollbar styles defined below in the Nano Scrollbar section */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  transition: background-color 0.8s cubic-bezier(0.16, 1, 0.3, 1), color 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Disable the grey tap-highlight flash on iOS/Safari — it creates visual lag */
  -webkit-tap-highlight-color: transparent;
}

/* =========================================
   Preloader
========================================= */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-color);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  pointer-events: all;
  transition: opacity 0.8s ease, visibility 0s 0.8s;
}

body.loaded #preloader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  position: relative;
  z-index: 1;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

body.loaded .preloader-content {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
}

.preloader-counter {
  font-size: 5vw;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text-main);
}

.preloader-name {
  font-size: clamp(10px, 1.2vw, 18px);
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.5;
  margin-top: 10px;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .preloader-counter {
    font-size: 12vw;
  }

  .preloader-name {
    font-size: clamp(11px, 3.5vw, 16px);
    letter-spacing: 3px;
  }
}

/* =========================================
   Film Grain Overlay
========================================= */
.film-grain {
  position: fixed;
  inset: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  z-index: 9998;
  /* Film grain: fixed overlay. On Safari, the SVG feTurbulence filter is very expensive.
     We keep will-change: transform to get a dedicated compositor layer which prevents
     Safari from re-compositing the whole page on each jitter frame. */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  animation: film-jitter 0.6s steps(3) infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

[data-theme="light"] .film-grain {
  opacity: 0.08;
  mix-blend-mode: multiply;
}

/* Disable film grain on mobile for scroll performance */
@media (max-width: 768px) {
  .film-grain {
    display: none !important;
  }
}

/* =========================================
   Mesh Background with Film Grain
========================================= */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-color);
}

.color-blob {
  position: absolute;
  filter: blur(120px);
  border-radius: 50%;
  animation: float 25s infinite ease-in-out alternate;
  opacity: 1;
}

.blob-1 {
  background: var(--mesh-1);
  width: 70vw;
  height: 70vw;
  top: -20%;
  left: -10%;
}

.blob-2 {
  background: var(--mesh-2);
  width: 60vw;
  height: 60vw;
  bottom: -20%;
  right: -10%;
  animation-delay: -7s;
}

.blob-3 {
  background: var(--mesh-3);
  width: 50vw;
  height: 50vw;
  top: 30%;
  left: 30%;
  animation-delay: -14s;
}

@keyframes film-jitter {
  0% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-2%, -2%);
  }

  20% {
    transform: translate(2%, -2%);
  }

  30% {
    transform: translate(-2%, 2%);
  }

  40% {
    transform: translate(2%, 2%);
  }

  50% {
    transform: translate(1%, -1%);
  }

  60% {
    transform: translate(-1%, 1%);
  }

  70% {
    transform: translate(2%, 0);
  }

  80% {
    transform: translate(-2%, 0);
  }

  90% {
    transform: translate(0, 2%);
  }

  100% {
    transform: translate(0, -2%);
  }
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  33% {
    transform: translate(-10%, 15%) scale(1.15) rotate(15deg);
  }

  66% {
    transform: translate(15%, -10%) scale(0.9) rotate(-10deg);
  }

  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

/* =========================================
   Custom Cursor
========================================= */
@media (pointer: fine) {
  body {
    cursor: none;
  }

  a,
  button,
  .bento-box {
    cursor: none !important;
  }

  /* Safari: custom cursor hover uses backdrop-filter which is expensive;
     use a simple semi-transparent bg instead to avoid compositing stall */

  /* Cursor uses transform for GPU-accelerated positioning — zero lag */
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    /* transform set by JS via translate() — no transition on position */
    transform: translate(0px, 0px) translate(-50%, -50%);
    transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
      height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
      background 0.35s ease,
      border 0.35s ease,
      opacity 0.35s ease;
    z-index: 10000;
    mix-blend-mode: difference;
    will-change: transform;
  }

  .custom-cursor.hovering {
    width: 64px;
    height: 64px;
    /* Removed backdrop-filter: Safari creates a new stacking context per
       backdrop-filter element; 64 hovering cursors = 64 repaint triggers.
       Using semi-transparent bg achieves same visual at zero compositor cost. */
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.5);
    mix-blend-mode: normal;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .cursor-text {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-transform: uppercase;
  }

  .custom-cursor.hovering .cursor-text {
    opacity: 1;
  }

  [data-theme="light"] .cursor-text {
    color: #111;
  }

  .click-ripple {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%) scale(0);
    z-index: 10001;
  }

  [data-theme="light"] .click-ripple {
    border: 1px solid rgba(0, 0, 0, 0.5);
  }

  .custom-cursor-trail {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
    /* transform set by JS — no transition here for smoothness */
    transform: translate(0px, 0px) translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    will-change: transform;
  }

  .custom-cursor-trail.hovering {
    opacity: 0;
  }
}

/* =========================================
   Typography & Utils
 ========================================= */
a {
  text-decoration: none;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.04em;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--text-main) 0%, var(--text-main) 25%, #1e90ff 45%, #8a2be2 55%, var(--text-main) 75%, var(--text-main) 100%);
  background-size: 250% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* =========================================
   Navbar (Floating Pill)
========================================= */
.bento-nav {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 90%;
  max-width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 8px 8px 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px) saturate(2.5);
  -webkit-backdrop-filter: blur(16px) saturate(2.5);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  z-index: 1000;
  box-shadow: var(--bento-shadow);
  transition: top 0.4s ease, padding 0.4s ease, width 0.4s ease, box-shadow 0.4s ease;
}

/* Scrolled state — nav shrinks */
.bento-nav.scrolled {
  top: 14px;
  width: 85%;
  padding: 6px 6px 6px 22px;
}

.can-hover .bento-nav.scrolled:hover {
  top: 24px;
  width: 90%;
  padding: 8px 8px 8px 24px;
}

.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

/* ---- Desktop nav-links container ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 100px;
  position: relative;
}

[data-theme="light"] .nav-links {
  background: rgba(0, 0, 0, 0.04);
}

/* Sliding background indicator */
.nav-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1), width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 0;
}

[data-theme="light"] .nav-indicator {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  z-index: 1;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 100px;
  transition: color 0.25s ease;
  white-space: nowrap;
}

.can-hover .nav-link:hover {
  color: var(--text-main);
}

.nav-link.active {
  color: var(--text-main);
}

/* ---- Actions ---- */
.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

/* ---- Hamburger (hidden on desktop) ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bento-border);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.can-hover .hamburger:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hamburger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--text-main);
  border-radius: 4px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
  will-change: auto;
}

/* X animation when open */
.hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Scroll lock for mobile menu — uses position:fixed instead of overflow:hidden
   because overflow:hidden on body triggers catastrophic relayout on iOS Safari */
body.scroll-locked {
  position: fixed;
  width: 100%;
  overflow-y: scroll; /* keeps scrollbar width to prevent layout shift */
  touch-action: none; /* block touch scroll while menu is open */
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  overflow: hidden;
}

.mobile-menu-bg {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}

[data-theme="light"] .mobile-menu-bg {
  background: rgba(245, 245, 250, 0.85);
}

.mobile-menu.open {
  pointer-events: all;
}

.mobile-menu.open .mobile-menu-bg {
  opacity: 1;
}

.mobile-menu-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  padding: 100px 40px 60px;
  gap: 3rem;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--bento-border);
  transition: color 0.3s ease, padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0;
  transform: translateY(30px);
}

.can-hover .mobile-nav-link:hover {
  color: var(--text-main);
  padding-left: 1rem;
}

.mobile-nav-link.active {
  color: var(--text-main);
}

.mnl-num {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.mobile-menu-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Animate items in */
.mobile-menu.open .mobile-nav-link {
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu.open .mobile-nav-link:nth-child(1) {
  animation-delay: 0.1s;
}

.mobile-menu.open .mobile-nav-link:nth-child(2) {
  animation-delay: 0.17s;
}

.mobile-menu.open .mobile-nav-link:nth-child(3) {
  animation-delay: 0.24s;
}

.mobile-menu.open .mobile-nav-link:nth-child(4) {
  animation-delay: 0.31s;
}

.mobile-menu.open .mobile-menu-footer {
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-color);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-primary {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bento-border);
  color: var(--text-main);
}

.can-hover .btn-primary:hover,
.can-hover .btn-secondary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

#theme-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bento-border);
  color: var(--text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.can-hover #theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}



/* =========================================
   Layout Containers & Edge Lighting
========================================= */
.bento-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 140px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 6rem;
}

.bento-box {
  background: var(--bento-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 32px;
  padding: 32px;
  box-shadow: var(--bento-shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.6s ease;
  z-index: 1;
  /* Removed will-change: transform; because it forces software rendering in Safari when combined with backdrop-filter */
}

/* Border: static subtle glow instead of spinning conic-gradient animation.
   The @property conic-gradient animation forced full layer repaint on every bento-box
   every single frame in Safari — the single biggest cause of scroll lag. */
.bento-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--bento-border);
  pointer-events: none;
  z-index: 0;
}

/* Edge Lighting Glow (tracked by JS) */
.bento-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

[data-theme="light"] .bento-box::after {
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(0, 0, 0, 0.04), transparent 40%);
}

.can-hover .bento-box:hover::after {
  opacity: 1;
}

.can-hover .bento-box:hover {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1),
    0 32px 64px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .can-hover .bento-box:hover {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 1),
    0 32px 64px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.4);
}

/* =========================================
   Scroll Progress Indicator
========================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #1e90ff, #8a2be2, #00ffaa);
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

/* =========================================
   Hero Section
========================================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: 1.2rem;
}

.bento-hero-main {
  grid-column: span 4;
  grid-row: span 2;
  display: flex;
  align-items: center;
  padding: 4rem 3rem;
}

.hero-avatar-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-avatar-container::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #1e90ff, #8a2be2, #00ffaa, #1e90ff);
  animation: holo-spin 4s linear infinite;
  z-index: -1;
  filter: blur(4px);
  opacity: 0.6;
}

@keyframes holo-spin {
  100% {
    transform: rotate(360deg);
  }
}

.hero-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  border: 4px solid var(--bg-color);
  z-index: 1;
  animation: avatar-breathe 6s ease-in-out infinite;
}

@keyframes avatar-breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content h1 span {
  background: linear-gradient(180deg, var(--text-main) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.bento-socials {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-socials h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bento-border);
  font-size: 1.8rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon svg {
  width: 1.8rem;
  height: 1.8rem;
}

[data-theme="light"] .social-icon {
  background: rgba(0, 0, 0, 0.02);
}

.can-hover .social-icon:hover {
  transform: scale(1.05);
  border-color: transparent;
  color: white !important;
}

.can-hover .social-icon:hover .fa-instagram {
  color: white;
}

.social-icon:has(.fa-instagram):hover {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  box-shadow: 0 8px 24px rgba(214, 36, 159, 0.4);
}

.can-hover .social-icon:hover .fa-youtube {
  color: white;
}

.social-icon:has(.fa-youtube):hover {
  background: #FF0000;
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.4);
}

.can-hover .social-icon:hover .fa-discord {
  color: #5865F2;
}

.can-hover .social-icon:has(.fa-discord):hover {
  background: #5865F2;
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}

.can-hover .social-icon:hover .fa-envelope {
  color: white;
}

.can-hover .social-icon:has(.fa-envelope):hover {
  background: linear-gradient(135deg, #007AFF 0%, #0056D2 100%);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.4);
}

.bento-mediakit {
  grid-column: span 2;
  padding: 0;
}

.mediakit-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  padding: 32px;
  position: relative;
}

.mk-bg {
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle at center, rgba(30, 144, 255, 0.4), rgba(138, 43, 226, 0.4), transparent 60%);
  z-index: 0;
  animation: pulse-mk 10s infinite alternate ease-in-out;
}

[data-theme="light"] .mk-bg {
  background: radial-gradient(circle at center, rgba(30, 144, 255, 0.25), rgba(138, 43, 226, 0.25), transparent 60%);
}

@keyframes pulse-mk {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.2) rotate(15deg);
    opacity: 1;
  }
}

.mk-content {
  position: relative;
  z-index: 1;
}

.mk-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.mk-handle {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0.5rem 0 1rem;
}

.mk-tags-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-inner {
  display: flex;
  gap: 0.5rem;
  animation: scrollLeft 15s linear infinite;
  white-space: nowrap;
}

.marquee-inner span {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

[data-theme="light"] .marquee-inner span {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.05);
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.mk-arrow {
  position: absolute;
  bottom: 32px;
  right: 32px;
  background: var(--text-main);
  color: var(--bg-color);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.can-hover .bento-mediakit:hover .mk-arrow {
  transform: translateX(8px) scale(1.1);
}



/* =========================================
   Brands
========================================= */
.brands-marquee-wrapper {
  overflow: hidden;
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  padding: 2rem 0 3rem;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  cursor: grab;
}

.brands-marquee-wrapper:active {
  cursor: grabbing;
}

.brands-marquee-track {
  display: flex;
  gap: 1.2rem;
  width: max-content;
  animation: scrollBrands 30s linear infinite;
}

.can-hover .brands-marquee-wrapper:hover .brands-marquee-track {
  animation-play-state: paused;
}

/* Dim non-hovered cards when hovering the strip */
.can-hover .brands-marquee-wrapper:hover .brand-box:not(:hover) {
  opacity: 0.3;
  filter: blur(1px) saturate(0.4);
  transform: scale(0.97);
}

@keyframes scrollBrands {
  to { transform: translateX(calc(-50% - 0.6rem)); }
}

/* ---- Brand Box ---- */
.brand-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0;
  width: 220px;
  flex-shrink: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--bento-bg) !important;
  /* backdrop-filter removed: cards sit on opaque background, blur is invisible but wastes a compositor layer */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  overflow: hidden !important;
  border-radius: 24px !important;
}

[data-theme="light"] .brand-box {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.can-hover .brand-box:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

[data-theme="light"] .can-hover .brand-box:hover {
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

/* ---- Colored Accent Bar (top) ---- */
.brand-accent-bar {
  width: 100%;
  height: 3px;
  flex-shrink: 0;
  z-index: 2;
  transition: height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s ease;
  opacity: 0.7;
}

.can-hover .brand-box:hover .brand-accent-bar {
  height: 4px;
  opacity: 1;
}

.aorus-bar    { background: linear-gradient(90deg, #FF6600, #FF9500); }
.deepcool-bar { background: linear-gradient(90deg, #00A58F, #00D4B4); }
.epomaker-bar { background: linear-gradient(90deg, #D90082, #FF4DB8); }
.tplink-bar   { background: linear-gradient(90deg, #009FCC, #0064A8); }
.iine-bar     { background: linear-gradient(135deg, #FF0066, #FF6600); }

/* ---- Inner content wrapper ---- */
.brand-content-3d {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.2rem 1.5rem 1.8rem;
  width: 100%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

/* ---- Logo Wrapper ---- */
.brand-logo-wrap {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.6rem;
}

.brand-logo {
  height: 34px;
  max-width: 130px;
  object-fit: contain;
  filter: brightness(0) invert(1) opacity(0.65);
  transition: filter 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .brand-logo {
  filter: brightness(0) opacity(0.55);
}

.can-hover .brand-box:hover .brand-logo {
  filter: brightness(0) invert(1) opacity(1);
  transform: scale(1.1);
}

[data-theme="light"] .can-hover .brand-box:hover .brand-logo {
  filter: brightness(0) opacity(1);
  transform: scale(1.1);
}

/* ---- Category label ---- */
.brand-text-logo {
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 1.5px;
  color: var(--text-main);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s ease;
  margin-bottom: 1.6rem;
}

[data-theme="light"] .brand-text-logo {
  color: #111111;
}

.can-hover .brand-box:hover .brand-text-logo {
  transform: scale(1.1);
}

.brand-cat {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  margin: 0;
  transition: color 0.3s ease;
}

.can-hover .brand-box:hover .brand-cat {
  color: var(--text-main);
}

/* ---- Corner arrow — appears on hover ---- */
.brand-corner-arrow {
  position: absolute;
  bottom: 1rem;
  right: 1.1rem;
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0;
  transform: translate(4px, 4px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
  line-height: 1;
}

.can-hover .brand-box:hover .brand-corner-arrow {
  opacity: 0.6;
  transform: translate(0, 0);
}

/* ---- Glow (bottom-right) ---- */
.brand-glow {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.06;
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
  z-index: 0;
}

.can-hover .brand-box:hover .brand-glow {
  opacity: 0.5;
  transform: scale(1.35);
}

.brand-glow.aorus    { background: #FF6600; }
.brand-glow.deepcool { background: #00C9A7; }
.brand-glow.epomaker { background: #D90082; }
.brand-glow.tplink   { background: #00B0DC; }

/* Constrain VanillaTilt glare */
.brand-box .js-tilt-glare {
  border-radius: inherit;
  overflow: hidden;
}

/* =========================================
   Portfolio / Content
========================================= */
.bento-grid-reels,
.bento-grid-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 1.2rem;
}

.reel-box {
  min-height: 400px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  border-radius: 32px;
  /* Safari: cursor:pointer ensures the tap target is recognized immediately */
  cursor: pointer;
}

.content-box {
  min-height: 280px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  border-radius: 32px;
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  z-index: 0;
}

.reel-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  /* Removed backdrop-filter: these tiny pill badges sit on dark-overlay cards.
     The visual difference is nil but the compositor cost is significant on WebKit.
     The rgba background provides sufficient frosted-glass effect. */
  background: rgba(30, 30, 35, 0.7);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  z-index: 1;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.reel-info,
.reel-actions {
  position: relative;
  z-index: 1;
  color: white;
}

.reel-info h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.reel-info p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
}

.reel-actions {
  display: flex;
  gap: 0.8rem;
}

.btn-sm {
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  /* Removed backdrop-filter: btn-sm sits on top of reel-box which already has
     a dark overlay. The blur is invisible but costs a full compositor layer.
     This was causing perceptible tap-response lag on Safari/WebKit. */
  background: rgba(255, 255, 255, 0.12);
  transition: all 0.3s ease;
  white-space: nowrap;
  /* Explicitly set on span elements that use onclick (not just a/button) */
  -webkit-user-select: none;
  user-select: none;
}

.btn-sm.btn-solid {
  background: white;
  color: black;
  border-color: transparent;
}

.can-hover .btn-sm:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.can-hover .btn-sm.btn-solid:hover {
  background: #e0e0e0;
}

/* content-box sizing handled by .swiper-slide.content-box (see bottom of file) */
/* .content-box .play-icon and .content-chip are defined in the Premium Content Preview UI section below */

/* =========================================
   Gear / Resources
========================================= */
.bento-grid-gear {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.gear-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.gear-img-wrapper {
  height: 140px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.gear-img-wrapper img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  mix-blend-mode: multiply;
}

.can-hover .gear-box:hover img {
  transform: scale(1.15) translateY(-8px);
}

.gear-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.gear-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.bento-grid-resources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 1.2rem;
}

.resource-box {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
}

.resource-box img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.resource-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.resource-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.resource-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.can-hover .resource-box:hover .resource-cta {
  text-decoration: underline;
}

/* =========================================
   Notices
========================================= */
.notices-section {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.notice-box {
  padding: 1.5rem 2rem;
  border-radius: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.notice-box p {
  margin: 0;
}

.notice-box strong {
  color: var(--text-main);
}

/* =========================================
   Footer
========================================= */
.bento-footer {
  margin-top: 0;
  padding: 2rem 24px 5rem;
  text-align: center;
  position: relative;
}

.bento-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bento-border), transparent);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.footer-brand h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-socials .social-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  /* perfect circle */
  aspect-ratio: auto;
  flex-shrink: 0;
}

.footer-copy p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================================
   Lenis Smooth Scrolling
========================================= */
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;
}

/* =========================================
   VanillaTilt 3D adjustments
========================================= */
/* Disabled VanillaTilt 3D translateZ adjustments due to Safari bug with preserve-3d + overflow:hidden */

/* =========================================
   Mobile Responsiveness Overrides
========================================= */

/* --- Tablet: 1024px and below --- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-hero-main {
    grid-column: span 2;
  }

  .bento-socials,
  .bento-mediakit {
    grid-column: span 1;
  }

  .bento-grid-gear {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .bento-grid-brands {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Mobile: 768px and below --- */
@media (max-width: 768px) {

  /* Ensure text elements revealed by GSAP are always visible on mobile */
  .reveal-mask-inner {
    transform: translateY(0) !important;
  }
  .section-title, .hero-desc {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Tap active states for touch devices — exclude swiper slides to not conflict with swipe drag */
  a:active,
  button:active,
  .bento-box:not(.swiper-slide):active {
    transform: scale(0.97) !important;
    transition: transform 0.1s ease !important;
  }


  /* ---- Navbar ---- */
  .bento-nav {
    width: 92%;
    top: 12px;
    border-radius: 20px;
    padding: 8px 8px 8px 20px;
    gap: 8px;
  }

  .nav-brand {
    font-size: 1rem;
  }

  /* Hide desktop nav links pill on mobile */
  .nav-links {
    display: none;
  }

  /* Hide Media Kit button on mobile — it's in the overlay instead */
  #nav-mediakit-btn {
    display: none;
  }

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  #theme-toggle {
    width: 36px;
    height: 36px;
  }

  /* ---- Layout ---- */
  .bento-container {
    padding: 100px 14px 60px;
    gap: 2.5rem;
  }

  .bento-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Kill all grid col/row overrides on mobile */
  .bento-box {
    grid-column: unset !important;
    grid-row: unset !important;
  }

  /* ---- Hero ---- */
  .bento-hero-main {
    padding: 2.5rem 1.5rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .hero-avatar-container {
    width: 110px;
    height: 110px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.95rem;
    max-width: 100%;
    margin-bottom: 1.5rem;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  /* ---- Section Titles ---- */
  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
  }

  /* ---- Brands ---- */
  .bento-grid-brands {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .brand-box {
    padding: 2rem 1rem;
  }

  .brand-logo {
    height: 36px;
  }

  /* ---- Portfolio / Reels / Content ---- */
  .bento-grid-reels,
  .bento-grid-content {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    /* Hide scrollbar */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bento-grid-reels::-webkit-scrollbar,
  .bento-grid-content::-webkit-scrollbar {
    display: none;
  }

  .reel-box {
    height: 350px;
    min-width: min(280px, 80vw);
    scroll-snap-align: center;
  }

  .content-box {
    min-height: 250px;
    min-width: min(280px, 80vw);
    scroll-snap-align: center;
  }

  /* ---- Gear ---- */
  .bento-grid-gear {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .bento-grid-gear::-webkit-scrollbar {
    display: none;
  }

  .gear-box {
    min-width: 200px;
    padding: 1.2rem;
    scroll-snap-align: center;
  }

  /* ---- Resources ---- */
  .bento-grid-resources {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .resource-box img {
    width: 80px;
    height: 80px;
  }

  /* ---- Socials ---- */
  .social-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7rem;
  }

  .bento-socials {
    min-height: auto;
  }

  .bento-socials .social-icon {
    width: 100%;
    height: 60px;
    aspect-ratio: unset;
    /* override the desktop square ratio */
    border-radius: 16px;
    font-size: 1.5rem;
  }

  /* ---- Footer ---- */
  .bento-footer {
    padding: 3rem 1rem;
  }

  .footer-brand h2 {
    font-size: 1.8rem;
  }



  /* ---- Hero fallback visibility ---- */
  /* On mobile we skip the letter-by-letter GSAP animation, so force all spans visible */
  .hero-content h1,
  .hero-content h1 span {
    opacity: 1 !important;
    transform: none !important;
    display: inline-block;
  }

  .bento-hero-main {
    text-align: center;
    min-height: auto;
  }

  .hero-content {
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  /* ---- Dynamic Island — hide on mobile ---- */
  .dynamic-island {
    display: none !important;
  }

  /* ---- Portfolio mobile mode ---- */
  .horizontal-scroll-container {
    display: none !important;
  }

  .portfolio-mobile {
    display: block;
    padding: 0;
  }

  .portfolio-mobile .section-title {
    margin-bottom: 1.2rem;
  }

  .portfolio-mobile .bento-grid-reels,
  .portfolio-mobile .bento-grid-content {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 1rem;
    padding-bottom: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .portfolio-mobile .bento-grid-reels::-webkit-scrollbar,
  .portfolio-mobile .bento-grid-content::-webkit-scrollbar {
    display: none;
  }

  .portfolio-mobile .reel-box {
    width: 260px !important;
    min-width: 260px !important;
    height: 320px !important;
    scroll-snap-align: start;
  }

  .portfolio-mobile .content-box {
    width: 260px !important;
    min-width: 260px !important;
    scroll-snap-align: start;
  }

  /* ---- touch-action on interactive elements ---- */
  /* Exclude .swiper-slide: touch-action:manipulation blocks horizontal swipe
     detection needed by Swiper. Swiper slides inherit .bento-box so we must
     explicitly exclude them. */
  a,
  button,
  .bento-box:not(.swiper-slide),
  .gear-box,
  .brand-box {
    touch-action: manipulation;
  }
  /* Swiper slides need pan-y so the browser only locks vertical scroll,
     letting Swiper detect horizontal swipe freely */
  .swiper-slide {
    touch-action: pan-y;
  }

} /* end @media (max-width: 768px) */


/* --- Phones: 600px and below --- */
@media (max-width: 600px) {
  .bento-grid-gear {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: visible;
  }

  .bento-grid-gear .gear-box {
    min-width: 0;
    padding: 1rem;
    scroll-snap-align: unset;
  }

  .gear-img-wrapper {
    height: 100px;
    padding: 0.5rem;
  }

  .gear-title {
    font-size: 0.9rem;
  }
}

/* --- Small phones: 480px and below --- */
@media (max-width: 480px) {
  .bento-container {
    padding: 90px 10px 50px;
  }

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .bento-grid-brands {
    grid-template-columns: 1fr 1fr;
  }

  .reel-box {
    height: 260px;
  }
}


/* Glass Shimmer Effect */
.glass-shimmer {
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
  z-index: 2;
}

.can-hover .bento-box:hover .glass-shimmer {
  animation: shimmer-sweep 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes shimmer-sweep {
  0% {
    left: -150%;
  }

  100% {
    left: 250%;
  }
}


/* =========================================
   Ultimate Tier Upgrades
========================================= */

/* Preloader CSS consolidated above */
body.loaded .preloader-content {
  opacity: 0;
  transform: translateY(-20px) scale(0.9);
}

/* 2. Liquid Distortion Avatar */
.hero-avatar {
  transition: filter 0.8s ease;
}

/* Only enable SVG filter hover on non-WebKit browsers.
   WebKit runs feTurbulence on the CPU, triggering a full repaint every mousemove frame.
   The JS guard (isSafari check) also prevents the animation from running, but
   this CSS guard prevents the browser from even parsing/activating the filter. */
@supports not (-webkit-touch-callout: none) {
  .can-hover .hero-avatar:hover {
    filter: url('#liquid') brightness(1.1);
  }
}

/* 3. Dynamic Island Status Bar */
.dynamic-island {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  /* Reduced blur from 20px → 10px: perceptually identical on this dark element
     but 50% cheaper for Safari's compositor which re-blurs on every scroll frame */
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 24px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .dynamic-island {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.loaded .dynamic-island {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.di-dot {
  width: 8px;
  height: 8px;
  background: #00ff88;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff88;
  animation: di-pulse 2s infinite ease-in-out;
}

.di-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-main);
}

@keyframes di-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

/* 4. Custom Nano Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  /* Ultra thin */
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.can-hover ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .can-hover ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.6);
}


/* =========================================
   Zenith Tier Upgrades
========================================= */

/* Portfolio CSS moved to bottom */

/* 2. Typographic Mask Reveals */
.reveal-mask {
  overflow: hidden;
  display: block;
}

.reveal-mask-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-mask.is-revealed .reveal-mask-inner {
  transform: translateY(0);
}


/* =========================================
   Premium Content Preview UI
========================================= */
.content-box {
  /* Height controlled by .swiper-slide.content-box */
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* content-box::after bloom glow removed: background:inherit + filter causes full repaint on every hover.
   The reel-overlay gradient already provides the dark vignette effect. */

.can-hover .content-box:hover {
  background-size: 110%;
  /* Cinematic slow zoom */
}

.can-hover .content-box:hover::after {
  opacity: 1;
  /* Glow effect behind */
}

/* Base overlay for readability */
.content-box .reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 40%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 0;
  transition: background 0.5s ease;
}

.can-hover .content-box:hover .reel-overlay {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.4) 100%);
}

.preview-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Play Icon */
.content-box .play-icon {
  font-size: 1.8rem;
  color: white;
  /* Removed backdrop-filter — same reason as reel-badge: invisible on dark bg,
     but forces a new compositor layer that slows tap/hover response on Safari */
  background: rgba(255, 255, 255, 0.2);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* On hover, morph play button to loading state */
.can-hover .content-box:hover .play-icon {
  transform: scale(0.6) translateY(-20px);
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  color: #00ff88;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.4);
}

/* Preview Text */
.preview-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00ff88;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: -10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0.1s;
}

.can-hover .content-box:hover .preview-text {
  opacity: 1;
  transform: translateY(0);
}

/* Fake Video Progress Bar */
.preview-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #00ff88;
  width: 0%;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 10px #00ff88;
}

.can-hover .content-box:hover .preview-progress {
  opacity: 1;
  animation: loadProgress 3s ease-in-out infinite;
}

@keyframes loadProgress {
  0% {
    width: 0%;
    left: 0;
    right: auto;
  }

  50% {
    width: 100%;
    left: 0;
    right: auto;
  }

  50.1% {
    width: 100%;
    left: auto;
    right: 0;
  }

  100% {
    width: 0%;
    left: auto;
    right: 0;
  }
}

.content-chip {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  /* Removed backdrop-filter for same Safari compositor reason as .reel-badge */
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 2;
  transition: all 0.3s ease;
}

.can-hover .content-box:hover .content-chip {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}


/* =========================================
   Portfolio Container & Groups
========================================= */
.portfolio-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.portfolio-group {
  margin-bottom: 4rem;
}

.portfolio-group:last-child {
  margin-bottom: 0;
}


.portfolio-section {
  width: 100%;
  position: relative;
  padding: 4rem 0;
  overflow: hidden;
  /* Prevent horizontal scrollbar from swiper spillover */
}

.portfolio-heading {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* ---- Portfolio Swiper ---- */
.portfolio-swiper {
  width: 100%;
  padding: 2rem 0;
  overflow: hidden;
}

@media (max-width: 768px) {
  .portfolio-swiper {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }
}

.swiper-slide.reel-box {
  width: min(300px, 85vw) !important;
  height: 400px !important;
  flex-shrink: 0;
}

/* Content Highlights — taller portrait-style cards */
.swiper-slide.content-box {
  width: 220px !important;
  height: clamp(280px, 35vh, 320px) !important;
  flex-shrink: 0;
  min-height: unset;
}

/* Pagination */
.swiper-pagination {
  position: relative;
  margin-top: 2rem;
  bottom: 0 !important;
}

html[data-theme="dark"] .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.3);
}

html[data-theme="dark"] .swiper-pagination-bullet-active {
  background: #fff;
}

html[data-theme="light"] .swiper-pagination-bullet {
  background: rgba(0, 0, 0, 0.3);
}

html[data-theme="light"] .swiper-pagination-bullet-active {
  background: #000;
}

/* Swiper manages its own layout, so we no longer need grid overrides here */

/* =========================================
   Keyboard Focus Accessibility
========================================= */
:focus-visible {
  outline: 2px solid #1e90ff;
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #1e90ff;
  outline-offset: 4px;
  border-radius: 8px;
}

/* =========================================
   Reduced Motion — Disable all animations
========================================= */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .film-grain {
    animation: none !important;
  }

  .color-blob {
    animation: none !important;
  }

  .hero-avatar {
    animation: none !important;
  }

  .hero-avatar-container::before {
    animation: none !important;
  }

  .section-title {
    animation: none !important;
    background: var(--text-main);
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--text-main);
    -webkit-text-fill-color: var(--text-main);
  }

  .bento-box::before {
    animation: none !important;
  }
}

/* =========================================
   New Utility Classes — Audit Additions
========================================= */

/* Hero content flex column */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* SEO line highlight tag */
.seo-line.text-highlight {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e90ff;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

[data-theme="light"] .seo-line.text-highlight {
  color: #0066cc;
}

/* Blue primary button variant */
.btn-primary.btn-blue {
  background: #007aff;
  color: #ffffff;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.can-hover .btn-primary.btn-blue:hover {
  background: #0063d4;
  box-shadow: 0 12px 32px rgba(0, 122, 255, 0.5);
}

/* =========================================
   CTA Slide — Portfolio Swiper
========================================= */
.cta-slide {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem;
  background: rgba(20, 20, 22, 0.6);
}

[data-theme="light"] .cta-slide {
  background: rgba(255, 255, 255, 0.7);
}

.cta-slide-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--text-main);
}

.cta-slide-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .cta-slide {
    width: min(300px, 85vw);
    padding: 2rem;
  }

  .cta-slide-title {
    font-size: 1.5rem;
  }
}

/* =========================================
   Brands Marquee Drag Hint
========================================= */
.brands-marquee-wrapper::after {
  content: "← drag →";
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  opacity: 0;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.can-hover .brands-marquee-wrapper:hover::after {
  opacity: 0.5;
}

/* =========================================
   Nav tablet fix — prevent over-wide nav at iPad widths
========================================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .bento-nav {
    width: 94%;
    max-width: 900px;
  }
}

/* =========================================
   Hero mobile centering alignment fix
========================================= */
@media (max-width: 768px) {
  .hero-content {
    align-items: center;
  }
}
/* Fast-Tap Mobile Fix */
a, button, .bento-box, .social-icon, .btn-sm {
  touch-action: manipulation;
}

/* Safe Area Insets for Mobile Notches */
@supports(padding: max(0px)) {
  .site-footer, footer, #mobile-menu .mobile-links {
    padding-bottom: max(2rem, env(safe-area-inset-bottom)) !important;
  }
}

