/* Tablet/desktop chapters. Nothing here changes the ordinary phone layout. */
@media (min-width: 768px) {
  .screen-mode {
    --ink: #102d65;
    --paper: #fffefa;
    --accent: #edbe66;
    --muted: #5b6880;
    --line: #d9e1ed;
    scroll-snap-type: y proximity;
    scroll-padding-top: 80px;
  }
  .screen-mode [hidden] { display: none !important; }
  .screen-mode main { display: flex; flex-direction: column; }
  .screen-mode main > * { flex-shrink: 0; }
  .screen-mode .work { padding-bottom: 0; }
  .screen-mode .work > .section-heading { scroll-snap-align: start; }
  .screen-mode .project-scene { scroll-snap-align: start; scroll-margin-top: 30px; }
  .screen-mode .project-scene.is-pinned { min-height: 120svh; }
  .screen-mode .project-scene:last-child { margin-bottom: 0; }
  .screen-mode .hero { scroll-snap-align: start; }
  .screen-mode .chapter {
    position: sticky;
    top: 80px;
    z-index: 1;
    isolation: isolate;
    min-height: calc(100svh - 80px);
    padding: clamp(28px, 5vh, 60px) max(5vw, 24px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #fffefa;
  }
  .screen-mode .chapter-stop {
    min-height: calc(112svh - 80px);
    background: #fffefa;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .screen-mode .chapter-stop:has(.archive-screen) { background: #edf3fc; }
  .screen-mode .final-stop { order: 2; min-height: calc(100svh - 80px); background: #102d65; }
  .screen-mode .chapter-tall { position: relative; top: auto; }
  .screen-mode .chapter::before {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    inset: 0;
    background: radial-gradient(ellipse at 110% 20%, transparent 0 34%, #102d6506 34.2% 49%, transparent 49.2%);
  }
  .screen-mode .chapter-inner { width: 100%; max-width: 1200px; margin: auto; }
  .screen-mode .archive-screen { background: #edf3fc; }
  .screen-mode .archive-screen .earlier-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 15px 0 0;
    gap: 20px;
  }
  .screen-mode .archive-screen .earlier-grid article {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
    background: #ffffffc9;
    border: 1px solid #dbe4f1;
    border-radius: 16px;
    min-height: 215px;
  }
  .screen-mode .archive-screen .earlier-grid p { flex: 1; }
  .screen-mode .archive-screen .earlier-grid a { color: #102d65; }
  .screen-mode .design { order: 0; }
  .screen-mode .design .section-heading { width: 100%; margin-bottom: 18px; }
  .screen-mode .logo-carousel {
    position: relative;
    display: block;
    width: 100%;
    height: clamp(250px, 44svh, 430px);
    max-width: 1250px;
    overflow: hidden;
    overflow: clip;
  }
  .screen-mode .logo-carousel figure {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(245px, 33vw, 440px);
    height: 80%;
    margin: 0;
    padding: 24px;
    background: white;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    box-shadow: 0 16px 45px -26px #102d6544;
    transform: translate(calc(-50% + var(--slot) * 82%), -50%) scale(0.78);
    opacity: 0.7;
    transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1), opacity 700ms;
    z-index: 1;
  }
  .screen-mode .logo-carousel figure.carousel-selected {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    z-index: 3;
    border-color: #edbe66;
  }
  .screen-mode .logo-carousel figure:hover,
  .screen-mode .logo-carousel figure:focus-within {
    transform: translate(calc(-50% + var(--slot) * 82%), -50%) scale(1.03);
    opacity: 1;
    z-index: 4;
  }
  .screen-mode .logo-carousel figure.carousel-distant { opacity: 0; pointer-events: none; }
  .screen-mode .logo-carousel figure.carousel-wrap { transition: none; }
  .screen-mode .logo-select {
    border: 0;
    background: none;
    width: 100%;
    min-height: 0;
    flex: 1;
    padding: 0;
    cursor: pointer;
  }
  .screen-mode .logo-select img { height: 100%; width: 100%; max-width: none; object-fit: contain; }
  .screen-mode .logo-carousel figure:hover img { transform: none; }
  .screen-mode .logo-carousel figcaption { font-size: 0.8rem; margin-top: 18px; }
  .screen-mode button { font-family: inherit; }
  .screen-mode button:focus-visible,
  .screen-mode [role='tabpanel']:focus-visible { outline: 3px solid #edbe66; outline-offset: 5px; }
  .screen-mode .carousel-controls { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
  .screen-mode .carousel-controls button {
    border: 1px solid #c8d5e7;
    background: white;
    color: #102d65;
    border-radius: 30px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.85rem;
  }
  .screen-mode .carousel-count { font-size: 0.75rem; min-width: 45px; color: #5b6880; }
  .screen-mode .final-screen { order: 2; background: #102d65; color: #fffefa; padding-top: 32px; padding-bottom: 18px; }
  .screen-mode .final-screen::before {
    background: radial-gradient(ellipse at -20% 90%, transparent 0 36%, #ffffff05 36.2% 56%, transparent 56.2%);
  }
  .screen-mode .final-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); width: 100%; max-width: 1360px; margin: auto; align-items: center; }
  .screen-mode .career-panel { position: relative; }
  .screen-mode .career-panel > .eyebrow { color: #edbe66; margin-bottom: 14px; font-size: 0.6rem; }
  .screen-mode .career-panel > h2 { font-size: clamp(1.8rem, 2.3vw, 2.4rem); }
  .screen-mode .career-tabs { display: flex; gap: 20px; margin: 20px 0 14px; border-bottom: 1px solid #ffffff30; }
  .screen-mode .career-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; color: #c1cee3; font-size: 0.78rem; padding: 10px 0; cursor: pointer; }
  .screen-mode .career-tabs button[aria-selected='true'] { color: #edbe66; border-color: #edbe66; }
  .screen-mode .career-panels { min-height: 340px; }
  .screen-mode .career-tabpanel { animation: none; }
  .screen-mode .career-tabpanel .experience { min-height: 0; margin: 0; display: block; }
  .screen-mode .career-tabpanel .experience > .eyebrow { display: none; }
  .screen-mode .career-tabpanel .experience-row { grid-template-columns: 1fr; gap: 7px; border-color: #ffffff22; padding: 11px 0; }
  .screen-mode .career-tabpanel .experience-row:first-of-type { border: 0; padding-top: 0; }
  .screen-mode .career-tabpanel .experience-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
  .screen-mode .career-tabpanel h3 { color: #fffefa; font-size: 1rem; }
  .screen-mode .career-tabpanel h4 { color: #edbe66; font-size: 0.85rem; }
  .screen-mode .career-tabpanel p { color: #d2dded; font-size: 0.76rem; line-height: 1.65; margin-top: 7px; }
  .screen-mode .career-tabpanel .role-history { color: #aebfda; font-size: 0.66rem; }
  .screen-mode .career-tabpanel .about-intro { display: block; min-height: 0; }
  .screen-mode .career-tabpanel .about-intro > div:first-child { display: none; }
  .screen-mode .career-tabpanel .lead { font-size: 1.13rem; color: #fffefa; }
  .screen-mode .career-tabpanel .capabilities { grid-template-columns: 1fr 1fr; gap: 18px 28px; margin: 0; padding: 0; border: 0; }
  .screen-mode .career-tabpanel .education { border-top: 1px solid #ffffff30; padding-top: 12px; margin-top: 18px; color: #c1cee3; }
  .screen-mode .about-anchor { position: absolute; top: 0; left: 0; min-height: 0; height: 1px; width: 1px; padding: 0; margin: 0; background: none; }
  .screen-mode .final-screen .contact { order: 0; position: static; min-height: 0; padding: 25px 0; background: none; text-align: left; align-items: flex-start; overflow: visible; }
  .screen-mode .final-screen .contact::before { display: none; }
  .screen-mode .final-screen .contact h2 { font-size: clamp(2rem, 3.5vw, 3.7rem); margin-bottom: 28px; }
  .screen-mode .final-screen .contact > .eyebrow { font-size: 0.6rem; }
  .screen-mode .final-screen .email-link { font-size: clamp(0.85rem, 1.35vw, 1.2rem); overflow-wrap: anywhere; }
  .screen-mode .final-screen .email-link span { margin-left: 6px; }
  .screen-mode .final-screen .contact-links { justify-content: flex-start; margin-top: 25px; }
  .screen-mode .final-screen footer { width: 100%; max-width: 1360px; background: none; padding: 16px 0 0; margin: 20px auto 0; font-size: 0.6rem; }
  .screen-mode .final-screen .calm-reveal { opacity: 1; transform: none; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .screen-mode .story-project .project-body { padding-left: 26px; }
  .screen-mode .story-project h3 { font-size: 2rem; }
  .screen-mode .project-body > p:not(.eyebrow):not(.tech),
  .screen-mode .project-details { font-size: 0.81rem; }
  .screen-mode .archive-screen .earlier-grid { grid-template-columns: 1fr 1fr; }
  .screen-mode .archive-screen .earlier-grid article { min-height: 160px; padding: 22px; }
  .screen-mode .chapter .section-heading { gap: 20px; }
  .screen-mode .chapter h2 { font-size: 2.25rem; }
  .screen-mode .final-grid { gap: 28px; }
  .screen-mode .career-tabs { gap: 14px; }
  .screen-mode .career-tabs button { font-size: 0.7rem; }
  .screen-mode .final-screen .contact h2 { font-size: 2rem; }
}
@media (min-width: 768px) and (max-width: 1099px) and (min-height: 900px) {
  .screen-mode .final-grid { grid-template-columns: 1fr; gap: 22px; }
  .screen-mode .career-panels { min-height: 310px; }
  .screen-mode .final-screen .contact { border-top: 1px solid #ffffff30; padding-top: 24px; }
  .screen-mode .final-screen .contact h2 { font-size: 2.5rem; }
  .screen-mode .final-screen .contact h2 br { display: contents; }
  .screen-mode .final-screen .contact h2 br::after { content: " "; }
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .screen-mode .career-tabpanel { animation: tab-arrive 350ms ease both; }
  @keyframes tab-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media print {
  .screen-mode { scroll-snap-type: none; }
  .screen-mode .chapter { position: static; min-height: 0; break-inside: avoid; }
  .screen-mode .career-tabpanel[hidden] { display: block !important; }
  .screen-mode .career-tabs, .screen-mode .carousel-controls { display: none; }
  .screen-mode .logo-carousel { height: auto; display: flex; flex-wrap: wrap; overflow: visible; }
  .screen-mode .logo-carousel figure { position: static; transform: none; opacity: 1; width: 30%; }
}
@media (min-width: 1100px) and (max-height: 800px) {
  .screen-mode .hero { padding-top: 26px; padding-bottom: 72px; }
  .screen-mode .desktop-opening { font-size: clamp(3.8rem, 11.5svh, 6.5rem); margin: 20px 0 24px; }
  .screen-mode .hero .actions { margin-top: 22px; }
}
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .screen-mode .chapter-arrival { opacity: 0; transform: translateY(24px) scale(0.985); transition: opacity 1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1); }
  .screen-mode .chapter-arrived, .screen-mode .chapter-arrival:focus-within { opacity: 1; transform: none; }
}
