.mobile-detail { display: none; }

@media (max-width: 900px) {
  html, body { width: 100%; min-width: 0; overflow-x: clip; }
  body { background: #f5f1ea; }
  body.home-active { height: 100dvh; }
  .long-surface { display: none !important; }

  .folder-home { width: 100vw; height: 100dvh; overflow: clip; }
  .folder-home-stage { width: 100vw; height: 100dvh; aspect-ratio: auto; }
  .folder-home-button { left: -8vw !important; width: 115vw !important; }
  .folder-home-button[data-folder-id="aigc"] { top: 2% !important; }
  .folder-home-button[data-folder-id="awards"] { top: 14% !important; }
  .folder-home-button[data-folder-id="blender"] { top: 26% !important; }
  .folder-home-button[data-folder-id="artworks"] { top: 38% !important; }
  .folder-home-button[data-folder-id="coursework"] { top: 50% !important; }
  .folder-home-button[data-folder-id="profile"] { top: 62% !important; }
  .folder-home-preview, .folder-home-tooltip { display: none !important; }
  .folder-home-wordmark { max-width: calc(100vw - 36px); }

  .mobile-detail {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: none;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    color: #1a1a1a;
    font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  }
  body.mobile-detail-open .mobile-detail { display: block; }
  body.mobile-detail-open .folder-home { visibility: hidden; pointer-events: none; }
  .mobile-detail-content { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 20px 110px; }
  .mobile-section { padding: 50px 0 34px; border-bottom: 1px solid #d9d9d9; scroll-margin-top: 0; }
  .mobile-section:first-child { padding-top: max(32px, env(safe-area-inset-top)); }
  .mobile-section-header { margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid #aaa; }
  .mobile-section-number { display: block; margin-bottom: 10px; color: #9b9b9b; font: 400 11px/1.2 "Playfair Display", Georgia, serif; letter-spacing: .16em; }
  .mobile-section-title { margin: 0; font-family: "Noto Serif SC", "Source Han Serif SC", serif; font-size: 27px; font-weight: 500; line-height: 1.25; }
  .mobile-section-en { margin: 8px 0 0; color: #777; font: 400 10px/1.4 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
  .mobile-copy { margin: 0 0 12px; font-size: 14px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
  .mobile-copy--hero { margin: 18px 0 14px; font-family: "Noto Serif SC", "Source Han Serif SC", serif; font-size: clamp(29px, 8vw, 38px); font-weight: 500; line-height: 1.25; }
  .mobile-copy--heading { margin: 28px 0 12px; font-size: 20px; font-weight: 500; line-height: 1.4; }
  .mobile-copy--caption { margin: 0 0 10px; color: #737373; font-size: 11px; line-height: 1.55; letter-spacing: .035em; }
  .mobile-copy--number { color: #999; font-size: 11px; letter-spacing: .12em; }
  .mobile-copy a { color: inherit; text-underline-offset: 3px; }
  .mobile-media { display: block; position: relative; width: 100%; height: auto; margin: 18px 0 25px; background: #f6f6f4; }
  .mobile-media img { display: block; width: 100%; height: auto; object-fit: contain; }
  .mobile-media.portfolio-media-frame { overflow: hidden !important; }
  .mobile-media.mobile-icon { width: 58px; margin: 8px 0 10px; background: transparent; }
  .mobile-gradient { display: block; width: 100%; min-height: 160px; margin: 18px 0 25px; }
  .mobile-pdf-card, .mobile-detail .portfolio-pdf-frame { position: relative; width: 100%; height: min(68vh, 620px); margin: 18px 0 28px; }
  .mobile-pdf-card .figma-pdf { width: 100%; height: 100%; border: 1px solid #ddd; }
  .mobile-pdf-open { display: inline-block; margin: 0 0 10px; color: #333; font-size: 13px; text-underline-offset: 3px; }
  .mobile-back {
    position: fixed;
    z-index: 120;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    min-width: 88px;
    min-height: 44px;
    border: 1px solid #6c6c6c;
    border-radius: 999px;
    padding: 0 16px;
    background: rgba(255,255,255,.94);
    color: #1a1a1a;
    font: 600 12px/1 Inter, sans-serif;
    letter-spacing: .08em;
    box-shadow: 0 4px 18px rgba(0,0,0,.1);
    cursor: pointer;
  }
  .mobile-back:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 3px; }
}
