/* Kseniia Nikitina — personal academic website
   Colors and fonts live here; change them once and every page updates. */

:root {
  --bg: #faf7f2;          /* warm paper background */
  --surface: #ffffff;     /* cards and header */
  --text: #2d2c2a;
  --muted: #6b6762;
  --accent: #1a5490;      /* headings and nav */
  --link: #1d4ed8;
  --border: #e7e2d9;
  --accent-soft: #e8eef5;
  --shadow: 0 1px 3px rgba(40, 35, 25, 0.08);
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .site-name, .nav a {
  font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--accent);
  font-weight: 600;
}

h1 { font-size: 1.75rem; font-variant: small-caps; margin: 0 0 0.75rem; letter-spacing: 0.01em; }
h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
h3 { font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(40, 35, 25, 0.08);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.site-name { font-size: 1.1rem; color: var(--accent); white-space: nowrap; }
.site-name:hover { text-decoration: none; }
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 5px 10px;
  border-radius: 4px;
  border-left: 3px solid transparent;
}
.nav a:hover { background: var(--accent-soft); text-decoration: none; }
.nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 28px 64px;
}

.about {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 52px;
  align-items: start;
}
.portrait {
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  border: 4px solid var(--surface);
  box-shadow: 0 2px 10px rgba(40, 35, 25, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Raleway", sans-serif;
  font-size: 3rem;
  font-weight: 600;
  color: var(--accent);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  font-size: 0.92rem;
  text-align: center;
}
.contact-list li { margin: 4px 0; }

.about p { margin: 0 0 1rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin: 0 0 18px;
}
.card .title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.card .meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 10px; }
.card p { margin: 0 0 10px; font-size: 0.95rem; }

.dash-list { list-style: none; padding: 0; margin: 8px 0 0 12px; font-size: 0.95rem; }
.dash-list li { position: relative; padding-left: 22px; margin: 4px 0; }
.dash-list li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }

.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  background: var(--surface);
}
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #134170; }

details { margin-top: 6px; font-size: 0.95rem; }
details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸ "; }
details[open] summary::before { content: "▾ "; }
details p { margin-top: 10px; }

/* ---------- Pages with a side menu (Research, CV) ---------- */
.with-sidebar {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 40px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 100px;
  font-size: 0.9rem;
}
.sidebar a { display: block; color: var(--text); padding: 7px 0; }
.sidebar a:hover { color: var(--accent); }
.with-sidebar h2:first-of-type { margin-top: 1.5rem; }

/* ---------- CV ---------- */
.cv-entry { margin: 0 0 20px; }
.cv-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cv-row .when { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.cv-entry p { margin: 2px 0; font-size: 0.95rem; }
.cv-entry ul { margin: 6px 0 0; padding-left: 20px; font-size: 0.95rem; }
.cv-entry li { margin: 3px 0; }
.label { font-style: italic; color: var(--muted); }
.skill { font-weight: 700; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.tags li {
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 12px;
}

/* ---------- Footer ---------- */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 28px 40px;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .header-inner { padding: 0 16px; gap: 14px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav { gap: 2px; }
  main { padding: 28px 16px 48px; }
  .about, .with-sidebar { grid-template-columns: 1fr; gap: 24px; }
  .portrait { width: 150px; height: 150px; font-size: 2.4rem; }
  .sidebar { display: none; }
  .card { padding: 18px; }
  footer { padding: 20px 16px 32px; }
}
