:root {
  --bg-page: #0b1120;
  --bg-sheet: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --accent: #059669;
  --accent-dark: #047857;
  --cyan: #0284c7;
  --border: #e2e8f0;
  --banner: #0f172a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-page);
  color: var(--ink);
  line-height: 1.5;
  padding: 28px 16px 48px;
  -webkit-user-select: none;
  user-select: none;
}

.toolbar {
  max-width: 820px;
  margin: 0 auto 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cv-lang-switcher {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
  gap: 2px;
}

.cv-lang-btn {
  padding: 6px 11px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.cv-lang-btn:hover {
  color: #f8fafc;
}

.cv-lang-btn.active {
  background: #10b981;
  color: #06281c;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tool-btn:hover {
  transform: translateY(-1px);
  border-color: #10b981;
  background: #1e293b;
}

.tool-btn.primary {
  background: #10b981;
  border-color: #10b981;
  color: #06281c;
}

.tool-btn.primary:hover {
  background: #34d399;
  border-color: #34d399;
}

.sheet {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-sheet);
  border-top: 8px solid #10b981;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cv-header {
  background: var(--banner);
  color: #ffffff;
  padding: 30px 42px 24px;
}

.cv-name {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.cv-role {
  margin-top: 5px;
  font-size: 1.02rem;
  font-weight: 600;
  color: #38bdf8;
}

.cv-meta {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.cv-meta a {
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px dotted rgba(226, 232, 240, 0.4);
}

.cv-meta a:hover {
  color: #34d399;
  border-bottom-color: #34d399;
}

.cv-body {
  padding: 28px 42px 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.section-title {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
  padding-bottom: 5px;
  border-bottom: 1.5px solid #cbd5e1;
  margin-bottom: 10px;
}

.summary-text {
  font-size: 0.94rem;
  color: #1e293b;
}

.skills-grid {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 6px 14px;
  font-size: 0.91rem;
}

.skill-cat {
  font-weight: 700;
  color: var(--ink);
}

.skill-vals {
  color: #334155;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.project-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.project-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}

.project-stack {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.79rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.project-desc {
  font-size: 0.89rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.cert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.cert-table td {
  padding: 4px 0;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}

.cert-table tr:last-child td {
  border-bottom: none;
}

.cert-name {
  font-weight: 700;
  color: var(--ink);
  width: 41%;
  padding-right: 12px;
}

.cert-issuer {
  color: #334155;
  padding-right: 12px;
}

.cert-issuer a {
  color: var(--cyan);
  text-decoration: none;
}

.cert-date {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-align: right;
  white-space: nowrap;
}

.lang-list {
  font-size: 0.91rem;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cv-footer {
  padding: 14px 42px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.79rem;
  color: #64748b;
}

@media (max-width: 640px) {
  .cv-header, .cv-body, .cv-footer { padding-left: 20px; padding-right: 20px; }
  .skills-grid { grid-template-columns: 1fr; gap: 2px 0; }
  .skills-grid .skill-cat { margin-top: 6px; }
  .cert-table, .cert-table tbody, .cert-table tr, .cert-table td { display: block; width: 100%; }
  .cert-table tr { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
  .cert-table td { border-bottom: none; padding: 1px 0; text-align: left; }
}

@media print {
  body { background: #ffffff; padding: 0; -webkit-user-select: text; user-select: text; }
  .toolbar { display: none !important; }
  .sheet { box-shadow: none; border-radius: 0; max-width: 100%; }
  .cv-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { size: A4; margin: 0; }
}

