/* Shared readable type and touch controls. Small type is reserved for metadata. */
@media screen {
  .hero-copy, .hero-visual, .section-heading > *, .story-copy,
  .learning-layout > *, .faq-layout > *, .credential-list > a > span,
  .contact-copy, .contact-channels, .project-info, .dialog-project-links > * {
    min-width: 0;
  }
  .hero h1 em { white-space: normal; isolation: isolate; }
  .hero h1 em::after { z-index: -1; }
  .hero-description, .section-intro, .work-intro > p,
  .service-card > p:not(.service-label), .story-copy > p, .process-grid p,
  .project-info > p, .intro-caption > p:not(.eyebrow), .salshi-description,
  .learning-description, .learning-expanded p, .faq-list details > p,
  .contact-copy > p:not(.eyebrow), .project-dialog p {
    font-size: 1rem;
  }
  .hero .eyebrow, .service-label, .visual-label, .visual-footer,
  .intro-caption > .eyebrow, .learning-layout .eyebrow, .salshi-panel .eyebrow {
    font-size: .75rem;
  }
  .hero-footnote, .portrait-caption div > span, .project-type,
  .credential-list small, .education-note > span, .rating-card > small,
  .rating-card > p, .footer-bottom, .video-tag, .learning-tags > span,
  .story-signature p, .project-dialog .dialog-project-type {
    font-size: .8125rem;
  }
  .service-deliverables, .service-enquire, .project-actions, .filter-button,
  .skill-pills > span, .credential-action, .credential-list strong,
  .footer-links, .education-note, .learning-details summary,
  .intro-caption > a, .intro-card-footer, .work-bottom p, .work-bottom a,
  .contact-note, .video-fallback, .footer-top > p, .project-dialog .skill-pills > span {
    font-size: .875rem;
  }
  .cipher-small, .cipher-rule { font-size: .75rem; }
  .portrait-side-label { font-size: .625rem; }
  .wordmark, .main-nav > a, .text-link, .underlined-link,
  .service-enquire, .project-actions > button, .project-actions > a,
  .footer-links > a, .footer-bottom > a, .dialog-project-links > a,
  .video-fallback a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .button, .filter-button { min-height: 44px; min-width: 44px; }
  .text-link, .filter-button { font-size: .875rem; }
  .project-actions { flex-wrap: wrap; gap: 8px 20px; }
  .project-actions > button, .project-actions > a { padding-block: 9px; }
  .service-enquire { display: flex; padding-block: 12px 3px; }
  .credential-list > a { min-height: 72px; }
  .footer-links { flex-wrap: wrap; row-gap: 6px; }
  .site-dialog {
    max-height: calc(100dvh - 32px);
    padding: 24px;
    scrollbar-gutter: stable;
  }
  .dialog-top {
    position: sticky;
    top: 0;
    z-index: 3;
    padding-block: 8px 12px;
    margin-bottom: 18px;
    background: var(--paper);
  }
  .dialog-close { width: 44px; height: 44px; }
  .project-dialog-image { max-height: min(34dvh, 280px); }
  .dialog-project-links .button { font-size: .875rem; }
  .video-fallback { line-height: 1.7; }
}

/* Preserve the generous desktop composition on larger displays. */
@media (min-width: 1500px) {
  .hero { gap: 80px; padding-block: 80px 100px; }
  .hero h1 { font-size: 4.25rem; }
  .portrait-frame { height: 570px; }
}

/* Smaller desktops and landscape tablets. */
@media (max-width: 1150px) {
  .section-shell, .nav-shell { width: calc(100% - 64px); }
  .nav-shell { min-height: 84px; }
  .main-nav { gap: 24px; }
  .section-space { padding-block: 88px; }
  .section-heading { gap: 40px; }
  .hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 36px;
    min-height: 0;
    padding-block: 52px 72px;
  }
  .hero h1 { font-size: clamp(2.65rem, 4.3vw, 3.3rem); }
  .hero .eyebrow { letter-spacing: .08em; }
  .hero-actions { gap: 16px 22px; flex-wrap: wrap; }
  .hero-actions .button { padding-inline: 20px; gap: 20px; font-size: .875rem; }
  .portrait-frame { height: 460px; }
  .note-top { left: -12px; }
  .portrait-side-label { right: -18px; }
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card, .service-card + .service-card { padding: 30px 32px; }
  .service-card:nth-child(odd) { border-left: 0; padding-left: 0; }
  .service-card:nth-child(even) { padding-right: 0; }
  .service-card:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .service-card h3 br { display: none; }
  .service-deliverables { margin-bottom: 26px; }
  .story-grid, .learning-layout, .faq-layout, .contact-grid { gap: 46px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 28px; }
  .project-visual { height: 315px; padding-inline: 20px; }
  .project-math .project-visual > img { width: 96%; }
  .project-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .project-type { white-space: normal; }
  .telegram-image-frame { height: 208px; }
  .telegram-image-frame img { width: 133px; height: 239px; }
  .cipher-input { font-size: 2.2rem; }
  .cipher-output { font-size: 3rem; }
  .process-grid { gap: 28px; }
  .salshi-section { padding-bottom: 0; }
  .salshi-panel { padding: 46px; gap: 28px; }
  .salshi-panel h2 { font-size: 3.5rem; }
  .salshi-mission { font-size: 1.125rem; }
  .orbit-core { width: 94px; height: 94px; border-radius: 22px; }
  .orbit-label { padding: 7px 16px; }
  .ratings-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 24px; }
  .rating-cards { gap: 10px; }
  .rating-card { padding: 22px 13px; }
  .review-stars { font-size: 1rem; }
  .credential-action { display: none; }
  .contact-copy h2 { font-size: 3.8rem; }
  .contact-email { font-size: 1rem; }
  .faq-section { padding-top: 0; }
}

/* This navigation breakpoint matches main.js. */
@media (max-width: 900px) {
  .site-header { --mobile-nav-height: 76px; background: var(--paper); }
  .nav-shell { min-height: var(--mobile-nav-height); }
  .wordmark { font-size: 1.25rem; }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 11px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 6px;
    z-index: 60;
  }
  .menu-toggle > span { width: 20px; height: 1.5px; background: var(--ink); transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] > span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
  .main-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--mobile-nav-height));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 32px 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 15px 25px #15231f0a;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    font-size: 1rem;
  }
  .main-nav.is-open { visibility: visible; opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav > a:not(.nav-contact) { min-height: 48px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .main-nav > a:not(.nav-contact)::after { display: none; }
  .main-nav .nav-contact { justify-content: space-between; min-height: 48px; padding: 13px 18px; margin-top: 16px; background: var(--yellow); border-color: var(--yellow); }
  html { scroll-padding-top: 92px; }
  .section-space { padding-block: 76px; }
  .section-heading { gap: 30px; }
  .section-intro { max-width: 320px; }
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; padding-block: 40px 60px; }
  .hero h1 { font-size: clamp(2.4rem, 4.8vw, 2.9rem); }
  .hero h1 em { font-size: 1.04em; }
  .hero-description { line-height: 1.75; }
  .hero-footnote { margin-top: 24px; line-height: 1.65; }
  .hero .eyebrow { letter-spacing: .06em; gap: 8px; }
  .line-mark { width: 20px; }
  .portrait-frame { height: 410px; border-top-left-radius: 85px; }
  .portrait-note { padding: 12px 15px; gap: 10px; font-size: .8125rem; }
  .note-star { font-size: 1.75rem; }
  .portrait-caption { margin-inline: 12px 8px; padding: 16px; }
  .portrait-caption strong { font-size: 1rem; }
  .caption-star { font-size: 1.6rem; }
  .portrait-side-label { display: none; }
  .work-intro { max-width: 340px; }
  .project-filters { gap: 8px; }
  .filter-button { padding: 10px 13px; }
  .project-visual { height: 300px; padding: 20px 18px 16px; }
  .visual-label, .visual-footer { font-size: .6875rem; letter-spacing: .07em; }
  .telegram-image-frame { height: 192px; }
  .telegram-image-frame img { width: 123px; height: 220px; }
  .story-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .story-copy > p { line-height: 1.8; }
  .intro-caption { padding: 24px; }
  .intro-caption h3 { font-size: 1.8rem; }
  .intro-card-footer { padding-inline: 24px; }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
  .process-grid h3 { font-size: 1.125rem; }
  .salshi-panel { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 38px 32px; }
  .salshi-art { min-width: 0; }
  .ratings-layout { grid-template-columns: 1fr; gap: 28px; }
  .rating-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
  .rating-summary > p, .aggregate-stars { margin-top: 0; }
  .rating-cards { gap: 14px; }
  .rating-card { padding: 22px 16px; }
  .learning-layout, .faq-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 36px; }
  .credential-list > a { gap: 12px; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact-copy { display: block; }
  .contact-copy > p:not(.eyebrow) { max-width: 580px; }
  .contact-copy h2 { font-size: 3.8rem; }
  .contact-channels { width: 100%; }
  .contact-channel { padding: 22px 24px; }
  .contact-channel-description { line-height: 1.6; }
  .contact-note { margin-top: 24px; }
  .footer-top { flex-wrap: wrap; gap: 22px; }
  .footer-links { width: 100%; gap: 8px 24px; }
  .salshi-section { padding-bottom: 0; }
  .faq-section { padding-top: 0; }
}

/* Portrait tablets and phones: content determines its own height. */
@media (max-width: 760px) {
  .section-shell, .nav-shell { width: calc(100% - 40px); }
  .section-space { padding-block: 64px; }
  h2 { font-size: clamp(2.2rem, 5.8vw, 2.85rem); }
  .section-heading { display: block; margin-bottom: 32px; }
  .section-heading .eyebrow { margin-bottom: 16px; }
  .section-intro { max-width: 560px; margin-top: 20px; line-height: 1.8; }
  .hero { display: grid; grid-template-columns: minmax(0, 1fr); padding-block: 30px 44px; gap: 30px; }
  .hero-copy { width: 100%; max-width: 600px; }
  .hero .eyebrow { align-items: flex-start; margin-bottom: 20px; font-size: .75rem; line-height: 1.6; letter-spacing: .06em; }
  .hero .line-mark { margin-top: 9px; }
  .hero h1 { font-size: clamp(2.2rem, 6.5vw, 3.25rem); line-height: 1.15; margin-bottom: 20px; letter-spacing: -.045em; }
  .hero h1 br { display: none; }
  .hero h1 em { display: inline; font-size: 1.05em; }
  .hero h1 em::after { display: none; }
  .hero-description { max-width: 560px; font-size: 1rem; line-height: 1.75; }
  .hero-actions { gap: 12px 24px; margin-top: 24px; }
  .hero-actions .button { min-height: 48px; padding: 14px 20px; gap: 22px; }
  .hero-footnote { max-width: 490px; margin-top: 18px; font-size: .8125rem; align-items: flex-start; }
  .hero-footnote .globe-icon { line-height: 1.1; }
  .hero-visual { width: min(100%, 340px); max-width: 340px; padding: 8px 0 0; margin-inline: auto; justify-self: center; }
  .portrait-frame { height: 320px; aspect-ratio: auto; border-top-left-radius: 85px; }
  .portrait-frame img { object-position: 50% 27%; }
  .note-top { left: 0; top: 0; }
  .portrait-note { font-size: .8125rem; padding: 11px 15px; }
  .portrait-caption { padding: 14px 16px; margin: -24px 10px 0 18px; }
  .portrait-caption strong { font-size: 1rem; }
  .portrait-caption div > span { font-size: .8125rem; }
  .caption-star { font-size: 1.6rem; }
  .capability-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding-block: 20px; text-align: center; font-size: .875rem; }
  .capability-inner > .strip-star { display: none; }
  .service-card, .service-card + .service-card { padding: 28px 22px; }
  .service-card:nth-child(odd) { padding-left: 0; }
  .service-card:nth-child(even) { padding-right: 0; }
  .service-card h3 { font-size: 1.35rem; }
  .service-label { font-size: .75rem; letter-spacing: .07em; }
  .services-note { font-size: .875rem; line-height: 1.8; margin-top: 22px; }
  .work-intro { max-width: none; margin-top: 22px; }
  .work-intro > p { max-width: 560px; margin-bottom: 20px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .project-visual { height: auto; min-height: 280px; aspect-ratio: auto; padding: 20px; }
  .visual-label, .visual-footer { font-size: .6875rem; letter-spacing: .06em; line-height: 1.55; }
  .visual-footer { gap: 12px; }
  .visual-footer > span { flex: none; font-size: 1.4rem; }
  .project-math .project-visual > img { width: 86%; max-height: 285px; margin-block: 16px; }
  .project-heading { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
  .project-heading h3 { font-size: 1.3rem; }
  .project-info { padding-top: 20px; }
  .project-type { font-size: .8125rem; }
  .project-actions { font-size: .875rem; margin-top: 20px; padding-top: 10px; }
  .skill-pills > span { font-size: .875rem; padding: 5px 10px; }
  .cipher-art { width: 76%; padding-block: 12px; }
  .cipher-input { font-size: 2.3rem; padding: 7px 14px; }
  .cipher-output { font-size: 3rem; }
  .telegram-image-frame { height: 210px; width: 80%; margin-block: 6px; }
  .telegram-image-frame img { height: 246px; width: 137px; }
  .video-project-frame { width: 84%; margin-block: 16px; }
  .work-bottom { align-items: flex-start; flex-wrap: wrap; gap: 8px 22px; margin-top: 34px; padding-top: 22px; }
  .work-bottom p { max-width: 410px; font-size: .875rem; }
  .work-bottom a { font-size: .875rem; }
  .about-aside { display: none; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .story-copy > p { font-size: 1rem; line-height: 1.85; margin-bottom: 18px; }
  .story-signature { margin-top: 22px; }
  .intro-card { max-width: 560px; width: 100%; margin-inline: auto; }
  .intro-caption { padding: 26px; }
  .intro-caption h3 { font-size: 2rem; }
  .intro-caption > p:not(.eyebrow) { max-width: 450px; }
  .intro-card-footer { padding: 16px 26px; font-size: .875rem; }
  .process-grid { gap: 30px 28px; }
  .process-grid article { padding-top: 24px; }
  .process-grid p { font-size: 1rem; line-height: 1.75; }
  .salshi-section { padding-bottom: 0; }
  .salshi-panel { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 34px 28px; border-radius: 12px; }
  .salshi-panel h2 { font-size: 3.5rem; }
  .salshi-mission { font-size: 1.125rem; }
  .salshi-description { max-width: 560px; }
  .salshi-art { width: min(90%, 290px); min-width: 0; align-self: center; margin-top: 14px; }
  .orbit-core { width: 96px; height: 96px; }
  .orbit-label { font-size: .875rem; padding: 8px 16px; }
  .ratings-layout { gap: 24px; padding-block: 26px; }
  .rating-number { font-size: 4rem; }
  .rating-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .rating-card { padding: 22px; }
  .rating-card > p, .rating-card > small { font-size: .875rem; }
  .rating-card > strong { font-size: 1rem; }
  .review-stars { font-size: 1.2rem; }
  .learning-layout, .faq-layout { display: block; }
  .learning-layout .eyebrow { margin-bottom: 18px; }
  .learning-description { max-width: 560px; }
  .education-note { margin-top: 24px; font-size: .875rem; }
  .education-note > span { font-size: .8125rem; }
  .credential-list { margin-top: 30px; }
  .credential-list > a { padding-block: 20px; gap: 14px; }
  .credential-list strong { font-size: 1rem; }
  .credential-list small { font-size: .875rem; }
  .credential-action { display: none; }
  .credential-symbol { width: 36px; height: 36px; }
  .learning-details { margin-top: 28px; padding-inline: 18px; }
  .learning-details summary { min-height: 58px; font-size: .875rem; gap: 12px; }
  .learning-details summary > span { flex: none; }
  .learning-expanded { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .learning-expanded p { font-size: 1rem; }
  .learning-tags > span { font-size: .8125rem; }
  .faq-section { padding-top: 0; }
  .faq-list { margin-top: 30px; }
  .faq-list summary { min-height: 60px; font-size: 1rem; padding-block: 20px; gap: 18px; }
  .faq-list summary > span { flex: none; }
  .faq-list details > p { padding-right: 0; font-size: 1rem; }
  .contact-grid { gap: 34px; }
  .contact-copy h2 { font-size: clamp(3rem, 8vw, 3.8rem); }
  .contact-email { font-size: 1rem; line-height: 1.5; }
  .contact-channels > .eyebrow { margin-bottom: 18px; }
  .contact-channel { padding: 20px; gap: 6px 16px; }
  .contact-channel-name { font-size: 1.125rem; }
  .contact-channel-description { font-size: 1rem; }
  .site-footer { padding-top: 38px; }
  .footer-top { padding-bottom: 26px; }
  .footer-top > p { font-size: .875rem; }
  .footer-links { font-size: .875rem; gap: 8px 24px; }
  .footer-bottom { flex-wrap: wrap; gap: 8px 20px; font-size: .8125rem; padding-block: 18px; }
  .site-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 20px; border-radius: 12px; }
  .project-dialog h2 { font-size: clamp(1.7rem, 5.5vw, 2.2rem); overflow-wrap: anywhere; }
  .project-dialog p { font-size: 1rem; }
  .dialog-top { gap: 16px; margin-bottom: 16px; }
  .dialog-top h2 { font-size: 1.5rem; }
  .dialog-project-links { gap: 10px 20px; }
  .video-dialog { padding: 16px; }
  .video-fallback { font-size: .875rem; }
}

/* Stack cards before their text columns become cramped. */
@media (max-width: 600px) {
  .site-header { --mobile-nav-height: 72px; }
  html { scroll-padding-top: 88px; }
  .main-nav { padding-inline: 20px; }
  .section-space { padding-block: 56px; }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .service-card, .service-card + .service-card { border-left: 0; padding: 28px 0; }
  .service-card + .service-card { border-top: 1px solid var(--line); }
  .service-card h3 { font-size: 1.5rem; margin-bottom: 14px; }
  .service-card h3 br { display: none; }
  .service-icon { margin-bottom: 20px; }
  .icon-window { margin-bottom: 26px; }
  .service-deliverables { margin: 18px 0 20px; font-size: .875rem; }
  .service-enquire { font-size: .875rem; }
  .process-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .process-grid article { padding-top: 22px; }
  .process-grid h3 { font-size: 1.2rem; }
  .process-shape { margin-bottom: 20px; }
  .shape-diamond { margin-bottom: 23px; }
  .shape-square { margin-bottom: 21px; }
  .salshi-section { padding-bottom: 0; }
  .faq-section { padding-top: 0; }
}

@media (max-width: 540px) {
  .project-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filter-button { min-height: 44px; width: 100%; padding: 10px 14px; font-size: .875rem; }
  .project-heading { display: block; }
  .project-type { display: block; margin-top: 6px; }
  .project-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .project-actions > button, .project-actions > a { justify-content: space-between; width: 100%; font-size: .875rem; }
  .project-actions > a { justify-self: start; width: auto; max-width: 100%; }
  .work-bottom { display: block; }
  .work-bottom > a { margin-top: 8px; }
}

@media (max-width: 430px) {
  .hero h1 { font-size: clamp(2.05rem, 8.3vw, 2.3rem); }
  .hero .eyebrow { font-size: .75rem; letter-spacing: .04em; }
  .hero .line-mark { width: 16px; }
  .hero-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hero-actions .button { justify-content: space-between; width: 100%; font-size: .875rem; }
  .hero-actions .text-link { justify-self: start; font-size: .875rem; }
  .hero-visual { max-width: 310px; }
  .portrait-frame { height: 300px; border-top-left-radius: 78px; }
  .portrait-caption { margin-inline: 10px; padding: 14px; gap: 8px; }
  .portrait-caption strong { font-size: 1rem; }
  .portrait-caption div > span { font-size: .8125rem; }
  .capability-inner { gap: 12px; font-size: .875rem; }
  .project-visual { aspect-ratio: auto; min-height: 270px; padding: 18px 16px; gap: 14px; }
  .project-math .project-visual > img { width: 96%; margin-block: 6px; }
  .project-heading h3 { font-size: 1.25rem; }
  .visual-label, .visual-footer { font-size: .6875rem; letter-spacing: .04em; }
  .cipher-art { width: 92%; padding-block: 0; }
  .cipher-input { font-size: 1.9rem; letter-spacing: .17em; }
  .cipher-output { font-size: 2.7rem; letter-spacing: .2em; }
  .cipher-rule { margin-top: 9px; }
  .telegram-image-frame { height: 190px; width: 90%; }
  .telegram-image-frame img { height: 222px; width: 124px; }
  .video-project-frame { width: 96%; margin-block: 8px; }
  .intro-caption { padding: 24px; }
  .intro-card-footer { padding-inline: 24px; gap: 12px; font-size: .875rem; }
  .intro-card-footer .small-spark { flex: none; }
  .salshi-panel { padding: 30px 22px; }
  .salshi-panel h2 { font-size: 3rem; }
  .salshi-art { width: 95%; max-width: 250px; }
  .orbit-label { padding: 7px 13px; }
  .rating-summary { gap: 16px 20px; }
  .rating-summary > p { font-size: .875rem; }
  .aggregate-stars { flex-basis: 100%; }
  .rating-card { padding: 18px 15px; }
  .review-stars { font-size: 1.05rem; }
  .credential-list > a { gap: 12px; }
  .learning-details { padding-inline: 16px; }
  .contact-copy h2 { font-size: 3rem; }
  .contact-email { font-size: 1rem; }
  .contact-channel { padding: 18px; gap: 6px 12px; }
  .contact-channel-description { font-size: 1rem; }
  .footer-top { display: block; }
  .footer-top > p { margin-top: 18px; }
  .footer-links { margin-top: 18px; gap: 8px 22px; }
  .site-dialog { padding: 16px; }
  .video-dialog { padding: 14px; }
  .dialog-project-links { display: grid; grid-template-columns: minmax(0, 1fr); }
  .dialog-project-links > a { justify-self: start; font-size: .875rem; }
  .dialog-project-links .button { width: 100%; justify-content: center; white-space: normal; }
}

@media (max-width: 350px) {
  .section-shell, .nav-shell { width: calc(100% - 32px); }
  .main-nav { padding-inline: 16px; }
  .hero h1 { font-size: 2.05rem; }
  .portrait-note { padding: 10px 12px; gap: 8px; }
  .note-star { font-size: 1.5rem; }
  .caption-star { font-size: 1.4rem; }
  .capability-inner { column-gap: 12px; }
  .salshi-panel { padding-inline: 20px; }
  .salshi-panel h2 { font-size: 2.7rem; }
  .orbit-label { font-size: .8125rem; }
  .contact-copy h2 { font-size: 2.8rem; }
  .rating-cards { gap: 10px; }
  .rating-card { padding-inline: 12px; }
  .footer-links { column-gap: 16px; }
}

/* Keep the player and close control usable in phone landscape. */
@media (max-height: 500px) and (orientation: landscape) {
  .site-dialog { max-height: calc(100dvh - 16px); }
  .video-dialog { width: min(780px, calc(100% - 24px)); padding: 12px 16px; }
  .video-dialog .dialog-top { padding-block: 0 6px; margin-bottom: 8px; }
  .video-player { width: min(100%, calc((100dvh - 160px) * 1.7778)); margin-inline: auto; }
  .video-fallback { margin-top: 8px; }
}

@media print {
  .site-header, .capability-strip, .project-filters, .site-dialog,
  .menu-toggle, .project-actions button, .intro-video-trigger .play-button { display: none !important; }
  .section-shell { width: 100%; }
  .section-space { padding-block: 30px; }
  body, .work-section, .contact-section, .site-footer { background: white; color: black; }
  .hero { padding-block: 25px; min-height: 0; }
  .hero-visual { max-width: 300px; }
  .portrait-frame { height: 350px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card, .service-card, .intro-card, .contact-channel { break-inside: avoid; }
  .work-intro > p, .project-info > p, .contact-copy > p, .footer-top > p { color: #444; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 8pt; overflow-wrap: anywhere; }
  .project-visual { height: 240px; }
  .skill-pills > span { color: black; border-color: #888; }
}

