:root { --ink: #11120f; --muted: #666860; --line: #d2d3cc; --paper: #fff; --lime: #c7ff3d; --sans: "Manrope", sans-serif; --mono: "DM Mono", monospace; }
html[data-theme="dark"] { color-scheme: dark; --ink: #f2f3ed; --muted: #afb1a9; --line: #3b3d37; --paper: #151613; }
* { box-sizing: border-box; }
body { margin: 0; background: #e8e9e4; color: var(--ink); font-family: var(--sans); line-height: 1.45; letter-spacing: 0; }
.cv-toolbar { position: sticky; z-index: 10; top: 0; display: flex; justify-content: space-between; align-items: center; width: min(210mm, calc(100% - 32px)); margin: 0 auto; padding: 14px 0; background: #e8e9e4; font-size: 13px; }
.cv-toolbar a { color: inherit; text-decoration: none; }
.cv-toolbar button { padding: 10px 15px; border: 0; background: var(--ink); color: white; font: 600 12px var(--sans); cursor: pointer; }
.cv-toolbar-actions, .cv-languages { display: flex; align-items: center; gap: 8px; }
.cv-languages { height: 34px; gap: 0; border: 1px solid var(--line); }
.cv-languages a { display: grid; min-width: 32px; height: 100%; place-items: center; color: inherit; font: 9px var(--mono); text-decoration: none; }
.cv-languages a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.cv-toolbar .theme-toggle { position: relative; display: grid; width: 36px; height: 36px; padding: 0; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--ink); }
.theme-toggle span { position: absolute; font-size: 17px; transition: opacity .2s, transform .2s; }
.theme-dark, html[data-theme="dark"] .theme-light { opacity: 0; transform: scale(.7); }
html[data-theme="dark"] .theme-dark { opacity: 1; transform: scale(1); }
.cv-page { width: 210mm; min-height: 297mm; margin: 0 auto 40px; padding: 18mm 17mm; background: var(--paper); box-shadow: 0 15px 50px rgba(17, 18, 15, .12); }
.cv-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; }
.cv-label, .cv-block h2, .cv-section > h2 { margin: 0 0 14px; font: 500 9px var(--mono); text-transform: uppercase; }
h1 { margin: 0; font-size: 54px; font-weight: 600; line-height: .9; }
.cv-role { display: grid; gap: 5px; text-align: right; }
.cv-role strong { font-size: 15px; }
.cv-role span { color: var(--muted); font-size: 11px; }
.cv-accent { height: 8px; margin: 30px 0 34px; background: var(--lime); }
.cv-layout { display: grid; grid-template-columns: 52mm 1fr; gap: 13mm; }
aside { padding-right: 10mm; border-right: 1px solid var(--line); }
.cv-block { margin-bottom: 29px; }
.contact-list, .skill-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { margin-bottom: 12px; overflow-wrap: anywhere; font-size: 10px; }
.contact-list span { display: block; margin-bottom: 2px; color: var(--muted); font: 8px var(--mono); text-transform: uppercase; }
.skill-list li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.cv-block > p { margin: 0 0 7px; font-size: 10px; }
.cv-section { margin-bottom: 26px; }
.cv-section > h2 { padding-bottom: 9px; border-bottom: 1px solid var(--ink); }
.profile-text { margin: 0; color: #3e403b; font-size: 11px; }
.cv-entry { margin-top: 16px; }
.cv-entry + .cv-entry { padding-top: 14px; border-top: 1px solid var(--line); }
.cv-entry-heading { display: flex; justify-content: space-between; gap: 20px; }
.cv-entry h3 { margin: 0; font-size: 12px; }
.cv-entry p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.cv-entry time { flex: 0 0 auto; font: 8px var(--mono); text-transform: uppercase; }
.cv-entry ul { margin: 10px 0 0; padding-left: 16px; color: #3e403b; font-size: 9.5px; }
.cv-entry li { margin-bottom: 4px; }
.cv-entry.compact { margin-top: 12px; }
.optional p { color: var(--muted); font-size: 10px; }
html[data-theme="dark"] body { background: #0b0c09; }
html[data-theme="dark"] .cv-toolbar { background: #0b0c09; }

@media (max-width: 850px) {
  .cv-page { width: calc(100% - 24px); min-height: 0; padding: 32px 24px; }
  .cv-toolbar { width: calc(100% - 24px); }
  .cv-layout { grid-template-columns: 1fr; }
  aside { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding: 0; border: 0; }
}
@media (max-width: 560px) {
  .cv-header, .cv-entry-heading { align-items: flex-start; flex-direction: column; }
  .cv-role { text-align: left; }
  .cv-layout, aside { display: block; }
  h1 { font-size: 44px; }
}
@media print {
  @page { size: A4; margin: 0; }
  body { background: white; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  html[data-theme="dark"] { --ink: #11120f; --muted: #666860; --line: #d2d3cc; --paper: #fff; }
  .cv-toolbar { display: none; }
  .cv-page { width: 210mm; min-height: 297mm; margin: 0; box-shadow: none; }
  .cv-layout { display: grid; grid-template-columns: 52mm 1fr; gap: 13mm; }
  aside { display: block; padding-right: 10mm; border-right: 1px solid var(--line); }
  .cv-header, .cv-entry-heading { display: flex; align-items: flex-end; flex-direction: row; }
  .cv-entry-heading { align-items: flex-start; }
  .cv-role { text-align: right; }
  h1 { font-size: 54px; }
}
