/* ===================================================================
   Demetre Bzekalava — personal site
   =================================================================== */
:root {
  --bg: #0e1014;
  --bg-soft: #14181f;
  --card: #171c25;
  --card-2: #1b2029;
  --text: #eef1f5;
  --muted: #9aa5b3;
  --muted-2: #6f7a89;
  --accent: #5b93ff;
  --accent-2: #7cd0ff;
  --accent-soft: rgba(91, 147, 255, 0.14);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.32);
  --radius: 18px;
  --radius-sm: 13px;
  --maxw: 940px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1100px 560px at 50% -12%, #1b2740 0%, transparent 62%),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }

/* ===== Nav ===== */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(14, 16, 20, 0.78);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.nav a {
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: 999px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a.active { color: var(--text); background: var(--accent-soft); }

/* ===== Layout ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 52px 24px 90px; }
.section { margin-top: 54px; }
.section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===== Hero ===== */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 46px 24px 8px;
  max-width: 720px;
  margin: 0 auto;
}
.avatar {
  width: 172px;
  height: 172px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid var(--border-strong);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 44px;
  font-weight: 750;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.hero .role {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 20px;
}
.hero .bio {
  color: var(--muted);
  max-width: 600px;
  font-size: 17px;
}

/* ===== Badges ===== */
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}
.badge {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 15px;
  border-radius: 999px;
}
.badge span { color: var(--accent-2); margin-right: 6px; }

/* ===== Buttons / links ===== */
.cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}
.btn {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--accent-soft); border-color: var(--accent); }

.links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 19px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.social .icon { display: inline-flex; }
.social svg { width: 19px; height: 19px; display: block; }
.social:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.social.cv { background: var(--accent); border-color: transparent; color: #fff; }
.social.cv:hover { filter: brightness(1.08); background: var(--accent); }

/* ===== Section tiles (home navigation) ===== */
.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  transition: all 0.2s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.tile h3 { color: var(--text); font-size: 19px; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 15px; }
.tile .arrow { color: var(--accent); font-weight: 700; }

/* ===== Honours ===== */
.honours { list-style: none; display: grid; gap: 12px; }
.honours li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 15.5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
}
.honours li::before {
  content: "★";
  color: var(--accent);
  flex: none;
  font-size: 14px;
  margin-top: 2px;
}

/* ===== Page head (subpages) ===== */
.page-head { text-align: center; margin-bottom: 42px; }
.page-head h1 { font-size: 36px; font-weight: 750; letter-spacing: -0.025em; margin-bottom: 10px; }
.page-head p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.back:hover { color: var(--text); }

/* ===== Entry cards (experience / education) ===== */
.entry {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.entry.no-media { grid-template-columns: 1fr; }
.entry-media {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, #1d2431, #11141b);
  border: 1px solid var(--border);
}
.entry-media::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--muted-2);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.entry-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
/* logo mode: clean white brand panel */
.entry-media.logo { background: #ffffff; border: 1px solid var(--border); }
.entry-media.logo::after { display: none; }
.entry-media.logo img { object-fit: contain; padding: 26px; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.entry-head h3 { font-size: 20px; color: var(--text); }
.entry-meta { color: var(--muted-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.entry-role { color: var(--accent); font-weight: 600; font-size: 15px; margin: 4px 0 12px; }
.entry ul { list-style: none; display: grid; gap: 9px; }
.entry ul li { position: relative; padding-left: 20px; color: var(--muted); font-size: 15.5px; }
.entry ul li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ===== Project grid ===== */
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.pcard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.pcard .phead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pcard h3 { font-size: 19px; color: var(--text); }
.pcard .pmeta { color: var(--muted-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pcard .prole { color: var(--accent); font-weight: 600; font-size: 14px; margin: 4px 0 12px; }
.pcard p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag {
  font-size: 12px; font-weight: 600; color: var(--accent-2);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 11px;
}

/* ===== Research hub cards ===== */
.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.rcard {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.rcard:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.rcard .rnum { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.rcard h3 { font-size: 21px; color: var(--text); margin: 8px 0 10px; }
.rcard p { color: var(--muted); font-size: 15px; flex: 1; }
.rcard .view { color: var(--accent); font-weight: 700; font-size: 14.5px; margin-top: 16px; }

/* ===== Q&A cards (research pages) ===== */
.qa {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.qa .q { display: flex; gap: 12px; align-items: flex-start; font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.qa .q .num { color: var(--accent); flex: none; }
.qa .a { color: var(--muted); font-size: 16.5px; }
.qa .a sup { font-size: 0.72em; }

/* ===== Highlight points ===== */
.point {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.point h3 { font-size: 18px; margin-bottom: 8px; color: var(--text); }
.point p { color: var(--muted); font-size: 16px; }

.lead { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 20px; }
.lead h2 { font-size: 20px; margin-bottom: 8px; }
.lead p { color: var(--muted); }
.section-label { text-transform: uppercase; letter-spacing: 0.14em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 40px 0 18px; }

.sources { color: var(--muted-2); font-size: 14px; border-top: 1px solid var(--border); margin-top: 30px; padding-top: 18px; }

/* ===== Footer ===== */
.footer { text-align: center; color: var(--muted-2); font-size: 14px; padding: 30px 16px 50px; border-top: 1px solid var(--border); margin-top: 40px; }

/* ===== Responsive ===== */
@media (max-width: 680px) {
  .hero h1 { font-size: 33px; }
  .avatar { width: 144px; height: 144px; }
  .wrap { padding: 40px 18px 70px; }
  .tiles, .grid2, .rgrid { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry-media { aspect-ratio: 16 / 9; }
  .qa, .point, .lead { padding: 20px; }
  .page-head h1 { font-size: 29px; }
}
