/* ============================================================
   Сергій Середницький — Resume
   Pure CSS3. No frameworks. System fonts only.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --text: #222222;
  --text-secondary: #666666;
  --accent: #1d4ed8;
  --border: #e5e7eb;

  --max-width: 900px;
  --pad: 40px;

  --font: "Segoe UI", "Inter", "Roboto", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

a:hover {
  text-decoration: underline;
}

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px var(--pad) 48px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.section {
  margin-bottom: 48px;
}

.section:last-of-type {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* ---------- Header ---------- */
.header {
  text-align: center;
}

.name {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.title {
  font-size: 1.15rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 22px;
}

.contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin-bottom: 26px;
}

.contacts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contacts a {
  color: var(--text-secondary);
}

.contacts a:hover {
  color: var(--accent);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: #1746b0;
  text-decoration: none;
}

/* Subtle, non-accented social links */
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-link:hover {
  border-color: #cbd2da;
  color: var(--text);
  text-decoration: none;
}

/* ---------- Icons ---------- */
.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.icon-sm {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* ---------- About ---------- */
.prose p {
  color: var(--text);
  margin-bottom: 14px;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---------- Skills cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: #cbd2da;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}

.card-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.8;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
}

/* ---------- Experience ---------- */
.job {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease;
}

.job:last-child {
  margin-bottom: 0;
}

.job:hover {
  border-color: #cbd2da;
}

.job-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 16px;
  margin-bottom: 4px;
}

.job-role {
  font-size: 1.08rem;
  font-weight: 600;
}

.job-dates {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.job-company {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 14px;
}

.job-note {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.job-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 4px;
}

.job-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
}

.job-list li:last-child {
  margin-bottom: 0;
}

/* ---------- Education ---------- */
.edu {
  border-left: 3px solid var(--border);
  padding: 4px 0 4px 18px;
  margin-bottom: 18px;
  transition: border-color 0.15s ease;
}

.edu:last-child {
  margin-bottom: 0;
}

.edu:hover {
  border-left-color: var(--accent);
}

.edu-name {
  font-size: 1.02rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.edu-spec {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ---------- Simple lists (certs, languages) ---------- */
.simple-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.9;
}

.simple-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer p {
  margin-bottom: 4px;
}

.footer-updated {
  font-size: 0.82rem;
  opacity: 0.8;
}

/* ---------- Accessibility: focus ---------- */
a:focus-visible,
.btn:focus-visible,
.btn-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .container {
    padding: 36px 20px 36px;
  }

  .name {
    font-size: 1.7rem;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .divider {
    margin: 32px 0;
  }
}

@media (max-width: 520px) {
  .container {
    padding: 28px 16px 28px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .job {
    padding: 18px 18px;
  }

  .job-head {
    flex-direction: column;
    gap: 2px;
  }

  .job-dates {
    white-space: normal;
  }

  .contacts {
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- Print ---------- */
@media print {
  .header-actions,
  .btn-link {
    display: none;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card,
  .job {
    border-color: #ccc;
  }
}
