html[data-theme] {
  --theme-bg: #14120f;
  --theme-text: #faf7f3;
  --theme-muted: #c8c0b7;
  --theme-surface: #292521;
  --theme-raised: #332e29;
  --theme-line: #49423a;
  --theme-accent: #fc570c;
  --site-header-height: 85px;
  color-scheme: dark;
}
html[data-theme="light"] {
  --theme-bg: #faf7f3;
  --theme-text: #201c17;
  --theme-muted: #625a50;
  --theme-surface: #eee8e0;
  --theme-raised: #fffdf9;
  --theme-line: #d7cec1;
  --theme-accent: #fc570c;
  color-scheme: light;
}
html[data-theme] body,
html[data-theme] .theme-page,
html[data-theme] :is(.hero, .pr, .ft, .mmenu, #terms) {
  background: var(--theme-bg);
  color: var(--theme-text);
}
html[data-theme] :is(.home-header, .top) {
  background: var(--theme-bg);
  color: var(--theme-text);
  border-bottom: 1px solid var(--theme-line);
}
html[data-theme] :is(.home-header, .top, .mmenu) :is(.m-logo, .logo, .burger) {
  color: var(--theme-text);
  border-color: var(--theme-line);
}
html[data-theme] :is(.top .nav a, .mmenu-l a, .nav-l a) { color: var(--theme-text); }
html[data-theme] :is(.top .nav a, .mmenu-l a, .nav-l a):hover,
html[data-theme] .top .nav [aria-current] { color: var(--theme-accent); }
html[data-theme] :is(.name, .home-approach-title .h2, #works .h2, .home-case, .home-approach-card, .box b, .svc-p, .crumbs [aria-current]) { color: var(--theme-text); }
html[data-theme] :is(.home-approach-card, .plan, .facts, .theme-privacy .box) { background: var(--theme-surface); border-color: var(--theme-line); }
html[data-theme] .plan-top { background: var(--theme-raised); }
html[data-theme] :is(.lbl, .crumbs, .crumbs a, .foot, .pf p, .home-case p, .home-approach-card p, .pr-head p, .pr-who, .pr-time, .pr-inc li, .pr-inc-note, .pr-note, .ft-l p, .ft-soc a, .ft-bot, .svc-v, .inc li, .px-r small, .plan-d, .plan-time, .plan-note, .plan-inc li) { color: var(--theme-muted); }
html[data-theme] :is(.pr-row, .ft-bot, .foot, .mmenu-l a) { border-color: var(--theme-line); }
html[data-theme] :is(.pr-row, .svc):hover { background: var(--theme-surface); }
html[data-theme] :is(.hero, .ft, .top, .pf, .mmenu, .theme-home #works, .theme-resume, .not-found) :is(.btn-line, .btn-wh) { color: var(--theme-text); }
html[data-theme] .btn-wh { border-color: var(--theme-line); }
html[data-theme] .ft-name text { fill: var(--theme-text); }
html[data-theme] .theme-resume :is(.about, .edu-note, .job li, .job .co, .job h4, .job .pos, .job-when, .edu p, .sec-h small, .ct-r span) { color: var(--theme-muted) !important; }
html[data-theme] .theme-resume :is(.facts span, .chip, .photo .tag) { background: var(--theme-surface); color: var(--theme-text); }
html[data-theme] .theme-resume .job-when b { color: var(--theme-text); }
html[data-theme="light"] :is(.acc, .pf h1 span) { color: var(--theme-accent); }
.theme-actions { display: flex; align-items: center; gap: var(--header-action-gap); margin-left: auto; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--theme-line);
  color: var(--theme-text);
  background: var(--theme-surface);
  font: 24px/1 system-ui, sans-serif;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--theme-accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 3px; }
.theme-moon, html[data-theme="light"] .theme-sun { display: none; }
html[data-theme="light"] .theme-moon { display: block; }
.theme-home > .home-header {
  position: sticky;
  z-index: 90;
  top: 0;
}
.theme-home .home-header .nav {
  height: calc(var(--site-header-height) - 1px);
  padding-top: 0;
}
.theme-home .hero { min-height: calc(800px - var(--site-header-height)); }
.theme-home .home-portrait { top: calc(153px - var(--site-header-height)); }
.theme-home [id] { scroll-margin-top: var(--site-header-height); }
@media (max-width: 1100px) {
  .theme-home .home-header .nav-l { display: none; }
  .theme-home .home-header .burger { display: flex; }
  .theme-home .home-header .nav-btn { display: none; }
}
@media (max-width: 760px) {
  .theme-home .hero { min-height: 0; }
  .theme-home .home-portrait { top: auto; }
  .theme-actions { gap: 8px; }
  .theme-toggle { width: 40px; height: 40px; }
}

/* Shared header alignment and controls */
:is(.home-header, .top, .theme-actions) { --header-control-size: 56px; --header-action-gap: 12px; }
.theme-actions .theme-toggle {
  order: -1;
  width: var(--header-control-size);
  height: var(--header-control-size);
  border-radius: 51px;
}
.theme-actions :is(.nav-btn, .btn-top) { height: var(--header-control-size); }
@media (min-width: 1101px) {
  .theme-home .home-header .nav-l,
  html[data-theme] .top .nav {
    position: static;
    transform: none;
    flex: 1;
    justify-content: center;
    margin: 0;
    white-space: nowrap;
  }

  /* Balance the space up to the project button, including the theme switch. */
  .theme-home .home-header .nav-l,
  html[data-theme] .theme-page:not(.theme-resume) .top .nav {
    padding-inline-start: calc(var(--header-control-size) + var(--header-action-gap));
  }
}
@media (max-width: 1100px) {
  .theme-actions { --header-control-size: 44px; }
  .theme-actions .burger { width: var(--header-control-size); height: var(--header-control-size); }
}
html[data-theme] #prices .pr-more-wrap .btn-line {
  color: var(--theme-text);
  border-color: currentColor;
}
html[data-theme] .calc-p h2 { color: #fff; }
html[data-theme] :is(.calc-p h2, .ft-l h2) .acc { color: #fc570c; }
html[data-theme="light"] .game-hint { color: #493f35; }

/* Price page contrasts and service details */
html[data-theme] .theme-price :is(.muted, .muted-d, .tabs-hint, .fq-a p),
html[data-theme] .theme-price #terms .card p {
  color: var(--theme-muted);
}
html[data-theme] .theme-price .calc .muted-d { color: #edf1ff; }
html[data-theme] .theme-price .calc .sum .muted { color: #4a4a4a; }
html[data-theme] .theme-price .hero .facts {
  padding: 8px clamp(16px, 2vw, 28px);
  border: 1px solid var(--theme-line);
  border-left: 3px solid #fc570c;
  border-radius: 16px;
  background: var(--theme-raised);
}
html[data-theme] .theme-price .facts > div { border-color: var(--theme-line); }
html[data-theme] .theme-price .facts b { font-weight: 600; }
html[data-theme] .theme-price .plan {
  background: var(--theme-surface); border-color: var(--theme-line); color: var(--theme-text);
}
html[data-theme] .theme-price .plan .plan-top { background: var(--theme-raised); }
html[data-theme] .theme-price .plan :is(.plan-d, .plan-time, .plan-note, .plan-inc li) { color: var(--theme-muted); }
.theme-price .plan .plan-plus { color: var(--theme-text); background: transparent; }
.theme-price .plan-plus svg { stroke: currentColor; }
.theme-price .plan .ck circle { fill: #fc570c; }
.theme-price .plan .ck path { stroke: #fff; }
.theme-price .plan .plan-top .btn { background: #fc570c; color: #fff; }
html[data-theme] .theme-price .plan:is(:hover,:focus-within) { background:#00299f; border-color:#00299f; color:#fff; }
html[data-theme] .theme-price .plan:is(:hover,:focus-within) .plan-top { background:rgb(255 255 255 / 10%); }
html[data-theme] .theme-price .plan:is(:hover,:focus-within) :is(.plan-plus,.plan-d,.plan-time,.plan-note,.plan-inc li) { color:#edf1ff; }
.theme-price .plan:is(:hover,:focus-within) .plan-top .btn { background:#fff;color:#020810; }

html[data-theme] .theme-price #terms .card {
  background: var(--theme-raised);
  color: var(--theme-text);
  border: 1px solid var(--theme-line);
}
html[data-theme] .theme-price #terms .card h3,
html[data-theme] .theme-price .fq-q { color: var(--theme-text); }
html[data-theme] .theme-price :is(.faq-l, .fq, .fq-q i, .svc, .svcs) { border-color: var(--theme-line); }
html[data-theme] .theme-price .fq.on .fq-q i { border-color: #fc570c; color: #201c17; }
html[data-theme] .theme-price .tabs { background: var(--theme-surface); border-color: var(--theme-line); }
html[data-theme] .theme-price .tab { color: var(--theme-text); }
html[data-theme] .theme-price .tab.on { color: var(--theme-accent); border-color: currentColor; background: var(--theme-raised); }
html[data-theme] .theme-price .tg-link:hover { color: var(--theme-text); }

.portfolio-cases.pf{display:block;min-height:0;padding-block:48px 96px}
.portfolio-cases .crumbs{margin:0 0 30px}
.portfolio-cases h1{margin:0 0 36px}
.portfolio-projects{display:grid;gap:32px}
.portfolio-project{display:grid;grid-template-columns:minmax(0, .9fr) minmax(0,1.1fr);align-items:start;gap:32px;padding:clamp(18px,3vw,40px);border:1px solid var(--theme-line);border-radius:18px;background:transparent;scroll-margin-top:100px}
.portfolio-project h2{margin:6px 0;font-size:clamp(30px,4vw,52px)}
.portfolio-project .portfolio-tag{margin:0;color:var(--theme-accent);font-size:14px}
.portfolio-project p{margin:0}
.portfolio-project dl{display:grid;gap:6px;margin:24px 0}
.portfolio-project dt{font-weight:600;color:var(--theme-text)}
.portfolio-project dd{margin:0 0 12px;color:var(--theme-muted)}
.portfolio-cover{display:block;border-radius:12px;overflow:hidden}
.portfolio-cover img{display:block;width:100%;height:auto}
.home-case-link{display:block;min-width:0;border-radius:16px}
.theme-resume .photo img{object-fit:cover;object-position:center}

.resume-footer{padding-top:76px}
.resume-contact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px}
.resume-contact h2{font-size:clamp(28px,4vw,40px);margin:8px 0}
.resume-contact p{color:var(--theme-muted);max-width:55ch}
.resume-contact nav{display:flex;flex-wrap:wrap;gap:16px;align-self:center}
.resume-contact nav a:hover{color:var(--theme-accent)}
.resume-wordmark{font:700 clamp(30px,8.5vw,135px)/1.15 Oswald,sans-serif;text-transform:uppercase;margin:36px 0;color:var(--theme-text)}
.theme-price .hero .h1{max-width:760px;font:700 clamp(40px,6.7vw,96px)/1.1 Oswald,sans-serif;text-transform:uppercase}
.price-hero-rates{display:flex;flex-wrap:wrap;gap:16px 52px;margin-top:24px;padding-top:16px;border-top:1px solid var(--theme-line);font-size:clamp(16px,2vw,26px)}
.price-hero-rates strong{display:block;font:400 clamp(26px,3vw,40px)/1.1 Oswald,sans-serif;margin-top:6px;color:var(--theme-accent)}
html[data-theme="light"] .price-hero-rates strong{color:#00299f}
@media(max-width:760px){.portfolio-project,.resume-contact{grid-template-columns:minmax(0,1fr)}.portfolio-cover{grid-row:1}.portfolio-cases.pf{padding-block:28px 60px}}

.theme-price .hero .anchors .btn-line,
.theme-home .hero-btns .btn-wh,
.theme-home #works .btn-wh {
  color: var(--theme-text);
  border-color: currentColor;
}
html[data-theme="dark"] .theme-home :is(.hero-btns, #works) .btn-wh { color: #fff; }
.theme-price .hero .anchors .btn-line:hover,
.theme-home :is(.hero-btns, #works, #prices) :is(.btn-wh,.btn-line):hover {
  background: color-mix(in srgb, var(--theme-text) 8%, transparent);
}
.theme-home .tools .tools-t { inset-inline: 18px; bottom: 0; }
.theme-home .tools .sticker { z-index: 2; }
.theme-home .tools .tools-f { z-index: 1; }
.theme-home .tools .tools-o { z-index: 3; }
.resume-contact nav a { display:inline-flex; align-items:center; gap:8px; }
.resume-contact nav a svg { width:20px; height:20px; flex:none; }

/* Layout and colors from the light and dark SVG exports. */
html[data-theme] .theme-home .home-approach-card{background:transparent;border:1px solid var(--theme-line)}
html[data-theme="light"] .theme-home .pr-price{color:#00299f}
.theme-price .hero-g{display:block}
.theme-price .hero{padding-top:24px}
.theme-price .hero .crumbs{margin-bottom:48px}
.theme-price .hero .h1{max-width:820px}
.theme-price .price-step-intro{max-width:620px;margin:12px 0 32px}
.theme-price .game{margin-top:54px}
.theme-price .game canvas{display:block;width:100%;height:270px;cursor:pointer;touch-action:manipulation}
.theme-price .game-hint{text-align:right;color:var(--theme-muted);font-size:13px}
html[data-theme] .theme-resume .facts span{background:transparent;color:var(--theme-text)}
.resume-name-light,html[data-theme="light"] .resume-name-dark{display:none}
html[data-theme="light"] .resume-name-light{display:inline}
.portfolio-intro{position:relative;padding-block:32px 0}
.portfolio-intro h1{margin:12px 0 0}
.portfolio-projects{scroll-margin-top:104px}
@media(max-width:760px){
  .theme-price .game canvas{height:200px}
  .portfolio-intro{grid-template-columns:1fr;min-height:0;padding:20px 0 36px}
}

.theme-home .hero-c { justify-content:flex-start; gap:56px; }
.theme-price .hero .anchors { margin-top:56px; }
.theme-price .hero p.muted-d { max-width: none !important; text-align:left; }
.theme-home .pr-row { cursor:pointer; }
.theme-resume .facts { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;text-align:center; }
.theme-resume .facts span { justify-content:center; height:auto;min-height:38px;text-wrap:balance;line-height:1.3;border-radius:0;padding-block:6px; }
.theme-resume .resume-contact nav img { width:20px;height:20px; }
.ft-name { display:block;width:100%;height:auto; }
.footer-docs { display:flex; flex-wrap:wrap;gap:10px 18px; }
html[data-theme] .theme-price .fq-q i::before,
html[data-theme] .theme-price .fq-q i::after { height:1px;width:14px; }
html[data-theme] .theme-price .fq.on .fq-q i { color:#fff; }
@media(max-width:760px) {
  .theme-price .hero p.muted-d { text-align:left; }
  .price-desc-break { display:none; }
}
@media(max-width:480px) { .theme-resume .facts { grid-template-columns:1fr; } }

.home-case-link{overflow:hidden}
:is(.home-case-link,.portfolio-cover) img{transition:transform .5s ease}
@media(hover:hover){:is(.home-case-link,.portfolio-cover):hover img{transform:scale(1.045)}}
:is(.home-case-link,.portfolio-cover):focus-visible img{transform:scale(1.045)}
@media(prefers-reduced-motion:reduce){:is(.home-case-link,.portfolio-cover) img{transition:none}:is(.home-case-link,.portfolio-cover):is(:hover,:focus-visible) img{transform:none}}
@media(prefers-reduced-motion:no-preference) {
  .theme-price .plan,
  .theme-price .plan :is(.plan-top,.plan-plus,.plan-d,.plan-time,.plan-note,.plan-inc li,.btn) {
    transition: background-color .35s ease, border-color .35s ease, color .35s ease;
  }
}

/* Horizontal card rows */
.horizontal-track:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 4px; }
.theme-price .plans.horizontal-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: 14px;
}
.theme-price .horizontal-track::-webkit-scrollbar { display: none; }
.theme-price .horizontal-track > * { scroll-snap-align: start; }
.st-rows{display:flex;flex-direction:column;gap:24px;margin-top:40px}
.st-row{display:flex;align-items:flex-start;gap:24px}
.st-card{width:306px;max-width:100%;height:400px;border-radius:8px;padding:16px;display:flex;flex-direction:column;justify-content:space-between;flex:none}
.st-card b{font-size:18px;line-height:1.6}
.st-media{position:absolute;left:0;top:0;bottom:0;width:40%}
.st-video{position:sticky;top:calc(100vh - min(64vh, 600px) - 40px);height:min(64vh, 600px);aspect-ratio:9/16;max-width:100%;border-radius:8px;overflow:hidden;background:#1A1B28}
.st-video video{display:block;width:100%;height:100%;object-fit:cover}
.st-track{display:flex;flex-direction:column;gap:24px}
.st-vrow{display:none}
.st-card h3{font-size:24px;line-height:1.4}
.st-card p{font-size:16px;line-height:1.6;margin-top:8px}

@media(max-width:1024px) {
  .theme-page .st-rows .st-media { display: none; }
  .theme-page .st-track.horizontal-track {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .theme-page .st-track.horizontal-track::-webkit-scrollbar { display: none; }
  .theme-page .st-track.horizontal-track .st-row {
    display: block;
    flex: 0 0 min(306px, 82%);
    padding-left: 0 !important;
    scroll-snap-align: start;
  }
  .theme-page .st-track.horizontal-track .st-vrow { position: relative; flex-basis: 200px; }
  .theme-page .st-track.horizontal-track .st-card { width: 100%; height: 100%; min-height: 320px; }
  .theme-page .st-track.horizontal-track .st-card.rv { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .st-rows { display: block; }
  .st-track {
    --stage-gutter: max(16px, 5vw);
    margin: 28px calc(-1 * var(--stage-gutter)) 0;
    padding-inline: var(--stage-gutter);
    scroll-padding-inline-start: var(--stage-gutter);
    -webkit-overflow-scrolling: touch;
  }
  .st-card { gap: 48px; }
  .st-track .rv { opacity: 1 !important; transform: none !important; }
}
.horizontal-track .st-vcard { position: absolute; inset: 0; width: 100%; height: auto; border-radius: 8px; overflow: hidden; }
.horizontal-track .st-vcard video { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-price .plans.horizontal-track .plan { flex: 0 0 calc((100% - 48px) / 3); min-width: min(320px, 82%); }

.theme-resume .resume-intro { min-width: 0; }
.theme-resume details.job { display: block; }
.theme-resume .job-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 18px;
  align-items: start;
  gap: 16px;
  cursor: pointer;
  list-style: none;
}
.theme-resume .job-summary::-webkit-details-marker { display: none; }
.theme-resume .job-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  justify-self: center;
  border: solid var(--theme-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.theme-resume .job[open] .job-summary::after { transform: rotate(225deg); }
.theme-resume .job-summary:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 4px; }
.theme-resume .job-body { margin-top: 20px; }
@media(min-width:1101px) {
  .theme-resume .cv { row-gap: 0; }
  .theme-resume .cv .crumbs { margin-bottom: 48px; }
  .theme-resume .cv .side { grid-column: 1; grid-row: 2 / span 2; }
  .theme-resume .cv :is(.resume-intro, .main) { grid-column: 2; }
}
@media(max-width:760px) {
  .theme-price .horizontal-track { gap: 12px; }
  .theme-resume .job-summary { grid-template-columns: minmax(0, 1fr) 18px; gap: 8px 12px; }
  .theme-resume .job-summary::after { grid-column: 2; grid-row: 1; }
  .theme-resume .job-when { grid-column: 1; }
}

/* Keep the dog reachable even when pills overlap its image. */
.theme-home .tools .sticker { z-index: 5; }
.theme-home .tools .tools-o { z-index: 6; }

@media(max-width:760px) {
  .theme-home .hero-surname { display: inline-block; position: relative; }
  .theme-home .hero-surname .star-a { left: auto !important; right: -.36em; top: 0 !important; }
  .theme-home .home-cases { row-gap: 24px; }
  .theme-home .hero-c > div:first-child { row-gap: 8px !important; }
  .theme-home #steps > .rv { gap: 8px !important; }
  .theme-home .pr-main { row-gap: 8px; }
  .theme-home :is(#steps > .rv, .pr-head, .ft-l) { row-gap: 8px; }
  .theme-home :is(#steps > .rv, .pr-head, .ft-l) > p { margin-top: 0; }
}

/* Shared vertical spacing across the main site pages. */
.theme-page {
  --section-space: 120px;
  --heading-copy-space: 16px;
}
@media (max-width: 1024px) {
  .theme-page { --section-space: 80px; --heading-copy-space: 8px; }
}
@media (max-width: 760px) {
  .theme-page { --section-space: 60px; }
}

.theme-home > :is(.home-approach, .cases, .st, .pr, .calc),
.theme-home > .ft {
  padding-block: var(--section-space) 0;
}
.theme-home > .st > .rv { padding-top: 0; }
.theme-home > .pr { padding-bottom: var(--section-space); }
.theme-home > .pr + .calc { padding-top: 0; }

.theme-price > .hero { padding-bottom: 0; }
.theme-price > .sec,
.theme-price > .ft { padding-block: var(--section-space) 0; }
.theme-price > #terms { padding-bottom: var(--section-space); }
.theme-price > .calc { padding-bottom: var(--section-space); }

.theme-portfolio .portfolio-intro { padding-bottom: 0; }
.theme-portfolio .portfolio-projects { margin-top: var(--section-space); }
.theme-portfolio .portfolio-cases.pf { padding-bottom: var(--section-space); }
.theme-resume .cv { padding-bottom: var(--section-space); }
.theme-resume .main > .sec { margin-top: var(--section-space); }
.theme-resume .resume-footer { padding-top: 0; }
.theme-resume .resume-wordmark { margin-top: var(--section-space); }
@media (max-width: 1100px) {
  .theme-resume .cv > .side { margin-top: calc(var(--section-space) - 40px); }
  .theme-resume .main > .sec:first-child { margin-top: calc(var(--section-space) - 40px); }
}
@media (max-width: 760px) {
  .theme-resume .cv > .side,
  .theme-resume .main > .sec:first-child { margin-top: calc(var(--section-space) - 32px); }
}

.theme-page :is(.home-approach-card, .st-card, .calc-p, .grp-h, .plan-top, .portfolio-project, .portfolio-intro, .resume-contact, .job-title, .edu) > :is(h1,h2,h3,h4) + p,
.theme-page :is(.home-approach-card, .st-card, .calc-p, .portfolio-project, .portfolio-intro, .resume-contact, .edu) > div > :is(h1,h2,h3,h4) + p {
  margin-top: var(--heading-copy-space);
  margin-bottom: 0;
}
.theme-home .home-case h3 { margin-bottom: var(--heading-copy-space); }
.theme-home .pr-who { margin-top: var(--heading-copy-space); }
.theme-home .hero-c .lead { margin-top: var(--heading-copy-space); }
.theme-home .hero-c > div:first-child { row-gap: 0 !important; }
.theme-home .hero-c .name { margin-top: 16px; }
.theme-page .ft-l { row-gap: var(--heading-copy-space); }
.theme-home #steps > .rv { gap: var(--heading-copy-space) !important; }
.theme-home #steps > .rv > p { margin-top: 0; }
.theme-price .price-step-intro { margin-top: var(--heading-copy-space); }
.theme-price .hero p.muted-d { margin-top: var(--heading-copy-space) !important; }
.theme-resume .resume-intro .role { margin-top: var(--heading-copy-space); }
.theme-home .pr-head,
.theme-price .head { row-gap: var(--heading-copy-space); }

.theme-portfolio .portfolio-intro h1,
.theme-resume .resume-contact h2 { margin-bottom: 0; }
.theme-portfolio .portfolio-projects { gap: 24px; }
@media (max-width: 760px) { .theme-portfolio .portfolio-projects { gap: 8px; } }
.theme-privacy main { padding-bottom: var(--section-space); }
.theme-privacy main :is(h1,h2) + p { margin-top: var(--heading-copy-space); }

@media (min-width: 1025px) {
  .theme-page .st-rows { position: relative; }
  .theme-page .st-media { width: 259px; }
  .theme-page .st-video {
    height: auto;
    max-height: calc(100dvh - var(--site-header-height) - 32px);
    top: calc(var(--site-header-height) + 24px);
  }
  .theme-page .st-row:not(.st-vrow) {
    padding-left: min(var(--stage-offset), calc(100% - 306px));
  }
}

.theme-home .pr-head,
.theme-price #calc .head {
  flex-direction: column;
  align-items: flex-start;
}
.theme-price #calc .head p { text-align: left; }

/* Typography scale shared by the site pages. */
.theme-page {
  --type-h1: 96px;
  --type-h2: 40px;
  --type-h3: 24px;
  --type-h4: 20px;
}
@media (max-width: 1024px) {
  .theme-page { --type-h1: 54px; --type-h2: 32px; --type-h3: 18px; --type-h4: 18px; }
}
.theme-page h1 { font-size: var(--type-h1) !important; }
.theme-page h2 { font-size: var(--type-h2) !important; }
.theme-page h3 { font-size: var(--type-h3) !important; }
.theme-page h4 { font-size: var(--type-h4) !important; }
.theme-page :is(p, li, dd, .about, .pr-who, .job .pos, .job .co, .lbl, .wiz-hint, .wiz-diff, .lead) { font-size: 16px !important; }
.theme-page :is(.btn, .ft-soc a, .resume-contact nav a, .wiz-back, .q-back) {
  font-size: 20px !important;
}
.theme-page .btn {
  min-height: 2.6em;
  white-space: normal;
  text-align: center;
  line-height: 1.2;
}
.theme-page h1 { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .theme-home #works .cs-head { flex-wrap: wrap; }
  .theme-page .btn { padding-inline: 16px; }
}
@media (max-width: 360px) {
  .theme-home .hero-surname { transform: scaleX(.86); transform-origin: left; }
  .theme-price .hero .h1 { hyphens: auto; }
}

html[data-theme] .theme-price .fq-q[aria-expanded="true"] { color: var(--theme-accent); }
@media (hover: hover) and (pointer: fine) {
  html[data-theme].faq-mouse-hover .theme-price .fq-q:hover { color: var(--theme-accent); }
  html[data-theme].faq-mouse-hover .theme-price .fq-q[aria-expanded="false"]:hover i {
    color: var(--theme-accent);
    border-color: var(--theme-accent);
  }
}
.theme-home :is(.cs-head, .pr-more-wrap) .btn { display: inline-flex; align-items: center; justify-content: center; }
.theme-resume .facts { border-radius: 8px; overflow: hidden; }

.theme-page .mmenu:has(.mmenu-header) { padding-top: 0; padding-inline: 0; }
.theme-page .mmenu-header { position: static; }
.theme-page .mmenu-header ~ :is(.mmenu-l,.mmenu-b) { margin-inline: max(16px, 5vw); }

html[data-theme] .theme-page .top > .wrap { height: calc(var(--site-header-height) - 1px); }

@media (max-width: 760px) { html[data-theme] { --site-header-height: 65px; } }

html[data-theme="light"] .theme-home .tools-f svg text { fill: var(--theme-bg); }

/* Keep the wordmark consistent across page headers and expanded menus. */
.theme-page :is(.home-header, .mmenu) .m-logo,
.theme-page :is(.top, .mmenu) .logo {
  font: 700 20px/1.1 Oswald, "Arial Narrow", sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
}
@media (max-width: 1024px) {
  .theme-home .hero-c > div:first-child { margin-inline: max(16px, 5vw); }
}

.portfolio-media { min-width: 0; }
.portfolio-media summary { cursor: pointer; list-style: none; position: relative; }
.portfolio-media summary::-webkit-details-marker { display: none; }
.portfolio-media-label { position: relative; display: block; padding: 12px 16px; background: var(--theme-raised); color: var(--theme-text); }
.portfolio-media video { display: block; width: 100%; margin-top: 16px; border-radius: 8px; }

.portfolio-video-full { margin-top: 12px; }
.portfolio-screen { display: block; margin-top: 16px; border-radius: 8px; overflow: hidden; }
.portfolio-screen img { display: block; width: 100%; height: auto; }

.portfolio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.theme-portfolio .portfolio-reel { color: var(--theme-text); border-color: currentColor; }
.portfolio-video-link { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; color: var(--theme-text); }
.portfolio-video-link:hover { color: var(--theme-accent); }
html[data-theme="dark"] .theme-portfolio .portfolio-reel { border-color: #fff; }

.portfolio-viewer:modal {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 64px 16px 24px; border: 0; overflow: auto; background: #000b;
  overscroll-behavior: contain;
}
.portfolio-viewer::backdrop { background: #0005; }
html:has(.portfolio-viewer[open]) { overflow: hidden; }
.portfolio-viewer form {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  margin: 0;
  z-index: 1;
}
.portfolio-viewer form button {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--theme-line); background: var(--theme-bg); color: var(--theme-text); cursor: pointer;
}
.portfolio-viewer [hidden] { display: none; }
.portfolio-viewer img:not([hidden]) { display: block; max-width: min(100%, 1200px); height: auto; margin-inline: auto; }
.portfolio-viewer.is-video:modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  overflow: hidden;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  touch-action: manipulation;
}
.portfolio-viewer.is-video form {
  position: relative;
  inset: auto;
  justify-self: end;
  z-index: 2;
  margin-bottom: 8px;
}
.portfolio-viewer video:not([hidden]) {
  display: block;
  align-self: center;
  width: min(100%, 1080px);
  max-height: 100%;
  object-fit: contain;
}

.portfolio-media summary .portfolio-media-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.portfolio-media summary .portfolio-media-label::after {
  content: ""; flex: 0 0 8px; height: 8px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
}
.portfolio-media[open] summary .portfolio-media-label::after { transform: translateY(2px) rotate(225deg); }
.portfolio-screen { cursor: zoom-in; }

.portfolio-copy { min-width: 0; }
.portfolio-copy .portfolio-actions { margin-top: 20px; }
.portfolio-copy h3 { margin: 28px 0 0; }
.portfolio-copy h4 { margin: 20px 0 0; }
.portfolio-copy :is(h3, h4) + p { margin-top: var(--heading-copy-space); }
.portfolio-copy p + p { margin-top: 12px; }

.portfolio-more { margin-top: 20px; }
.portfolio-more summary { display: flex; align-items: center; gap: 8px; width: fit-content; cursor: pointer; color: var(--theme-accent); font-size: 18px; list-style: none; }
.portfolio-more summary::-webkit-details-marker { display: none; }
.portfolio-more-close, .portfolio-more[open] .portfolio-more-open { display: none; }
.portfolio-more[open] .portfolio-more-close { display: inline; }
.portfolio-more[open] .portfolio-more-arrow { transform: rotate(180deg); }

@media (min-width: 1201px) {
  .theme-portfolio .portfolio-cases.pf { overflow: visible; }
  .portfolio-project-info { min-width: 0; }
  .portfolio-project:has(> .portfolio-media[open]) > .portfolio-project-info {
    position: sticky;
    top: calc(var(--site-header-height) + 24px);
    max-height: calc(100dvh - var(--site-header-height) - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
@media (max-width: 1200px) {
  .portfolio-project { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .portfolio-project-info { display: contents; }
  .portfolio-project-heading { grid-row: 1; }
  .portfolio-project > .portfolio-media { grid-row: 2; }
  .portfolio-project .portfolio-copy { grid-row: 3; }
  .portfolio-project .portfolio-copy .portfolio-actions { margin-top: 0; }
}

@media (max-width: 1200px) {
  .portfolio-project .portfolio-copy p { max-width: none; }
}

.theme-portfolio .portfolio-intro h1 {
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
}

.theme-price #terms > .wrap { padding-inline: clamp(16px, 5vw, 72px); }

.theme-page .site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: none;
}

html[data-theme] .theme-page .site-header > .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--site-header-height) - 1px);
  padding: 0 clamp(16px, 5vw, 72px);
  gap: 24px;
  font: 400 18px/1.1 Inter, sans-serif;
}

.theme-page .site-header :is(.logo, .m-logo) {
  display: block;
  flex: none;
  text-transform: uppercase;
}

html[data-theme] .theme-page .site-header .site-header-nav {
  position: static;
  transform: none;
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding-inline-start: calc(var(--header-control-size) + var(--header-action-gap));
  font: inherit;
  white-space: nowrap;
}

html[data-theme] .theme-page .site-header .site-header-nav a { font: inherit; }
.theme-page .site-header .theme-actions { margin: 0; }
.theme-page .site-header .site-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 8px;
  height: var(--header-control-size);
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--theme-accent);
  color: #fff;
  font: inherit;
  white-space: nowrap;
}
.theme-page .site-header .site-header-cta .ico { width: 14px; height: 14px; }
.theme-page .site-header .site-header-cta:hover { filter: brightness(1.08); }
.theme-page .site-header .burger { display: none; }

@media (max-width: 1100px) {
  html[data-theme] .theme-page .site-header .site-header-nav,
  .theme-page .site-header .site-header-cta { display: none; }
  .theme-page .site-header .burger { display: flex; }
}
.theme-page .mmenu:has(.site-header) {
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.theme-page .mmenu:has(.site-header)::-webkit-scrollbar { display: none; }
.theme-page .mmenu .site-header {
  position: static;
  flex: none;
}
.theme-page .mmenu .site-header > .mmenu-top { min-height: 0; }
.theme-page .mmenu .site-header .burger { display: flex; }
.theme-page .mmenu .site-header ~ :is(.mmenu-l, .mmenu-b) {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 72px);
}
.theme-page .mmenu .site-header ~ .mmenu-l a {
  font: 400 22px/1.4 Inter, sans-serif;
}
/* Keep contact links consistent with the resume footer. */
.theme-page .ft-g {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.theme-page .ft-l {
  flex: 1 1 calc(18 * var(--type-h2));
  container-type: inline-size;
}
.theme-page .ft-l h2 {
  font-size: min(var(--type-h2), 5.5cqi) !important;
  max-width: none;
  text-wrap: balance;
}
.theme-page .ft-l p { max-width: none; }
.theme-page .ft-soc {
  flex: 0 1 max-content;
  flex-wrap: wrap;
  align-self: center;
  gap: 16px;
  padding-top: 0;
}
html[data-theme] .theme-page .ft-soc a {
  gap: 8px;
  color: var(--theme-text);
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
}
html[data-theme] .theme-page .ft-soc a:hover { color: var(--theme-accent); }
.theme-page .ft-soc a svg {
  width: 20px;
  height: 20px;
}