/* =============================================
   RESPONSIVE STYLES
   ============================================= */

/* TABLET - 768px */
@media (max-width: 768px) {
  /* NAV: hamburger */
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: -32px;
    right: -32px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 16px 32px 24px;
    gap: 16px;
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-inner { position: relative; }
  .nav-links a {
    font-size: 12px;
    padding: 8px 0;
  }

  /* Home: identity row stacks */
  .identity-row {
    flex-wrap: wrap;
    overflow-x: hidden;
    gap: 0;
  }
  .identity-item {
    padding: 12px 0;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    flex-basis: 50%;
    flex-shrink: 1;
  }
  .identity-item:first-child { padding-left: 0; }

  /* Home: connect grid single column */
  .connect-grid { grid-template-columns: 1fr; }

  /* About: stack grid single column */
  .stack { grid-template-columns: 1fr; }
  .stack-item { border-right: none !important; }
  .stack-item:last-child { border-bottom: none; }

  /* Projects: card layout stacks */
  .project-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card-meta {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .card-connect { text-align: left; max-width: none; }

  /* Toolbox: tool rows stack */
  .tool-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Writing: coming items stack */
  .coming-item {
    flex-direction: column;
    gap: 8px;
  }

  /* Vault: gate padding + stack password form */
  #gate { padding: 40px 24px; }
  .pw-form {
    flex-direction: column;
    gap: 0;
    max-width: 100%;
  }
  .pw-input {
    border-right: 1px solid var(--rule);
    border-bottom: none;
    font-size: 16px;
  }
  .pw-btn {
    border-left: 1px solid var(--rule);
    padding: 14px 20px;
  }

  /* 404: scene fits */
  .scene { width: 240px; height: 280px; }
  .nav-links-404 { gap: 10px; }
}

/* MOBILE - 480px */
@media (max-width: 480px) {
  .wrap { padding: 0 20px; }
  .nav-inner { padding: 0 20px; }
  .nav-links {
    left: -20px;
    right: -20px;
    padding: 16px 20px 24px;
  }

  h1 { font-size: clamp(28px, 7vw, 36px); }

  /* Global: buttons meet 48px touch target */
  .btn {
    padding: 16px 28px;
    font-size: 11px;
  }

  /* Global: bump small labels for readability */
  .eyebrow { font-size: 11px; }

  /* Home */
  .hero { padding: 56px 0 48px; }
  .hero-headline { font-size: clamp(32px, 8vw, 48px); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; }

  .identity-item {
    flex-basis: 100%;
    flex-shrink: 1;
  }
  .id-label { font-size: 10px; }
  .id-value { white-space: normal; }

  .what-tag { font-size: 9px; }

  /* Work form: prevent iOS zoom, enlarge touch targets */
  .field-input,
  .field-textarea {
    font-size: 16px;
    padding: 14px 16px;
  }
  .field-label { font-size: 10px; }
  .form-wrap { padding: 24px; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .btn-submit { text-align: center; padding: 16px 28px; }

  /* Projects */
  .filters { overflow-x: auto; }
  .filter-btn { padding: 14px 14px; }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    max-width: 100%;
  }
  .footer-meta { text-align: center; font-size: 10px; }

  /* Signal Fire sidebar */
  .sf-sidebar .edition-list {
    max-height: none;
  }

  /* 404 */
  .scene { width: 200px; height: 240px; }
  .link-404 { padding: 12px 16px; font-size: 10px; }
}
