/* ==========================================================================
   mobile.css — overrides только для mobile / narrow viewports.
   Подключается ПОСЛЕ site.css, чтобы перекрывать без !important.
   ========================================================================== */

/* — Mid-size: планшеты ————————————————————————————————— */
@media (max-width: 1024px) {
  :root {
    --container-pad: 24px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-9);
  }
  .article-aside {
    position: static;
    border-top: 1px solid var(--line);
    padding-top: var(--sp-7);
  }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

/* — Mobile ——————————————————————————————————————————————— */
@media (max-width: 768px) {
  :root {
    --container-pad: 20px;
    --section-y:    clamp(56px, 9vw, 80px);
    --section-y-lg: clamp(72px, 12vw, 96px);
    --section-y-sm: 40px;
    --block-gap:    32px;
    --grid-gap:     20px;
  }

  /* ---- Nav: solid bg, full-screen drawer ---------------------------- */
  .site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    z-index: 110000;
  }
  .site-nav .container,
  .site-nav__inner {
    position: relative;
    z-index: 110001;
  }
  .site-nav__inner { height: 60px; }
  body[data-nav-style="on-dark"] .site-nav:not(.is-scrolled) {
    background: var(--surface);
    color: var(--ink);
  }
  body[data-nav-style="on-dark"] .site-nav:not(.is-scrolled) .site-nav__list a {
    color: var(--ink);
  }
  body[data-nav-style="on-dark"] .site-nav:not(.is-scrolled) .site-nav__toggle {
    color: var(--ink);
    border-color: var(--line);
  }

  .site-nav__toggle {
    display: inline-flex;
    width: 44px; height: 44px;
    padding: 0;
    border-color: transparent;
    background: transparent;
  }
  .site-nav__toggle span {
    width: 22px; height: 2px;
    background: var(--ink);
    border-radius: 1px;
  }
  .site-nav__toggle span:not(:last-child) { margin-bottom: 5px; }
  .site-nav__controls { gap: 6px; }
  .site-nav__search-toggle {
    width: 40px;
    height: 40px;
    border-color: transparent;
  }

  /* Mobile drawer — full screen, padded, large links */
  .site-nav__menu {
    position: fixed;
    inset: 60px 0 0 0;
    z-index: 110000;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--sp-7) var(--container-pad) var(--sp-9);
    gap: 0;
    transform: translateY(-101%);
    transition: transform var(--t-slow) var(--ease-out);
    pointer-events: none;
    visibility: hidden;
    overflow-y: auto;
  }
  .site-nav__menu.is-open {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }
  .site-nav__controls,
  .site-nav__toggle,
  .site-nav__search-toggle {
    position: relative;
    z-index: 110002;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__list li {
    border-bottom: 1px solid var(--line-2);
  }
  .site-nav__list a {
    display: block;
    padding-block: 18px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
  }
  .site-nav__list a::after { display: none; }
  .site-nav__list a:hover,
  .site-nav__list a.is-active {
    color: var(--accent);
  }
  .site-nav__list--right {
    display: none;
  }
  .site-nav__search {
    top: 60px;
    left: 0;
    right: 0;
    width: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    transform: translateY(-10px);
  }
  .site-nav__search-form {
    grid-template-columns: 1fr;
  }
  .site-nav__search-form .btn {
    width: 100%;
  }

  /* ---- Hero: stack (photo above, content below) --------------------- */
  .hero {
    min-height: 0;
    flex-direction: column;
    padding-top: 60px;
    margin-top: -60px;
    background: var(--bg-2);
    align-items: stretch;
  }
  .hero__bg {
    position: relative;
    inset: auto;
    height: 58vh;
    height: 58svh;
    min-height: 360px;
    max-height: 520px;
    width: 100%;
    flex: 0 0 auto;
  }
  .hero__bg img {
    object-position: 62% 18%;
  }
  .hero__bg::after {
    background: linear-gradient(180deg,
      transparent 0%,
      color-mix(in srgb, var(--bg-2) 18%, transparent) 58%,
      color-mix(in srgb, var(--bg-2) 62%, transparent) 82%,
      var(--bg-2) 100%);
  }
  .hero .container { width: 100%; }
  .hero__inner {
    padding-block: var(--sp-8) var(--sp-9);
    max-width: none;
    text-align: left;
  }
  .hero__eyebrow {
    margin-bottom: var(--sp-4);
    font-size: 11px;
    padding-left: 24px;
  }
  .hero__eyebrow::before { width: 16px; }
  .hero__title {
    font-size: clamp(38px, 11vw, 56px);
    line-height: 1;
    margin-bottom: var(--sp-4);
  }
  .hero__sub {
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
    margin-bottom: var(--sp-6);
  }
  .hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }
  .hero__actions .btn { justify-content: center; padding: 14px 16px; }
  .hero__scroll { display: none; }

  /* ---- Headings: tighten on mobile ---------------------------------- */
  h1 { letter-spacing: -0.025em; }
  h2 { margin-bottom: var(--sp-4); font-size: clamp(24px, 6vw, 32px); }
  h3 { font-size: clamp(18px, 5vw, 22px); }

  /* ---- Sections & grids --------------------------------------------- */
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
    margin-bottom: var(--sp-8);
  }
  .section-head .btn { width: 100%; justify-content: center; }

  /* ---- Cards -------------------------------------------------------- */
  .card__media { aspect-ratio: 4 / 3; }
  .card--feature { gap: var(--sp-5); }

  /* ---- Article hero (single post) ----------------------------------- */
  .article-hero {
    min-height: 0;
    padding-top: 60px;
    margin-top: -60px;
  }
  .article-hero__bg img {
    object-position: center 30%;
  }
  .article-hero__bg::after {
    background: linear-gradient(180deg,
      rgba(0,0,0,0.30) 0%,
      rgba(0,0,0,0.55) 50%,
      rgba(0,0,0,0.92) 100%);
  }
  .article-hero__inner {
    padding-block: var(--sp-12) var(--sp-8);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }
  .article-hero h1 {
    font-size: clamp(26px, 6.5vw, 36px);
    line-height: 1.15;
    margin-bottom: var(--sp-3);
  }
  .article-hero__cat {
    font-size: 10.5px;
    padding: 5px 10px;
  }
  .article-hero__meta {
    font-size: 13px;
    gap: var(--sp-2);
  }

  /* ---- Article body ------------------------------------------------- */
  .article-body { font-size: 16px; }
  .article-body p { font-size: 16px; }
  .article-body .lead { font-size: 17px; line-height: 1.6; }
  .article-body blockquote {
    margin: var(--sp-6) 0;
    padding-left: var(--sp-4);
    font-size: 18px;
  }

  /* ---- Article sidebar: cards-like styling -------------------------- */
  .article-aside {
    gap: var(--sp-5);
    text-align: center;
  }
  .aside-block,
  .mmt-single-aside-block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-3);
    padding: var(--sp-6) var(--sp-5);
    align-items: center;
    gap: var(--sp-4);
  }
  .aside-block h4,
  .mmt-single-aside-title {
    text-align: center;
    margin-bottom: var(--sp-2);
  }
  .aside-block__meta,
  .mmt-single-aside-meta {
    text-align: center;
    margin: 0;
  }
  .aside-block .cat-buttons,
  .mmt-single-aside-cats {
    justify-content: center;
  }
  .mmt-single-aside-cats .btn {
    min-width: 180px;
  }
  .aside-block .btn--link {
    align-self: center;
  }

  /* Share grid: bigger, prominent, on accent-tinted background */
  .share-grid,
  .mmt-article-social-grid {
    justify-content: center;
    gap: var(--sp-3) var(--sp-4);
    display: grid;
    grid-template-columns: repeat(4, 48px);
  }
  .share-grid a,
  .mmt-article-social-btn {
    width: 48px; height: 48px;
    background: var(--bg-2);
    border-color: transparent;
  }
  .share-grid a:hover,
  .mmt-article-social-btn:hover {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
  }
  .share-grid svg,
  .mmt-article-social-btn i { width: 18px; height: 18px; font-size: 18px; }

  .aside-nav,
  .mmt-single-aside-nav {
    align-items: stretch;
    gap: var(--sp-3);
  }
  .aside-nav a,
  .mmt-single-aside-nav a {
    background: var(--bg-2);
    padding: var(--sp-4) var(--sp-4);
    border-radius: var(--r-2);
    text-align: center;
    justify-content: center;
    font-size: 14px;
    gap: var(--sp-2);
    border: 1px solid transparent;
    font-weight: 500;
  }
  .aside-nav a:hover,
  .mmt-single-aside-nav a:hover {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
  }
  .mmt-single-aside-nav a::before {
    display: none;
  }

  /* ---- Related publications grid stays single column ---------------- */
  /* (handled by .grid--3 -> 1fr above) */

  /* ---- Bio hero ----------------------------------------------------- */
  .bio-hero {
    padding-top: calc(60px + var(--sp-11));
    padding-bottom: var(--sp-9);
    margin-top: -60px;
  }
  .bio-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
  .bio-hero__title {
    font-size: clamp(40px, 11vw, 56px);
    line-height: 1;
    text-align: left;
  }
  .bio-hero__sub {
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
  }
  .bio-hero__portrait {
    max-width: 320px;
    margin-inline: auto;
    aspect-ratio: 4 / 5;
    border-radius: var(--r-3);
  }

  /* ---- Bio panels --------------------------------------------------- */
  .bio-panel { padding-block: var(--sp-9); }
  .bio-panel__inner { gap: var(--sp-5); }
  .bio-panel__label {
    font-size: 11px;
    flex-direction: row;
    align-items: baseline;
    gap: var(--sp-3);
    display: flex;
  }
  .bio-panel__label .num {
    font-size: 36px;
    margin-bottom: 0;
    line-height: 1;
  }
  .bio-panel__title {
    font-size: clamp(24px, 6vw, 32px);
  }
  .bio-panel__text {
    font-size: 16px;
    line-height: 1.6;
  }
  .bio-slide { height: 220px; }

  /* ---- Quote band --------------------------------------------------- */
  .quote-band {
    padding-block: var(--sp-9);
  }
  .quote-band__text {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 600;
  }
  .quote-band__text::before { font-size: 40px; }

  /* ---- CV layout (last section of bio + press) ---------------------- */
  .cv-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
  }
  .cv-photo {
    max-width: 280px;
    margin-inline: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
  }
  .cv-info {
    gap: var(--sp-7);
    text-align: left;
  }
  .cv-socials {
    justify-content: flex-start;
    gap: var(--sp-2);
  }
  .cv-list li,
  .cv-row-item {
    grid-template-columns: 1fr !important;
    gap: 4px;
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--line-2);
  }
  .cv-list li:last-child,
  .cv-row-item:last-child { border-bottom: none; }
  .cv-list li span:first-child,
  .cv-row-left {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 500;
  }
  .cv-row-left { font-weight: 500; }
  .cv-row-right { gap: 2px; }
  .cv-row-right strong { font-size: 15px; }
  .cv-row-right span { font-size: 14px; color: var(--ink-2); }

  /* ---- Mention archive ---------------------------------------------- */
  .mention-source-card {
    grid-template-columns: 44px 1fr;
    padding: var(--sp-4);
  }
  .mention-source-card__avatar { width: 44px; height: 44px; }
  .mention-source-card__action { grid-column: 1 / -1; margin-top: var(--sp-3); }
  .mention-source-card__action .btn { width: 100%; }

  /* ---- Filters sidebar — under content ------------------------------ */
  .mentions-layout { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; }

  /* ---- Showcase ----------------------------------------------------- */
  .showcase {
    grid-template-columns: 1fr;
  }
  .press-center-page .showcase {
    margin-top: 60px;
  }
  .showcase__media { aspect-ratio: 4 / 3; order: -1; }
  .showcase__copy {
    padding: var(--sp-9) var(--container-pad);
    gap: var(--sp-5);
  }
  .showcase__copy h2 { font-size: clamp(26px, 6.5vw, 32px); }
  .showcase__copy .btn { width: 100%; justify-content: center; }

  /* ---- Footer ------------------------------------------------------- */
  .site-footer {
    padding-block: var(--sp-9);
  }
  .site-footer__inner {
    gap: var(--sp-7);
  }
  .site-footer__socials {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: var(--sp-3) var(--sp-4);
    justify-content: center;
  }
  .site-footer__socials a {
    width: 44px; height: 44px;
  }
  .site-footer__socials svg { width: 18px; height: 18px; }
  .site-footer__links {
    flex-direction: column;
    gap: var(--sp-2);
    width: 100%;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-block: var(--sp-5);
  }
  .site-footer__links li {
    width: 100%;
    text-align: center;
  }
  .site-footer__links a {
    display: block;
    padding-block: var(--sp-2);
    font-size: 15px;
  }
  .site-footer__copy {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
  }

  /* ---- Top button --------------------------------------------------- */
  .topbtn {
    right: var(--sp-5);
    bottom: var(--sp-5);
    width: 44px; height: 44px;
  }

  /* ---- Page header -------------------------------------------------- */
  .page-header {
    padding-top: calc(60px + var(--sp-9));
    padding-bottom: var(--sp-8);
  }
  .page-header h1 { font-size: clamp(28px, 7vw, 40px); }
  .page-header__intro { font-size: 16px; line-height: 1.55; margin-top: var(--sp-4); }

  /* ---- Press CV blocks ---------------------------------------------- */
  .press-cv-columns { grid-template-columns: 1fr; gap: var(--sp-7); }
  .press-center-page .quote-band .cv-socials {
    display: grid;
    grid-template-columns: repeat(4, 44px);
    gap: var(--sp-3) var(--sp-4);
    justify-content: start;
  }
  .press-cv-cta {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
    margin-top: var(--sp-7);
    padding-top: var(--sp-5);
  }
  .press-cv-cta .btn { width: 100%; justify-content: center; }

  /* ---- Error page --------------------------------------------------- */
  .error-page__code { font-size: clamp(120px, 36vw, 200px); }

  /* ---- Search ------------------------------------------------------- */
  .search-result { grid-template-columns: 1fr; }
  .search-result__media { aspect-ratio: 16 / 9; }
}

/* — Very narrow ———————————————————————————————————————— */
@media (max-width: 380px) {
  :root { --container-pad: 16px; }
  .btn { padding: 11px 18px; font-size: 13px; }
  .btn--lg { padding: 14px 22px; font-size: 14px; }
  .hero__actions { grid-template-columns: 1fr; }
  .hero__title { font-size: clamp(32px, 11vw, 44px); }
  .bio-hero__title { font-size: clamp(36px, 11vw, 48px); }
}

/* — Touch optimizations ———————————————————————————————— */
@media (hover: none) and (pointer: coarse) {
  .card:hover .card__media img { transform: none; }
  .btn:hover { transform: none; }
  /* tap target floor: 44×44 */
  .site-nav__list a { min-height: 44px; display: flex; align-items: center; }
  .share-grid a { width: 48px; height: 48px; }
}
