/* ── LOCAL FONTS ── */
@font-face {
  font-family: 'CyrGaramond';
  src: url('fonts/garamond-Normal.ttf') format('truetype');
  font-weight: 400; font-style: normal;
}
@font-face {
  font-family: 'CyrGaramond';
  src: url('fonts/garamond-Italic.ttf') format('truetype');
  font-weight: 400; font-style: italic;
}
@font-face {
  font-family: 'CyrGaramond';
  src: url('fonts/garamond-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal;
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'CyrGaramond', serif;
  color: #fff; background: #050505; overflow-x: hidden;
  cursor: url('img/cursor-pen.svg') 2 2, auto;
}
a, button { cursor: pointer; }
.diss-paper { cursor: auto; font-family: 'CyrGaramond', serif; }

/* ── FADE-IN ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade     { opacity: 0; animation: fadeUp .85s ease forwards; }
.fade-1   { animation-delay: .12s; }
.fade-2   { animation-delay: .32s; }
.fade-3   { animation-delay: .52s; }
.fade-nav { animation-delay: .82s; }

/* ══ LANG BAR ══ */
.lang-bar {
  position: fixed; top: 22px; left: 28px;
  z-index: 300; display: flex; align-items: center; gap: 8px;
}
.lang-bar a { display: block; opacity: .55; transition: opacity .2s; line-height: 0; cursor: pointer; }
.lang-bar a:hover, .lang-bar a.active { opacity: 1; }
.lang-bar img { width: 26px; height: auto; border-radius: 2px; }

/* ══ BOTTOM NAV ══ */
.bottom-nav {
  position: fixed; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 300; display: flex; gap: 44px;
}
.bottom-nav a {
  position: relative; cursor: pointer;
  color: rgba(255,255,255,.4); text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: clamp(.72rem, .9vw, 1rem);
  font-weight: 400; letter-spacing: .15em;
  text-transform: uppercase; transition: color .25s;
  white-space: nowrap; padding-bottom: 4px;
}
.bottom-nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: rgba(255,255,255,.55);
  transform: scaleX(0); transform-origin: center;
  transition: transform .3s ease;
}
.bottom-nav a:hover { color: rgba(255,255,255,.9); }
.bottom-nav a:hover::after { transform: scaleX(1); }
.bottom-nav a.active { color: rgba(255,255,255,.9); }
.bottom-nav a.active::after { transform: scaleX(1); background: rgba(255,255,255,.3); }

/* ══════════════════════════════════════
   ГЛАВНАЯ
══════════════════════════════════════ */
.page-main {
  position: relative; width: 100%; height: 100vh;
  min-height: 600px; overflow: hidden; background: #000;
}
.bg-main {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 100%; height: 100%;
  background: url('../assets/img/photo-main.jpg') center center / contain no-repeat;
  z-index: 0;
}
.overlay-main {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right,
      rgba(0,0,0,.64) 0%, rgba(0,0,0,.08) 38%,
      rgba(0,0,0,.06) 55%, rgba(0,0,0,.54) 100%),
    linear-gradient(to bottom,
      rgba(0,0,0,.18) 0%, rgba(0,0,0,0) 18%,
      rgba(0,0,0,0) 72%, rgba(0,0,0,.28) 100%);
  z-index: 1;
}

/* ── Left info block ── */
.main-info {
  position: absolute; bottom: 13vh; left: 44px; z-index: 2;
}
.main-name {
  font-size: clamp(1.35rem, 1.7vw, 4.2rem);
  font-weight: 700; color: #fff;
  line-height: 1.2; margin-bottom: 7px;
  white-space: nowrap;
}
.main-degree {
  font-size: clamp(.88rem, 1.1vw, 2.5rem);
  color: rgba(255,255,255,.7); margin-bottom: 8px;
  white-space: nowrap;
}
.main-position {
  font-size: clamp(.92rem, 1.15vw, 2.6rem);
  color: rgba(255,255,255,.85);
  line-height: 1.4; margin-bottom: 18px;
  /* 2 lines via <br> in HTML */
}
.logo-link { display: inline-block; margin-bottom: 20px; line-height: 0; cursor: pointer; }
.logo-link img { height: clamp(62px, 5.4vw, 90px); width: auto; opacity: .85; transition: opacity .2s; }
.logo-link:hover img { opacity: 1; }

.main-contacts { display: flex; flex-direction: column; gap: 9px; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.72); text-decoration: none;
  font-size: clamp(.82rem, 1vw, 2.2rem);
  font-weight: 300; transition: color .2s; cursor: pointer;
}
.contact-item:hover { color: #fff; }
.ci { width: clamp(16px, 1.1vw, 24px); height: clamp(16px, 1.1vw, 24px); flex-shrink: 0; display: block; }
.ci-phone  { color: #4ade80; }
.ci-mobile { color: #60a5fa; }
.ci-email  { color: #fb923c; }

/* ── Right links block — left-aligned ── */
.main-links {
  position: absolute; bottom: 13vh; right: 44px;
  z-index: 2; max-width: 340px;
  text-align: left;           /* ← left-aligned */
}
.main-link-block { margin-bottom: 20px; }
.main-link-block a { text-decoration: none; cursor: pointer; }
.main-link-block a:hover .link-text { color: #fff; }
.link-text {
  font-size: clamp(.88rem, 1.1vw, 2.5rem);
  color: rgba(255,255,255,.72); line-height: 1.55; transition: color .2s;
}

/* ══════════════════════════════════════
   ДИССЕРТАЦИЯ
══════════════════════════════════════ */
.page-diss { position: relative; width: 100%; min-height: 100vh; overflow: hidden; }
.bg-diss {
  position: absolute; inset: 0;
  background: url('../assets/img/photo-dissertation.jpg') right center / cover no-repeat;
  z-index: 0;
}
.overlay-diss {
  position: absolute; inset: 0;
  background: linear-gradient(to right,
    rgba(0,0,0,.1) 0%, rgba(0,0,0,.03) 45%, rgba(0,0,0,0) 100%);
  z-index: 1;
}
.diss-wrap {
  position: relative; z-index: 2;
  display: flex; align-items: center;
  min-height: 100vh; padding: 60px 0 60px 6vw;
}
.diss-paper {
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  color: #0a0a0a;
  width: min(560px, 90vw); max-height: 88vh;
  overflow-y: auto;
  padding: clamp(24px, 2.8vw, 44px) clamp(22px, 3.2vw, 48px);
  box-shadow: 0 12px 50px rgba(0,0,0,.25);
  scrollbar-width: thin; scrollbar-color: #aaa transparent;
}
.diss-paper::-webkit-scrollbar { width: 4px; }
.diss-paper::-webkit-scrollbar-thumb { background: #aaa; }
.diss-paper h1 {
  font-size: clamp(1rem, 1.25vw, 1.25rem); font-weight: 700;
  text-align: center; text-transform: uppercase; letter-spacing: .06em;
  color: #0a0a0a; margin-bottom: 18px; line-height: 1.4;
}
.diss-paper .author-line { font-size: clamp(.82rem, .95vw, 1rem); color: #333; margin-bottom: 20px; }
.diss-paper .sec-num { font-size: clamp(.84rem, .95vw, 1rem); font-weight: 600; color: #0a0a0a; margin-top: 16px; margin-bottom: 7px; }
.diss-paper p { font-size: clamp(.8rem, .9vw, .98rem); line-height: 1.65; color: #111; margin-bottom: 9px; }
.diss-paper ul { margin: 0 0 10px 16px; }
.diss-paper ul li { font-size: clamp(.8rem, .9vw, .98rem); line-height: 1.65; color: #111; margin-bottom: 4px; }
.diss-paper .econ-heading {
  font-size: clamp(.95rem, 1.1vw, 1.2rem); font-weight: 700;
  text-align: center; color: #0a0a0a; margin: 22px 0 12px; line-height: 1.45;
}
.diss-paper a { color: inherit; text-decoration: none; cursor: auto; }
.diss-paper strong { color: #000; font-weight: 600; }

/* ══════════════════════════════════════
   НАУЧНЫЕ СТАТЬИ
══════════════════════════════════════ */
.page-articles {
  position: relative; width: 100%;
  height: 100vh; min-height: 600px; overflow: hidden;
}
.bg-articles {
  position: absolute; inset: 0;
  background: url('../assets/img/photo-articles.jpg') 58% center / cover no-repeat;
  z-index: 0;
}
.overlay-articles {
  position: absolute; inset: 0;
  background: linear-gradient(to right,
    rgba(10,12,16,.88) 0%, rgba(10,12,16,.70) 26%,
    rgba(10,12,16,.20) 48%, rgba(10,12,16,0)   62%);
  z-index: 1;
}
/* Raised — starts from top so nothing is cut off */
.articles-content {
  position: absolute;
  top: 8vh;                   /* ← raised, not centered */
  left: 44px; z-index: 2;
  max-width: min(48vw, 680px);
  max-height: 84vh;
  overflow-y: auto;
  scrollbar-width: none;      /* hidden but scrollable if needed */
}
.articles-content::-webkit-scrollbar { display: none; }

/* All articles text in CyrGaramond */
.art-heading-label {
  font-size: clamp(1.3rem, 2.2vw, 3.8rem);
  font-weight: 700; color: #fff; margin-bottom: 12px;
}
.art-title {
  font-size: clamp(1.05rem, 1.7vw, 3rem);
  font-style: italic;
  color: rgba(255,255,255,.82); line-height: 1.5; margin-bottom: 24px;
}
.art-theses-label {
  font-size: clamp(.82rem, 1.1vw, 1.8rem);
  color: rgba(255,255,255,.5); margin-bottom: 16px;
}
.thesis-item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.thesis-n {
  font-size: clamp(.88rem, 1.2vw, 2rem);
  color: rgba(255,255,255,.4); flex-shrink: 0; padding-top: 2px;
}
.thesis-text {
  font-size: clamp(.88rem, 1.2vw, 2rem);
  font-weight: 400; color: rgba(255,255,255,.78); line-height: 1.6;
}
.thesis-text strong { color: #fff; font-weight: 700; }
.art-status {
  font-size: clamp(.8rem, 1vw, 1.7rem);
  color: rgba(255,255,255,.4); font-style: italic; margin-top: 20px;
}

/* ══════════════════════════════════════
   MOBILE ≤ 768px
══════════════════════════════════════ */
@media (max-width: 768px) {
  .bg-main { background-size: cover !important; background-position: center 25% !important; }
  .main-name  { white-space: normal; font-size: clamp(1.4rem, 5.5vw, 2rem); }
  .main-degree  { white-space: normal; }
  .main-position { white-space: normal; }
  .main-links { display: none; }
  .main-info { left: 20px; right: 20px; bottom: 9vh; max-width: 90vw; }
  .bg-articles { background-position: 60% center !important; }
  .articles-content { left: 18px; max-width: 88vw; top: 7vh; }
  .diss-wrap { padding: 60px 16px; }
  .diss-paper { max-height: 80vh; }
  .bottom-nav { gap: 18px; }
  .bottom-nav a { letter-spacing: .08em; }
}
@media (max-width: 420px) {
  .bg-articles { background-position: 63% center !important; }
  .bottom-nav { gap: 10px; }
  .bottom-nav a { font-size: .6rem; letter-spacing: .04em; }
}

/* ══ 4K ≥ 2560px ══ */
@media (min-width: 2560px) {
  .main-info  { left: 80px; }
  .main-links { right: 80px; max-width: 600px; }
  .bottom-nav { gap: 80px; bottom: 44px; }
  .lang-bar   { top: 44px; left: 60px; }
  .lang-bar img { width: 36px; }
  .articles-content { left: 80px; max-width: min(50vw, 960px); top: 8vh; }
  .diss-wrap  { padding-left: 10vw; }
  .diss-paper { width: min(720px, 90vw); }
}

@media (prefers-reduced-motion: reduce) {
  .fade { animation: none; opacity: 1; }
  * { transition: none !important; }
}
