/* ============================================================
   ВИИ – София · V2 "EMERALD"
   Deep forest + emerald + cream · Playfair Display + Manrope
   ============================================================ */

:root {
  --bg-950: #060d0a;
  --bg-900: #0a1410;
  --bg-800: #10201a;
  --ink: #101915;
  --cream: #f1ede2;
  --cream-2: #e7e2d2;
  --paper: #f7f5ee;
  --emerald: #1ec98b;
  --emerald-2: #57e0ad;
  --emerald-deep: #0d7a53;
  --amber: #f2a93b;
  --muted: #5d6a63;
  --muted-dark: #93aa9e;
  --line: rgba(16, 25, 21, 0.14);
  --line-dark: rgba(255, 255, 255, 0.13);

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.68;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--emerald-deep); }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.12; font-weight: 700; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin: 0.32em 0; }

::selection { background: var(--emerald); color: var(--bg-950); }

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.container { width: min(100% - 44px, 1240px); margin-inline: auto; }

.section { padding: 104px 0; position: relative; }
.section--dark { background: var(--bg-900); color: var(--cream); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--cream { background: var(--cream); }

/* ---------- Scroll progress ---------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  z-index: 1000;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  transition: background 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(247, 245, 238, 0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(6, 13, 10, 0.08);
}
/* header over dark hero (top of every page) */
.site-header:not(.is-scrolled) .brand__text strong { color: #fff; }
.site-header:not(.is-scrolled) .brand__text small { color: rgba(255, 255, 255, 0.55); }
.site-header:not(.is-scrolled) .nav-list a { color: rgba(255, 255, 255, 0.85); }
.site-header:not(.is-scrolled) .nav-list a:hover { color: #fff; }
.site-header:not(.is-scrolled) .nav-list a.is-active { color: #fff; }
.site-header:not(.is-scrolled) .menu-btn { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.08); }
.site-header:not(.is-scrolled) .menu-btn span,
.site-header:not(.is-scrolled) .menu-btn span::before,
.site-header:not(.is-scrolled) .menu-btn span::after { background: #fff; }
.header-inner {
  width: min(100% - 32px, 1360px);
  margin-inline: auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  transition: height 0.35s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 64px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px var(--emerald);
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); box-shadow: 0 0 0 3px var(--emerald), 0 0 24px rgba(30, 201, 139, 0.45); }
.brand__mark img { width: 100%; height: 100%; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; }
.brand__text small { font-size: 11.5px; color: var(--muted); font-weight: 600; }

.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  color: #2b3a32;
  transition: color 0.2s;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-list a:hover { color: var(--emerald-deep); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a.is-active { color: var(--bg-900); }
.nav-list a.is-active::after { transform: scaleX(1); background: var(--emerald); }

.nav-cta { flex: 0 0 auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}
.btn .arr { transition: transform 0.25s var(--ease); display: inline-block; }
.btn:hover .arr { transform: translateX(5px); }
.btn:active { transform: scale(0.98); }

.btn--emerald {
  background: var(--emerald);
  color: var(--bg-950);
  box-shadow: 0 8px 24px rgba(30, 201, 139, 0.35);
}
.btn--emerald:hover { background: var(--emerald-2); color: var(--bg-950); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(30, 201, 139, 0.45); }

.btn--amber {
  background: var(--amber);
  color: var(--bg-950);
  box-shadow: 0 8px 24px rgba(242, 169, 59, 0.35);
}
.btn--amber:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(242, 169, 59, 0.5); color: var(--bg-950); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16, 25, 21, 0.3);
}
.btn--ghost:hover { border-color: var(--emerald-deep); color: var(--emerald-deep); }

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
  backdrop-filter: blur(6px);
}
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255,255,255,0.6); }

.btn--sm { padding: 10px 18px; font-size: 13.5px; }
.btn--lg { padding: 18px 36px; font-size: 16.5px; }

/* Menu button */
.menu-btn {
  display: none;
  width: 46px; height: 46px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  position: relative;
  padding: 0;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all 0.3s var(--ease);
}
.menu-btn span { top: 50%; transform: translateY(-50%); }
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------- Overlay mobile menu ---------- */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 850;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(30, 201, 139, 0.16), transparent 60%),
    var(--bg-950);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px 32px 48px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.6s var(--ease), visibility 0.6s;
}
.overlay-menu.is-open { clip-path: inset(0 0 0% 0); visibility: visible; }
.overlay-menu__list { list-style: none; margin: 0; padding: 0; counter-reset: item; }
.overlay-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--serif);
  font-size: clamp(30px, 8.5vw, 44px);
  font-weight: 700;
  color: var(--cream);
  padding: 12px 0;
  border-bottom: 1px solid var(--line-dark);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.25s, padding-left 0.3s var(--ease);
}
.overlay-menu.is-open .overlay-menu__list a { opacity: 1; transform: none; }
.overlay-menu__list a:hover, .overlay-menu__list a.is-active { color: var(--emerald); padding-left: 12px; }
.overlay-menu__list a .idx { font-family: var(--mono); font-size: 12px; color: var(--muted-dark); letter-spacing: 0.1em; }
.overlay-menu__foot {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.overlay-menu__foot a { color: var(--emerald); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--bg-950);
  overflow: hidden;
  padding-top: var(--header-h);
}
.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  animation: kenburns 22s ease-in-out infinite alternate;
  transform-origin: center 40%;
}
@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.12) translateY(-1.5%); }
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,13,10,0.55) 0%, rgba(6,13,10,0.25) 35%, rgba(6,13,10,0.82) 88%),
    radial-gradient(700px 500px at 15% 75%, rgba(30,201,139,0.2), transparent 60%);
}
.hero__glow {
  position: absolute;
  width: 620px; height: 620px;
  left: -180px; bottom: -220px;
  background: radial-gradient(circle, rgba(30,201,139,0.28), transparent 65%);
  filter: blur(10px);
  animation: glowFloat 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glowFloat {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(90px, -70px) scale(1.15); }
}
.hero__inner { position: relative; padding: 0 0 96px; }
.hero__kicker {
  color: var(--emerald-2);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.hero__kicker::before { content: ""; width: 34px; height: 1.5px; background: var(--emerald); }
.hero__title {
  font-family: var(--serif);
  font-size: clamp(52px, 9vw, 124px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin-bottom: 28px;
  color: #fff;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word {
  display: inline-block;
  transform: translateY(110%);
  animation: wordUp 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes wordUp { to { transform: translateY(0); } }
.hero__title .em { font-style: italic; color: var(--emerald-2); }
.hero__lead {
  max-width: 620px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #cfe0d6;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease) 0.75s forwards;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; opacity: 0; animation: fadeUp 0.9s var(--ease) 0.9s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 24px;
  border-top: 1px solid var(--line-dark);
  color: var(--muted-dark);
}
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; }
.scroll-hint__line {
  width: 52px; height: 1.5px;
  background: rgba(255,255,255,0.25);
  position: relative;
  overflow: hidden;
}
.scroll-hint__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--emerald);
  transform: translateX(-100%);
  animation: hintSlide 2.4s var(--ease) infinite;
}
@keyframes hintSlide { 45% { transform: translateX(0); } 100% { transform: translateX(100%); } }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--bg-950);
  color: var(--emerald);
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  padding: 16px 0;
  position: relative;
}
.marquee__track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 30s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee .star { color: var(--amber); }

/* ---------- Section headers ---------- */
.sec-head { margin-bottom: 56px; max-width: 780px; }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--emerald-deep);
  margin-bottom: 18px;
}
.section--dark .sec-kicker { color: var(--emerald-2); }
.sec-kicker::before { content: ""; width: 30px; height: 1.5px; background: currentColor; }
.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.sec-head h2 em { font-style: italic; color: var(--emerald-deep); }
.section--dark .sec-head h2 em { color: var(--emerald-2); }
.sec-head .lead { font-size: 17.5px; color: var(--muted); }
.section--dark .sec-head .lead { color: var(--muted-dark); }

/* ---------- Stats ---------- */
.stats { background: var(--paper); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 44px 30px;
  border-left: 1px solid var(--line);
  position: relative;
}
.stat:first-child { border-left: 0; }
.stat::before {
  content: "";
  position: absolute;
  left: 30px; right: 30px; top: 0;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--emerald), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease) 0.25s;
}
.stat.is-visible::before { transform: scaleX(1); }
.stat__num {
  display: block;
  font-family: var(--serif);
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 800;
  line-height: 1;
  color: var(--bg-900);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.stat__num .suf { font-size: 0.5em; color: var(--emerald-deep); font-style: italic; margin-left: 4px; }
.stat__label { font-size: 14.5px; color: var(--muted); font-weight: 600; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  filter: blur(6px);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease), filter 0.85s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* ---------- Split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(6, 13, 10, 0.22);
}
.split__media img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; transition: transform 1.2s var(--ease); }
.split__media:hover img { transform: scale(1.06); }
.split__media .chip {
  position: absolute;
  left: 16px; bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(6, 13, 10, 0.82);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.split__media .chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(30,201,139,0.6); } 50% { box-shadow: 0 0 0 7px rgba(30,201,139,0); } }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding: 9px 0 9px 36px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 13px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(30, 201, 139, 0.14);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%230d7a53" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>');
  background-size: 11px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 0 var(--emerald);
  transition: box-shadow 0.4s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(6, 13, 10, 0.12); }
.card:hover::after { box-shadow: inset 0 0 0 1.5px var(--emerald); }
.card h3 { font-family: var(--serif); font-size: 22px; font-weight: 700; }
.card .num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--emerald-deep);
  display: block;
  margin-bottom: 14px;
}
.card p { color: var(--muted); font-size: 15.5px; }
.card .icon {
  font-size: 26px;
  display: inline-grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(30, 201, 139, 0.12);
  margin-bottom: 18px;
  transition: transform 0.4s var(--ease), background 0.3s;
}
.card:hover .icon { transform: rotate(-8deg) scale(1.1); background: rgba(30, 201, 139, 0.2); }

/* teacher cards (faculty page) */
.card .role { font-size: 14px; color: var(--muted); margin: 0; }
.card .mail {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-deep);
  word-break: break-all;
}
.card .initials {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream);
  background: linear-gradient(140deg, var(--bg-800), var(--bg-950));
  border: 3px solid rgba(30, 201, 139, 0.3);
}

.card--dark {
  background: var(--bg-800);
  border-color: var(--line-dark);
}
.card--dark h3 { color: #fff; }
.card--dark p { color: var(--muted-dark); }
.card--dark .num { color: var(--emerald-2); }
.card--dark:hover::after { box-shadow: inset 0 0 0 1.5px var(--emerald); }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(180px, auto); gap: 18px; }
.bento .span-2c { grid-column: span 2; }
.bento .span-2r { grid-row: span 2; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.gallery figure {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(6,13,10,0.14);
}
.gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter 0.5s;
}
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(6,13,10,0.85));
  color: #fff;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.gallery figure:hover figcaption { opacity: 1; transform: none; }
.gallery .g-tall { grid-row: span 2; }
.gallery .g-wide { grid-column: span 2; }
.gallery .g-3 { grid-column: span 3; }
.gallery figure { min-height: 220px; }

.tilt { transform-style: preserve-3d; will-change: transform; }

/* ---------- Faculty row ---------- */
.fac-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(300px, 78vw);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 6px 22px;
  scrollbar-width: thin;
  scrollbar-color: var(--emerald) transparent;
}
.fac-row::-webkit-scrollbar { height: 6px; }
.fac-row::-webkit-scrollbar-thumb { background: var(--emerald); border-radius: 6px; }
.fac-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.35s;
}
.fac-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(6,13,10,0.14); border-color: var(--emerald); }
.fac-card .ph {
  width: 104px; height: 104px;
  margin: 0 auto 16px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 3px solid rgba(30, 201, 139, 0.25);
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.fac-card:hover .ph { transform: scale(1.06) rotate(2deg); border-color: var(--emerald); }
.fac-card .initials {
  width: 104px; height: 104px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 34px;
  font-style: italic;
  color: var(--cream);
  background: linear-gradient(140deg, var(--bg-800), var(--bg-950));
  border: 3px solid rgba(30, 201, 139, 0.3);
}
.fac-card h3 { font-size: 18px; font-family: var(--serif); margin-bottom: 6px; }
.fac-card .role { font-size: 13.5px; color: var(--muted); line-height: 1.5; min-height: 42px; }
.fac-card .mail { display: block; margin-top: 12px; font-size: 12.5px; font-weight: 700; color: var(--emerald-deep); word-break: break-all; }

/* ---------- News ---------- */
.news-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.news-card .media { position: relative; overflow: hidden; }
.news-card .media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform 0.9s var(--ease); }
.news-card:hover .media img { transform: scale(1.07); }
.news-card .tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(247, 245, 238, 0.95);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg-900);
  font-weight: 700;
}
.news-card .body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.news-card .date { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.news-card h3 { font-size: 20px; font-family: var(--serif); margin-bottom: 10px; }
.news-card p { font-size: 14.5px; color: var(--muted); flex: 1; }
.news-card .more {
  margin-top: 16px;
  font-weight: 800;
  font-size: 14px;
  color: var(--emerald-deep);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.news-card .more .arr { transition: transform 0.25s var(--ease); }
.news-card .more:hover .arr { transform: translateX(5px); }

.news-placeholder {
  border: 2px dashed rgba(16, 25, 21, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  padding: 34px;
  text-align: center;
  color: var(--muted);
}
.news-placeholder .ico { font-size: 32px; margin-bottom: 10px; }
.news-placeholder strong { color: var(--bg-900); }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-left: 10px; padding-left: 40px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 12px; top: 10px; bottom: 10px;
  width: 2px;
  background: linear-gradient(var(--emerald), var(--amber));
  border-radius: 2px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.6s var(--ease) 0.2s;
}
.timeline.is-visible::before { transform: scaleY(1); }
.tl-item { position: relative; padding-bottom: 40px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -35px; top: 6px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 3.5px solid var(--emerald);
  box-shadow: 0 0 0 5px var(--paper);
  transition: background 0.3s, transform 0.3s var(--ease);
}
.tl-item:hover::before { background: var(--emerald); transform: scale(1.25); }
.tl-item--amber::before { border-color: var(--amber); }
.tl-year {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--emerald-deep);
  margin-bottom: 8px;
  font-weight: 700;
}
.tl-item h3 { font-family: var(--serif); font-size: 21px; margin-bottom: 8px; }
.tl-item p { color: var(--muted); font-size: 15.5px; margin: 0; }

/* ---------- Info cards ---------- */
.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s;
}
.info-card:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(6,13,10,0.1); border-color: rgba(30,201,139,0.5); }
.info-card h3 { font-family: var(--serif); font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.info-card h3 .ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(30, 201, 139, 0.12);
  font-size: 20px;
  flex: 0 0 auto;
  transition: transform 0.4s var(--ease);
}
.info-card:hover h3 .ico { transform: rotate(-8deg) scale(1.1); }
.info-card ul { list-style: none; padding: 0; margin: 0; }
.info-card li { padding: 8px 0 8px 24px; position: relative; font-size: 15.5px; }
.info-card li::before {
  content: "";
  position: absolute;
  left: 2px; top: 16px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--emerald);
}

/* ---------- CTA ---------- */
.cta-wrap { padding: 90px 0; }
.cta {
  position: relative;
  border-radius: 30px;
  padding: 64px 56px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
  background:
    radial-gradient(700px 380px at 88% -20%, rgba(30, 201, 139, 0.35), transparent 60%),
    radial-gradient(460px 300px at 4% 120%, rgba(242, 169, 59, 0.22), transparent 60%),
    linear-gradient(120deg, var(--bg-950), var(--bg-900) 55%, var(--bg-800));
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 32px;
  padding: 2px;
  background: conic-gradient(from var(--spin, 0deg), transparent 0%, transparent 65%, var(--emerald) 80%, var(--amber) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spinBorder 5s linear infinite;
  pointer-events: none;
}
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinBorder { to { --spin: 360deg; } }
.cta__orb {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  right: -100px; top: -120px;
  background: radial-gradient(circle, rgba(30,201,139,0.3), transparent 65%);
  animation: glowFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
}
.cta h2 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; color: #fff; margin-bottom: 10px; }
.cta h2 em { font-style: italic; color: var(--emerald-2); }
.cta p { color: #b9cfc3; max-width: 520px; margin: 0; }
.cta__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page hero (inner) ---------- */
.pagehero {
  position: relative;
  background:
    radial-gradient(800px 420px at 85% -30%, rgba(30, 201, 139, 0.18), transparent 60%),
    radial-gradient(500px 320px at 5% 130%, rgba(242, 169, 59, 0.12), transparent 60%),
    var(--bg-950);
  color: var(--cream);
  padding: calc(var(--header-h) + 84px) 0 96px;
  overflow: hidden;
}
.pagehero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.pagehero .container { position: relative; z-index: 1; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
  margin-bottom: 22px;
}
.crumbs a { color: var(--muted-dark); }
.crumbs a:hover { color: var(--emerald-2); }
.crumbs .sep { color: var(--emerald); }
.pagehero h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 6.4vw, 84px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: #fff;
  margin-bottom: 18px;
}
.pagehero h1 em { font-style: italic; color: var(--emerald-2); }
.pagehero .lead { color: #b9cfc3; max-width: 720px; font-size: 17.5px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-item {
  display: flex;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  align-items: flex-start;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, border-color 0.3s;
}
.contact-item:hover { transform: translateY(-5px); box-shadow: 0 20px 44px rgba(6,13,10,0.12); border-color: rgba(30,201,139,0.5); }
.contact-item .ico {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(30,201,139,0.12);
  font-size: 22px;
  flex: 0 0 auto;
}
.contact-item h3 { font-family: var(--serif); font-size: 17px; margin-bottom: 4px; }
.contact-item p { margin: 0; color: var(--muted); font-size: 15px; }
.contact-item a { color: var(--emerald-deep); font-weight: 700; word-break: break-word; }

.map-box {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 24px 54px rgba(6,13,10,0.12);
}
.map-box iframe { display: block; width: 100%; height: 420px; border: 0; }
.map-box__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  flex-wrap: wrap;
}
.map-box__bar p { margin: 0; font-weight: 700; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-950); color: var(--muted-dark); position: relative; overflow: hidden; }
.site-footer::before {
  content: "ВИИ";
  position: absolute;
  right: -30px;
  bottom: -90px;
  font-family: var(--serif);
  font-size: 340px;
  font-weight: 800;
  font-style: italic;
  color: rgba(255, 255, 255, 0.025);
  line-height: 1;
  pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 44px;
  padding: 72px 0 52px;
  position: relative;
}
.site-footer .brand__text strong { color: #fff; }
.site-footer .brand__text small { color: var(--muted-dark); }
.footer-about { margin-top: 20px; font-size: 14.5px; color: var(--muted-dark); max-width: 320px; }
.site-footer h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald-2);
  margin-bottom: 20px;
  font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 10px 0; font-size: 14.5px; }
.site-footer a { color: var(--muted-dark); transition: color 0.2s, padding-left 0.25s var(--ease); }
.site-footer a:hover { color: var(--emerald-2); padding-left: 6px; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-dark);
  font-size: 16px;
  transition: transform 0.3s var(--ease), background 0.3s, color 0.3s;
}
.socials a:hover { background: var(--emerald); color: var(--bg-950); transform: translateY(-4px) rotate(-6deg); padding-left: 0; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  position: relative;
}
.footer-bottom a { color: var(--emuted, var(--muted-dark)); color: var(--muted-dark); }
.footer-bottom a:hover { color: var(--emerald-2); padding-left: 0; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 50px; height: 50px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  font-size: 20px;
  color: var(--bg-900);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  visibility: hidden;
  transition: all 0.35s var(--ease);
  z-index: 800;
}
.to-top.is-visible { opacity: 1; transform: none; visibility: visible; }
.to-top:hover { background: var(--emerald); transform: translateY(-4px); }

/* ---------- 404 ---------- */
.err { min-height: 100svh; display: flex; align-items: center; background: var(--bg-950); color: var(--cream); }
.err h1 {
  font-family: var(--serif);
  font-size: clamp(100px, 20vw, 220px);
  font-weight: 800;
  line-height: 1;
  color: #fff;
  margin: 0 0 10px;
}
.err h1 em { font-style: italic; color: var(--emerald); }

/* ---------- Grids & utilities ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.mt-1 { margin-top: 14px; }
.mt-2 { margin-top: 28px; }
.mt-3 { margin-top: 44px; }
.text-center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .nav-list { gap: 0; }
  .nav-list a { padding: 8px 9px; font-size: 13.5px; }
}

@media (max-width: 1080px) {
  .main-nav, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .span-2c { grid-column: span 2; }
  .bento .span-2r { grid-row: span 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .g-wide { grid-column: span 2; }
  .gallery .g-3 { grid-column: span 2; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split__media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 76px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta { padding: 48px 34px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 36px); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .bento .span-2c { grid-column: span 1; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .g-tall, .gallery .g-wide, .gallery .g-3 { grid-column: span 1; grid-row: span 1; }
  .gallery figure { min-height: 260px; }
  .hero__inner { padding-bottom: 150px; }
  .hero__actions .btn { width: 100%; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 8px; padding-bottom: 18px; }
  .section { padding: 62px 0; }
  .sec-head { margin-bottom: 40px; }
  .stat { padding: 30px 22px; }
  .stat:nth-child(even) { border-left: 0; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .cta { padding: 42px 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .site-footer::before { font-size: 200px; bottom: -50px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .hero__title .word { transform: none; animation: none; }
  .hero__lead, .hero__actions { opacity: 1; animation: none; }
}
