/* ═══════════════════════════════════════════
   ACADEMIC HOMEPAGE — Viacheslav Iablochnikov
   Inspired by anyirao.com, myownskyw7.github.io
   ═══════════════════════════════════════════ */

/* ── Reset & Base ────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.72;
  color: #222;
  background: #fff;
}

a { color: #1a6fb5; text-decoration: none; }
a:hover { text-decoration: underline; }

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

code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.88em;
  background: #f4f4f4;
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Navigation ──────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #e0e0e0;
  backdrop-filter: blur(6px);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-name {
  font-family: 'Crimson Pro', 'Georgia', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-name:hover { text-decoration: none; color: #1a6fb5; }

.nav-links {
  display: flex;
  gap: 1.4rem;
  margin-left: auto;
}

.nav-links a {
  font-size: 0.9rem;
  color: #444;
  font-weight: 400;
}
.nav-links a:hover { color: #1a6fb5; text-decoration: none; }

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #444;
  margin-left: auto;
  padding: 0;
  line-height: 1;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  padding: 0.5rem 1.25rem 1rem;
  gap: 0.6rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 0.95rem; color: #333; padding: 0.2rem 0; }

/* ── Page Wrapper ────────────────────────── */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Profile Section ─────────────────────── */
.profile-section {
  display: flex;
  gap: 2.8rem;
  padding: 2.8rem 0 2.2rem;
  border-bottom: 1px solid #ebebeb;
}

/* Left column */
.profile-left {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar placeholder SVG */
.avatar-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.avatar-placeholder svg { width: 100%; height: 100%; }

/* Use this class instead of .avatar-placeholder when adding a real photo */
.avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.profile-name {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
  margin-bottom: 0.35rem;
}

.profile-title {
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 0.15rem;
}

.profile-affil {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.1rem;
}
.profile-affil.muted-text { color: #888; }

.contact-line {
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

.social-row {
  margin-top: 0.5rem;
  font-size: 0.83rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
}
.social-link { color: #1a6fb5; }
.social-sep { color: #aaa; }

.cv-btn {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.83rem;
  background: #1a6fb5;
  color: #fff;
  padding: 0.3rem 0.9rem;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.cv-btn:hover { background: #145a94; text-decoration: none; }

.affil-logos {
  margin-top: 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.affil-logos img { max-width: 130px; max-height: 36px; object-fit: contain; }

/* Right column */
.profile-right { flex: 1 1 0; min-width: 0; }

.section-title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.65rem;
  padding-bottom: 0.25rem;
  border-bottom: 1.5px solid #d0d0d0;
}

.profile-right p { font-size: 0.94rem; margin-bottom: 0.7rem; }

.kw-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.9rem;
}
.kw {
  font-size: 0.78rem;
  background: #eef4fb;
  color: #1a6fb5;
  border: 1px solid #c4daf0;
  border-radius: 20px;
  padding: 0.15rem 0.7rem;
  font-weight: 600;
}

/* ── Content Sections ────────────────────── */
.content-section {
  padding: 2.2rem 0;
  border-bottom: 1px solid #ebebeb;
}
.content-section:last-of-type { border-bottom: none; }

/* ── News ────────────────────────────────── */
.news-list { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.5rem; }

.news-item {
  display: flex;
  gap: 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

.nd {
  flex: 0 0 72px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  padding-top: 0.05rem;
  white-space: nowrap;
}

.news-item em { font-style: italic; }

/* ── Publications ────────────────────────── */
.paper-card {
  display: flex;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.paper-card:last-child { border-bottom: none; }

.paper-thumb {
  flex: 0 0 130px;
}
.paper-thumb img {
  width: 130px;
  height: 95px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e4e4e4;
}

.paper-info { flex: 1 1 0; min-width: 0; }

.paper-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.25rem;
  line-height: 1.45;
}

.paper-authors {
  font-size: 0.86rem;
  color: #555;
  margin-bottom: 0.2rem;
}
.paper-authors u { text-decoration: underline; color: #333; }

.paper-venue {
  font-size: 0.86rem;
  color: #888;
  margin-bottom: 0.2rem;
}

.paper-note {
  font-size: 0.83rem;
  color: #777;
  margin-bottom: 0.2rem;
}

.plinks {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.plinks a { color: #1a6fb5; font-weight: 600; }
.plinks a:hover { text-decoration: underline; }

/* ── Projects ────────────────────────────── */
.proj-row {
  display: flex;
  gap: 1.4rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.proj-row:last-child { border-bottom: none; }

.proj-media {
  flex: 0 0 200px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.proj-media img, .proj-media video {
  width: 200px;
  height: 130px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e4e4e4;
}

.proj-details { flex: 1 1 0; min-width: 0; }

.proj-tag {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.proj-details h3 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.proj-details p {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Inline institution logos */
.ilogo {
  height: 18px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  border-radius: 2px;
}
.ilogo-circle { border-radius: 50%; }

/* ── Honors / Two-column layout ──────────── */
.two-col-wide {
  display: flex;
  gap: 3rem;
}
.tc-left { flex: 1 1 0; min-width: 0; }
.tc-right { flex: 1 1 0; min-width: 0; }

.honors-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.5rem;
  font-size: 0.91rem;
}
.honors-list li { display: flex; gap: 0.8rem; line-height: 1.5; }
.hy {
  flex: 0 0 62px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #888;
  padding-top: 0.05rem;
  white-space: nowrap;
}

.mt2 { margin-top: 1.8rem; }

/* Education */
.edu-block {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f2f2f2;
}
.edu-block:last-of-type { border-bottom: none; }
.edu-logo { flex: 0 0 80px; display: flex; align-items: flex-start; padding-top: 4px; }
.edu-logo img { max-width: 78px; max-height: 34px; object-fit: contain; }
.edu-block p { font-size: 0.88rem; margin-bottom: 0.2rem; line-height: 1.5; }
.edu-block p.muted { color: #666; }

/* Skills table */
.skills-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  margin-top: 0.5rem;
}
.skills-tbl td {
  padding: 0.35rem 0.6rem 0.35rem 0;
  vertical-align: top;
  border-bottom: 1px solid #f2f2f2;
}
.skills-tbl td:first-child {
  white-space: nowrap;
  color: #333;
  padding-right: 1rem;
  width: 130px;
}
.skills-tbl tr:last-child td { border-bottom: none; }

/* ── Footer ──────────────────────────────── */
.site-footer {
  padding: 1.8rem 0 2.2rem;
  text-align: center;
  font-size: 0.82rem;
  color: #999;
  border-top: 1px solid #ebebeb;
  margin-top: 1rem;
}
.site-footer a { color: #888; }
.site-footer a:hover { color: #1a6fb5; }

/* ── Responsive ──────────────────────────── */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .burger { display: block; }

  .profile-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.4rem;
    padding: 1.8rem 0 1.4rem;
  }
  .profile-left { flex: none; width: 100%; }
  .affil-logos { flex-direction: row; justify-content: center; }
  .kw-row { justify-content: center; }

  .paper-card { flex-direction: column; gap: 0.8rem; }
  .paper-thumb img { width: 100%; height: 160px; }

  .proj-row { flex-direction: column; gap: 0.8rem; }
  .proj-media { flex: none; }
  .proj-media img, .proj-media video { width: 100%; height: 180px; }

  .two-col-wide { flex-direction: column; gap: 0; }

  .edu-block { flex-direction: column; gap: 0.5rem; }
  .edu-logo { flex: none; }
}

@media (max-width: 500px) {
  .page-wrap { padding: 0 1rem; }
  .profile-name { font-size: 1.25rem; }
  .section-title { font-size: 1.15rem; }
}
