/* Mobile-only polish. Desktop layout is unchanged. */
.open-full {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.open-full:hover,
.open-full:focus-visible {
  text-decoration: underline;
}
.caption-label {
  min-width: 0;
}

@media (max-width: 640px) {
  body {
    overflow-x: hidden;
  }

  .container {
    width: min(var(--max), calc(100% - 30px));
  }

  .hero {
    padding: 42px 0 44px;
  }

  .hero-grid {
    gap: 30px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 12vw, 3.15rem);
    line-height: 1.02;
    margin-bottom: 18px;
  }

  .hero .lede {
    font-size: 1.03rem;
    line-height: 1.55;
    margin-bottom: 22px;
  }

  .hero .buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .hero .buttons .btn-primary {
    grid-column: 1 / -1;
  }

  .hero .btn {
    min-height: 44px;
    padding: 0 12px;
    font-size: .9rem;
  }

  .hero-card {
    padding: 23px;
    border-radius: 20px;
  }

  .hero-card h3 {
    font-size: 1.4rem;
    line-height: 1.12;
  }

  .section {
    padding: 54px 0;
  }

  .section-head {
    margin-bottom: 28px;
  }

  .about-grid {
    gap: 20px;
  }

  .bio-panel,
  .experience-item,
  .card {
    padding: 22px;
  }

  .feature-grid {
    gap: 28px;
  }

  .metric-grid {
    gap: 10px;
    margin: 22px 0;
  }

  .metric {
    padding: 14px;
  }

  .metric span {
    font-size: .8rem;
    line-height: 1.35;
  }

  .cards-3 {
    gap: 12px;
  }

  .cta {
    padding: 24px;
    border-radius: 20px;
  }

  .cta .buttons {
    width: 100%;
  }

  .cta .btn {
    flex: 1 1 140px;
  }

  .project-hero {
    padding: 44px 0 30px;
  }

  .project-hero h1 {
    font-size: clamp(2.15rem, 10.8vw, 2.85rem);
    line-height: 1.03;
    margin-bottom: 18px;
  }

  .project-hero .lede {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 0;
  }

  .project-meta {
    gap: 7px;
    margin-top: 18px;
  }

  .project-meta span {
    padding: 6px 9px;
    font-size: .78rem;
  }

  .project-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .project-links .btn {
    width: 100%;
  }

  .project-hero-image {
    margin-top: 28px;
  }

  .project-content {
    gap: 28px;
  }

  .sidebar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-radius: 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar::-webkit-scrollbar {
    display: none;
  }

  .sidebar strong {
    display: none;
  }

  .sidebar a {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--navy);
    font-size: .8rem;
    line-height: 1.2;
  }

  .prose-section {
    margin-bottom: 52px;
  }

  .prose-section p,
  .prose-section li {
    font-size: .98rem;
  }

  .screen-grid {
    gap: 18px;
  }

  .screen-card .caption {
    padding: 13px 14px;
    gap: 7px;
  }

  .open-full {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
  }
}
