
/* ==========================================================
   MOBILE RESPONSIVE — Ameer Muavia Portfolio
   Loaded after style.css. Desktop layout is UNTOUCHED.
   Breakpoints: ≤768px (mobile), ≤480px (small mobile)
   ========================================================== */

@media (max-width: 768px) {

  /* ---- GLOBAL: restore native cursor on touch devices ---- */
  *, *::before, *::after {
    cursor: auto !important;
  }

  /* ---- HIDE: custom cursor + noise overlay ---- */
  #cur,
  .noise {
    display: none !important;
  }

  /* ---- HIDE: Three.js background canvas (GPU-heavy) ---- */
  #bg-canvas {
    display: none !important;
  }

  /* ---- HIDE: Photoshop left toolbar (desktop-only chrome) ---- */
  #toolbar {
    display: none !important;
  }

  /* ---- HIDE: Right-side scroll progress nav ---- */
  #scroll-progress,
  #sp-line,
  #sp-fill,
  #sp-percent {
    display: none !important;
  }

  /* ---- TOPBAR: collapse to logo + status only ---- */
  #topbar {
    padding: 0 16px;
    height: 48px;
  }
  .tb-menu {
    display: none !important;
  }
  .tb-left {
    gap: 10px;
  }
  .tb-right {
    flex-shrink: 0;
  }

  /* ---- MAIN: remove sidebar offsets ---- */
  main {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 48px !important;
  }

  /* ---- SECTION WRAP: tighter padding ---- */
  .section-wrap {
    padding: 64px 20px !important;
  }

  /* ---- SECTION DIVIDERS ---- */
  .section-divider {
    margin: 0 16px !important;
    height: 52px !important;
    padding: 0 16px !important;
    gap: 12px !important;
  }
  .sd-text {
    font-size: 13px !important;
  }

  /* ---- SECTION TITLES ---- */
  .section-title {
    font-size: clamp(32px, 9vw, 52px) !important;
  }

  /* ---- REVEAL: disable JS-driven animation on mobile ---- */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* ====================================================
     LOADER
     ==================================================== */
  #loader {
    padding: 24px;
  }
  .loader-sub {
    font-size: 9px;
    text-align: center;
    padding: 0 20px;
  }

  /* ====================================================
     HERO — FIX 1: Make name big & the screen feel full
     ==================================================== */
  #hero {
    min-height: 100svh;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0;
    padding-bottom: 0;
  }

  #hero-canvas {
    display: none !important;
  }

  /* Hide decorative floating panels */
  .hero-swatch-panel,
  .hero-prop,
  .sel-box,
  .sel-handle {
    display: none !important;
  }

  .hero-inner {
    padding: 20px 28px 48px !important;
    max-width: 100% !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    gap: 0;
  }

  .hero-eyebrow {
    font-size: 9px !important;
    letter-spacing: .15em !important;
    margin-bottom: 28px;
    color: var(--accent) !important;
  }

  /* Hero name: massive, screen-commanding */
  .hero-h1 {
    font-size: clamp(80px, 22vw, 140px) !important;
    line-height: .82 !important;
    letter-spacing: -.04em !important;
    margin-bottom: 32px !important;
  }

  /* Add a thin accent rule below the name */
  .hero-h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 28px;
    border-radius: 2px;
  }

  .hero-sub {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 36px !important;
    color: var(--fg) !important;
  }

  .hero-badges {
    gap: 8px !important;
    flex-wrap: wrap;
  }

  .badge {
    padding: 6px 12px !important;
    font-size: 9px !important;
  }

  /* ====================================================
     MARQUEE
     ==================================================== */
  .mq-item {
    font-size: 11px;
    padding: 0 20px;
  }

  /* ====================================================
     ABOUT
     ==================================================== */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .ps-body {
    grid-template-columns: 1fr !important;
  }
  .ps-panels {
    display: none !important;
  }
  .ps-canvas-area {
    min-height: 220px;
  }
  .ps-profile-media {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .layer-detail {
    margin-top: 16px;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  .drag-layers {
    display: none !important;
  }

  /* ====================================================
     SKILLS — ARSENAL
     ==================================================== */
  .arsenal-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  .arsenal-stats {
    gap: 20px;
  }

  .arsenal-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    margin-bottom: 32px !important;
  }

  .app-card {
    padding: 16px !important;
    min-height: 160px !important;
  }

  .app-card-canvas {
    display: none !important;
  }

  .app-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 13px !important;
  }

  .app-name {
    font-size: 14px !important;
  }

  .app-desc {
    font-size: 11px !important;
  }

  /* ====================================================
   SKILLS — TYPOGRAPHY + MOBILE SWATCHES (RESPONSIVE)
   Clean, standalone responsive block
==================================================== */

/* ---- TABLET / SMALL DESKTOP (≤1100px) ---- */
@media (max-width: 1100px) {
  .skills-2col {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Show mobile accent strip */
  .mobile-accent-strip {
    display: block !important;
  }

  .type-panel {
    padding: 16px !important;
  }

  .type-panel-hdr {
    margin-bottom: 12px !important;
    font-size: 10px !important;
  }

  /* Hide sliders on tablet — keep only Font Family + Style */
  .type-ctrl-group:nth-child(n+3) {
    display: none !important;
  }

  #tracking-word {
    font-size: 32px !important;
    letter-spacing: -.02em !important;
    margin-bottom: 8px !important;
  }

  .type-preview {
    margin-bottom: 12px !important;
    padding: 20px 16px 16px !important;
  }


/* ---- COMPANIES MARQUEE (MOBILE) ---- */
#companies {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}
.companies-marquee-viewport {
    /* Break out of mobile 20px padding to hit screen edges */
    margin-left: -20px !important;
    margin-right: -20px !important;
    width: calc(100% + 40px) !important;
    padding: 50px 0 !important;
}
.companies-marquee-viewport::before,
.companies-marquee-viewport::after {
    width: 60px !important;
}
.companies-marquee-label {
    top: 12px !important;
    left: 20px !important;
    font-size: 9px !important;
}
.companies-marquee-track {
    gap: 16px !important;
    padding: 0 20px !important;
}
.company-logo-node {
    padding: 12px 20px 12px 14px !important;
    gap: 10px !important;
}
.company-node-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 12px !important;
}
.company-node-name {
    font-size: 12px !important;
}
.company-node-popup {
    width: 220px !important;
    padding: 14px 16px !important;
    bottom: calc(100% + 12px) !important;
}
.company-popup-title {
    font-size: 10px !important;
}
.company-popup-desc {
    font-size: 12px !important;
}

}

/* ---- MOBILE (≤768px) ---- */
@media (max-width: 768px) {
  .type-panel {
    border-radius: 4px !important;
  }

  .type-panel-hdr {
    padding: 8px 12px !important;
    font-size: 9px !important;
  }

  .type-preview {
    padding: 16px 12px !important;
    min-height: 120px !important;
  }

  #tracking-word {
    font-size: 28px !important;
    letter-spacing: -.01em !important;
  }

  .type-preview-meta {
    font-size: 7px !important;
    gap: 6px !important;
  }

  /* Improve slider touch targets on mobile */
  .type-slider-row {
    gap: 10px !important;
  }

  .type-slider-row input[type=range] {
    height: 28px !important;
  }

  .type-slider-row input[type=range]::-webkit-slider-thumb {
    width: 22px !important;
    height: 22px !important;
    margin-top: -9px !important;
  }

  .type-slider-row input[type=range]::-moz-range-thumb {
    width: 22px !important;
    height: 22px !important;
  }

  .type-slider-val {
    width: 44px !important;
    font-size: 9px !important;
  }

  /* Style buttons bigger on mobile */
  .type-style-btn {
    padding: 10px 6px !important;
    font-size: 12px !important;
  }

  /* Font select */
  .type-font-select {
    padding: 10px !important;
    font-size: 13px !important;
  }

  /* Mobile accent strip */
  .mobile-accent-strip {
    display: block !important;
    margin-top: 0 !important;
  }

  .mobile-swatches-body {
    padding: 12px !important;
  }

  .cp-recent-colors {
    gap: 10px !important;
    justify-content: flex-start !important;
  }

  .cp-recent-dot {
    width: 36px !important;
    height: 36px !important;
  }
}

/* ---- SMALL MOBILE (≤480px) ---- */
@media (max-width: 480px) {
  #tracking-word {
    font-size: 22px !important;
  }

  .type-preview {
    padding: 14px 10px !important;
    min-height: 100px !important;
  }

  .type-preview-meta {
    font-size: 6px !important;
    gap: 4px !important;
  }

  .cp-recent-dot {
    width: 32px !important;
    height: 32px !important;
  }

  .mobile-swatches-body {
    padding: 10px !important;
  }

  .type-style-btn {
    padding: 9px 4px !important;
    font-size: 11px !important;
  }
}

  /* ====================================================
     PROCESS
     ==================================================== */
  .process-steps {
    padding-left: 40px !important;
  }

  .pstep {
    margin-bottom: 40px !important;
  }

  .pstep-canvas {
    display: none !important;
  }

/* ====================================================
   WORK (MOBILE OVERRIDE) - NATURAL HEIGHT, NO CROPPING
   ==================================================== */
@media (max-width: 640px) {
    
    /* 1. CONTAINER: Override JS Masonry and force a seamless vertical list */
    #work .work-masonry {
        height: auto !important; /* Overrides the JS calculated height */
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important; /* Removes all gaps */
        margin: 0 !important;
    }

    /* 2. CARDS: Take them out of JS absolute positioning */
    #work .work-card {
        position: relative !important; /* Overrides JS 'absolute' */
        left: 0 !important;
        top: auto !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important; /* Seamless edge-to-edge look */
        /* ✨ REMOVED aspect-ratio so images aren't forced into a box ✨ */
        overflow: hidden;
    }

    /* ✨ Ensure images take their natural height without being cropped ✨ */
    #work .work-card .work-card-img {
        width: 100% !important;
        height: auto !important; /* Natural height based on original aspect ratio */
        display: block !important;
        object-fit: initial !important; /* Prevents any cropping */
    }

    /* 3. PADDING: Edge-to-edge images on mobile */
    #work > div[style*="padding:0 60px"],
    #work > div[style*="padding:32px 60px"] {
        padding-left: 0 !important; 
        padding-right: 0 !important;
    }

    /* 4. HEADER: Adjust for mobile stacking */
    .work-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 20px 20px !important;
        margin-bottom: 24px !important;
    }

    /* 5. CLEANUP: Hide desktop-only decorative elements */
    .work-crop-border,
    .work-crop-mask {
        display: none !important;
    }
    
    /* 6. OVERLAY: Optimize text size for mobile list view */
    #work .work-card-content {
        padding: 16px !important;
    }
    #work .work-card-title {
        font-size: 16px !important;
    }
    #work .work-cat-badge {
        font-size: 9px !important;
        padding: 6px 12px !important;
    }
}
  /* ====================================================
     PLAYGROUND
     ==================================================== */
  #play-canvas {
    height: 320px !important;
    cursor: crosshair !important;
  }

  .play-toolbar {
    gap: 6px !important;
    padding: 10px !important;
    flex-wrap: wrap;
  }

  .play-tool {
    padding: 5px 10px !important;
    font-size: 8px !important;
  }

  .play-colors {
    margin-left: 0 !important;
    margin-top: 4px;
  }

  .play-actions {
    margin-left: 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    margin-top: 4px;
  }

  /* ====================================================
     VECTOR LAB — FIX 3: Hide entire section on mobile
     ==================================================== */
  #vector-lab,
  #vector-lab + .section-divider,
  .section-divider:has(+ #vector-lab) {
    display: none !important;
  }

  /* Fallback: hide divider before vector-lab via JS class */
  .hide-on-mobile {
    display: none !important;
  }

  /* ====================================================
     TESTIMONIALS — FIX 4: Prev / Next slider
     Layers panel & props hidden; nav bar injected by JS.
     ==================================================== */
  .testi-workspace {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    display: block !important;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border2);
  }

  .testi-layers-panel,
  .testi-props-panel {
    display: none !important;
  }

  .testi-canvas-area {
    min-height: auto !important;
    padding: 0 !important;
    position: relative;
    display: block !important;
  }

  /* Content area */
  #testi-content {
    padding: 32px 24px 28px !important;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity .22s ease, transform .22s ease;
  }

  #testi-content.testi-slide-out {
    opacity: 0 !important;
    transform: translateX(-20px) !important;
  }

  #testi-content.testi-slide-in {
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  /* Mobile nav bar below the content */
  .testi-mobile-nav {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--panel2);
    border-top: 1px solid var(--border2);
  }

  .testi-nav-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--panel3);
    border: 1px solid var(--border2);
    border-radius: 4px;
    color: var(--fg);
    font-size: 16px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
  }

  .testi-nav-btn:active {
    background: var(--accent) !important;
    color: #000 !important;
    border-color: var(--accent) !important;
  }

  /* Dots */
  .testi-nav-dots {
    display: flex !important;
    gap: 8px;
    align-items: center;
  }

  .testi-nav-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border2);
    transition: background .25s, transform .25s, box-shadow .25s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .testi-nav-dot.active {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    transform: scale(1.35);
  }

  /* Quote text larger on mobile */
  .testi-quote {
    font-size: 15px !important;
    line-height: 1.65 !important;
    margin-bottom: 24px !important;
  }

  /* ====================================================
     ORACLE
     ==================================================== */
  .oracle-wrap {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    margin-top: 28px !important;
  }

  .oracle-cards {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  .oracle-quote {
    font-size: 11px !important;
    line-height: 1.5 !important;
  }

  /* ====================================================
     BLOG — InDesign Workspace
     ==================================================== */
  .blog-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    margin-bottom: 20px !important;
  }

  .id-workspace {
    margin-top: 16px !important;
  }

  .id-topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .id-menu {
    display: none !important;
  }

  .id-body {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }

  .id-pages,
  .id-char-panel {
    display: none !important;
  }

  .id-doc {
    padding: 20px !important;
    min-height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .id-blog-post {
    padding: 20px !important;
    margin-bottom: 24px !important;
  }

  .id-post-title {
    font-size: 20px !important;
  }

  /* ====================================================
     CONTACT
     ==================================================== */
  .contact-frame {
    padding: 28px 20px !important;
  }

  .reg-mark,
  .crop-marks,
  .float-badge {
    display: none !important;
  }

  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .clip-text {
    font-size: clamp(60px, 18vw, 88px) !important;
    line-height: .85 !important;
  }

  .clip-mask-indicator {
    display: none !important;
  }

  .export-formats {
    flex-wrap: wrap;
    gap: 6px !important;
  }

  .format-badge {
    font-size: 10px !important;
    padding: 6px 10px !important;
  }

  .metadata-panel {
    margin-top: 20px;
  }

  .meta-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .meta-value a {
    word-break: break-all;
  }

  .export-side {
    width: 100% !important;
  }

  .export-dialog {
    width: 100% !important;
  }

  .dlg-body {
    padding: 20px !important;
  }

  .social-row {
    gap: 12px;
    justify-content: flex-start !important;
    flex-wrap: wrap;
    margin-top: 24px !important;
  }

  /* ====================================================
     FOOTER — FIX 6: Clean mobile layout
     ==================================================== */
  footer {
    padding: 0 !important;
    overflow: hidden;
  }

  .ft-inner {
    padding: 40px 60px 28px 20px !important;
  }

  /* Stack brand + nav vertically */
  .ft-top {
    flex-direction: column !important;
    gap: 32px !important;
    align-items: flex-start !important;
  }

  /* Brand: horizontal row, centered vertically */
  .ft-brand {
    gap: 12px !important;
    align-items: center !important;
    flex-direction: column !important;
  }

  .ft-brand-name {
    font-size: 18px !important;
    letter-spacing: -.02em !important;
  }

  .ft-brand-sub {
    font-size: 9px !important;
  }

  /* Nav: 3 equal columns */
  .ft-nav {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px 20px !important;
    width: 100% !important;
  }

  .ft-nav-col {
    gap: 6px !important;
  }

  .ft-nav-title {
    font-size: 8px !important;
    margin-bottom: 6px !important;
    letter-spacing: .1em !important;
  }

  .ft-nav-col a {
    font-size: 11px !important;
    padding: 2px 0 !important;
    display: block;
  }

  /* Divider */
  .ft-divider {
    margin: 24px 0 20px !important;
  }

  /* Bottom row: stacked */
  .ft-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .ft-copy {
    font-size: 9px !important;
    letter-spacing: .06em !important;
    line-height: 1.7;
    color: var(--fg) !important;
  }

  /* Meta: horizontal pills */
  .ft-meta {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 14px !important;
  }

  .ft-meta-item {
    font-size: 9px !important;
    gap: 5px !important;
    letter-spacing: .05em !important;
  }

  /* Hide decorative watermark text */
  .ft-watermark {
    display: none !important;
  }

} /* end @media 768px */


/* ====================================================
   MOBILE ACCENT SWATCHES — standalone component
   Hidden on desktop. JS injects + activates this panel.
   ==================================================== */
#mobile-accent-swatches {
  display: none; /* hidden on desktop */
}

/* Panel styles (always defined, only shown on mobile) */
.mas-panel {
  background: var(--panel2);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 14px 16px;
}

.mas-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--fg);
  text-transform: uppercase;
}

.mas-hdr-icon {
  color: var(--accent);
  font-size: 14px;
}

.mas-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.mas-swatch {
  aspect-ratio: 1;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.mas-swatch.active {
  border-color: var(--bright) !important;
  box-shadow: 0 0 0 1px var(--bright);
  transform: scale(1.08);
}

.mas-swatch:active {
  transform: scale(.92);
}

.mas-custom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.mas-custom-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: var(--fg);
  letter-spacing: .08em;
  flex-shrink: 0;
}

.mas-custom-input {
  width: 36px;
  height: 28px;
  border: 1px solid var(--border2);
  border-radius: 4px;
  cursor: pointer;
  background: none;
  padding: 2px;
  flex-shrink: 0;
}

.mas-hex-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--bright);
  letter-spacing: .05em;
}


/* ====================================================
   SMALL MOBILE — 480px and below
   ==================================================== */
@media (max-width: 480px) {

  .hero-h1 {
    font-size: clamp(64px, 19vw, 100px) !important;
  }

  .hero-eyebrow {
    font-size: 8px !important;
    margin-bottom: 20px;
  }

  .hero-sub {
    font-size: 13px !important;
  }

  .hero-badges {
    gap: 6px !important;
  }

  .badge {
    padding: 5px 10px !important;
    font-size: 8px !important;
  }

  .section-title {
    font-size: clamp(28px, 10vw, 44px) !important;
  }

  .arsenal-grid {
    grid-template-columns: 1fr !important;
  }

  .oracle-cards {
    grid-template-columns: 1fr !important;
  }

  .oracle-card {
    aspect-ratio: 3/2 !important;
  }

  .ft-nav {
    grid-template-columns: 1fr 1fr !important;
  }

  .clip-text {
    font-size: clamp(42px, 13vw, 68px) !important;
  }

  .id-blog-post {
    padding: 16px !important;
  }

  .id-post-title {
    font-size: 18px !important;
  }

  .contact-frame {
    padding: 20px 16px !important;
  }

  .section-wrap {
    padding: 48px 16px !important;
  }

  .section-divider {
    margin: 0 12px !important;
    padding: 0 12px !important;
  }

  .cta-btn {
    padding: 12px 20px !important;
    font-size: 10px !important;
  }

  .form-input,
  .form-label {
    font-size: 13px !important;
  }

  .mas-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

} /* end @media 480px */


/* ====================================================
   REDUCED MOTION
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .mq-track {
    animation: none !important;
  }
}