:root {
  --bg: #fff;
  --bg-soft: #f5f5f7;
  --card: #fff;
  --card-border: rgba(0, 0, 0, 0.08);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --radius: 18px;
  --maxw: 900px;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 2px 20px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ===== Toolbar (language + PDF) ===== */
.toolbar {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}
.lang__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.03em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lang__btn:hover { color: var(--text); }
.lang__btn.is-active {
  background: var(--accent);
  color: #fff;
}
.pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text);
  font: 600 13px/1 -apple-system, "SF Pro Text", sans-serif;
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.pdf-btn::before {
  content: "↓";
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}
.pdf-btn:hover {
  background: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

body {
  margin: 0;
  font-family: -apple-system, "SF Pro Text", "SF Pro Display", BlinkMacSystemFont,
    "Helvetica Neue", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

.page { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, #fbfbfd 0%, #fff 100%);
  border-bottom: 1px solid var(--card-border);
}
.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
  align-items: flex-end;
}
.hero__eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
  font-weight: 500;
}
.hero__name {
  font-family: -apple-system, "SF Pro Display", BlinkMacSystemFont, sans-serif;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.02;
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}
.hero__tagline {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.hero__contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
}
.hero__contacts li { display: flex; align-items: center; gap: 10px; }
.hero__contacts a { word-break: break-word; overflow-wrap: anywhere; }
.hero__contacts .ic {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--mono);
  flex-shrink: 0;
}

/* ===== Sections ===== */
.content { padding: 0 0 48px; }
.section { padding: 52px 0 8px; }
.section__title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--card-border);
}
.lead {
  font-size: 18px;
  color: var(--text);
  margin: 0;
  max-width: 70ch;
  line-height: 1.65;
}

/* ===== Cards ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.card:hover {
  background: var(--card);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}
.card__title { margin: 0 0 14px; font-size: 16px; font-weight: 600; color: var(--text); }
.card__list,
.job__list { margin: 0; padding: 0; list-style: none; }
.card__list li,
.job__list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.card__list li::before,
.job__list li::before {
  content: "·";
  position: absolute;
  left: 3px;
  color: var(--accent);
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
}

/* ===== Timeline ===== */
.timeline { display: flex; flex-direction: column; gap: 16px; }
.job {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.job:hover {
  background: var(--card);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.job__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.job__role { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.job__period {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.job__company {
  margin: 4px 0 14px;
  color: var(--accent);
  font-weight: 500;
  font-size: 15px;
}

/* ===== Education ===== */
.edu {
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 28px;
}
.edu__school { margin: 0 0 8px; font-size: 17px; font-weight: 600; }
.edu__line { margin: 3px 0; color: var(--text); font-size: 15px; }
.muted { color: var(--muted); }

/* ===== Tags ===== */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-family: var(--mono);
  font-size: 13px;
  padding: 7px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  color: var(--text);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tags li:hover {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Footer ===== */
.footer {
  margin-top: 48px;
  padding: 32px 0 56px;
  border-top: 1px solid var(--card-border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.footer p { margin: 0; }
.views-line {
  margin-top: 8px !important;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.4;
}
.views-line:empty,
.views-line span:empty { display: none; }

/* ===== Планшети ===== */
@media (max-width: 768px) {
  .page { padding: 0 20px; }
  .hero__inner { padding: 64px 20px 48px; }
  .cards { grid-template-columns: 1fr; }
  .section { padding-top: 40px; }
}

/* ===== Телефони ===== */
@media (max-width: 560px) {
  .toolbar { top: 10px; right: 10px; gap: 8px; }
  .lang__btn { padding: 6px 10px; font-size: 12px; }
  .pdf-btn { padding: 8px 12px; font-size: 12px; }
  .hero__inner { padding-top: 72px; gap: 24px; }
  .hero__tagline { font-size: 16px; }
  .job__head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .job__period { font-size: 12px; }
  .lead { font-size: 16.5px; }
  .card, .job, .edu { padding: 20px; }
  .tags li { font-size: 12px; padding: 6px 11px; }
}

/* ===== Дуже вузькі екрани ( < 380px ) ===== */
@media (max-width: 380px) {
  .pdf-btn { font-size: 0; padding: 8px; }
  .pdf-btn::before { font-size: 15px; }
  .hero__name { font-size: clamp(30px, 9vw, 42px); }
}

/* Print-friendly (кнопка PDF / Ctrl+P) */
@media print {
  :root {
    --bg: #fff;
    --bg-soft: #f5f5f7;
    --card: #fff;
    --card-border: rgba(0, 0, 0, 0.08);
    --text: #1d1d1f;
    --muted: #6e6e73;
    --accent: #0071e3;
    --accent-soft: rgba(0, 113, 227, 0.08);
    --shadow: none;
    --shadow-hover: none;
  }
  body { background: #fff; }
  .toolbar { display: none !important; }
  .views-line { display: none !important; }
  .hero { background: #fbfbfd; border-bottom: 1px solid rgba(0,0,0,0.08); }
  .card, .job, .edu { break-inside: avoid; box-shadow: none !important; }
  .card:hover, .job:hover { transform: none !important; }
  .section { padding-top: 24px; }
  a { color: var(--text); text-decoration: none; }
  @page { margin: 14mm; }
}
