:root{
  --bg: #ffffff;
  --fg: #111111;
  --muted: #5c5c5c;
  --line: rgba(17,17,17,.12);

  --btn-bg: #0f0f0f;
  --btn-fg: #ffffff;

  --radius: 18px;
  --radius-pill: 999px;

  /* делаем “мобильную колонку” и на десктопе */
  --container: 720px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.45;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  width: min(92vw, var(--container));
  margin: 0 auto;
}

.skip-link{
  position: absolute;
  left: -9999px;
  top: 12px;
  padding: 10px 12px;
  background: #000;
  color: #fff;
  border-radius: 10px;
}
.skip-link:focus{ left: 12px; }

/* =======================
   Top / Nav
======================= */
.top{
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 10;
}
.top__nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.top__brand{
  font-weight: 700;
  letter-spacing: .2px;
}
.top__links{
  display: none;
  gap: 14px;
  font-size: 14px;
  color: var(--muted);
}

/* =======================
   Sections
======================= */
.section{ padding: 22px 0; }
.section__title{
  margin: 0 0 14px;
  font-size: clamp(18px, 2.2vw, 24px);
  letter-spacing: .2px;
}

/* =======================
   Profiles (верхние карточки)
   ВСЕГДА ОДНА КОЛОНКА
======================= */
.stack{
  display: grid;
  grid-template-columns: 1fr; /* ключ */
  gap: 18px;
}

.profile{
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;

  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px 18px;
  background: #fff;
}

.profile__media{
  width: min(82vw, 360px);
}

.profile__title{
  margin: 0;
  font-size: 20px;
}
.profile__subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.profile__text{
  width: min(86vw, 560px);
  color: #1f1f1f;
  font-size: 14px;
}
.profile__text p{ margin: 6px 0; }

.btns{
  width: min(86vw, 460px);
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid #000;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .2px;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:hover{ text-decoration: none; opacity: .92; }
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{
  outline: 3px solid rgba(0,0,0,.2);
  outline-offset: 3px;
}

/* =======================
   Cards (кафедра/вуз/прочее)
======================= */
.cards{
  display: grid;
  grid-template-columns: 1fr; /* тоже одной колонкой */
  gap: 16px;
  margin-top: 6px;
}

.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fff;
}

.card--tight{ margin-top: 14px; }
.card__title{ margin: 0; font-size: 16px; }
.card__text{ margin: 0; color: var(--muted); font-size: 14px; }

.note{
  margin: 16px 0 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.03);
  border: 1px solid var(--line);
}
.note__title{ margin: 0 0 6px; font-weight: 700; letter-spacing: .2px; }
.note__text{ margin: 0; color: var(--muted); font-size: 14px; }
.note__meta{ color: #2f2f2f; }

/* =======================
   Gallery
======================= */
.gallery{
  display: grid;
  gap: 14px;
}

.shot{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

/* на мобилке 2 колонки деталей — как у тебя внизу */
.grid2{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

/* =======================
   Placeholders
======================= */
.ph{
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
  color: rgba(0,0,0,.55);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}
.ph span{
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  border: 1px dashed rgba(0,0,0,.22);
}

.ph--portrait{ aspect-ratio: 3 / 4; }
.ph--wide{ aspect-ratio: 4 / 3; }
.ph--sq{ aspect-ratio: 1 / 1; }

.img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =======================
   Footer
======================= */
.footer{
  margin-top: 26px;
  background: #0b0b0b;
  color: #fff;
}
.footer__inner{
  padding: 22px 0 26px;
  display: grid;
  gap: 12px;
  text-align: center;
}
.footer__title{
  margin: 0;
  font-weight: 700;
  letter-spacing: .2px;
}
.footer__links{
  display: grid;
  gap: 10px;
  justify-items: center;
  color: rgba(255,255,255,.9);
}
.footer__links a{ text-decoration: none; }
.footer__links a:hover{ text-decoration: underline; }
.footer__copy{
  margin: 4px 0 0;
  color: rgba(255,255,255,.65);
  font-size: 13px;
}

/* =======================
   Desktop-only polish (БЕЗ изменения сеток)
======================= */
@media (min-width: 840px){
  .top__links{ display: flex; }
  .section{ padding: 28px 0; }

  .profile__media{ width: 420px; }
  .btns{ width: 520px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn{ transition: none; }
}
