/* Науковий ліцей ім. Миколи Сабата — дизайн-система концепту */
:root {
  --ivory: #f8f5ef;
  --paper: #fffdf9;
  --ink: #1b1416;
  --ink-2: #4a3f40;
  --muted: #7a6e6c;
  --rule: #ddd3c3;
  --burgundy: #6e1423;
  --burgundy-deep: #470c16;
  --gold: #b08d47;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hdr: 92px;
  --mbar: 0px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ivory: #141011; --paper: #1b1617; --ink: #f1ebe2; --ink-2: #d2c8bc;
    --muted: #a39890; --rule: #3a3031; --burgundy: #b8475a; --gold: #c9a660;
  }
}
:root[data-theme="dark"] {
  --ivory: #141011; --paper: #1b1617; --ink: #f1ebe2; --ink-2: #d2c8bc;
  --muted: #a39890; --rule: #3a3031; --burgundy: #b8475a; --gold: #c9a660;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 16px/1.65 var(--sans); overflow-x: clip; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.label { font: 600 11.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--burgundy); }
.label.gold { color: var(--gold); }
.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.link { display: inline-block; font-weight: 600; font-size: 14px; letter-spacing: .02em; border-bottom: 1px solid currentColor; padding: 10px 0 2px; }
.link:hover { color: var(--burgundy); }
.btn { display: inline-flex; align-items: center; gap: 10px; font: 600 14px/1 var(--sans); letter-spacing: .04em; padding: 16px 26px; border: 1px solid var(--burgundy); background: var(--burgundy); color: #fff; cursor: pointer; transition: background .2s; }
.btn:hover { background: var(--burgundy-deep); }
.btn.line { background: transparent; color: inherit; border-color: currentColor; }
.btn.line:hover { background: rgba(127,127,127,.08); }
.arrow::after { content: "→"; transition: transform .2s; }
a:hover .arrow::after, .btn:hover.arrow::after { transform: translateX(3px); }

/* ---------- Утилітна смуга ---------- */
.util { background: var(--burgundy-deep); color: #eadfd2; font-size: 13px; }
.util .wrap { display: flex; align-items: center; gap: 28px; height: 38px; }
.util a { opacity: .78; }
.util a:hover { opacity: 1; }
.util .push { margin-left: auto; }

/* ---------- Шапка ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; transition: transform .3s ease, box-shadow .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px -22px rgba(0,0,0,.45); }
.site-header.hide { transform: translateY(-100%); }
.site-header .wrap { display: flex; align-items: center; height: var(--hdr); gap: 32px; }
.logo { display: flex; align-items: center; gap: 16px; }
.logo img { height: 64px; width: auto; }
.logo b { display: block; font: 500 21px/1.1 var(--serif); }
.logo small { display: block; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.mainnav { margin-left: auto; display: flex; height: 100%; }
.mainnav > div { position: relative; display: flex; align-items: center; }
.mainnav > div > a { font-size: 14.5px; font-weight: 500; padding: 0 16px; height: 100%; display: flex; align-items: center; border-bottom: 2px solid transparent; }
.mainnav > div:hover > a, .mainnav > div > a[aria-current] { border-bottom-color: var(--burgundy); color: var(--burgundy); }
.drop { position: absolute; top: 100%; left: 0; min-width: 260px; background: var(--paper); border: 1px solid var(--rule); border-top: 2px solid var(--burgundy); padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; box-shadow: 0 24px 40px -24px rgba(0,0,0,.25); }
.mainnav > div:hover .drop, .mainnav > div:focus-within .drop { opacity: 1; visibility: visible; transform: none; }
.drop a { display: block; padding: 9px 22px; font-size: 14.5px; }
.drop a:hover { background: var(--ivory); color: var(--burgundy); }
.icon-btn { background: none; border: 1px solid var(--rule); color: var(--ink); width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.burger { display: none; }

/* ---------- Мобільне меню ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; background: var(--paper); transform: translateX(100%); transition: transform .3s ease; overflow-y: auto; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; height: 76px; padding: 0 20px; border-bottom: 1px solid var(--rule); }
.drawer details { border-bottom: 1px solid var(--rule); }
.drawer summary, .drawer > nav > a { display: flex; justify-content: space-between; padding: 18px 20px; font: 500 22px var(--serif); cursor: pointer; list-style: none; border-bottom: 1px solid var(--rule); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::after { content: "+"; font-family: var(--sans); font-weight: 300; }
.drawer details[open] summary::after { content: "−"; }
.drawer details summary { border-bottom: 0; }
.drawer details a { display: block; padding: 10px 32px; color: var(--ink-2); }
.drawer details div { padding-bottom: 14px; }
.drawer .btn { margin: 24px 20px 8px; display: flex; justify-content: center; }
.drawer-contacts { padding: 16px 20px 40px; display: grid; gap: 4px; color: var(--ink-2); font-size: 15px; }
.drawer-contacts a { padding: 8px 0; }
body.locked { overflow: hidden; }

/* ---------- Пошук ---------- */
.search { position: fixed; inset: 0; z-index: 120; background: rgba(20,12,14,.6); display: none; padding: 10vh 20px 20px; }
.search.open { display: block; }
.search-box { max-width: 760px; margin: 0 auto; background: var(--paper); border-top: 3px solid var(--burgundy); }
.search-top { display: flex; align-items: center; border-bottom: 1px solid var(--rule); }
.search-box input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 400 26px var(--serif); padding: 24px 28px; outline: none; }
.search-close { background: none; border: 0; color: var(--muted); font: 500 14px var(--sans); padding: 0 24px; height: 64px; cursor: pointer; }
.search-close:hover { color: var(--burgundy); }
.search-res mark { background: rgba(176,141,71,.28); color: inherit; padding: 0 1px; }
.search-res { max-height: 55vh; overflow-y: auto; }
.search-res a { display: block; padding: 14px 28px; border-bottom: 1px solid var(--rule); }
.search-res a:hover { background: var(--ivory); }
.search-res small { color: var(--muted); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.search-res b { display: block; font: 500 19px var(--serif); }
.search-empty { padding: 20px 28px; color: var(--muted); }

/* ---------- Заголовок сторінки ---------- */
.page-head { border-bottom: 1px solid var(--rule); padding: 72px 0 56px; background: var(--paper); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.crumbs a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.crumbs a:hover { color: var(--burgundy); }
.page-head h1 { font-size: clamp(44px, 6vw, 84px); }
.page-head p { font-size: 20px; color: var(--ink-2); max-width: 40em; margin: 22px 0 0; }

/* ---------- Секції ---------- */
.sec { padding: 104px 0; }
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); margin-bottom: 48px; }
.sec-head h2 { font-size: clamp(34px, 4vw, 54px); margin-top: 14px; }

/* ---------- Новини ---------- */
.news-card .img { aspect-ratio: 3/2; overflow: hidden; background: var(--rule); }
.news-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
@media (hover: hover) { .news-card:hover img { transform: scale(1.03); } }
.news-card .meta { display: flex; gap: 14px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; }
.news-card .meta b { color: var(--burgundy); font-weight: 600; }
.news-card h3 { font-size: 24px; }
.news-card:hover h3 { color: var(--burgundy); }
.news-card p { color: var(--ink-2); font-size: 15px; margin: 10px 0 0; }

/* ---------- Футер ---------- */
.site-footer { background: var(--burgundy-deep); color: #e9ddd0; margin-top: 0; }
.site-footer .top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding: 80px 0 56px; }
.site-footer .logo small { color: rgba(233,221,208,.6); }
.site-footer .motto { font: italic 400 20px var(--serif); margin-top: 24px; opacity: .85; }
.site-footer h4 { font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 14.5px; }
.site-footer ul a { opacity: .82; }
.site-footer ul a:hover { opacity: 1; color: #fff; }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 22px 0 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; opacity: .6; }

/* ---------- Стильові деталі ---------- */
::selection { background: var(--burgundy); color: #fff; }
html { scrollbar-color: var(--burgundy) var(--ivory); }
.label::before { content: ""; display: inline-block; width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg) translateY(-2px); margin-right: 10px; }
.notice .label::before, .mbar .label::before { display: none; }
.link { border-bottom: 0; background: linear-gradient(var(--gold), var(--gold)) 0 100% / 0 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s ease, color .2s; }
.link:hover { background-size: 100% 2px, 100% 1px; }
.btn { position: relative; overflow: hidden; }
.btn::before { content: ""; position: absolute; inset: auto 0 0 0; height: 2px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.btn:hover::before { transform: scaleX(1); }

/* Головна новина — текст поверх фото */
.news-card .body { display: block; }
@media (min-width: 901px) {
  .news-card.big { position: relative; display: block; color: #fff; }
  .news-card.big .img { aspect-ratio: auto; height: 100%; min-height: 520px; }
  .news-card.big .img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(30,8,12,.88)); }
  .news-card.big .body { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px; z-index: 1; }
  .news-card.big .meta { color: rgba(255,255,255,.75); }
  .news-card.big .meta b { color: var(--gold); }
  .news-card.big h3 { font-size: clamp(30px, 3vw, 40px); max-width: 16em; }
  .news-card.big:hover h3 { color: #fff; }
  .news-card.big p { color: rgba(255,255,255,.82); max-width: 34em; }
  .news-card.big .img { position: relative; }
}
.news-card .img { position: relative; }

/* Заголовок сторінки — водяний знак герба */
.page-head { position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; right: -40px; top: 50%; width: 340px; height: 476px; transform: translateY(-50%) rotate(-8deg);
  background: url("http://gimnazia1.if.ua/images/gerb.png") center / contain no-repeat; opacity: .07; filter: grayscale(1); pointer-events: none; }
.page-head::before { content: ""; position: absolute; left: 0; right: 0; bottom: 3px; border-bottom: 1px solid var(--rule); }
.page-head .wrap { position: relative; z-index: 1; }

/* Футер — великий девіз */
.site-footer { position: relative; overflow: hidden; }
.site-footer::before { content: "Scientia vinces"; position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); white-space: nowrap;
  font: italic 400 clamp(80px, 15vw, 220px)/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(201,166,96,.16); pointer-events: none; }
.site-footer .wrap { position: relative; }

/* Поява першого екрана */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .18s; } .rise.d3 { animation-delay: .3s; } .rise.d4 { animation-delay: .42s; }

/* ---------- Доступність ---------- */
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--burgundy); color: #fff; padding: 12px 18px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Нижня панель дій (телефон) ---------- */
.mbar { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .mainnav, .site-header .btn { display: none; }
  .burger { display: grid; margin-left: auto; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --hdr: 64px; --mbar: calc(64px + env(safe-area-inset-bottom)); }
  .wrap { padding: 0 16px; }
  body { padding-bottom: var(--mbar); }
  .util { display: none; }
  .site-header .wrap { gap: 8px; }
  .logo { gap: 10px; min-width: 0; }
  .logo img { height: 42px; }
  .logo b { font-size: 16px; }
  .logo small { font-size: 9.5px; letter-spacing: .1em; }
  .icon-btn { width: 44px; height: 44px; border-color: transparent; }
  .drawer-head { height: var(--hdr); padding: 0 16px; }
  .sec { padding: 64px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 4px; padding-bottom: 20px; margin-bottom: 32px; }
  .sec-head .link { justify-self: start; }
  .page-head { padding: 36px 0 32px; }
  .page-head h1 { font-size: 44px; }
  .page-head p { font-size: 17px; }
  .crumbs { margin-bottom: 18px; }
  .btn { padding: 15px 22px; }
  .news-card h3 { font-size: 22px; }
  .site-footer .top { grid-template-columns: 1fr 1fr; gap: 36px 20px; padding: 48px 0 32px; }
  .site-footer .top > div:first-child, .site-footer .top > div:last-child { grid-column: 1 / -1; }
  .site-footer ul { gap: 2px; }
  .site-footer ul a { display: inline-block; padding: 8px 0; }
  .site-footer .bottom { flex-direction: column; gap: 6px; }
  .page-head::after { width: 180px; height: 252px; right: -50px; }
  .site-footer::before { bottom: 90px; }
  .search { padding: 0; background: var(--paper); }
  .search-box { max-width: none; height: 100%; display: flex; flex-direction: column; border-top: 0; }
  .search-box input { font-size: 20px; padding: 0 16px; height: 64px; }
  .search-close { padding: 0 16px; }
  .search-res { max-height: none; flex: 1; }
  .search-res a { padding: 14px 16px; }

  .mbar { display: grid; grid-template-columns: 1fr 1fr 1.3fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px -24px rgba(0,0,0,.5); }
  .mbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; font: 600 11.5px var(--sans); letter-spacing: .04em; color: var(--ink-2); }
  .mbar a + a { border-left: 1px solid var(--rule); }
  .mbar svg { width: 20px; height: 20px; }
  .mbar a.primary { background: var(--burgundy); color: #fff; border-left: 0; font-size: 13px; flex-direction: row; gap: 8px; }
}

/* ---------- Сторінки зі змістом (вступ, навчання, відкритість) ---------- */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 80px; padding-top: 80px; padding-bottom: 112px; }
.toc { position: sticky; top: 124px; align-self: start; border-top: 1px solid var(--ink); }
.toc a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; color: var(--ink-2); }
.toc a:hover, .toc a.on { color: var(--burgundy); }
.toc a.on { font-weight: 600; }
.block { padding-bottom: 72px; margin-bottom: 72px; border-bottom: 1px solid var(--rule); scroll-margin-top: 120px; }
.block:last-child { border-bottom: 0; margin-bottom: 0; }
.block h2 { font-size: clamp(32px, 3.6vw, 46px); margin: 12px 0 24px; }
.block > p { font-size: 18px; color: var(--ink-2); max-width: 38em; }

/* Перелік документів і матеріалів */
.docs { border-top: 1px solid var(--rule); margin-top: 28px; }
.docs a { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--rule); transition: background .2s, padding .2s; }
.docs a::before { content: ""; width: 26px; height: 32px; border: 1px solid var(--gold); background: linear-gradient(135deg, transparent 70%, var(--gold) 70%) top right / 9px 9px no-repeat; }
.docs a::after { content: "↗"; color: var(--muted); transition: color .2s, transform .2s; }
.docs a:hover { background: var(--paper); padding-left: 12px; }
.docs a:hover::after { color: var(--burgundy); transform: translate(2px, -2px); }
.docs small { display: block; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.chips button { font: 500 14px var(--sans); color: var(--ink-2); background: transparent; border: 1px solid var(--rule); padding: 9px 16px; cursor: pointer; transition: border-color .2s, color .2s; }
.chips button:hover { border-color: var(--burgundy); color: var(--burgundy); }
.chips button[aria-pressed="true"] { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 48px; padding-bottom: 64px; }
  .toc { position: sticky; top: var(--hdr-now, var(--hdr)); z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    background: var(--ivory); border-top: 0; border-bottom: 1px solid var(--rule); margin: 0 -16px; padding: 10px 16px; transition: top .3s ease; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; border: 1px solid var(--rule); padding: 9px 14px; white-space: nowrap; font-size: 14px; }
  .toc a.on { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
  .block { scroll-margin-top: 140px; padding-bottom: 48px; margin-bottom: 48px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .chips button { flex: none; }
}

/* ---------- Рядки новин (головна, сторінка новини) ---------- */
.news-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 22px; padding: 24px 0; border-top: 1px solid var(--rule); }
.news-row:first-child { border-top: 0; padding-top: 0; }
.news-row img { width: 132px; aspect-ratio: 1; object-fit: cover; background: var(--rule); }
.news-row small { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.news-row small b { color: var(--burgundy); font-weight: 600; margin-right: 10px; }
.news-row h3 { font-size: 21px; margin-top: 8px; }
.news-row:hover h3 { color: var(--burgundy); }

/* ---------- Сторінка новини ---------- */
.art-head h1 { font-size: clamp(36px, 4.6vw, 64px); max-width: 18em; }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 72px; padding-top: 56px; padding-bottom: 112px; }
.art-lead { margin: 0 0 40px; background: var(--rule); }
.art-lead img { width: 100%; max-height: 640px; object-fit: cover; }
.art-text { max-width: 40em; }
.art-text p { font: 400 21px/1.6 var(--serif); color: var(--ink); margin: 0 0 22px; }
.art-text.dc p:first-child::first-letter { float: left; font: 500 76px/.8 var(--serif); color: var(--burgundy); margin: 8px 10px 0 0; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.gallery a { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--rule); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery a:hover img { transform: scale(1.05); }
.art-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--ink); }
.art-nav a { font: 500 20px/1.3 var(--serif); }
.art-nav a:hover { color: var(--burgundy); }
.art-nav small { display: block; font: 600 11.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.art-nav .nx { text-align: right; }
.art-side { position: sticky; top: 124px; align-self: start; }
.art-side .news-rows { margin: 20px 0 28px; }
.art-side .news-row { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 18px 0; }
.art-side .news-row img { width: 84px; }
.art-side .news-row h3 { font-size: 18px; }
.art-src { font-size: 14px; color: var(--muted); margin-top: 20px; }
.art-src a { color: var(--burgundy); border-bottom: 1px solid; }

/* ---------- Модальне вікно: фото й біографії ---------- */
#modal { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; color: var(--ink); }
#modal::backdrop { background: rgba(20, 6, 9, .86); backdrop-filter: blur(4px); }
#modal[open] { display: grid; place-items: center; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-x { position: fixed; top: 16px; right: 16px; width: 48px; height: 48px; display: grid; place-items: center; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); cursor: pointer; z-index: 2; }
.modal-x svg { width: 22px; height: 22px; }
.modal-x:hover { background: var(--burgundy); }
.modal-photo figure { margin: 0; padding: 72px 16px 0; }
.modal-photo img { max-width: min(1200px, 100%); max-height: calc(100vh - 160px); object-fit: contain; margin: 0 auto; }
.modal-bar { display: flex; justify-content: center; align-items: center; gap: 20px; color: #eadfd2; padding: 16px; font-size: 14px; }
.modal-bar button { width: 48px; height: 48px; background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff; font-size: 20px; cursor: pointer; }
.modal-bar button:hover { background: var(--burgundy); border-color: var(--burgundy); }
.bio-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; background: var(--paper); max-width: 820px; width: calc(100% - 32px); max-height: calc(100vh - 120px); overflow: auto; padding: 32px; border-top: 3px solid var(--gold); }
.bio-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; }
.bio-card h3 { font: 400 30px/1.15 var(--serif); }
.bio-card h3 b { font-weight: 500; text-transform: uppercase; letter-spacing: .03em; font-size: .9em; }
.bio-card .role { color: var(--burgundy); font-size: 14px; margin: 6px 0 18px; }
.bio-card p { margin: 0; color: var(--ink-2); line-height: 1.7; }
.bio-btn { margin-top: 10px; display: block; font: 600 12.5px var(--sans); letter-spacing: .06em; color: var(--ink-2); background: transparent; border: 0; border-bottom: 1px solid var(--gold); padding: 6px 0; cursor: pointer; }
.bio-btn:hover { color: var(--burgundy); }

@media (max-width: 1000px) {
  .article { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .art-side { position: static; }
}
@media (max-width: 640px) {
  .news-row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .news-row img { width: 96px; }
  .article { padding-top: 32px; padding-bottom: 64px; }
  .art-lead { margin: 0 -16px 28px; }
  .art-text p { font-size: 19px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .art-nav { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .art-nav .nx { text-align: left; }
  .bio-card { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 18px; }
  .bio-card img { max-width: 180px; }
}
