/* Touch-tablet landscape layout. Width alone never opts a desktop into this mode. */
@media (orientation:landscape) and (min-width:1024px) and (max-width:1366px) and (min-height:600px) and (max-height:1024px) and (pointer:coarse) {
  html:root {
    --tablet-nav-height: 72px;
    --tablet-section-top: calc(var(--tablet-nav-height) + 32px);
    --tablet-title-size: clamp(64px, 9dvh, 82px);
  }

  .topbar { height:var(--tablet-nav-height); padding-inline:var(--content-edge); }
  .topbar .brand { width:112px; }
  .topbar .burger { width:44px; height:44px; min-height:44px; }
  .topbar .burger i { width:24px; }
  .menu-inner { max-width:600px; padding:calc(var(--tablet-nav-height) + 24px) var(--content-edge) 32px; }
  .menu-list a { min-height:64px; padding-block:16px; font-size:26px; }

  #projects,#works,#experience,#about {
    min-height:100dvh;
    scroll-margin-top:0;
  }
  #projects,#about { padding-top:var(--tablet-section-top); padding-bottom:32px; }
  #projects .project-title,#about .about-title {
    margin:0 0 28px;
    font-size:var(--tablet-title-size);
    line-height:1;
  }

  #projects .project-gallery {
    --pg-card-width:min(84vw,1040px);
    --pg-inset:max(var(--content-edge),calc((100% - var(--pg-card-width))/2));
    --pg-gap:24px;
    --tablet-project-height:calc(100dvh - var(--tablet-section-top) - var(--tablet-title-size) - 28px - 32px - 76px);
    padding-top:0;
  }
  #projects .pg-card {
    --pg-media-gap:16px;
    grid-template-columns:minmax(0,min(44%,calc((var(--tablet-project-height) - 48px - 10px)/.9375))) minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    gap:0 32px;
    height:var(--tablet-project-height);
    min-height:0;
    padding:24px;
  }
  #projects .pg-visuals { align-self:center; min-height:0; }
  #projects .pg-copy { gap:12px; min-height:0; height:100%; padding:0; overflow:hidden; }
  #projects .pg-name { flex:none; font-size:26px; line-height:1.3; }
  #projects .pg-reading {
    display:flex; flex:1; flex-direction:column; align-items:flex-start; gap:14px;
    width:100%; min-height:0; padding-right:8px;
    overflow-x:hidden; overflow-y:auto; overscroll-behavior-y:contain;
    touch-action:pan-y pinch-zoom; scrollbar-width:thin; scrollbar-color:#666 transparent;
    -webkit-overflow-scrolling:touch;
  }
  #projects .pg-reading > * { flex-shrink:0; }
  #projects .pg-summary { gap:12px; }
  #projects .pg-description { max-width:100%; font-size:16px; line-height:1.8; }
  #projects .pg-contribution { margin-top:10px; font-size:14px; line-height:1.75; }
  #projects .pg-funding { font-size:13px; }
  #projects .pg-link { font-size:13px; }
  #projects .pg-controls { min-height:44px; margin-top:16px; }
  #projects .pg-autoplay { display:none; }
  #projects .pg-progress-wrap { --pg-dot-slot:44px; --pg-active-dot:34px; padding:0 8px; }
  #projects .pg-progress { top:0; left:8px; width:calc(100% - 16px); }

  /* Full-size iPad copy fits naturally; shorter browser windows retain a scroll fallback. */
}
