/* ─────────────────────────────────────────
   responsive.css — Mobile Breakpoints
───────────────────────────────────────── */

/* ══════════════════════════════
   HAMBURGER + MOBILE DRAWER
══════════════════════════════ */

.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 4px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.2s;
  transform-origin: center;
}

.nav__burger.is-open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--color-accent);
}
.nav__burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__burger.is-open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--color-accent);
}

/* Drawer */
.nav__drawer {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.nav__drawer.is-open {
  max-height: 400px;
  padding: 1.2rem 1.5rem 1.8rem;
}

.nav__drawer ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav__drawer ul li a {
  display: block;
  padding: 0.9rem 0;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition-fast);
}

.nav__drawer ul li:last-child a {
  border-bottom: none;
}

.nav__drawer ul li a:hover {
  color: var(--color-accent);
}

/* ══════════════════════════════
   TABLET — max 768px
══════════════════════════════ */

@media (max-width: 768px) {
  :root { --max-width: 100%; }

  .nav { padding: 0 1.5rem; }
  .container { padding: 0 1.5rem; }

  /* Focus: 2 cols on tablet */
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Re-do borders for 2-col layout */
  .focus-card { border-right: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
  .focus-card:nth-child(3n)  { border-right: 1px solid var(--color-border); }
  .focus-card:nth-child(2n)  { border-right: none; }
  .focus-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--color-border); }
  .focus-card:nth-last-child(-n+2) { border-bottom: none; }

  /* Stack: 3 cols on tablet */
  .stack-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stack-grid .stack-item:nth-child(4n) { border-right: 1px solid var(--color-border); }
  .stack-grid .stack-item:nth-child(3n) { border-right: none; }

  /* Depth: 2 cols stays same on tablet */
}

/* ══════════════════════════════
   MOBILE — max 540px
══════════════════════════════ */

@media (max-width: 540px) {

  /* ── Nav ── */
  .nav__links { display: none; }
  .nav__burger { display: flex; }

  /* ── Type ── */
  h1 { font-size: 1.95rem; line-height: 1.15; }
  h2 { font-size: 1.35rem; }

  /* ── Layout ── */
  .container { padding: 0 1.1rem; }
  .section { padding: 2.8rem 0; }
  .section--hero { padding-top: 40px; }

  /* ── Hero ── */
  .hero-bio { font-size: 12.5px; }
  .hero-footer { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .link-group { gap: 1rem; flex-wrap: wrap; }
  .icon-link { font-size: 11px; }

  /* ── Focus: 2 cols on mobile ── */
  .focus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .focus-card { padding: 1rem 0.9rem; gap: 0.45rem; }
  .focus-card:nth-child(3n)  { border-right: 1px solid var(--color-border); }
  .focus-card:nth-child(2n)  { border-right: none; }
  .focus-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--color-border); }
  .focus-card:nth-last-child(-n+2) { border-bottom: none; }
  .focus-card__desc { font-size: 10.5px; line-height: 1.6; }
  .focus-card__title { font-size: 11.5px; }

  /* ── Stack: 2 cols on mobile ── */
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stack-grid .stack-item:nth-child(4n) { border-right: 1px solid var(--color-border); }
  .stack-grid .stack-item:nth-child(3n) { border-right: 1px solid var(--color-border); }
  .stack-grid .stack-item:nth-child(2n) { border-right: none; }
  .stack-item { padding: 1rem 0.7rem; gap: 0.4rem; }
  .stack-item__name { font-size: 11.5px; }
  .stack-item__note { font-size: 9.5px; }
  .stack-item__icon img,
  .stack-item__icon--logo img { width: 26px; height: 26px; }
  .stack-item__icon { width: 28px; height: 28px; }

  /* ── Depth: 1 col on mobile ── */
  .stack-category--depth .depth-grid {
    grid-template-columns: 1fr;
  }
  .depth-item { border-right: none !important; }
  .depth-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--color-border); }
  .depth-item:last-child { border-bottom: none; }

  /* ── Projects ── */
  .project-item__desc { font-size: 12px; }

  /* ── Experience ── */
  .exp-item__header { flex-direction: column; gap: 0.15rem; }
  .exp-item__desc { font-size: 12px; }

  /* ── Principles ── */
  .principle__text { font-size: 12px; }

  /* ── Contact ── */
  .contact-grid { grid-template-columns: 1fr; gap: 1.2rem; }

  /* ── Section header ── */
  .section__header { margin-bottom: 1.4rem; }
  .skills-intro { font-size: 12.5px; margin-bottom: 1.8rem; }
  .stack-category { margin-bottom: 2rem; }
}
