/* Responsive layouts from Pixso; approved component states stay in styles.css. */
:root {
  --content: min(var(--page), calc(100vw - 2 * var(--gutter)));
  --side: calc((var(--content) - 60px) / 4);
}

.split > *, .project-caption > *, .skill-group { min-width: 0; }
.ui-kit { min-width: 0; }
.kit-header,.kit-section { margin-inline: var(--gutter); }
.kit-project { max-width: 100%; }
.kit-example-label { margin-top: 40px; margin-bottom: 16px; }
.state-focus .project-link { outline: 2px solid var(--accent); outline-offset: 4px; }
.swatches,.kit-state { flex-wrap: wrap; }
.kit-section .container { width: 100%; max-width: 100%; }
.kit-section .experience { grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); }

/* Interpolate the wide layout without changing the approved 1920 px reference. */
@media (max-width: 1919px) {
  .split { grid-template-columns: var(--side) minmax(0, 1fr); }
  .header-nav { margin-left: calc((var(--content) + 20px) * 5 / 12 - 159px); }
  .portrait { margin-left: calc((var(--content) + 20px) * 5 / 12); }
  .hero-bottom { grid-template-columns: calc((100% + 20px) * 5 / 12 - 20px) minmax(0, 1fr); }
  .hero-copy { width: auto; }
  .hero h1 { height: auto; }
  .about-description,.skill-tags { width: 100%; }
  .tools-grid { grid-template-columns: minmax(0, 1fr) 30%; }
  .tool-main { width: calc(100% + 20px); }
  .creative-heading,.creative-meta { grid-template-columns: minmax(0, 1.26fr) minmax(0, 1fr); }
  .video-grid,.interests-list { margin-left: calc(var(--side) + 20px); }
  .video-poster { height: auto; aspect-ratio: 397 / 534.905; }
  .interests-title { width: min(100%, 1071px); }
  .interest-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.164fr); }
  .contact-inner { width: calc((var(--content) - 20px) / 2); margin-left: calc((100% - var(--content)) / 2 + var(--side) + 20px); }
  .footer-logo { width: calc((100% - 40px) / 3); height: auto; align-self: flex-start; }
  .footer-bottom { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .footer-note { max-width: 100%; }
  .menu-inner { width: var(--content); }
  .menu-contacts,.menu-logo { width: calc((100% + 20px) * 5 / 12 - 20px); }
  .menu-logo { height: auto; }
  .site-menu nav,.menu-signature { left: calc((100% + 20px) * 3 / 4); }
}

@media (max-width: 1600px) {
  :root { --page: 1360px; }
  h1,.type-display { font-size: 48px; line-height: 58px; }
  h2 { font-size: 40px; line-height: 48px; }
  .section-label { font-size: 28px; line-height: 36px; }
  .hero { height: 816px; padding-top: 60px; }
  .hero-intro { font-size: 16px; line-height: 22px; }
  .portfolio-year { margin-top: 41px; }
  .projects { padding-bottom: 80px; }
  .projects h2 { height: auto; }
  .project-name { font-size: 16px; line-height: 22px; }
  .about { padding-block: 80px; gap: 72px; }
  .about-intro { min-height: 268px; }
  .about-lead { font-size: 28px; line-height: 36px; }
  .about-description { font-size: 18px; line-height: 25px; }
  .competencies { min-height: 414px; padding-block: 72px; }
  .skills-grid { column-gap: 40px; row-gap: 64px; }
  .workflow-grid { grid-template-columns: 1fr; gap: 16px; }
  .workflow-card { height: auto; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .workflow-top { justify-content: flex-start; gap: 16px; }
  .workflow-top > .muted { order: -1; font-size: 15px; line-height: 21px; flex-shrink: 0; }
  .workflow-card > p { font-size: 16px; line-height: 22px; }
  .experience { padding-block: 72px; min-height: 550px; }
  .experience-list { --experience-gap: 44px; }
  .experience-item:first-child { min-height: 0; }
  .experience-date,.experience-company { font-size: 15px; line-height: 21px; }
  .experience-item h3 { font-size: 22px; line-height: 29px; margin-top: 8px; }
  .experience-company { margin-top: 8px; }
  .experience-description { font-size: 16px; line-height: 22px; margin-top: 32px; }
  .experience-description p+p { margin-top: 12px; }
  .tools-grid { grid-template-columns: minmax(0, 1fr) calc(355 / 1015 * 100%); }
  .tool-main { padding: 24px; }
  .tool-main > p { margin-bottom: 16px; }
  .tool-secondary { padding: 24px 24px 24px 44px; display: flex; flex-direction: column; }
  .tool-secondary > p { margin-top: auto; padding-top: 40px; }
  .outside { padding-block: 80px; min-height: 0; }
  .outside > .section-label { margin-bottom: 24px; }
  .outside-part { padding-top: 48px; }
  .outside-heading { grid-template-columns: var(--side) minmax(0, 1fr); }
  .section-number { font-size: 80px; line-height: 72px; }
  .outside-heading > div { position: relative; }
  .creative-heading { display: flex; flex-direction: column; gap: 12px; padding-right: 185px; }
  .creative-heading h3,.interests-title { font-size: 40px; line-height: 48px; }
  .creative-heading > p { font-size: 18px; line-height: 25px; padding: 0; max-width: 470px; }
  .creative-meta { display: block; margin-top: 20px; }
  .creative-meta > .tags { padding-right: 185px; }
  .creative-meta > p { position: absolute; top: 0; right: 0; flex-direction: column; gap: 4px; line-height: 25px; }
  .creative-meta > p > .muted { padding-top: 0; }
  .social-link { font-size: 18px; line-height: 25px; }
  .video-grid,.interests-list { margin-left: calc(var(--side) + 20px); }
  .video-grid { gap: 20px; margin-top: 40px; }
  .video-card h3 { font-size: 24px; line-height: 31px; }
  .video-card > p { margin-top: 8px; }
  .interests { margin-top: 80px; }
  .interests-title { max-width: 750px; }
  .interest-row { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); padding-bottom: 24px; min-height: 0; }
  .interest-row h3 { font-size: 22px; line-height: 29px; padding-left: 72px; }
  .interest-row > p { font-size: 16px; line-height: 22px; }
  .contact-section { padding-block: 80px; }
  .contact-inner h2 { font-size: 48px; line-height: 58px; }
  .contact-description { font-size: 18px; line-height: 25px; }
  .contact-list { margin-block: 40px; }
  .contact { height: 87px; }
  .contact-link { font-size: 32px; line-height: 38px; }
  .contact:nth-child(n) .contact-link > span { width: auto; }
  .contact-link .icon { width: 40px; height: 40px; }
  .site-footer { height: auto; padding-block: 80px; }
  .footer-top { height: auto; }
  .footer-bottom { margin-top: 56px; }
  .menu-logo { top: 599px; }
  .site-menu nav a { font-size: 28px; line-height: 36px; }
  .menu-contacts .contact-list { margin-top: 40px; }
}

@media (max-width: 1308px) {
  .play-button { width: 48px; height: 48px; }
}

@media (max-width: 1280px) {
  :root { --page: 1120px; --gutter: 80px; }
  h1,.type-display { font-size: 40px; line-height: 48px; }
  h2 { font-size: 34px; line-height: 41px; }
  .section-label { font-size: 26px; line-height: 34px; }
  .site-header { height: 74px; }
  .brand { width: 141px; height: 42px; }
  .brand img { width: 141px; height: 42px; object-fit: fill; }
  .header-nav { margin-left: calc((var(--content) + 20px) / 3 - 141px); padding-top: 9px; }
  .menu-toggle,.menu-toggle .icon,.menu-close,.menu-close .icon { width: 40px; height: 40px; }
  .hero { padding-top: 64px; padding-bottom: 130px; height: auto; }
  .portrait { margin-left: calc((var(--content) + 20px) / 3); }
  .hero-bottom { grid-template-columns: calc((100% + 20px) / 3 - 20px) minmax(0, 1fr); margin-top: 40px; padding-top: 32px; row-gap: 24px; }
  .hero-meta,.hero-copy { display: contents; }
  .hero-tags { grid-column: 2; grid-row: 2; width: 100%; }
  .hero h1 { grid-column: 2; grid-row: 1; }
  .portfolio-year { grid-column: 1; grid-row: 1; align-self: start; margin-top: 38px; }
  .hero-intro { grid-column: 1; grid-row: 1; align-self: start; font-size: 16px; line-height: 22px; margin-bottom: 0; }
  .projects { padding-bottom: 72px; }
  .projects h2 { margin-bottom: 32px; }
  .project-name { grid-row: 1; margin: 0; font-size: 16px; line-height: 22px; }
  .about { padding-block: 64px; gap: 56px; }
  .about-intro { min-height: 258px; }
  .about-lead { font-size: 26px; line-height: 34px; }
  .about-description { margin-top: 24px; }
  .competencies { padding-block: 56px; min-height: 477px; }
  .skills-grid { row-gap: 32px; column-gap: 24px; }
  .workflow-card { grid-template-columns: minmax(0, 1fr) minmax(0, calc(100% - 300px)); }
  .experience { padding-block: 56px; min-height: 518px; }
  .tools-grid { display: flex; flex-direction: column; }
  .tool-main { width: 100%; }
  .tool-secondary { padding: 44px 24px 24px; margin-top: -20px; flex-direction: column; gap: 40px; }
  .tool-secondary .tool-heading { flex: 1; }
  .tool-secondary .tool-heading > div { display: flex; gap: 24px; }
  .tool-secondary h3+h3 { margin-top: 0; }
  .tool-secondary > p { width: auto; margin: 0; padding: 0; }
  .outside { padding-block: 68px 84px; }
  .outside-heading { grid-template-columns: calc((var(--content) + 20px) / 6 - 20px) minmax(0, 1fr); }
  .section-number { font-size: 72px; line-height: 65px; }
  .video-grid,.interests-list { margin-left: calc((var(--content) + 20px) / 6); }
  .video-card h3 { font-size: 22px; line-height: 29px; }
  .video-card > p { margin-top: 4px; }
  .interest-row { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
  .interest-row h3 { padding-left: 40px; }
  .outside > .section-label { margin-bottom: 20px; }
  .outside-part { padding-top: 40px; }
  .outside-heading > div { position: relative; }
  .creative-heading { display: flex; flex-direction: column; gap: 12px; padding-right: 170px; }
  .creative-heading > p { max-width: 497px; }
  .creative-heading h3,.interests-title { font-size: 34px; line-height: 41px; }
  .creative-meta { display: block; margin-top: 20px; }
  .creative-meta > .tags { padding-right: 170px; }
  .creative-meta > p { position: absolute; right: 0; top: 0; font-size: 15px; }
  .creative-meta > p > .muted { padding-top: 0; line-height: 21px; }
  .creative-meta .tag { width: auto; font-size: 14px; line-height: 20px; min-height: 44px; padding: 11px 19px; border: 1px solid var(--line); background: transparent; }
  .video-grid { gap: 16px; margin-top: 32px; }
  .interests { margin-top: 72px; }
  .interests-title { max-width: 669px; }
  .interests-list { gap: 24px; }
  .contact-section { padding-block: 72px; }
  .contact-inner { width: calc((var(--content) + 20px) * 2 / 3 - 20px); margin-inline: auto; }
  .contact-inner h2 { font-size: 40px; line-height: 48px; }
  .contact-list { margin-block: 32px; gap: 20px; }
  .contact { height: 81px; }
  .contact-link { font-size: 28px; line-height: 34px; }
  .contact-link .icon { width: 34px; height: 34px; }
  .site-footer { padding-block: 72px; }
  .footer-bottom { margin-top: 48px; font-size: 15px; line-height: 21px; }
  .policy-links .text-link { font-size: 15px; line-height: 21px; }
  .footer-note { font-size: 14px; line-height: 20px; }
  .menu-contacts,.site-menu nav { top: 114px; }
  .menu-contacts,.menu-logo { width: calc((100% - 20px) / 2); }
  .site-menu nav,.menu-signature { left: calc((100% + 20px) * 2 / 3); }
  .menu-logo { top: 539px; }
  .site-menu nav a { font-size: 26px; line-height: 34px; }
  .menu-contacts .contact-list { margin-top: 32px; gap: 20px; }
}

@media (max-width: 1200px) {
  .menu-logo { top: 531px; }
  :root { --page: 960px; --gutter: clamp(32px, 10vw, 120px); }
  .header-nav { margin-left: calc((var(--content) + 20px) / 4 - 141px); gap: clamp(24px, 6vw, 90px); }
  .portrait { margin-left: max(200px, calc((var(--content) + 20px) / 4)); }
  .hero-bottom { grid-template-columns: max(180px, calc((100% + 20px) / 4 - 20px)) minmax(0, 1fr); }
  .hero { padding-bottom: 126px; }
  .projects h2 { margin-bottom: 32px; }
  .projects { padding-bottom: 64px; }
  .about .split,.kit-section .experience { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .about-intro { min-height: 0; }
  .about-description { width: 100%; }
  .about-description p+p { margin-top: 8px; }
  .competencies { min-height: 0; }
  .skills-grid { grid-template-columns: 1fr; gap: 32px; }
  .skill-tags { min-height: 0; }
  .workflow-card { grid-template-columns: minmax(0, 324px) minmax(0, 1fr); }
  .experience { min-height: 0; }
  .experience-side { display: contents; }
  .experience-list { grid-row: 2; --experience-gap: 32px; }
  .experience-side > .button { grid-row: 3; justify-self: start; margin-top: 12px; }
  .outside { padding-block: 64px; }
  .outside-heading { grid-template-columns: 1fr; gap: 20px; }
  .outside-part { padding-top: 48px; }
  .section-number { font-size: 18px; line-height: 25px; }
  .video-grid,.interests-list { margin-left: 0; }
  .interests { margin-top: 56px; }
  .contact-section { padding-block: 64px; }
  .site-footer { padding-block: 64px; }
  .footer-bottom { grid-template-columns: calc((100% + 20px) * 7 / 12 - 20px) minmax(0, 1fr); }
  .kit-state { gap: 24px; }
  .kit-state h3 { width: 100%; }
}

/* Keep the logo and signature on one bottom edge as the logo scales. */
@media (width > 767px) {
  .menu-inner { container-type: inline-size; }
  .menu-contacts,.site-menu nav,.menu-logo,.menu-signature { translate: 0 -24px; }
  .menu-signature { top: calc(663px + 154px); transform: translateY(-100%); }
}
@media (width > 1600px) and (max-width: 1919px) {
  .menu-signature { top: calc(663px + ((100cqw + 20px) * 5 / 12 - 20px) * 154 / 688); }
}
@media (width > 1280px) and (max-width: 1600px) {
  .menu-signature { top: calc(599px + ((100cqw + 20px) * 5 / 12 - 20px) * 154 / 688); }
}
@media (width > 767px) and (max-width: 1280px) {
  .menu-signature { top: calc(539px + (100cqw - 20px) / 2 * 154 / 688); }
}
@media (width > 767px) and (max-width: 1200px) {
  .menu-signature { top: calc(531px + (100cqw - 20px) / 2 * 154 / 688); }
}

/* Below the tablet composition, stack cards before their text becomes cramped. */
@media (max-width: 767px) {
  :root { --page: 600px; --gutter: 16px; }
  h1,.type-display { font-size: 32px; line-height: 38px; }
  h2 { font-size: 30px; line-height: 36px; }
  .section-label { font-size: 24px; line-height: 31px; }
  .header-nav { display: none; }
  .menu-toggle,.menu-toggle .icon,.menu-close,.menu-close .icon { width: 32px; height: 32px; }
  .hero { height: auto; padding-top: 54px; padding-bottom: 64px; }
  .portrait { margin-left: 0; }
  .hero-bottom { display: flex; flex-direction: column; gap: 32px; margin-top: 32px; padding-top: 24px; }
  .hero-copy { display: block; order: -1; }
  .hero-meta { display: block; width: 100%; }
  .hero-intro { font-size: 16px; line-height: 22px; margin-bottom: 24px; }
  .hero-tags { display: flex; width: 100%; }
  .tag { width: auto; font-size: 14px; line-height: 20px; min-height: 44px; padding: 11px 19px; border: 1px solid var(--line); background: transparent; }
  .hero-tags .tag { background: transparent; }
  .portfolio-year { margin-top: 20px; }
  .projects h2 { margin-bottom: 16px; }
  .project-name { white-space: normal; }
  .about { gap: 40px; }
  .about .split,.kit-section .experience { gap: 16px; }
  .about-lead { font-size: 24px; line-height: 31px; }
  .about-description { margin-top: 20px; font-size: 18px; line-height: 25px; }
  .about-description p+p { margin-top: 8px; }
  .competencies,.experience { padding-block: 40px; }
  .skill-title { display: block; font-size: 18px; line-height: 25px; margin-bottom: 24px; letter-spacing: -.04em; }
  .skill-tags { gap: 4px; }
  .skill-tags .tag { background: transparent; border-color: var(--line); }
  .workflow-grid { gap: 16px; }
  .workflow-card { display: flex; padding: 16px; gap: 40px; }
  .workflow-top { justify-content: space-between; }
  .workflow-top > .muted { order: 0; font-size: 14px; line-height: 20px; }
  .workflow-card > p { font-size: 15px; line-height: 21px; }
  .experience-item { padding-left: 24px; }
  .experience-item::after { top: 20px; }
  .experience-date,.experience-company { font-size: 14px; line-height: 20px; }
  .experience-item h3 { font-size: 20px; line-height: 26px; }
  .experience-description { margin-top: 24px; }
  .experience-side > .button { width: 100%; margin-top: 16px; }
  .button { font-size: 15px; line-height: 21px; min-height: 53px; }
  .tool-main { padding: 20px; }
  .tool-heading > .muted { font-size: 15px; line-height: 21px; }
  .tool-main > p { margin-top: 24px; margin-bottom: 16px; font-size: 15px; line-height: 21px; }
  .tool-main .tags { gap: 4px; }
  .tags--filled .tag { min-height: 44px; padding: 12px 20px; border: 0; background: var(--paper); }
  .tool-secondary { padding: 32px 20px 20px; margin-top: -8px; flex-direction: column; gap: 32px; }
  .tool-secondary .tool-heading > div { display: block; }
  .tool-secondary h3+h3 { margin-top: 8px; }
  .tool-secondary > p { width: auto; }
  .outside > .section-label { margin-bottom: 20px; }
  .outside-part { padding-top: 48px; }
  .outside-heading { gap: 16px; }
  .creative-heading { padding: 0; }
  .creative-heading h3,.interests-title { font-size: 30px; line-height: 36px; }
  .creative-meta { margin-top: 16px; }
  .creative-meta > .tags { padding: 0; gap: 8px; }
  .creative-meta > p { position: static; flex-direction: row; gap: 8px; margin-top: 16px; font-size: 14px; align-items: baseline; }
  .creative-meta > p > .muted { font-size: 14px; line-height: 20px; padding: 0; }
  .video-grid { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
  .video-poster { aspect-ratio: 328 / 436; }
  .video-poster .play-button { left: 16px; bottom: 16px; }
  .video-time { right: 16px; bottom: 16px; }
  .video-card h3 { font-size: 20px; line-height: 26px; margin-top: 12px; }
  .video-card > p { font-size: 15px; line-height: 21px; }
  .interests { margin-top: 48px; }
  .interests-list { margin-top: 24px; gap: 20px; }
  .interest-row { grid-template-columns: 1fr; gap: 12px; padding-bottom: 20px; }
  .interest-row h3 { font-size: 20px; line-height: 26px; padding-left: 24px; }
  .interest-row h3::before { width: 6px; height: 6px; top: 10px; }
  .interest-row > p { font-size: 15px; line-height: 21px; }
  .contact-inner { width: var(--content); }
  .contact-inner h2 { font-size: 32px; line-height: 38px; }
  .contact-list { margin-block: 40px; gap: 24px; }
  .contact { height: 78px; }
  .contact > p { font-size: 15px; line-height: 21px; }
  .contact-link { font-size: 26px; line-height: 31px; }
  .contact-link .icon { width: 32px; height: 32px; }
  .contact-inner > .button { width: 100%; }
  .footer-top { flex-direction: column; gap: 32px; }
  .policy-links { max-width: 100%; }
  .policy-links a { max-width: 100%; align-items: flex-start; }
  .policy-links a span { min-width: 0; }
  .footer-logo { width: 218px; height: 49px; }
  .footer-bottom { display: flex; flex-direction: column; gap: 32px; margin-top: 32px; padding: 0; border: 0; font-size: 14px; line-height: 20px; }
  .footer-note { width: 100%; padding-top: 32px; border-top: 1px solid var(--line); }
  .menu-inner { min-height: max(800px, 100dvh); display: flex; flex-direction: column; padding: 136px 0 17px; gap: 0; }
  .menu-mobile-logo { display: block; position: absolute; left: 0; top: 12px; width: 141px; height: 42px; }
  .menu-close .icon { stroke-width: 3.5; }
  .menu-contacts,.site-menu nav { position: static; width: 100%; }
  .site-menu nav { order: -1; gap: 12px; }
  .site-menu nav a { display: flex; justify-content: space-between; align-items: flex-start; width: 100%; height: auto; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 20px; line-height: 32px; }
  .site-menu nav a::after { bottom: 9px; }
  .menu-nav-arrow { display: block; flex: none; width: 32px; height: 32px; color: var(--accent); }
  .menu-contacts { display: flex; flex-direction: column; gap: 32px; margin-top: 32px; padding-top: 0; }
  .menu-contacts .contact-list { order: -1; margin: 0; gap: 16px; }
  .menu-contacts .contact { height: auto; padding-bottom: 16px; }
  .menu-contacts .contact-link { display: flex; width: 100%; justify-content: space-between; margin-top: 2px; font-size: 24px; }
  .menu-contacts > .button { min-height: 53px; font-size: 15px; line-height: 21px; }
  .menu-logo { display: none; }
  .menu-signature { position: absolute; left: 0; top: 66px; width: auto; font-size: 15px; line-height: 21px; }
  .menu-signature p+p { margin-top: 4px; }
  .kit-header,.kit-section { margin-block: 48px; }
  .kit-section > h2 { margin-bottom: 24px; }
  .swatches { gap: 16px; }
  .kit-state { align-items: flex-start; gap: 24px; }
}

@media (width > 420px) and (max-width: 767px) {
  .menu-inner { padding-top: 128px; }
}

@media (max-width: 389px) {
  .portrait { --portrait-width: 172.8px; --portrait-height: 216px; }
}

@media (max-width: 960px) {
  .project-name { grid-column: 1; grid-row: 1; font-size: 14px; line-height: 20px; white-space: normal; }
  .project-number { display: none; }
}

@media (max-width: 420px) {
  .site-header { height: 66px; padding-bottom: 12px; }
  .hero { padding-top: 24px; }
  .portrait { width: var(--portrait-width, 216px); height: var(--portrait-height, 270px); }
  .hero-intro { margin-bottom: 16px; }
  .hero-bottom { gap: 24px; }
  .skills-grid { row-gap: 16px; }
  .skill-title { margin-bottom: 12px; }
  .skill-tags { gap: 8px; }
  .tool-main > p { margin-bottom: 12px; }
  .tool-main .tags { gap: 8px; }
  .experience-item::before { width: 8px; height: 8px; }
  .experience-item::after { left: 4px; }
}

/* Main-page cards: three columns on desktop, the approved single column below 960 px. */
@media (max-width: 1600px) {
  .project-caption h3 { font-size: 22px; line-height: 29px; }
}
@media (max-width: 1200px) {
  .project-caption h3 { font-size: 20px; line-height: 26px; }
}
@media (max-width: 960px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .project-preview-tags { top: 16px; left: 16px; right: 16px; }
  .project-caption { margin-top: 8px; }
  .project-name { margin-bottom: 4px; }
}
