* { box-sizing: border-box; }

body {
  margin: 0;
  background: oklch(0.94 0.006 250);
  font-family: 'IBM Plex Sans', sans-serif;
  padding: 32px 16px;
  display: flex;
  justify-content: center;
}

a { color: oklch(0.5 0.14 235); text-decoration: none; }
a:hover { color: oklch(0.4 0.16 235); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: oklch(0.75 0.01 250); border-radius: 4px; }

.card {
  width: 100%;
  max-width: 1100px;
  background: oklch(0.99 0.004 250);
  border-radius: 12px;
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.12);
  overflow: hidden;
  position: relative;
}

/* Header */
.header {
  background: oklch(0.16 0.03 250);
  color: #fff;
  padding: 56px 64px 44px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.header-info { display: flex; flex-direction: column; gap: 8px; }

.name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

.title { font-size: 19px; color: oklch(0.7 0.05 250); font-weight: 600; }

.summary {
  font-size: 14px;
  color: oklch(0.75 0.01 250);
  max-width: 560px;
  line-height: 1.6;
  margin: 6px 0 0;
}

.lang-toggle {
  border: 1px solid oklch(0.4 0.02 250);
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.lang-toggle:hover { background: oklch(0.25 0.02 250); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 14px;
  color: oklch(0.8 0.01 250);
  align-items: center;
}
.contact-row a.email { color: oklch(0.85 0.01 250); }
.contact-row a.telegram { color: oklch(0.7 0.05 250); }

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 22px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s ease;
  font-family: inherit;
}

.btn-pdf {
  background: oklch(0.7 0.05 250);
  color: oklch(0.16 0.03 250);
  font-weight: 700;
}
.btn-pdf:hover { background: oklch(0.76 0.05 250); }

.btn-docx { background: oklch(0.24 0.02 250); color: #fff; }
.btn-docx:hover { background: oklch(0.3 0.02 250); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid oklch(0.4 0.02 250);
}
.btn-outline:hover { background: oklch(0.25 0.02 250); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid oklch(0.9 0.004 250);
}

.stat {
  padding: 28px 24px;
  text-align: center;
  border-right: 1px solid oklch(0.9 0.004 250);
}
.stat:last-child { border-right: none; }

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: oklch(0.32 0.09 250);
}

.stat-label { font-size: 12.5px; color: oklch(0.45 0.01 250); margin-top: 4px; }

/* Body grid */
.body-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
}

.main-col {
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  color: oklch(0.2 0.02 250);
  border-right: 1px solid oklch(0.92 0.004 250);
  min-width: 0;
}

.side-col {
  padding: 44px 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  background: oklch(0.975 0.006 250);
}

.block { display: flex; flex-direction: column; gap: 18px; }

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.32 0.09 250);
}
.section-label.small { font-size: 13px; }

/* Experience */
.experience-list { display: flex; flex-direction: column; gap: 18px; }

.job { display: flex; gap: 16px; }

.job-dot-col { width: 10px; padding-top: 6px; flex-shrink: 0; }

.job-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: oklch(0.7 0.05 250);
}

.job-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }

.job-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.job-role { font-size: 16px; font-weight: 700; }
.job-period { font-size: 12.5px; color: oklch(0.5 0.01 250); white-space: nowrap; }
.job-company { font-size: 13.5px; color: oklch(0.32 0.09 250); font-weight: 600; }

.job-bullets {
  margin: 2px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-bullets li { font-size: 14px; line-height: 1.55; color: oklch(0.3 0.01 250); }

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.project-card {
  border: 1px solid oklch(0.9 0.004 250);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: oklch(0.995 0.002 250);
}

.project-title { font-size: 14.5px; font-weight: 700; }
.project-desc { font-size: 13px; line-height: 1.5; color: oklch(0.4 0.01 250); }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag {
  font-size: 11px;
  background: oklch(0.92 0.012 250);
  color: oklch(0.32 0.03 250);
  padding: 3px 9px;
  border-radius: 10px;
  font-weight: 600;
}

/* Education */
.education-list { display: flex; flex-direction: column; gap: 14px; }
.edu-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.edu-degree { font-size: 14.5px; }
.edu-degree b { font-weight: 700; }
.edu-period { font-size: 12.5px; color: oklch(0.5 0.01 250); white-space: nowrap; }

/* Sidebar: skills */
.skill-groups { display: flex; flex-direction: column; gap: 16px; }
.skill-group { display: flex; flex-direction: column; gap: 8px; }
.skill-group-name { font-size: 12px; font-weight: 700; color: oklch(0.35 0.01 250); }
.skill-items { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-chip {
  font-size: 12px;
  background: #fff;
  border: 1px solid oklch(0.88 0.004 250);
  padding: 5px 10px;
  border-radius: 14px;
  color: oklch(0.25 0.01 250);
}

.cert-list, .lang-list { display: flex; flex-direction: column; gap: 10px; }
.cert-item { font-size: 13px; color: oklch(0.28 0.01 250); line-height: 1.5; }
.lang-item { font-size: 13.5px; color: oklch(0.28 0.01 250); }
.lang-item b { font-weight: 600; }

/* Toast */
.toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: oklch(0.16 0.03 250);
  color: #fff;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.toast.visible { opacity: 1; }

/* PDF export snapshot: hide interactive-only chrome, force clean page look */
#app.exporting { box-shadow: none; border-radius: 0; }
.exporting .btn-row,
.exporting .lang-toggle,
.exporting .toast { display: none !important; }

/* Responsive */
@media (max-width: 860px) {
  .header { padding: 40px 28px 32px; }
  .name { font-size: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .body-grid { grid-template-columns: 1fr; }
  .main-col { border-right: none; padding: 36px 28px; }
  .side-col { padding: 36px 28px; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { padding: 12px 0; }
  .card { border-radius: 0; }
  .header { padding: 32px 20px 24px; }
  .name { font-size: 26px; }
  .btn-row { gap: 8px; }
  .btn { padding: 9px 14px; font-size: 12.5px; }
}
