/* Mobile home: use document flow rather than desktop image coordinates. */
@media (max-width: 1100px) {
  body.is-home {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    overflow: visible;
    display: flex;
    flex-direction: column;
  }
  .is-home .site-header { flex: none; }
  .is-home #main { display: block; height: auto; min-height: 0; flex: 1 0 auto; }
  .is-home .neural-stage {
    height: auto;
    min-height: 0;
    padding: 24px 16px 42px;
    overflow: visible;
    background: linear-gradient(#020c18b8, #020c1877), url("../neural-panorama.954fb1ef5c6c.png") center bottom / cover no-repeat;
  }
  .is-home .neural-canvas {
    position: relative;
    inset: auto;
    transform: none;
    width: min(100%, 760px);
    height: auto;
    aspect-ratio: auto;
    margin: 0 auto;
    container-type: normal;
  }
  .is-home .neural-canvas .neural-artwork { display: none; }
  .is-home .terminal-overlay {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
    align-items: stretch;
  }
  .is-home .terminal-overlay .branch,
  .is-home .terminal-overlay .branch:hover {
    position: relative;
    inset: auto;
    transform: none;
    grid-column: auto;
    grid-row: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 184px;
    padding: 10px 4px;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 12px;
    text-align: center;
    touch-action: manipulation;
  }
  .is-home .terminal-overlay .branch:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 14px) / 2);
  }
  .is-home .terminal-overlay .branch .neon-orb {
    order: -1;
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .is-home .terminal-overlay .branch h2,
  .is-home .terminal-overlay .branch p {
    position: static;
    inset: auto;
    transform: none;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .is-home .terminal-overlay .branch h2 { font-size: 14px; line-height: 1.8; color: #eef8ff; }
  .is-home .terminal-overlay .branch p { font-size: 11px; line-height: 1.9; color: #bdd6ec; }
  /* The hover/focus ring follows the icon only, rather than the full mobile link. */
  .is-home .terminal-overlay .branch::after {
    inset: auto;
    top: 13px;
    left: 50%;
    transform: translateX(-50%);
    width: 62px;
    height: 62px;
    box-sizing: border-box;
  }
  .is-home .terminal-overlay .branch:focus-visible { outline-offset: 3px; }
  .is-home .home-social-footer {
    position: static;
    inset: auto;
    flex: none;
    width: 100%;
    background: #020d1ce8;
    border-top: 1px solid #45baff33;
  }
  .is-home .home-social-footer .social-links { gap: 26px; padding: 16px 0; }
  .is-home .home-social-footer .social-circle { width: 40px; height: 40px; }
  .is-home .home-social-footer .social-link { font-size: 10px; gap: 6px; }
  .is-home .home-social-footer .social-label { display: block; }
  .is-home .home-social-footer svg { width: 22px; height: 22px; }
  .is-home .nav { max-height: calc(100svh - 64px); overflow-y: auto; }
}
@media (min-width: 700px) and (max-width: 1100px) {
  .is-home .terminal-overlay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .is-home .terminal-overlay .branch:last-child { grid-column: 2; width: 100%; }
}
@media (max-width: 360px) {
  .is-home .neural-stage { padding-inline: 12px; }
  .is-home .terminal-overlay { column-gap: 10px; }
  .is-home .terminal-overlay .branch h2 { font-size: 13px; }
  .is-home .terminal-overlay .branch p { font-size: 10px; }
}
