/* Mobile refinements keep the original mint palette and full portrait. */
.mobile-menu-toggle, .site-header .mobile-navigation { display: none; }
.home-nav-arrow { width: 18px; height: 18px; }

@media (max-width: 700px) {
  html { scroll-padding-top: 88px; }
  body { -webkit-text-size-adjust: 100%; }
  .wrap { padding-inline: 20px; }
  .header-inner { padding: 10px 20px; gap: 12px; }
  .identity { gap: 6px; }
  .site-header nav { gap: 8px; }
  .site-header .button { padding-inline: 10px; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; }
  .mobile-menu-toggle svg { width: 16px; height: 16px; }
  .site-header .mobile-navigation:not([hidden]) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; padding: 0 20px 16px; border-bottom: 1px solid var(--line); }
  .mobile-navigation a { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 14px; }
  .mobile-navigation a span { color: var(--muted); font: italic 11px var(--serif); }

  .mint-home { min-height: auto; padding: max(24px, env(safe-area-inset-top)) 20px 28px; gap: 20px; }
  .home-wordmark { align-self: center; font-size: clamp(38px, 11.8vw, 54px); margin: 0; line-height: 1.2; }
  .home-directory h1 { font-size: clamp(24px, 6.5vw, 30px); line-height: 1.45; margin-top: 12px; }
  .home-tag { min-height: 24px; padding: 5px 10px; font-size: 10px; }
  .home-navigation { gap: 4px 20px; margin-top: 14px; }
  .home-navigation a { min-width: 0; min-height: 48px; gap: 8px; font-size: 14px; border-bottom-color: #b9cec15e; }
  .home-navigation .home-nav-arrow { width: 16px; height: 16px; opacity: .65; }
  .mascot-background { order: 2; width: calc(100% + 40px); aspect-ratio: auto; height: clamp(220px, 64vw, 300px); margin-top: -8px; margin-bottom: -8px; }
  .mascot-background video { object-position: 50% 62%; }
  .home-contact { order: 3; padding-top: 16px; border-top: 1px solid #b9cec15e; }
  .home-contact > .home-tag { display: none; }
  .home-contact h2 { margin: 0; font-size: 19px; line-height: 1.5; }
  .home-contact h2 br { display: none; }
  .home-contact-links { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
  .home-contact-links a { gap: 12px; min-height: 44px; font-size: 14px; white-space: normal; }
  .home-contact-links a > span { min-width: 0; overflow-wrap: anywhere; }
  .home-contact-links small { font-size: 10px; }
  .home-resume { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding: 12px 16px; min-height: 48px; border: 1px solid #bccfc1; border-radius: 8px; background: #ffffff80; }

  .about-section { padding-block: 36px; }
  .about-copy { gap: 20px; }
  .about-title h2 { font-size: 28px; }
  .about-bio, .about-direction { padding: 20px; }
  .about-bio .about-intro, .about-direction > p { line-height: 1.85; }
  .about-section .profile-card { max-width: 380px; }
  .about-section .profile-photo { max-width: none; width: 100%; height: auto; object-fit: contain; }
  .about-section .profile-info { padding: 24px 20px; }
  .about-section .profile-facts { grid-template-columns: 64px minmax(0, 1fr); margin-top: 4px; gap: 14px 16px; }
  .about-actions { padding: 20px; gap: 16px; }
  .about-actions .button { min-height: 48px; }
  .section-heading h2 { font-size: 27px; }
  .company-tabs { gap: 6px; }
  .company-tab { padding: 14px 8px; min-height: 104px; }
  .company-tab-copy strong { font-size: clamp(12px, 3.7vw, 16px); }
  .company-index { font-size: 18px; }
  .company-tab-copy small { font-size: 10px; }
  .company-summary { padding: 20px 16px; }
  .experience-highlights { gap: 12px; }
  .doc-thumb { height: auto; aspect-ratio: 4 / 3; }
  .doc-info { padding: 20px; }
  .doc-name { overflow-wrap: anywhere; }
  .doc-bottom { gap: 12px; font-size: 12px; }
  .creative-body, .certificate-body { padding: 20px; }
  .creative-kicker, .certificate-kicker { flex-wrap: wrap; gap: 4px 12px; }
  .creative-actions { gap: 12px; }
  .creative-actions .button { flex-basis: 100%; min-height: 48px; }
  .creative-platform { flex-basis: 100%; }
  .resume-section { margin-inline: 20px; padding: 28px 20px; }
  .resume-section h2 { font-size: 25px; }
  .resume-section .button { padding-inline: 12px; }

  #document-dialog, #certificate-dialog { height: 100vh; height: 100dvh; }
  .viewer-header { padding-top: max(10px, env(safe-area-inset-top)); }
  .viewer-heading h2 { font-size: 13px; }
  .viewer-header .close-button { width: 44px; height: 44px; flex-shrink: 0; }
  .viewer-toolbar { gap: 8px; }
  .viewer-toolbar .viewer-controls { min-width: 0; }
  .viewer-toolbar #sheet-controls { flex: 1 1 100%; }
  #sheet-controls #sheet-media-button { margin-left: auto; }
  .viewer-toolbar .zoom-label { margin-left: auto; }
  .viewer-toolbar select, .viewer-toolbar input { font-size: 16px; }
  .viewer-toolbar select { max-width: 140px; }
  .viewer-content, .viewer-stage { min-height: 0; }
  .viewer-stage { -webkit-overflow-scrolling: touch; }
  .workbook-navigation { min-height: 48px; }
  .sheet-arrows button { min-width: 32px; height: 48px; }
  #sheet-tabs { overscroll-behavior-inline: contain; -webkit-overflow-scrolling: touch; }
  #sheet-tabs button { min-height: 48px; padding-inline: 14px; }
  .viewer-footer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .viewer-footer > span { flex: 1; min-width: 0; }
  .viewer-footer strong { flex-shrink: 0; max-width: 45%; }
  .certificate-viewer-header { padding-top: max(12px, env(safe-area-inset-top)); }
  .certificate-viewer-stage { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .header-inner { padding-inline: 16px; gap: 8px; }
  .site-header .identity-mark { font-size: 24px; }
  .mobile-menu-toggle { padding-inline: 8px; }
  .site-header .button { font-size: 12px; padding-inline: 8px; }
  .home-navigation { column-gap: 16px; }
  .home-navigation a { font-size: 13px; }
}
