.cv-open{display:inline;padding:0;border:0;background:none;color:inherit;font:inherit;letter-spacing:inherit;text-align:inherit;cursor:pointer}
.cv-dialog{width:min(1240px,calc(100vw - 64px));max-width:none;max-height:calc(100dvh - 64px);padding:0;border:1px solid #555;background:#0b0b0b;color:#f2f2f0;box-shadow:0 24px 90px #000b;overflow:auto;overscroll-behavior:contain;font:100 14px/1.55 'Victor Mono',monospace}
.cv-dialog::backdrop{background:#000b}
.cv-card{min-height:100%;padding:25px 30px 30px}
.cv-top,.cv-portrait-top,.cv-portrait-bottom{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:.04em;color:#a8a8a8}
.cv-top{position:sticky;top:0;z-index:5;padding-bottom:22px;border-bottom:1px solid #333;background:#0b0b0b}
.cv-close{display:grid;place-items:center;width:42px;height:42px;padding:0;border:1px solid #555;background:#101010;color:#f5f5f5;font:100 26px/1 Geologica,sans-serif;cursor:pointer}
.cv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.68fr);gap:clamp(30px,5vw,80px);padding-top:40px}
.cv-content{min-width:0}.cv-label,.cv-role,.cv-skills span,.cv-projects span{font-size:11px;color:#aaa;letter-spacing:.03em}
.cv-heading h2{font:600 clamp(42px,5.2vw,76px)/.99 Geologica,sans-serif;letter-spacing:-.045em;margin:19px 0 25px}.cv-heading h2 span{color:#888}
.cv-location{margin:0;color:#bdbdbd}.cv-location a{color:#f2f2f0}.cv-about{max-width:590px;margin:42px 0 64px;color:#d4d4d4;font-size:15px;line-height:1.65}
.cv-section{margin:0 0 55px}.cv-section-title{display:flex;align-items:baseline;justify-content:space-between;border-bottom:1px solid #555;padding-bottom:13px;margin-bottom:24px}.cv-section-title h3{font:500 25px/1.1 Geologica,sans-serif;letter-spacing:-.03em;margin:0}.cv-section-title span{font-size:11px;color:#888}
.cv-job{margin:0 0 29px}.cv-job-heading{display:flex;justify-content:space-between;gap:12px;align-items:baseline}.cv-job h4{font:500 19px/1.2 Geologica,sans-serif;margin:0}.cv-job time{font-size:11px;color:#999;white-space:nowrap}.cv-job p{margin:7px 0 0;color:#c4c4c4}.cv-job .cv-role{margin:5px 0 9px;color:#888}
.cv-projects>div,.cv-skills>div{display:grid;grid-template-columns:100px minmax(0,1fr);gap:15px;margin-bottom:18px}.cv-projects p,.cv-skills p{margin:0;color:#c4c4c4}.cv-end{display:flex;gap:30px;padding-top:20px;border-top:1px solid #555;font-size:13px}
.cv-portrait{align-self:start;position:sticky;top:0;min-width:0;height:min(710px,calc(100dvh - 210px));min-height:430px;border:1px solid #414141;background:#121212;overflow:hidden;display:flex;flex-direction:column;padding:15px}
.cv-portrait-top,.cv-portrait-bottom{position:relative;z-index:1}.cv-portrait img{display:block;min-height:0;flex:1;align-self:center;width:100%;height:100%;object-fit:contain;object-position:center bottom}.cv-portrait-bottom{border-top:1px solid #333;padding-top:12px}
@media(max-width:767px){.cv-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);font-size:13px}.cv-card{padding:15px}.cv-top{padding-bottom:13px}.cv-grid{display:flex;flex-direction:column;gap:0;padding-top:25px}.cv-content{display:contents}.cv-heading{order:0}.cv-heading h2{font-size:clamp(40px,11vw,62px);margin:13px 0 17px}.cv-portrait{order:1;align-self:stretch;position:relative;top:auto;height:clamp(340px,105vw,480px);min-height:0;margin:25px 0 0}.cv-about{order:2;margin:28px 0 40px;font-size:13px}.cv-section{order:3;margin-bottom:42px}.cv-end{order:4}.cv-projects>div,.cv-skills>div{grid-template-columns:75px minmax(0,1fr);gap:10px}.cv-close{width:42px;height:42px;flex:none}}

/* A compact overview: portrait and all sections share one screen on common sizes. */
.cv-dialog{width:min(1180px,calc(100vw - 48px));max-height:calc(100dvh - 32px)}
.cv-card{padding:14px 24px 18px}.cv-top{padding-bottom:10px}.cv-close{width:36px;height:36px;font-size:23px}
.cv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'heading portrait' 'experience projects' 'experience skills';column-gap:clamp(25px,4vw,60px);row-gap:14px;padding-top:16px}
.cv-content{display:contents}.cv-heading{grid-area:heading;align-self:center}.cv-heading h2{font-size:clamp(34px,4vw,54px);margin:8px 0 0}.cv-label{margin:0}
.cv-portrait{grid-area:portrait;position:relative;top:auto;justify-self:end;align-self:center;width:min(180px,40%);height:110px;min-height:0;margin:0;padding:0;border:0;background:none}.cv-portrait img{object-fit:cover;object-position:center top;width:100%;height:100%;flex:none}.cv-portrait-top,.cv-portrait-bottom{display:none}
.cv-section{margin:0}.cv-section:nth-of-type(1){grid-area:experience}.cv-section:nth-of-type(2){grid-area:projects}.cv-section:nth-of-type(3){grid-area:skills}
.cv-section-title{padding-bottom:6px;margin-bottom:10px}.cv-section-title h3{font-size:20px}.cv-job{margin:0 0 13px}.cv-job h4{font-size:16px}.cv-job p{margin:3px 0 0;line-height:1.35}.cv-job .cv-role{margin:2px 0 5px}.cv-projects>div,.cv-skills>div{grid-template-columns:75px minmax(0,1fr);gap:10px;margin-bottom:8px}.cv-projects p,.cv-skills p{line-height:1.35}.cv-end{grid-area:end;padding-top:8px}
@media(max-width:767px){
 .cv-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);font-size:11px;line-height:1.3}.cv-card{padding:10px 12px 12px}.cv-top{padding-bottom:6px}.cv-close{width:32px;height:32px;font-size:21px}
 .cv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'heading portrait' 'experience projects' 'experience skills';column-gap:14px;row-gap:9px;padding-top:10px}
 .cv-heading{order:initial}.cv-heading h2{font-size:clamp(27px,8vw,40px);margin:6px 0 0}.cv-label{font-size:8px;line-height:1.2}.cv-portrait{order:initial;align-self:center;justify-self:end;width:100px;height:78px;margin:0}
 .cv-section{order:initial;margin:0}.cv-section-title{padding-bottom:4px;margin-bottom:7px}.cv-section-title h3{font-size:16px}.cv-section-title span,.cv-role,.cv-skills span,.cv-projects span,.cv-job time{font-size:9px}.cv-job{margin-bottom:9px}.cv-job h4{font-size:13px}.cv-job-heading{gap:4px;flex-wrap:wrap}.cv-job p{line-height:1.3}.cv-job .cv-role{margin:2px 0 3px}
 .cv-projects>div,.cv-skills>div{display:block;margin-bottom:6px}.cv-projects p,.cv-skills p{line-height:1.3}.cv-projects span,.cv-skills span{display:block;margin-bottom:2px}.cv-end{order:initial;padding-top:6px;font-size:11px}
}
@media(max-width:767px) and (max-height:700px){
 .cv-dialog{font-size:10px;line-height:1.2}.cv-grid{row-gap:5px;padding-top:5px}.cv-card{padding:8px 10px}.cv-top{padding-bottom:4px}.cv-portrait{height:60px;width:85px}.cv-heading h2{font-size:27px;margin-top:3px}.cv-section-title{margin-bottom:4px}.cv-job{margin-bottom:6px}.cv-job p,.cv-projects p,.cv-skills p{line-height:1.18}.cv-projects>div,.cv-skills>div{margin-bottom:4px}.cv-end{padding-top:3px}
}

/* Resume on the left, character and skills on the right. */
.cv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:none;gap:clamp(25px,4vw,60px);align-items:start}
.cv-content{display:block;min-width:0}.cv-heading,.cv-section,.cv-portrait{grid-area:auto}.cv-heading h2{margin-bottom:20px}.cv-section{margin:0 0 22px}.cv-job{padding:5px 0;margin:0;border-bottom:1px solid #242424}.cv-job-heading{align-items:center}.cv-projects>div{margin-bottom:10px}
.cv-right{display:flex;flex-direction:column;gap:14px;min-width:0}.cv-portrait{position:relative;align-self:stretch;justify-self:stretch;width:100%;height:220px;min-height:0;margin:0;border:1px solid #414141;background:#111;display:flex;flex-direction:column;overflow:hidden;padding:10px 12px 8px}
.cv-accessories{position:relative;z-index:2;display:flex;justify-content:flex-end;gap:6px}.cv-accessories button{padding:4px 8px;border:1px solid #555;color:#aaa;background:#101010;font:100 10px/1.2 'Victor Mono',monospace;cursor:pointer}.cv-accessories button[aria-pressed=true]{background:#eee;color:#111;border-color:#eee}
.cv-avatar-stage{position:absolute;inset:0;overflow:hidden;pointer-events:none}.cv-avatar-art{position:absolute;width:205px;left:50%;top:36px;transform:translateX(-50%);aspect-ratio:2/3}.cv-avatar-art img,.cv-avatar-art svg{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.cv-avatar-art svg [hidden]{display:none}
.cv-portrait-bottom{display:flex;margin-top:auto;padding-top:6px;border-top:1px solid #333;background:#111;font-size:9px}.cv-tools,.cv-levels{margin:0}.cv-skills>div{margin-bottom:6px}.cv-levels-note{margin:0 0 8px;font-size:10px;color:#999}.cv-level-list{display:grid;grid-template-columns:1fr 1fr;column-gap:20px;row-gap:8px}.cv-level-list>div{font-size:11px;color:#ccc;line-height:1.2}.cv-level-list i{display:block;margin-top:4px;height:3px;background:linear-gradient(to right,#eee 0 var(--level),#393939 var(--level) 100%)}
@media(max-width:767px){.cv-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:none;gap:14px;padding-top:10px}.cv-content{display:block}.cv-heading{order:initial}.cv-heading h2{margin-bottom:13px}.cv-section{order:initial;margin:0 0 16px}.cv-job{margin:0;padding:4px 0}.cv-job h4{font-size:13px}.cv-projects>div{margin-bottom:7px}.cv-right{gap:12px}.cv-portrait{order:initial;align-self:stretch;justify-self:stretch;width:100%;height:155px;padding:6px}.cv-accessories{gap:3px}.cv-accessories button{padding:3px 4px;font-size:8px}.cv-avatar-art{width:145px;top:28px}.cv-portrait-bottom{font-size:7px;padding-top:3px}.cv-tools,.cv-levels{margin:0}.cv-levels-note{font-size:9px}.cv-level-list{column-gap:8px;row-gap:7px}.cv-level-list>div{font-size:9px}.cv-level-list i{margin-top:3px;height:2px}}
@media(max-width:767px) and (max-height:700px){.cv-portrait{height:125px}.cv-avatar-art{width:120px;top:24px}.cv-right{gap:8px}.cv-section{margin-bottom:10px}.cv-level-list{row-gap:5px}}

/* Keep the character frame square and allow it to occupy the right half. */
.cv-portrait{align-self:center;width:min(100%,42dvh);height:auto;aspect-ratio:1;flex:none}
.cv-avatar-art{width:85%;top:36px}
@media(max-width:767px){.cv-portrait{align-self:center;width:100%;height:auto;aspect-ratio:1}.cv-avatar-art{width:85%;top:28px}}

@media(min-width:768px){.cv-dialog{width:min(920px,calc(100vw - 48px))}}
.cv-job h4{font-family:'Victor Mono',monospace;font-weight:100;letter-spacing:0}

/* Match the project pages: muted mono labels and light mono content. */
@font-face{font-family:'CV Victor';src:url('assets/victor-mono-ru-thin.ttf') format('truetype');font-weight:100 400;font-display:swap}
.cv-dialog{font-family:'CV Victor',monospace;font-weight:400;color:#f4f4ef}
.cv-section-title h3{font:400 12px/1.4 'CV Victor',monospace;letter-spacing:.04em;text-transform:uppercase;color:#aaa}
.cv-job h4,.cv-job time,.cv-projects p,.cv-skills p,.cv-level-list>div{font-family:'CV Victor',monospace;font-weight:400;color:#f4f4ef}
.cv-skills>p{margin:0;line-height:1.5}
@media(max-width:767px){.cv-section-title h3{font-size:10px}.cv-job h4{font-size:13px}}

.cv-level-list{display:grid;grid-template-columns:1fr;gap:7px}
.cv-level-list>div{display:grid;grid-template-columns:1fr auto;gap:3px 8px;font-size:12px;line-height:1.2}
.cv-level-list i{grid-column:1/-1;display:block;width:100%;height:9px;margin:0;background:linear-gradient(to right,#f4f4ef 0 var(--level),#3b3b3b var(--level) 100%);-webkit-mask-image:repeating-linear-gradient(to right,#000 0 9px,transparent 9px 13px);mask-image:repeating-linear-gradient(to right,#000 0 9px,transparent 9px 13px)}
@media(max-width:767px){.cv-level-list{gap:6px}.cv-level-list>div{font-size:10px;gap:2px 4px}.cv-level-list i{height:7px;-webkit-mask-image:repeating-linear-gradient(to right,#000 0 7px,transparent 7px 11px);mask-image:repeating-linear-gradient(to right,#000 0 7px,transparent 7px 11px)}}

/* Twenty equal squares, one per five percent. */
.cv-level-list i{display:grid;grid-template-columns:repeat(20,minmax(0,1fr));gap:clamp(2px, .28vw, 4px);height:auto;background:none;-webkit-mask-image:none;mask-image:none}
.cv-level-list i b{display:block;width:100%;aspect-ratio:1;background:#3b3b3b}
.cv-level-list i b.is-filled{background:#f4f4ef}
.cv-accessories button[data-accessory="glasses"]{width:32px;height:28px;display:grid;place-items:center;padding:5px;color:#eee}
.cv-accessories button[data-accessory="glasses"][aria-pressed="true"]{color:#111}
.cv-accessories button[data-accessory="glasses"] svg{display:block;width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:767px){.cv-level-list i{height:auto;-webkit-mask-image:none;mask-image:none}.cv-accessories button[data-accessory="glasses"]{width:29px;height:25px;padding:4px}}
/* Match the portfolio's square pause control. */
.cv-accessories button[data-accessory="glasses"]{width:42px;height:42px;min-width:42px;padding:0;border:1px solid #555;border-radius:0;background:#101010;box-shadow:0 8px 24px #0007;color:#f5f5f5;display:grid;place-items:center}
.cv-accessories button[data-accessory="glasses"] svg{width:20px;height:20px}
.cv-accessories button[data-accessory="glasses"]:hover,.cv-accessories button[data-accessory="glasses"][aria-pressed="true"]{background:#101010;border-color:#555;color:#929292}
.cv-accessories button[data-accessory="glasses"]:focus-visible{outline:2px solid #929292;outline-offset:3px}

.cv-avatar-art img.cv-avatar-glasses{clip-path:inset(5.2% 43.7% 91.5% 42.9%);pointer-events:none}
.cv-avatar-art img.cv-avatar-glasses[hidden]{display:none}

.cv-projects ul{list-style:disc;margin:0;padding-left:1.15em;color:#f4f4ef;font:400 1em/1.35 'CV Victor',monospace}
.cv-projects li{padding:0}
@media(max-width:767px){.cv-projects ul{line-height:1.3}}
@media(max-width:767px) and (max-height:700px){.cv-projects ul{line-height:1.18}}

.cv-projects li::marker{color:#929292;font-size:.72em}
/* Show the character down to just below the hands. */
.cv-avatar-art{width:98%}
@media(max-width:767px){.cv-avatar-art{width:98%}}
.cv-accessories button[data-accessory="glasses"]{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.cv-accessories button[data-accessory="glasses"] svg{pointer-events:none}

/* Character class, styled as a compact game attribute. */
.cv-heading h2{margin-bottom:10px}
.cv-character-class{display:flex;align-items:baseline;gap:10px;margin:0 0 20px;font:400 12px/1.35 'CV Victor',monospace}
.cv-character-class span{color:#929292;font-size:10px;letter-spacing:.04em;flex:none}
.cv-character-class strong{font:inherit;color:#f4f4ef}
@media(max-width:767px){.cv-heading h2{margin-bottom:7px}.cv-character-class{gap:7px;margin-bottom:14px;font-size:10px}.cv-character-class span{font-size:9px}}
.cv-character-class{display:inline-flex;align-items:baseline;max-width:100%;padding:6px 8px;border:1px solid #555;background:#101010;box-sizing:border-box}
@media(max-width:767px){.cv-character-class{padding:5px 6px}}

/* Home contact controls use the same outline as the music launcher. */
.contacts{align-items:flex-end;gap:var(--home-control-gap,8px)}
.contacts .contact-icon{width:42px;height:42px;flex:none;display:grid;place-items:center;padding:0;border:1px solid #555;border-radius:0;background:#101010;box-shadow:0 8px 24px #0007;color:#f5f5f5;cursor:pointer;transition:color .18s ease}
.contacts .contact-icon:hover{opacity:1;color:#929292}
.contacts .contact-icon svg{width:20px;height:20px;display:block;pointer-events:none}
@media(max-width:767px){.contacts{align-items:flex-start;gap:8px}}
/* Give the left column more room for project names and tools on phones. */
@media(max-width:767px){
 .cv-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:10px}
 .cv-content{min-width:0}
 .cv-tools{width:100%;min-width:0}
 .cv-skills p{overflow-wrap:anywhere}
}
@media(max-width:767px){.cv-avatar-art{top:16px}}
@media(max-width:767px){
 .contacts{display:grid;width:100%;grid-template-columns:minmax(0,1fr) 42px;grid-template-rows:42px 42px;column-gap:12px;row-gap:8px;align-items:end}
 .contacts .cv-open{grid-column:2;grid-row:1}
 .contacts a.contact-icon{grid-column:2;grid-row:2}
 .contacts>span{grid-column:1;grid-row:2;align-self:end;line-height:1}
}
.cv-character-class{display:table;width:max-content;max-width:100%}
@media(max-width:767px){.cv-character-class{font-size:clamp(8px,2.3vw,10px)}}
@media(max-width:767px){.cv-accessories button[data-accessory="glasses"] svg{width:16px;height:16px}}

.cv-level-list i b.is-partial{background:linear-gradient(to right,#f4f4ef 0 var(--fill),#3b3b3b var(--fill) 100%)}
/* Match the mobile spacing between the upper project and music buttons. */
@media(max-width:767px){.contacts{row-gap:max(0px,calc(22.8vw - 84px))}}
@media(max-width:767px){.contacts{row-gap:var(--home-control-gap,8px)}}

/* Small client marks, framed with discreet corner brackets. */
.cv-medals{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;list-style:none;margin:0;padding:0}
.cv-medal{position:relative;aspect-ratio:1;min-width:0;overflow:hidden;background:linear-gradient(#777,#777) left top/8px 1px no-repeat,linear-gradient(#777,#777) left top/1px 8px no-repeat,linear-gradient(#777,#777) right top/8px 1px no-repeat,linear-gradient(#777,#777) right top/1px 8px no-repeat,linear-gradient(#777,#777) left bottom/8px 1px no-repeat,linear-gradient(#777,#777) left bottom/1px 8px no-repeat,linear-gradient(#777,#777) right bottom/8px 1px no-repeat,linear-gradient(#777,#777) right bottom/1px 8px no-repeat}
.cv-medal-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.cv-medal-mark img,.cv-medal-mark svg{display:block;width:54%;height:54%;min-width:0;min-height:0;flex:none;object-fit:contain;overflow:hidden;clip-path:inset(0)}
@media(min-width:768px){
 .cv-dialog{width:min(760px,calc(100vw - 48px))}
 .cv-grid{gap:32px}
 .cv-portrait{width:min(100%,300px);justify-self:center}
 .cv-heading h2{font-size:clamp(34px,3.4vw,47px)}
 .cv-section{margin-bottom:18px}
 .cv-right{gap:12px}
 .cv-level-list{gap:6px}
}
@media(max-width:767px){.cv-medals{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:200px}.cv-medal-mark img,.cv-medal-mark svg{width:55%;height:55%}}

/* Company marks share the same subtle panel as the designer label. */
.cv-medal{box-sizing:border-box;border:1px solid #555;background:#101010}
.cv-medal-mark img,.cv-medal-mark svg{width:55%;height:55%}
.cv-medal[aria-label="Газпром"] .cv-medal-mark img{width:57%;height:57%;transform:translateY(-2px)}
.cv-medal[aria-label="Пятёрочка"] .cv-medal-mark img{width:53%;height:53%}
.cv-medal[aria-label="Мега"] .cv-medal-mark img{width:83%;height:57%}
.cv-medal[aria-label="Газинформсервис"] .cv-medal-mark img{width:66%;height:51%}
.cv-medal[aria-label="МТС"] .cv-medal-mark img{width:47%;height:47%}

/* Match the designer label to the tools text while keeping it on one line. */
@media(min-width:768px){.cv-character-class{font-size:14px;line-height:1.5}}
@media(max-width:767px){.cv-character-class{font-size:clamp(8px,2.4vw,11px);line-height:1.5}}


/* Tool tags use the same typography and treatment as the designer label. */
.cv-tool-list{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0;padding:0}
.cv-character-class,.cv-tool-list li{box-sizing:border-box;padding:6px 8px;border:1px solid #555;background:#101010;color:#f4f4ef;font:400 14px/1.5 'CV Victor',monospace}
.cv-tool-list li{white-space:nowrap}
@media(max-width:767px){.cv-tool-list{gap:4px}.cv-character-class,.cv-tool-list li{padding:5px 6px;font-size:clamp(8px,2.4vw,11px)}}

/* Keep company marks compact in the narrower mobile résumé column. */
@media(max-width:767px){
 .cv-medals{width:100%;max-width:180px;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
 .cv-job h4{font-size:12px}
 /* Start beneath the company marks and flow into the free space on the right. */
 .cv-tool-list{display:flow-root;width:calc(186.9565% + 10px);font-size:0}
 .cv-tool-list::before{content:'';float:right;width:calc(46.5116% + 5.3488px);height:var(--cv-tools-clearance, 0px)}
 .cv-tool-list li{display:inline-block;vertical-align:top;margin:0 4px 4px 0;padding-left:5px;padding-right:5px}
}
