/* Shared small-screen corrections. Desktop styling remains in each page. */
@media (max-width: 900px) {
  .navbar { padding-inline: 5vw; height: 74px; }
  .navbar .nav-center, .navbar .nav-right > .btn-talk { display: none; }
  .navbar .nav-right { margin-left: auto; }
  .navbar .nav-hamburger { display: flex; position: relative; width: 48px; height: 48px; align-items: center; justify-content: center; }
  .nav-hamburger .hamburger-bar { display: none; }
  .nav-hamburger::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: -9px 0 #fff, 9px 0 #fff; }
  .nav-hamburger.is-active::before { width: 22px; height: 2px; border-radius: 0; box-shadow: none; transform: rotate(45deg); }
  .nav-hamburger.is-active::after { content: ''; position: absolute; width: 22px; height: 2px; background: #fff; transform: rotate(-45deg); }
  .mobile-nav-drawer { inset: 0; width: 100%; height: 100dvh; padding: 98px 7vw 32px; overflow-y: auto; justify-content: center; text-align: center; }
  .mobile-nav-links { margin: 0; padding: 0; gap: 8px; }
  .mobile-nav-link { font-size: clamp(1.5rem, 5vw, 2.4rem); padding: 10px; }
  .mobile-talk-wrapper { width: 100%; max-width: 400px; align-self: center; }
}
@media (max-width: 767px) {
  body { overflow-wrap: break-word; }
  main, section, article, [class$='-inner'], [class$='-col'], [class$='-grid'] > * { min-width: 0; }
  img, video { max-width: 100%; }
  main, .hero-stage, .selected-work-section, .creative-design-section, .about-preview-section, .cta-banner-section { text-align: center; }
  section { padding-inline: 5vw; }
  .hero-pinned-track { height: calc(var(--mobile-hero-height, 1400px) + 400svh); }
  .hero-sticky-viewport { height: var(--mobile-hero-height, 1400px); top: min(0px, calc(100svh - var(--mobile-hero-height, 1400px))); }
  .hero-stage { padding: 0 5vw; justify-content: flex-start; align-items: center; }
  .stage-intro-content, .stage-expertise-content, .stage-capabilities-content {
    width: 100%; max-width: 560px; padding: 600px 0 72px; margin: 0 auto; align-items: center; text-align: center;
  }
  #animation-canvas { height: 600px; }
  .hero-brand-name { font-size: clamp(2rem, 9vw, 3rem); }
  .hero-role-headline { font-size: clamp(1.25rem, 5.5vw, 1.8rem); }
  .hero-cta-actions, .hero-stats-row, .capabilities-tags, .hero-intro-lead { justify-content: center; flex-wrap: wrap; }
  .hero-stats-row { width: 100%; gap: 18px; }
  .hero-stat-item { padding-inline: 6px; min-width: 0; }
  .hero-scroll-indicator, .hero-stage-indicators { display: none; }
  .featured-project-card, .secondary-projects-grid, .project-showcase-card, .project-showcase-card:nth-child(even), .story-grid, .skills-grid, .philosophy-grid, .teaching-inner, .contact-grid, .cs-body-inner, .cs-capabilities-grid, .cs-tech-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .featured-project-card, .project-showcase-card { padding: 24px 18px; }
  .project-info-col, .project-media-col { width: 100%; min-width: 0; }
  .project-info-col { align-items: center; }
  .project-meta-row, .project-action-row, .project-actions-group, .project-tags-list, .project-actions, .cs-badge-row, .cta-action-row { justify-content: center; flex-wrap: wrap; gap: 12px; }
  .project-title, .work-headline, .design-headline, .section-heading { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  .project-browser-frame { width: 100%; min-width: 0; }
  .browser-url-pill, .cs-browser-url-pill { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .about-two-col { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .about-col-left, .cs-sidebar { position: static; }
  .about-col-left, .about-hero-inner, .work-hero-inner, .design-hero-inner, .contact-hero-inner, .cs-hero-inner, .section-header-wrap { text-align: center; align-items: center; margin-inline: auto; }
  .about-col-left p, .section-header-wrap p, .cta-banner-inner p { margin-inline: auto; }
  .expertise-item { flex-direction: column; align-items: center; text-align: center; }
  .story-photo-wrap { max-width: 440px; margin-inline: auto; }
  .contact-form, .contact-form-card { text-align: left; }
  input, textarea, select { max-width: 100%; font-size: 16px; }
  .form-row { display: flex; flex-direction: column; gap: 20px; }
  .cs-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-body-inner { display: grid; }
  .cs-next-prev, .cs-project-nav { flex-wrap: wrap; justify-content: center; gap: 20px; }
  .filter-tabs, .filter-bar, .work-filters, .gallery-filters { flex-wrap: wrap; justify-content: center; height: auto; }
  .site-footer-wrapper { text-align: center; }
  .footer-top-row, .footer-meta-bar { align-items: center; }
  .footer-direct-reach, .footer-actions-right { justify-content: center; flex-wrap: wrap; gap: 16px; }
  .footer-copy-text { line-height: 1.6; }
}
@media (max-width: 480px) {
  .cs-meta-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-cta-actions, .project-actions-group { flex-direction: column; width: 100%; }
  .hero-cta-actions a, .project-actions-group a { width: 100%; justify-content: center; }
}@media (max-width: 767px) {
  .skills-grid > .skill-card { grid-column: 1 / -1 !important; }
  .skill-card-icon, .expertise-icon-wrap { margin-inline: auto; }
  .hero-brand-name, .hero-role-headline, .hero-intro-desc, .stage-eyebrow, .stage-headline, .expertise-row, .exp-row-main, .exp-row-sub { text-align: center; }
  .exp-row-main, .exp-row-sub { justify-content: center; flex-wrap: wrap; }
  .stage-intro-content p, .stage-expertise-content p, .stage-capabilities-content p { text-align: center; }
  .contact-info-col, .contact-info-card { text-align: center; }
}
@media (max-width: 767px) {
  .stage-header-left, .stage-section-title, .stage-headline-large, .stage-description-text { text-align: center; }
  .capabilities-tags-group, .stage-cta-wrapper { justify-content: center; }
  .hero-sequence-nav { bottom: 16px; max-width: 90%; }
}
@media (max-width: 767px) {
  .about-col-left { transform: none; }
  .person-headline { font-size: clamp(2rem, 9vw, 2.8rem); }
  .hero-scroll-prompt { display: none; }
}
@media (max-width: 767px) {
  .selected-work-section, .creative-design-section, .about-preview-section, .cta-banner-section, .site-footer-wrapper { content-visibility: visible; }
}
/* Keep the mobile portrait anchored while the taller text layer scrolls. */
@media (max-width: 767px) {
  .hero-sticky-viewport { overflow: clip; }
  #animation-canvas { position: sticky; top: 74px; height: 600px; margin-bottom: -600px; }
  .stage-intro-content, .stage-expertise-content, .stage-capabilities-content { padding-top: 520px; }
}
@media (max-width: 767px) {
  .hero-intro-desc br { display: none; }
}
/* Portrait-only opening, then a separate readable content timeline. */
@media (max-width: 767px) {
  .hero-sticky-viewport::after {
    content: ''; position: absolute; inset: 0; z-index: 6;
    background: #000; opacity: var(--mobile-content-darkness, 0); pointer-events: none;
  }
  .hero-stage { translate: none; }
  .hero-sticky-viewport { top: var(--mobile-viewport-top, 0px); }

  .hero-pinned-track { height: calc(var(--mobile-hero-height, 1400px) + 600svh); }
}
