/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS & MOBILE VIEWS
   ========================================================================== */

@media (max-width: 1100px) {
  .slide-container {
    flex-direction: column;
    padding: 30px 15px;
  }

  .avatar-section {
    flex: auto;
  }

  .bio-line {
    white-space: normal;
  }

  .tech-stack-panel {
    right: 2%;
    width: 55vw;
  }

  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }

  .nav-item {
    padding: 7px 12px;
    font-size: 11px;
  }

  .education-scroll-track {
    height: 340vh;
  }

  .edu-header-overlay {
    top: 112px;
    width: 92%;
  }

  .edu-header-overlay .section-title {
    font-size: clamp(16px, 4.5vw, 22px);
    margin-bottom: 8px;
  }

  .edu-header-overlay .glow-divider {
    width: min(75vw, 260px);
    margin-bottom: 0;
  }

  .edu-hud {
    display: flex;
    top: auto;
    bottom: 92px;
    right: 12px;
    left: auto;
    padding: 5px 10px;
    gap: 6px;
    z-index: 28;
  }

  .edu-hud-label,
  .edu-hud-count {
    font-size: 10px;
  }

  .sky-chevrons {
    display: none;
  }

  .edu-info-card {
    right: 50%;
    top: 168px;
    transform: translate(50%, -10px);
    width: calc(100vw - 24px);
    max-width: 460px;
    max-height: calc(100svh - 375px);
    overflow-y: auto;
    padding: 14px 16px;
  }

  .edu-info-card.visible {
    transform: translate(50%, 0);
  }

  .edu-card-top {
    gap: 12px;
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .edu-card-logo {
    width: 50px;
    height: 50px;
    padding: 4px;
  }

  .edu-step-badge {
    font-size: 10px;
    padding: 2px 6px;
    margin-bottom: 4px;
  }

  .edu-institution {
    font-size: clamp(11px, 3.2vw, 13px);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .edu-program {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .edu-meta-row {
    gap: 6px;
    margin-bottom: 8px;
  }

  .edu-meta-pill {
    font-size: 15px;
    padding: 2px 8px;
  }

  .edu-description {
    font-size: 13.5px;
    line-height: 1.45;
    margin-bottom: 10px;
  }

  .edu-skill-tag {
    font-size: 10.5px;
    padding: 3px 7px;
  }

  .edu-ground {
    height: 85px;
  }

  .edu-hero {
    left: 4%;
    bottom: 78px;
    width: 115px;
    height: 145px;
  }

  .edu-token {
    bottom: 135px;
    width: 78px;
    height: 78px;
  }

  .edu-token:nth-child(even) {
    bottom: 155px;
  }

  .edu-dots-nav {
    bottom: 14px;
    width: calc(100vw - 20px);
    max-width: 420px;
    justify-content: space-between;
    gap: 4px;
    padding: 6px 8px;
  }

  .edu-dot-btn {
    flex: 1;
    font-size: clamp(9.5px, 2.6vw, 11px);
    padding: 6px 4px;
    text-align: center;
    white-space: nowrap;
  }

  .detective-scroll-track {
    height: 310vh;
  }

  .character-wrap {
    width: min(88vw, 420px);
    max-height: 76svh;
  }

  .medal {
    width: clamp(18px, 5.2vw, 30px);
  }

  .tech-stack-panel {
    left: 50%;
    right: auto;
    top: 104px;
    width: calc(100vw - 24px);
    max-width: 500px;
    padding: 14px 12px 16px;
    background: rgba(6, 14, 9, 0.94);
    border: 1.5px solid rgba(0, 217, 89, 0.4);
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .85), inset 0 0 16px rgba(0, 255, 102, .06);
    clip-path: polygon(0 8px, 8px 8px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 8px), 0 calc(100% - 8px));
  }

  .tech-stack-panel .section-title {
    font-size: clamp(14px, 4vw, 20px);
    margin-bottom: 8px;
    gap: 6px;
  }

  .tech-stack-panel .glow-divider {
    width: min(70vw, 240px);
    margin-bottom: 10px;
  }

  .tech-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin-top: 2px;
  }

  .tech-card {
    min-width: 0;
    aspect-ratio: auto;
    padding: 9px 4px 8px;
    gap: 6px;
    border-radius: 6px;
    background: rgba(14, 22, 16, .96);
    border: 1px solid rgba(0, 255, 102, .18);
  }

  .tech-card img {
    width: 28px;
    height: 28px;
  }

  .tech-card span {
    font-size: clamp(9px, 2.5vw, 11px);
    line-height: 1.15;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  /* Mobile project card positioning is managed via centered modal popup (#projectInfo) */
  .spacktr-card {
    direction: ltr;
  }

  .card-top-preview {
    height: 150px;
  }

  .spacktr-title {
    font-size: 13px;
  }

  .projects-header-overlay .section-title {
    font-size: 20px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 22px;
  }

  .hologram-scroll-track {
    height: 310vh;
  }

  .holo-header-overlay {
    top: 108px;
  }

  .holo-header-overlay .section-title {
    font-size: clamp(15px, 4.4vw, 20px);
    margin-bottom: 6px;
  }

  .holo-header-overlay .glow-divider {
    width: min(70vw, 240px);
  }

  .holo-layout {
    flex-direction: column;
    gap: 12px;
    padding: 135px 14px 65px;
  }

  .holo-projector-zone {
    width: 210px;
    height: 220px;
  }

  .holo-light-cone {
    width: 195px;
    height: 175px;
    bottom: 34px;
  }

  .holo-rings {
    width: 150px;
    height: 165px;
    bottom: 38px;
  }

  .holo-figure-frame {
    width: 160px;
    height: 175px;
    margin-bottom: 4px;
  }

  .holo-emitter-box {
    width: 170px;
    height: 36px;
  }

  .holo-box-aperture {
    width: 140px;
    height: 10px;
  }

  .holo-box-body {
    width: 170px;
    height: 28px;
    padding: 4px 14px 0;
  }

  .holo-box-label {
    font-size: 8.5px;
  }

  .holo-dialogue-card {
    padding: 14px 16px;
    width: calc(100vw - 24px);
    max-width: 460px;
  }

  .holo-status-bar {
    margin-bottom: 10px;
    padding-bottom: 8px;
  }

  .holo-mode-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .holo-freq {
    font-size: 15px;
  }

  .holo-role-title {
    font-size: clamp(11.5px, 3.4vw, 14px);
    margin-bottom: 10px;
  }

  .holo-main-quote {
    font-size: clamp(13.5px, 3.6vw, 15px);
    line-height: 1.45;
    padding: 8px 12px;
    margin-bottom: 8px;
  }

  .holo-subtext {
    font-size: 12.5px;
    line-height: 1.4;
    margin-bottom: 10px;
  }

  .holo-tag {
    font-size: 10px;
    padding: 3px 7px;
  }

  .holo-dots-nav {
    bottom: 12px;
    width: calc(100vw - 20px);
    max-width: 390px;
    justify-content: space-between;
    padding: 5px 8px;
    gap: 4px;
  }

  .holo-dot-btn {
    flex: 1;
    font-size: 9.5px;
    padding: 5px 4px;
    text-align: center;
  }
}

@media (max-width: 480px),
(max-height: 700px) and (max-width: 900px) {
  .edu-info-card {
    top: 158px;
    max-height: calc(100svh - 340px);
    padding: 12px 14px;
  }

  .edu-hero {
    width: 96px;
    height: 122px;
    bottom: 76px;
  }

  .edu-token {
    width: 66px;
    height: 66px;
    bottom: 122px;
  }

  .edu-token:nth-child(even) {
    bottom: 138px;
  }
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

@media (max-width: 600px) {
  .site-header {
    padding: 10px 12px;
  }

  .brand-first {
    font-size: 0.85rem;
  }

  .brand-last {
    font-size: 0.95rem;
  }

  .brand-avatar-wrap {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .cv-btn {
    padding-right: 10px;
    gap: 6px;
  }

  .cv-text {
    font-size: 10px;
  }

  .cv-icon-circle {
    width: 29px;
    height: 29px;
  }

  .header-nav {
    justify-content: flex-start;
    max-width: 100%;
  }

  .section-title {
    font-size: clamp(13px, 4vw, 20px);
    letter-spacing: 0;
  }

  .glow-divider {
    width: min(80vw, 340px);
  }

  .bio-text {
    font-size: 15px;
  }

  .pixel-box {
    padding: 10px;
  }

  .box-label {
    width: 78px;
    font-size: 12px;
  }

  .box-separator {
    margin: 0 8px;
  }

  .box-value {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
  }

  .tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  .tech-card {
    padding: 10px 5px;
    gap: 8px;
    min-width: 0;
  }

  .tech-card img {
    width: 34px;
    height: 34px;
  }

  .tech-card span {
    font-size: 12px;
    overflow-wrap: anywhere;
  }

  .camera-rig,
  .truck-mover {
    transform-origin: center center;
  }

  .contact-grid {
    gap: 22px;
  }

  .pixel-input,
  .pixel-textarea {
    max-width: 100%;
    min-width: 0;
  }

  .send-pixel-btn {
    min-height: 44px;
  }
}

@media (max-width: 420px),
(max-height: 700px) and (max-width: 900px) {
  .tech-stack-panel {
    top: 96px;
    padding: 10px 8px 12px;
  }

  .tech-stack-panel .section-title {
    font-size: clamp(12px, 3.5vw, 16px);
  }

  .tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .tech-card {
    padding: 7px 3px 6px;
    gap: 5px;
  }

  .tech-card img {
    width: 23px;
    height: 23px;
  }

  .tech-card span {
    font-size: 10px;
  }

  .character-wrap {
    width: min(82vw, 340px);
    max-height: 68svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.cert-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 5, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cert-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cert-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  background:
    radial-gradient(120% 80% at 50% -10%,
      rgba(74, 222, 128, 0.12) 0%,
      rgba(74, 222, 128, 0) 60%),
    #0c0f0d;
  border: 1.5px solid rgba(0, 255, 102, 0.4);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.75),
    0 0 30px rgba(0, 255, 102, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.cert-modal-overlay.active .cert-modal-content {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.cert-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(14, 20, 16, 0.85);
}

.cert-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 102, 0.28);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.12);
}

.cert-icon-tile img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.cert-header-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-modal-title {
  margin: 0;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-shadow: 1px 1px 0 #041208;
}

.cert-modal-subtitle {
  margin: 0;
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--neon);
  text-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
  text-transform: uppercase;
}

.cert-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #aeb4ae;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cert-modal-close:hover,
.cert-modal-close:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon);
  transform: rotate(90deg);
  box-shadow: 0 0 12px rgba(0, 255, 102, 0.35);
  outline: none;
}

.cert-modal-body {
  padding: 16px;
  max-height: min(58vh, 380px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 222, 128, 0.4) transparent;
}

.cert-modal-body::-webkit-scrollbar {
  width: 6px;
}

.cert-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.cert-modal-body::-webkit-scrollbar-thumb {
  background: rgba(74, 222, 128, 0.35);
  border-radius: 3px;
}

.cert-modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}

.cert-item:hover {
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.35);
  transform: translateY(-2px);
}

.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.cert-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.cert-title {
  color: #f3f5f3;
  font-family: 'Share Tech Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.cert-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.2;
  font-family: 'Share Tech Mono', monospace;
}

.cert-provider {
  color: var(--neon);
}

.cert-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.6;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: #4ade80;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cert-link:hover,
.cert-link:focus-visible {
  background: rgba(74, 222, 128, 0.25);
  color: #ffffff;
  border-color: var(--neon);
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.35);
  outline: none;
}

.cert-empty-state {
  padding: 32px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cert-empty-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #4ade80;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}

.cert-empty-title {
  font-family: 'Silkscreen', monospace;
  font-size: 14px;
  color: #ffffff;
  margin: 0;
}

.cert-empty-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: #8fa395;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hamburger-btn {
  display: none;
  width: 42px;
  height: 42px;
  background: rgba(14, 22, 17, 0.95);
  border: 1.5px solid var(--neon-border);
  color: var(--neon);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  clip-path: polygon(0px 5px, 5px 5px, 5px 0px,
      calc(100% - 5px) 0px, calc(100% - 5px) 5px, 100% 5px,
      100% calc(100% - 5px), calc(100% - 5px) calc(100% - 5px), calc(100% - 5px) 100%,
      5px 100%, 5px calc(100% - 5px), 0px calc(100% - 5px));
}

.hamburger-btn .ham-bar {
  display: block;
  width: 20px;
  height: 2.5px;
  background-color: var(--neon);
  box-shadow: 0 0 6px rgba(0, 255, 102, 0.6);
}

.hamburger-btn.is-active .ham-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger-btn.is-active .ham-bar:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.is-active .ham-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-tech-header {
  display: none;
}

@media (max-width: 900px) {

  *:not(.scroll-reveal-item):not(#dialog-tags span):not(.ham-bar):not(#skill-dialog-modal):not(.cert-image-viewer):not(.cert-viewer-card),
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto !important;
  }

  .matrix-bg {
    display: none !important;
  }

  .site-header {
    height: 70px !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    padding: 0 16px !important;
    background: rgba(4, 10, 6, 0.96) !important;
    border-bottom: 1.5px solid rgba(0, 255, 102, 0.25) !important;
  }

  .hamburger-btn {
    display: inline-flex !important;
  }

  .header-nav {
    display: none !important;
    position: fixed !important;
    top: 70px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 14px !important;
    border-radius: 0 !important;
    background: rgba(6, 15, 10, 0.98) !important;
    border: 2px solid var(--neon-border) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.92), 0 0 20px rgba(0, 255, 102, 0.2) !important;
    z-index: 999 !important;
    clip-path: polygon(0px 8px, 8px 8px, 8px 0px,
      calc(100% - 8px) 0px, calc(100% - 8px) 8px, 100% 8px,
      100% calc(100% - 8px), calc(100% - 8px) calc(100% - 8px), calc(100% - 8px) 100%,
      8px 100%, 8px calc(100% - 8px), 0px calc(100% - 8px));
  }

  .header-nav.is-open {
    display: flex !important;
  }

  .header-nav .nav-item {
    font-size: 13px !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    text-align: left !important;
    border: 1px solid rgba(0, 255, 102, 0.12) !important;
  }

  .about-section {
    min-height: 100svh !important;
    padding: 82px 14px 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .about-section .slide-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    padding: 8px 6px !important;
    width: 100% !important;
  }
  .about-section .avatar-section {
    flex: 0 0 auto !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .about-section .avatar-section .scene-stage {
    width: min(240px, 72vw) !important;
    height: 220px !important;
    min-height: 220px !important;
    margin: 0 auto !important;
  }
  .about-section .avatar-section img.character-layer {
    width: 64% !important;
    max-width: 155px !important;
    height: 68% !important;
    top: 6% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }
  .about-section .avatar-section img.laptop-layer {
    width: 60% !important;
    max-width: 145px !important;
    height: 40% !important;
    bottom: -4% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }
  .back-rays-container {
    display: flex !important;
    opacity: 1 !important;
    transform: scale(0.68) !important;
  }
  .screen-beam-layer,
  .laser-streaks {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(10px) scale(0.78) !important;
  }
  .laser-streaks .ray-line {
    opacity: 0.75 !important;
  }
  .about-section .content-section {
    width: 100% !important;
    max-width: 520px !important;
  }
  .about-section .section-title {
    font-size: clamp(16px, 4.8vw, 22px) !important;
    margin-bottom: 8px !important;
  }
  .about-section .glow-divider {
    width: min(72vw, 260px) !important;
    margin-bottom: 14px !important;
  }
  .about-section .bio-text {
    font-size: clamp(13.5px, 3.6vw, 15.5px) !important;
    line-height: 1.5 !important;
    margin-bottom: 16px !important;
    padding: 0 4px !important;
  }
  .about-section .bio-line {
    white-space: normal !important;
    display: inline !important;
  }
  .about-section .boxes-wrapper {
    gap: 8px !important;
    width: 100% !important;
  }
  .about-section .pixel-box {
    padding: 8px 12px !important;
  }
  .about-section .box-label {
    width: 76px !important;
    font-size: 12px !important;
  }
  .about-section .box-separator {
    margin: 0 10px !important;
    height: 16px !important;
  }
  .about-section .box-value {
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .education-scroll-track {
    height: auto !important;
    padding: 60px 16px 40px !important;
  }
  .education-sticky-stage {
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: transparent !important;
    overflow: visible !important;
  }
  .edu-header-overlay {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin-bottom: 24px !important;
    width: 100% !important;
  }
  .edu-hud,
  .sky-chevrons,
  .edu-hero,
  .edu-tokens-track,
  .edu-ground,
  .edu-dots-nav {
    display: none !important;
  }
  #eduInfoCard {
    display: none !important;
  }
  .mobile-edu-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    max-width: 500px;
  }
  .mobile-edu-list .edu-info-card {
    display: block !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 100% !important;
    max-height: none !important;
  }

  .detective-scroll-track {
    height: auto !important;
    padding: 60px 16px 40px !important;
  }
  .detective-stage {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .mobile-tech-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 14px !important;
    width: 100% !important;
  }
  .mobile-tech-header .glow-divider {
    margin-bottom: 12px !important;
  }
  .mobile-tech-hint {
    font-family: 'Silkscreen', monospace;
    font-size: 11px;
    color: var(--neon);
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid rgba(0, 255, 102, 0.35);
    padding: 6px 12px;
    letter-spacing: 0.5px;
    max-width: 92vw;
  }

  .tech-stack-panel,
  .scroll-hint {
    display: none !important;
  }
  .character-wrap {
    display: block !important;
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: min(94vw, 430px) !important;
    max-height: none !important;
    aspect-ratio: 2 / 3 !important;
    margin: 0 auto !important;
  }

  #characterA {
    opacity: 0 !important;
  }
  #characterB {
    opacity: 1 !important;
  }
  .coat-medals {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .coat-medals .medal {
    opacity: 1 !important;
    scale: 1 !important;
    translate: 0 0 !important;
    pointer-events: auto !important;
    width: clamp(24px, 6.8vw, 36px) !important;
  }

  .projects-scroll-track {
    height: auto !important;
    padding: 60px 16px 40px !important;
  }
  .sticky-viewport {
    position: relative !important;
    height: auto !important;
    width: 100% !important;
    flex-direction: column !important;
    gap: 18px !important;
    overflow: visible !important;
  }
  .projects-header-overlay {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin-bottom: 6px !important;
  }
  .road-line,
  .camera-rig {
    display: none !important;
  }

  .mobile-projects-selector {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 480px !important;
  }
  .mobile-proj-crate-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: rgba(8, 18, 12, 0.94);
    border: 1.5px solid var(--neon-border);
    padding: 8px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7), inset 0 0 12px rgba(0, 255, 102, 0.06);
    clip-path: polygon(0px 6px, 6px 6px, 6px 0px,
      calc(100% - 6px) 0px, calc(100% - 6px) 6px, 100% 6px,
      100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%,
      6px 100%, 6px calc(100% - 6px), 0px calc(100% - 6px));
  }
  .mobile-proj-crate-card:active {
    border-color: #ffffff;
    background: rgba(0, 255, 102, 0.14);
  }
  .mobile-proj-thumb-wrap {
    position: relative;
    width: 100%;
    height: 92px;
    background: #060d09;
    border: 1px solid #1f422b;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .mobile-proj-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .mobile-proj-num-badge {
    display: none !important;
  }
  .mobile-proj-cat-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-family: 'VT323', monospace;
    font-size: 13px;
    background: rgba(6, 20, 11, 0.92);
    color: #ffe680;
    border: 1px solid rgba(255, 204, 0, 0.45);
    padding: 1px 6px;
  }
  .mobile-proj-card-title {
    font-family: 'Silkscreen', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
  }
  .mobile-proj-tap-hint {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--neon);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .mobile-proj-popup-backdrop {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(2, 6, 4, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99990 !important;
  }
  .mobile-proj-popup-backdrop.is-open {
    display: block !important;
  }

  #projectInfo.spacktr-card {
    display: none !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: min(420px, calc(100vw - 28px)) !important;
    max-height: min(84vh, 84dvh) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    z-index: 100000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    filter:
      drop-shadow(0 16px 36px rgba(0, 0, 0, 0.92))
      drop-shadow(0 0 6px rgba(0, 255, 102, 0.22))
      drop-shadow(0 0 16px rgba(0, 255, 102, 0.10)) !important;
  }
  #projectInfo.spacktr-card.mobile-popup-open,
  #projectInfo.spacktr-card.mobile-popup-open.visible {
    display: block !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Soften the green color on the sides and outer borders */
  #projectInfo .pixel-card-outer {
    background: linear-gradient(180deg, #1b4d2a 0%, #2a8a3f 50%, #164022 100%) !important;
    padding: 3px !important;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.8) !important;
  }

  #projectInfo .pixel-card-inner {
    padding: 12px 14px 14px !important;
    box-shadow: inset 0 0 0 1.5px rgba(0, 255, 102, 0.12) !important;
  }

  #projectInfo .card-top-preview {
    height: clamp(120px, 32vw, 150px) !important;
  }

  #projectInfo .card-dark-body {
    padding: 10px 2px 2px !important;
  }

  #projectInfo .card-header-row {
    margin-bottom: 8px !important;
  }

  #projectInfo .spacktr-desc {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
    max-height: 75px !important;
    overflow-y: auto !important;
  }

  #projectInfo .spacktr-actions {
    gap: 8px !important;
    margin-top: 4px !important;
  }

  #projectInfo .spacktr-btn {
    padding: 9px 12px !important;
    font-size: 11px !important;
  }

  .mobile-proj-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    background: rgba(10, 18, 13, 0.92);
    border: 2px solid #ff5555;
    box-shadow: 0 0 0 2px #050a07;
    color: #ff7777;
    font-family: 'Silkscreen', monospace;
    font-size: 15px;
    font-weight: 700;
    display: grid !important;
    place-items: center;
    cursor: pointer;
    z-index: 10;
  }

  #hologramTrack #scroll-track {
    height: auto !important;
    padding: 60px 16px 40px !important;
  }
  #hologramTrack #sticky-viewport {
    position: relative !important;
    height: auto !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }
  .beyond-header-overlay {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    margin-bottom: 10px !important;
  }
  #bg-canvas,
  #capsule-canvas,
  #char-liquid-canvas,
  #internal-flash,
  #callout-lines-svg,
  .crt-overlay {
    display: none !important;
  }
  #camera-stage {
    transform: none !important;
    height: auto !important;
    flex-direction: column !important;
  }
  #capsule-unit {
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
    transform: none !important;
  }
  #character-rig {
    position: relative !important;
    inset: auto !important;
    height: 220px !important;
    width: 100% !important;
  }
  #img-final {
    position: relative !important;
    opacity: 1 !important;
    height: 100% !important;
  }
  #character-callouts-hud {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 460px !important;
  }
  .cyber-callout-card {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: 100% !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (min-width: 901px) {
  .mobile-edu-list,
  .mobile-projects-selector,
  .mobile-tech-header,
  .mobile-proj-popup-backdrop,
  .mobile-proj-popup-close,
  .preview-expand-btn,
  #expandPreviewBtn {
    display: none !important;
  }
}



@media (max-width: 1100px) {
  .about-section .slide-container {
    flex-direction: column !important;
    padding: 30px 15px !important;
  }

  .about-section .avatar-section {
    flex: 0 0 auto !important;
    width: 320px !important;
    max-width: 85vw !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section .scene-stage {
    width: 100% !important;
    max-width: 320px !important;
    aspect-ratio: 460 / 500 !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 900px) {
  .about-section .avatar-section {
    flex: 0 0 auto !important;
    width: min(220px, 65vw) !important;
    max-width: 220px !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section .scene-stage {
    width: 100% !important;
    max-width: 220px !important;
    aspect-ratio: 460 / 500 !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section img.character-layer {
    width: 80% !important;
    height: 74% !important;
    max-width: none !important;
    top: 2% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }

  .about-section .avatar-section img.laptop-layer {
    width: 78% !important;
    height: 50% !important;
    max-width: none !important;
    bottom: 0% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }

  .back-rays-container {
    display: flex !important;
    opacity: 1 !important;
    transform: scale(0.65) !important;
  }

  .screen-beam-layer,
  .laser-streaks {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(6px) scale(0.82) !important;
  }
}



@media (max-width: 900px) {
  #hologramTrack .beyond-header-overlay {
    position: relative !important;
    top: 0 !important;
    margin-bottom: 44px !important;
  }

  #hologramTrack #sticky-viewport > main {
    padding-top: 16px !important;
  }

  #hologramTrack #camera-stage {
    margin-top: 18px !important;
  }

  #hologramTrack #capsule-unit {
    width: 100% !important;
    height: auto !important;
    margin-top: 12px !important;
  }
}





@media (max-width: 900px) {
  #characterWrap.scroll-reveal-item {
    opacity: 0 !important;
    transform: translateY(26px) scale(0.97) !important;
    transition:
      opacity 0.62s cubic-bezier(0.22, 1, 0.36, 1) var(--sr-delay, 0s),
      transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) var(--sr-delay, 0s) !important;
  }
  #characterWrap.scroll-reveal-item.is-revealed {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
  }
}

@media (max-width: 900px) {
  .about-section {
    min-height: 100svh !important;
    min-height: 100dvh !important;
    height: auto !important;
    padding: clamp(56px, 7.5svh, 66px) 12px clamp(8px, 1.8svh, 14px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .about-section .slide-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(5px, 1.1svh, 8px) !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section {
    flex: 0 0 auto !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section .scene-stage {
    width: clamp(120px, 24svh, 145px) !important;
    max-width: 145px !important;
    aspect-ratio: 460 / 500 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 158px !important;
    margin: 0 auto !important;
  }

  .about-section .avatar-section img.character-layer {
    width: 80% !important;
    height: 74% !important;
    max-width: none !important;
    top: 2% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }

  .about-section .avatar-section img.laptop-layer {
    width: 78% !important;
    height: 50% !important;
    max-width: none !important;
    bottom: 0% !important;
    opacity: 1 !important;
    transform: translate(-50%, 0) scale(1) !important;
    filter: none !important;
  }

  .about-section .content-section {
    width: 100% !important;
    max-width: 440px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .about-section .section-title {
    font-size: clamp(14px, 3.8vw, 17px) !important;
    margin-bottom: 2px !important;
    letter-spacing: 0.3px !important;
  }

  .about-section .glow-divider {
    width: min(50vw, 160px) !important;
    margin-bottom: clamp(5px, 0.9svh, 8px) !important;
  }

  .about-section .bio-text {
    display: block !important;
    font-size: clamp(11.5px, 3vw, 12.8px) !important;
    line-height: 1.44 !important;
    letter-spacing: 0.15px !important;
    word-spacing: 0.8px !important;
    text-align: center !important;
    text-wrap: pretty;
    color: #e9f5ec !important;
    background: rgba(6, 20, 11, 0.62) !important;
    border: 1px solid rgba(0, 255, 102, 0.22) !important;
    padding: clamp(6px, 0.9svh, 8px) 12px !important;
    margin: 0 auto clamp(5px, 1svh, 8px) !important;
    width: 100% !important;
    max-width: 440px !important;
    box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.05) !important;
    clip-path: polygon(
      0px 6px, 6px 6px, 6px 0px,
      calc(100% - 6px) 0px, calc(100% - 6px) 6px, 100% 6px,
      100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%,
      6px 100%, 6px calc(100% - 6px), 0px calc(100% - 6px)
    );
  }

  .about-section .bio-line {
    display: inline !important;
    white-space: normal !important;
  }

  .about-section .bio-line::after {
    content: " ";
  }

  .about-section .boxes-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(4px, 0.7svh, 5px) !important;
    width: 100% !important;
    max-width: 440px !important;
    margin: 0 auto !important;
  }

  .about-section .pixel-box {
    padding: clamp(4px, 0.7svh, 6px) 10px !important;
    min-height: clamp(26px, 3.8svh, 29px) !important;
    display: flex !important;
    align-items: center !important;
  }

  .about-section .box-label {
    width: clamp(58px, 15vw, 64px) !important;
    font-size: clamp(9.5px, 2.6vw, 10.5px) !important;
    flex-shrink: 0 !important;
  }

  .about-section .box-separator {
    margin: 0 6px !important;
    height: 12px !important;
    flex-shrink: 0 !important;
  }

  .about-section .box-value {
    font-size: clamp(10px, 2.7vw, 11.5px) !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .education-scroll-track,
  .detective-scroll-track,
  .projects-scroll-track,
  #hologramTrack #scroll-track {
    padding: 54px 16px 36px !important;
  }

  .contact-section {
    min-height: auto !important;
    padding: 56px 16px 64px !important;
  }

  .contact-pixel-panel {
    padding: 24px 20px !important;
  }

  .contact-talk-title {
    font-size: 22px !important;
    margin-bottom: 12px !important;
  }

  .contact-talk-desc {
    font-size: 15px !important;
    line-height: 1.65 !important;
    margin-bottom: 20px !important;
  }
}



/* ==========================================================================
   إزاحة سلايد About Me قليلاً إلى اليسار على شاشات سطح المكتب + تسريع الأداء
   ========================================================================== */
@media (min-width: 901px) {
  .about-section .slide-container {
    transform: translateX(-48px) !important;
    margin-right: 48px !important;
  }
}

@media (min-width: 901px) {
  .education-scroll-track,
  .detective-scroll-track,
  .projects-scroll-track,
  .contact-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 100vh;
  }
  #hologramTrack {
    content-visibility: visible !important;
    contain: none !important;
  }
}

@media (max-width: 900px) {
  .projects-scroll-track,
  .sticky-viewport,
  #hologramTrack {
    content-visibility: visible !important;
    contain: none !important;
  }
  .education-scroll-track,
  .detective-scroll-track,
  .contact-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 100vh;
  }
}
