/* ============================================================================
   MOBILE FIRST — Dynamic Mobile Experience
   Pillar 1: Recruiter Toggle in mobile nav
   Pillar 2: High-fidelity touch states (:active — no hover on phones)
   Pillar 3: Adaptive modals + horizontal Mermaid scroll
   Pillar 4: Floating Resume CTA (always 1-tap away)
   + Bonus: Full layout audit for < 768px
   NOTE: 3D WebGL Space Engine — untouched, preserved as-is.
   ============================================================================ */

.logo-short {
  display: none;
}


/* Navigation bar mobile refinements - Atlassian Style */
@media (max-width: 767px) {
  .nav {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(9, 30, 66, 0.12) !important;
    backdrop-filter: none !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important;
    width: 100% !important;
    top: 0 !important;
    left: 0 !important;
    position: fixed !important;
    z-index: 1000 !important;
  }

  .nav>* {
    pointer-events: auto !important;
    /* Re-enable for children like logo and menu button */
  }

  /* FORCE SCROLLABILITY ON MOBILE */
  html,
  body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    height: auto !important;
    min-height: 100% !important;
    position: relative !important;
  }

  .nav-inner {
    height: 60px !important;
    width: 100% !important;
    padding: 0 16px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: transparent !important;
  }

  .nav-logo .logo-full {
    display: none !important;
  }

  .nav-logo .logo-short {
    display: inline-block !important;
    font-weight: 800;
    color: var(--text-primary);
    margin-left: 0 !important; /* Force left anchor */
  }

  .nav-logo .nc,
  .nav-logo .np,
  .nav-logo .ns {
    display: none !important;
  }

  .mobile-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    pointer-events: auto !important;
  }

  .hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #172B4D;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 4px;
    display: block;
  }

  .mobile-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .mobile-toggle.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
  }

  .mobile-toggle.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .nav-mob-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    pointer-events: auto !important;
  }

  /* Dark theme overrides for mobile Navigation */
  .dark-theme .nav {
    background: #050505 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .dark-theme .nav-logo span {
    color: #FFFFFF !important;
  }

  .dark-theme .hamburger-line {
    background-color: #FFFFFF !important;
  }
}

/* ── Nav-bar Recruiter Mode button — keep on one line ── */
#mob-recruiter-toggle-btn {
  white-space: nowrap;        /* Never wrap to second line */
  font-size: 0.75rem !important;
  padding: 6px 10px !important;
  gap: 5px !important;
  border-radius: 8px !important;
  min-height: unset !important;
}

/* ── Mobile Theme Toggle Polish ── */
.theme-toggle-mob-btn {
  width: 48px !important;
  height: 48px !important;
  background: var(--bg-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  color: var(--text-primary) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-1);
}

.theme-toggle-mob-btn:active {
  transform: scale(0.92) !important;
  background: var(--accent-hover) !important;
}

.dark-theme .theme-toggle-mob-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ─── Desktop: restore hamburger to hidden ─── */
@media (min-width: 1024px) {
  .mobile-toggle,
  .nav-mob-wrapper {
    display: none !important;
  }
}
@media (max-width: 1023px) {
  .nav-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin-right: 0 !important;
    pointer-events: auto !important;
    margin-left: auto !important; /* Push to far right */
  }

  /* Force show mobile features */
  .nav-mob-wrapper,
  .mobile-toggle {
    display: flex !important;
  }

  /* Hide redundant/cluttering buttons on small screens */
  .desktop-only,
  .trace-hud-btn,
  .nav-v-divider,
  .btn-cmdk,
  .nav-icon {
    display: none !important;
  }

  .nav-sys-status {
    display: flex !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* --- Global/Header Recruiter Button (Horizontal Pill for Desktop) --- */
@media (min-width: 1024px) {
  #recruiter-trigger-global.recruiter-btn-elite {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    margin-left: 12px;
  }
}



#recruiter-trigger-global:hover {
  transform: translateY(-1px);
}





#mob-recruiter-toggle-btn i {
  font-size: 0.8rem !important;
}


/* ─── DESIGN TOKENS (mobile-scale) ─────────────────────────────────────── */
:root {
  --mob-tap-radius: 12px;
  --mob-hero-fs: clamp(2.6rem, 10vw, 4rem);
  --mob-section-pad: 48px 0;
  --mob-container-pad: 0 20px;
  --touch-scale: scale(0.97);
  --touch-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PILLAR 2 — HIGH-FIDELITY TOUCH STATES
   On mobile :hover doesn't fire. :active is the only feedback.
   Every interactive element gets immediate physical depression.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Project cards — depress on tap */
.proj:active {
  transform: scale(0.975) !important;
  box-shadow: var(--touch-shadow), var(--card-spec, 0 0 0 transparent) !important;
  transition: transform 0.08s ease, box-shadow 0.08s ease !important;
}

/* Skill cards */
.sk:active {
  transform: scale(0.97) !important;
  box-shadow: var(--touch-shadow) !important;
  transition: transform 0.08s ease !important;
}

/* Collaboration / principle cards */
.coll-card:active,
.tcrd:active {
  transform: scale(0.975) !important;
  transition: transform 0.08s ease !important;
}

/* ADR blog cards */
.adr-card:active {
  transform: scale(0.97) translateY(0) !important;
  box-shadow: var(--touch-shadow) !important;
  transition: transform 0.08s ease !important;
}

/* Architecture node cards */
.arch-node-card:active {
  transform: scale(0.96) !important;
  transition: transform 0.08s ease !important;
}

/* Nav links */
.mob-menu a:active {
  background: rgba(99, 102, 241, 0.12) !important;
  color: var(--accent-indigo-hi, #818cf8) !important;
  transition: transform 0.06s ease, opacity 0.06s ease, background-color 0.06s ease, border-color 0.06s ease, box-shadow 0.06s ease, color 0.06s ease !important;
}

/* Buttons — all types */
.btn:active,
.btn-primary:active,
.btn-outline:active,
.pmodal-btn:active,
.proj-arch-btn:active,
.pipe-run-btn:active {
  transform: scale(0.95) !important;
  box-shadow: var(--touch-shadow) !important;
  transition: transform 0.08s ease !important;
}

/* Resume FAB touch state */
#resume-fab:active {
  transform: scale(0.92) !important;
  box-shadow: 0 4px 16px rgba(66, 133, 244, 0.5) !important;
  transition: transform 0.08s ease !important;
}

/* Nav mobile hamburger */
#mob-btn:active {
  transform: scale(0.88) !important;
  opacity: 0.7 !important;
  transition: transform 0.06s ease !important;
}

/* Chip tags — tappable feel */
.chip:active,
.skill-tag:active,
.proj-tech span:active,
.rqs-chip:active {
  transform: scale(0.92) !important;
  transition: transform 0.06s ease !important;
}

/* Timeline items */
.tl-item:active .tl-body {
  transform: translateX(2px) !important;
  transition: transform 0.08s ease !important;
}

/* GH number cards */
.gh-num-card:active {
  transform: scale(0.96) translateY(0) !important;
  transition: transform 0.08s ease !important;
}

/* Cert cards */
.cert-card:active,
.cert:active {
  transform: scale(0.97) !important;
  transition: transform 0.08s ease !important;
}

/* Incident replay button */
.incident-replay-btn:active {
  transform: scale(0.92) !important;
  transition: transform 0.06s ease !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PILLAR 4 — FLOATING RESUME CTA (Always 1-tap away)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#resume-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  display: none;
  /* shown on mobile via media query */
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285F4 0%, #1A73E8 100%);
  color: #ffffff;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(66, 133, 244, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.3s ease,
    opacity 0.4s ease;
  /* Start hidden, slide in after scroll */
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

#resume-fab.fab-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

#resume-fab.fab-hidden {
  transform: translateY(80px);
  opacity: 0;
  pointer-events: none;
}

#resume-fab i {
  font-size: 0.9rem;
}

/* Pulse ring on FAB */
#resume-fab::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 2px solid rgba(66, 133, 244, 0.4);
  animation: fab-ring 2.5s ease-in-out infinite;
}

@keyframes fab-ring {

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

  50% {
    transform: scale(1.06);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  #resume-fab {
    display: flex;
  }

  /* Hide the existing mobile-fab (keyboard shortcut FAB) when resume-fab is present */
  #mobile-fab {
    bottom: 88px;
    /* push the terminal FAB up above the resume FAB */
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PILLAR 1 — RECRUITER TOGGLE IN MOBILE MENU
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Recruiter quick-action row in mob-menu */
.mob-recruiter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  margin: 8px 0;
  background: rgba(52, 168, 83, 0.06);
  border: 1px solid rgba(52, 168, 83, 0.18);
  border-radius: 10px;
}

.mob-recruiter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(52, 168, 83, 0.1);
  border: 1px solid rgba(52, 168, 83, 0.28);
  color: #34A853;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  flex: 1;
  justify-content: auto;
}

.mob-recruiter-toggle.active {
  background: rgba(52, 168, 83, 0.2);
  border-color: rgba(52, 168, 83, 0.5);
  box-shadow: 0 0 16px rgba(52, 168, 83, 0.2);
}

.mob-resume-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4285F4, #1A73E8);
  color: #fff;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PILLAR 3 — ADAPTIVE MODALS (Mermaid + Project Modals)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 767px) {

  /* Project modal — full-screen sheet on mobile */
  #proj-modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .proj-modal-box {
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh !important;
    width: 100% !important;
    transform: translateY(100%) scale(1) !important;
  }

  #proj-modal-overlay.open .proj-modal-box {
    transform: translateY(0) scale(1) !important;
  }

  /* Sheet handle indicator */
  .proj-modal-box::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border, rgba(255, 255, 255, 0.15));
    border-radius: 2px;
    margin: 12px auto 0;
  }

  .pmodal-header {
    padding: 16px 20px 16px !important;
  }

  .pmodal-body {
    padding: 16px 20px 24px !important;
  }

  .pmodal-title {
    font-size: 1.05rem !important;
  }

  .pmodal-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .pmodal-tabs {
    padding: 0 16px !important;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pmodal-tabs::-webkit-scrollbar {
    display: none;
  }

  /* Architecture modal — bottom sheet */
  .arch-modal-overlay {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .arch-modal-box {
    border-radius: 20px 20px 0 0 !important;
    max-height: 92vh !important;
    max-width: 100% !important;
    width: 100% !important;
    transform: translateY(100%) !important;
  }

  .arch-modal-overlay.open .arch-modal-box {
    transform: translateY(0) !important;
  }

  .arch-modal-box::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border, rgba(255, 255, 255, 0.15));
    border-radius: 2px;
    margin: 12px auto 0;
  }

  .arch-modal-header {
    padding: 16px 20px 16px !important;
  }

  .arch-diagram-wrap {
    padding: 16px 20px !important;
  }

  /* Mermaid diagram — horizontally scrollable on mobile */
  .mermaid-rendered {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x proximity;
    padding: 16px !important;
  }

  .mermaid-rendered svg {
    min-width: 520px !important;
    /* diagram won't squish below 520px */
    height: auto !important;
  }

  /* Recruiter quick-scan on mobile */
  #recruiter-quickscan {
    margin: 0 16px 24px !important;
    padding: 20px !important;
  }

  .rqs-grid {
    grid-template-columns: 1fr !important;
  }

  .rqs-item[style*="span 2"],
  .rqs-item[style*="grid-column"] {
    grid-column: span 1 !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE LAYOUT AUDIT — Full < 768px review
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 767px) {

  /* ── Container padding ── */
  .container {
    padding: var(--mob-container-pad) !important;
  }

  /* ── Section spacing ── */
  .section,
  .section.s-alt {
    padding: var(--mob-section-pad) !important;
  }

  /* ── Hero ── */
  .hero h1,
  .hero-title {
    font-size: var(--mob-hero-fs) !important;
    letter-spacing: -0.03em !important;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Stack hero photo below text on mobile */
  .hero-visual {
    order: -1;
    max-width: 260px;
    margin: 0 auto;
  }

  /* Chips row — allow wrapping, larger touch targets */
  .id-chips {
    gap: 8px !important;
    flex-wrap: wrap !important;
  }

  .chip {
    padding: 7px 14px !important;
    font-size: 0.72rem !important;
    border-radius: var(--mob-tap-radius) !important;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Hero stat row — 2 columns on mobile */
  .h-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* Hero terminal — full width */
  .h-term {
    margin-top: 24px;
    font-size: 0.72rem !important;
  }

  /* ── Skills grid — 1 col mobile ── */
  .skills-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .sk {
    padding: 20px !important;
  }

  /* ── Projects — full width stacked ── */
  .proj-bento,
  .proj-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Remove featured card 2-col span on mobile */
  .proj-bento .proj:first-child {
    grid-column: span 1 !important;
  }

  .proj {
    padding: 20px !important;
  }

  /* Impact pill — wrappable  */
  .proj-impact-pill {
    font-size: 0.68rem !important;
    padding: 5px 10px !important;
    white-space: normal !important;
    line-height: 1.4;
  }

  /* ── Architecture thinking cards — 1 col ── */
  .arch-node-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .arch-node-card {
    padding: 16px !important;
  }

  .arch-node-icon {
    font-size: 1.2rem !important;
    margin-bottom: 8px !important;
  }

  /* Hide tooltip on mobile — show full card info instead */
  .arch-node-tooltip {
    display: none !important;
  }

  /* ── GitHub heatmap — horizontally scrollable ── */
  .gh-heatmap-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 16px !important;
  }

  .gh-heatmap-grid {
    min-width: 580px;
  }

  .gh-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .gh-numbers {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* ── Pipeline stages — horizontal scroll ── */
  .pipeline-flow,
  .pipe-stages {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
  }

  .pipe-stage {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* ── SRE Dashboard — mobile single col ── */
  .sre-metrics-grid,
  .sre-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ── CTA buttons — full width on mobile ── */
  .cta-btns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100%;
  }

  .cta-btns .btn {
    justify-content: center !important;
    padding: 14px 20px !important;
    font-size: 0.85rem !important;
    border-radius: var(--mob-tap-radius) !important;
    min-height: 48px;
    /* touch target min per WCAG */
  }

  /* ── ADR grid — 1 col ── */
  .adr-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* ── Radar chart — center, full width ── */
  .radar-wrap {
    flex-direction: column !important;
    align-items: center !important;
    gap: 24px !important;
    padding: 20px !important;
  }

  .radar-svg-wrap {
    width: 220px !important;
    height: 220px !important;
  }

  .radar-legend {
    width: 100% !important;
  }

  /* ── Incident timeline ── */
  .incident-event {
    gap: 10px !important;
  }

  .incident-event-time {
    min-width: 44px !important;
    font-size: 0.6rem !important;
  }

  /* ── SRE incident wrap ── */
  .incident-wrap {
    padding: 18px !important;
  }

  /* ── Performance badges ── */
  .perf-badge-cluster {
    gap: 8px !important;
  }

  .perf-badge {
    padding: 10px 14px !important;
  }

  /* ── Section headers ── */
  .s-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem) !important;
  }

  .section-header {
    text-align: center !important;
    margin-bottom: 32px !important;
  }

  .section-header .s-label {
    justify-content: center;
  }

  /* ── Recruiter quickscan ── */
  #recruiter-quickscan {
    border-radius: 12px !important;
  }

  /* ── Mobile menu recruiter row ── */
  .mob-recruiter-row {
    margin: 8px 16px !important;
  }

  /* ── Timeline ── */
  .timeline {
    padding-left: 20px !important;
  }

  /* ── Testimonial slider ── */
  .tslider {
    padding: 0 !important;
  }

  /* ── Certifications grid ── */
  .certs-grid,
  .certifications-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  /* ── Education timeline grid (symmetrical on mobile) ── */
  .edu-timeline {
    padding-left: 0 !important;
  }

  /* ── EIP terminal box ── */
  .eip-box {
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 0 16px !important;
  }

  /* ── Footer ── */
  .footer-trust {
    flex-wrap: wrap !important;
    gap: 12px !important;
    justify-content: center !important;
    padding: 0 20px !important;
  }

  /* ── Working with me cards ── */
  .coll-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* ── Performance badge cluster ── */
  .perf-badge-cluster {
    grid-template-columns: repeat(2, 1fr) !important;
    display: grid !important;
    gap: 10px !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SMALL PHONES (< 380px) — Samsung Galaxy S8, iPhone SE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 380px) {

  .hero h1,
  .hero-title {
    font-size: 2.3rem !important;
  }

  .arch-node-grid {
    grid-template-columns: 1fr !important;
  }

  .certs-grid,
  .certifications-grid {
    grid-template-columns: 1fr !important;
  }

  .gh-numbers {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  #resume-fab {
    bottom: 16px;
    right: 16px;
    padding: 12px 16px;
    font-size: 0.72rem;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLET (768px – 1023px) — iPad, surface
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (min-width: 768px) and (max-width: 1023px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

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

  .proj-bento .proj:first-child {
    grid-column: span 2 !important;
  }

  .arch-node-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .adr-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .gh-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .proj-modal-box {
    max-width: 680px !important;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOUCH DEVICE — pointer:coarse (actual touch screens)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (pointer: coarse) {

  /* Increase touch target sizes to WCAG 2.5.5 (44×44px minimum) */
  .btn,
  .btn-primary,
  .btn-outline,
  .nav-link,
  .mob-menu a,
  .proj-arch-btn,
  .pmodal-btn,
  .pmodal-close,
  .arch-modal-close,
  .incident-replay-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Disable hover effects that cause stuck states on touch */
  .sk:hover,
  .proj:hover,
  .tcrd:hover,
  .adr-card:hover,
  .gh-num-card:hover {
    transform: none !important;
    box-shadow: inherit !important;
  }

  /* Keep 3D tilt off on touch — just feels wrong */
  .sk:hover {
    transform: none !important;
  }

  /* Show arch tooltip as always-visible on touch */
  .arch-node-tooltip {
    display: none !important;
  }

  /* Swipe hint on scrollable diagrams */
  .gh-heatmap-wrap::after,
  .pipeline-flow::after {
    content: '← swipe →';
    display: block;
    font-family: var(--font-mono, monospace);
    font-size: 0.6rem;
    color: var(--text-muted, #64748b);
    text-align: center;
    padding-top: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE MENU — additional styling
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 767px) {
  .mob-menu a {
    padding: 13px 20px !important;
    border-radius: 8px !important;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SAFE-AREA INSETS (iPhone notch / Dynamic Island)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

#resume-fab {
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  right: max(24px, env(safe-area-inset-right, 24px));
}

#mobile-fab {
  bottom: max(88px, calc(env(safe-area-inset-bottom, 24px) + 70px));
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ATLASSIAN STYLE MOBILE DRAWER + BACKDROP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.mob-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.5);
  /* Slightly darker */
  backdrop-filter: blur(12px);
  z-index: 200000;
  /* Absolute highest */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.mob-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
}

.mob-menu {
  position: fixed !important;
  top: 0 !important;
  left: -100% !important;
  width: 310px !important;
  max-width: 85vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(24px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(150%) !important;
  border-right: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 15px 0 50px rgba(0, 0, 0, 0.1) !important;
  z-index: 200001 !important;
  display: flex !important;
  flex-direction: column !important;
  transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none;
}

.dark-theme .mob-menu {
  background: rgba(18, 18, 20, 0.75) !important;
  border-right-color: rgba(255, 255, 255, 0.05) !important;
  color: #fff !important;
}

.mob-menu.open {
  left: 0 !important;
  pointer-events: auto !important;
}

/* Backdrop */
.mob-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, 0.5);
  backdrop-filter: blur(12px);
  z-index: 200000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.mob-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto !important;
}

/* Header & Brand */
.mob-menu-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.mob-header-right {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.close-mob, .theme-toggle-mob-btn {
  background: transparent !important;
  border: none !important;
  border-radius: 50% !important;
  color: var(--text-primary) !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 1.1rem !important;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.close-mob:hover, .theme-toggle-mob-btn:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

.dark-theme .close-mob:hover, .dark-theme .theme-toggle-mob-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

.close-mob:active, .theme-toggle-mob-btn:active {
  transform: scale(0.9) !important;
}

/* Quick Actions */
.mob-menu-actions {
  padding: 0 20px 16px !important;
  display: grid !important;
  grid-template-columns: 1fr 48px !important;
  gap: 8px !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.mob-recruiter-pill {
  background: rgba(0, 82, 204, 0.1) !important;
  border: 1px solid rgba(0, 82, 204, 0.2) !important;
  color: #0052CC !important;
  padding: 12px 16px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  font-family: var(--font-mono) !important;
  font-size: 0.8rem !important;
  transition: background 0.2s ease, transform 0.2s ease !important;
}

.mob-recruiter-pill:active {
  transform: scale(0.96) !important;
  background: rgba(0, 82, 204, 0.15) !important;
}

.dark-theme .mob-menu-actions-grid {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

.mob-action-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 16px 12px !important;
  border-radius: 16px !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  cursor: pointer !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  background: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

.dark-theme .mob-action-btn {
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  color: #fff !important;
}

.mob-action-btn i {
  font-size: 1.2rem !important;
}

.mob-action-btn.primary {
  background: #0052CC !important;
  border-color: #0747A6 !important;
  color: #FFFFFF !important;
}

/* Premium Mobile Action Bar Upgrade */
.mob-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  background: transparent;
}

.dark-theme .mob-action-bar {
  border-top-color: rgba(255, 255, 255, 0.08);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.mob-theme-toggle-square {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mob-theme-toggle-square:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.dark-theme .mob-theme-toggle-square {
  background-color: transparent;
  color: #fff;
}

.dark-theme .mob-theme-toggle-square:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.mob-recruiter-cta {
  flex: 1;
  background-color: #000000 !important;
  color: #FFFFFF !important;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  gap: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--ff);
}

.mob-recruiter-cta i {
  font-size: 1.1rem;
}

.mob-recruiter-cta span {
  font-weight: 800;
}

.mob-recruiter-cta:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-theme .mob-recruiter-cta {
  background-color: #000000 !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mob-action-btn.primary:active {
  background: #0747A6 !important;
  transform: scale(0.96) !important;
}

.mob-action-btn.secondary:active {
  background: rgba(0, 0, 0, 0.05) !important;
  transform: scale(0.96) !important;
}

/* ── Accordion Sections ── */
.mob-menu-section {
  background: transparent !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.dark-theme .mob-menu-section {
  border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

.mob-menu-title {
  width: 100% !important;
  padding: 18px 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: none !important;
  border: none !important;
  font-family: var(--font-body) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  color: #172B4D !important; /* Explicit Dark Blue for Light Mode */
  cursor: pointer !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

/* Hard block global .mob-menu anchor arrows on .mob-menu-title to fix flex alignments */
a.mob-menu-title::before {
  content: none !important;
}

.dark-theme .mob-menu-title,
[data-theme="dark"] .mob-menu-title {
  color: #F1F5F9 !important; /* Explicit White for Dark Mode */
}

.mob-menu-title i {
  font-size: 0.8rem !important;
  transition: transform 0.3s ease !important;
  color: var(--text-muted) !important;
}

.mob-menu-section.active .mob-menu-title i {
  transform: rotate(180deg) !important;
}

.mob-menu-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.15, 1, 0.3, 1), padding 0.3s ease;
  background: transparent !important; /* Unified with menu backdrop */
}

.mob-menu-section.active .mob-menu-content {
  max-height: 500px;
  /* Arbitrary large height */
  padding-bottom: 8px;
}

.mob-menu-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 0 8px 12px !important;
}

/* Atlassian style Mobile Top Links */
.mob-top-links {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  margin: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.dark-theme .mob-top-links, [data-theme="dark"] .mob-top-links {
  border-bottom-color: rgba(255, 255, 255, 0.04) !important;
}

.mob-top-link {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 18px 24px !important;
  text-decoration: none !important;
  font-family: var(--font-body) !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.01em !important;
  color: #172B4D !important;
  background: transparent !important;
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease !important;
}

.dark-theme .mob-top-link, [data-theme="dark"] .mob-top-link {
  color: #F1F5F9 !important;
}

.mob-top-link i {
  color: var(--text-secondary) !important;
  font-size: 0.95rem !important;
  width: 24px !important;
  margin-right: 8px !important;
  text-align: left !important;
  transition: color 0.2s ease !important;
}

.mob-top-link:hover, .mob-top-link:active {
  background: var(--list-hover, rgba(0, 0, 0, 0.04)) !important;
  color: var(--accent-cyan, #0052cc) !important;
}

.mob-top-link:hover i, .mob-top-link:active i {
  color: var(--accent-cyan, #0052cc) !important;
}

/* Overriding links inside mob-menu */
.mob-menu a.app-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 10px 14px !important;
  border-bottom: none !important;
  text-decoration: none !important;
  color: #42526E !important; /* Explicit Grey-Blue for Light Mode */
  border-radius: 8px !important;
  background: transparent !important;
  transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease !important;
}

.dark-theme .mob-menu a.app-item,
[data-theme="dark"] .mob-menu a.app-item {
  color: #94A3B8 !important; /* Explicit Silver for Dark Mode */
}

.mob-menu a.app-item::before {
  display: none !important;
}

.mob-menu a.app-item:active,
.mob-menu a.app-item:hover {
  background: rgba(9, 30, 66, 0.04) !important;
  transform: none !important;
  color: #0C66E4 !important;
  /* Atlassian primary blue on hover */
}

html.light .mob-menu a.app-item:active {
  background: rgba(9, 30, 66, 0.04) !important;
}

.app-icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  margin-bottom: 0 !important;
  margin-right: 12px !important;
  box-shadow: none !important;
  background: transparent !important;
  color: inherit !important;
}

html.light .app-icon {
  box-shadow: none !important;
}

.mob-menu a.app-item span {
  font-size: 0.95rem !important;
  font-family: var(--font-body) !important;
  font-weight: 500 !important;
  text-align: left !important;
  line-height: auto !important;
  color: inherit !important;
}

.mob-menu-body {
  flex: 1 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.mob-menu-footer-links {
  padding: 16px 20px !important;
  display: flex !important;
  gap: 12px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  margin-top: 12px !important;
}

.mob-menu-footer {
  margin-top: auto !important;
  padding: 24px 20px !important;
  border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
}

.mob-footer-text {
  font-family: var(--font-mono, 'JetBrains Mono', monospace) !important;
  font-size: 12px !important;
  color: #64748b !important;
  margin: 0 !important;
  text-align: center !important;
  letter-spacing: 0.02em !important;
}

.mob-footer-text i {
  margin-right: 6px !important;
  color: #64748b !important;
}

/* ━━ Phase 2: Atlassian-Elite Mobile Components ━━ */

/* Standardized 768px Guard */
@media (max-width: 768px) {

  .nav-center,
  .nav-right .nav-icon,
  .nav-right .btn-resume,
  .theme-toggle-btn {
    display: none !important;
  }
}

/* ══ BOTTOM ACTION DOCK (Glassmorphic Elite) ══ */
.mob-bottom-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 440px;
  height: 64px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  z-index: 2000;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none !important;
  /* Allow scroll behind dock */
  width: calc(100% - 40px) !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.mob-bottom-dock>* {
  pointer-events: auto !important;
  /* Clickable items */
}

.dark-theme .mob-bottom-dock {
  background: rgba(15, 15, 15, 0.7);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 20px;
  transition: transform 0.2s var(--ease-premium, ease), opacity 0.2s var(--ease-premium, ease), background-color 0.2s var(--ease-premium, ease), border-color 0.2s var(--ease-premium, ease), box-shadow 0.2s var(--ease-premium, ease), color 0.2s var(--ease-premium, ease);
}

.dock-item i {
  font-size: 1.25rem;
}

.dock-item.active {
  color: #22D3EE;
  /* Electric Cyan */
}

/* Recruiter Toggle Special Pulse */
.dock-recruiter {
  position: relative;
}

.dock-recruiter::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid #22D3EE;
  opacity: 0.2;
  animation: recruiter-dock-pulse 2s infinite;
}

@keyframes recruiter-dock-pulse {
  0% {
    transform: scale(1);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 0.2;
  }
}

/* ══ VISUAL RIPPLE (CSS Haptic) ══ */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.ripple-effect:active::after {
  transform: scale(0, 0);
  opacity: .3;
  transition: 0s;
}

/* ══ THEME TRANSITION ENGINE (Luxury Fade) ══ */
body.theme-transitioning,
body.theme-transitioning *,
body.theme-transitioning *::before,
body.theme-transitioning *::after {
  transition: background 0.5s cubic-bezier(0.16, 1, 0.3, 1) !important;
  transition-delay: 0s !important;
}

/* Theme Icon Animation */
.theme-rotate {
  animation: themeModeRotate 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes themeModeRotate {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(0.8); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ══ END OF MOBILE-FIRST.CSS ══ */



/* --- PHASE 4: MOBILE LAYOUT HARDENING --- */
@media screen and (max-width: 768px) {
  
  /* 1. Prevent accidental horizontal scrolling (Mobile layout killer) */
  body, html {
    overflow-x: hidden !important;
  }

  /* 2. Stack the SRE Bento Grid and Dashboard elements
     NOTE: skills-grid, proj-grid, proj-bento, h-stats have their own
     grid rules in the @media (max-width: 767px) block above.
     Only the obs-bento-grid needs explicit flex stacking here. */
  .obs-bento-grid,
  .obs-main-panel,
  .obs-side-panel,
  .dashboard-grid,
  .obs-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  /* 3. Ensure Glass Cards don't bleed off screen */
  .glass-card, 
  .project-card, 
  .proj, 
  .sk, 
  .obs-metric,
  .obs-chart-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 20px !important; /* Ensure padding isn't too cramped */
    box-sizing: border-box !important;
  }

  /* 4. Scale down typography to fit narrow screens */
  h1, .hero-title {
    font-size: 28px !important;
    line-height: 1.2 !important;
  }
  
  h2, .section-title {
    font-size: 22px !important;
  }

  /* 5. Touch Target Accessibility (Apple/Google Standard) */
  button, 
  .nav-link, 
  .action-icon,
  .btn,
  .nav-icon {
    min-height: 44px !important; /* Minimum height for fingers */
    min-width: 44px !important;
    /* NOTE: do NOT override padding here — it breaks precision-styled buttons */
  }

  /* 6. TopNav Mobile Spacing */
  .nav-premium {
    padding: 0 16px !important; /* Gives the logo breathing room */
  }
  
  /* 7. SRE Terminal / Hero Terminal scaling */
  .sre-terminal,
  .h-term,
  .h-term-body {
    font-size: 12px !important; /* Smaller text to fit command lines */
    padding: 12px !important;
    height: auto !important;
    min-height: 150px !important;
  }
}

/* Hide dock on desktop */
@media (min-width: 1024px) {
  .mob-bottom-dock {
    display: none !important;
  }
}

/* Navbar Recruiter Button (Mobile) - Exact Look */
.mob-nav-recruiter-btn {
  display: flex !important;
  background: #000 !important;
  color: #fff !important;
  border: none;
  height: 34px !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800 !important;
  font-size: 10px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-right: 10px !important;
  gap: 6px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3) !important;
  cursor: pointer;
  font-family: var(--ff);
  transition: transform 0.1s ease;
}

.mob-nav-recruiter-btn:active {
  transform: scale(0.95);
}