/* Home-only phone roles. Device mode stays stable through rotation. */
@font-face {
  font-family:Manrope; src:url('../assets/manrope-500.ttf') format('truetype');
  font-weight:500; font-style:normal; font-display:swap;
}
:root[data-case-type-mode="phone"] body:not(.case-page) {
  font-size:18px; line-height:26px;
  -webkit-text-size-adjust:100%; text-size-adjust:100%;
}
:root[data-case-type-mode="phone"] .hero-text h1 { font-size:36px; line-height:47px; }
:root[data-case-type-mode="phone"] .hero-text p { font-size:18px; line-height:26px; font-weight:500; }
:root[data-case-type-mode="phone"] .section h2 { font-size:30px; line-height:41px; }
:root[data-case-type-mode="phone"] .projects-description { font-size:18px; line-height:26px; }
:root[data-case-type-mode="phone"] .biography,
:root[data-case-type-mode="phone"] .contact-links { font-size:16px; line-height:24px; }
:root[data-case-type-mode="phone"] .record h3 { font-size:18px; line-height:26px; }
:root[data-case-type-mode="phone"] .record p,
:root[data-case-type-mode="phone"] .year { font-size:15px; line-height:22px; }
/* Six half-width tracks center the last pair without changing icon sizes. */
@media (orientation:portrait) {
  :root[data-case-type-mode="phone"] .tool-list {
    display:grid; grid-template-columns:repeat(6,27px); gap:10px;
    justify-content:center;
  }
  :root[data-case-type-mode="phone"] .tool { grid-column:span 2; }
  :root[data-case-type-mode="phone"] .tool:nth-child(4) { grid-column:2 / span 2; }
}

/* This stylesheet is loaded only by the home page. */
.about-intro::before { content:none; }
.hero-text p .hero-tenure { font-weight:inherit; }
@media (orientation:portrait) {
  :root[data-case-type-mode="phone"] .hero-tenure { display:block; white-space:nowrap; }
}
@media (orientation:landscape) {
  :root[data-case-type-mode="phone"] .hero {
    height:auto; min-height:100svh; justify-content:flex-start;
    padding-top:calc(max(14px, env(safe-area-inset-top, 0px)) + 62px + 8px);
    padding-bottom:24px;
  }
  :root[data-case-type-mode="phone"] .hero-content { height:auto; gap:40px; }
  :root[data-case-type-mode="phone"] .hero-text { height:auto; }
  :root[data-case-type-mode="phone"] .hero-text p { font-size:22px; line-height:31px; font-weight:400; }
}

/* Section-shell spacing only; content and component gaps remain untouched. */
@media (orientation:landscape) {
  :root[data-case-type-mode="phone"] { --home-section-space:80px; }
  :root[data-case-type-mode="phone"] main > .section { padding-block:var(--home-section-space); }
  :root[data-case-type-mode="phone"] footer.section { padding-top:var(--home-section-space); }
}
@media (orientation:landscape) and (max-width:740px) {
  :root[data-case-type-mode="phone"] { --home-section-space:56px; }
}

/* Portrait hero is bottom-aligned: expand its content track upward by 24px,
   keeping the scroll arrow on the same bottom edge and all intro gaps intact. */
@media (orientation:portrait) {
  :root[data-case-type-mode="phone"] .hero-content { height:584px; }
}
