:root {
    --bg: #0b0b09;
    --bg-soft: #12120f;
    --surface: rgba(22, 22, 18, 0.86);
    --surface-solid: #191915;
    --paper: #f6f0df;
    --muted: rgba(246, 240, 223, 0.68);
    --faint: rgba(246, 240, 223, 0.44);
    --line: rgba(246, 240, 223, 0.14);
    --line-strong: rgba(246, 240, 223, 0.28);
    --mint: #78e4bf;
    --amber: #f4b55d;
    --coral: #ff765f;
    --blue: #8ab7ff;
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
    --font-main: "Space Grotesk", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(11, 11, 9, 0.86), #0b0b09 38%),
        var(--bg);
    color: var(--paper);
    font-family: var(--font-main);
    line-height: 1.5;
    letter-spacing: 0;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-pad {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 72px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    background: rgba(11, 11, 9, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
}

.brand-copy {
    display: grid;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 1rem;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.78rem;
}

.nav-links {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(246, 240, 223, 0.04);
}

.nav-links a {
    min-width: 74px;
    padding: 0.55rem 0.78rem;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    background: rgba(246, 240, 223, 0.08);
    color: var(--paper);
    outline: none;
}

.lang-btn {
    justify-self: end;
    min-width: 48px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(246, 240, 223, 0.04);
    color: var(--paper);
    cursor: pointer;
    font-weight: 800;
    transition: border-color 160ms ease, background 160ms ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
    border-color: var(--mint);
    background: rgba(120, 228, 191, 0.08);
    outline: none;
}

.hero {
    position: relative;
    min-height: calc(100svh - 170px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-bottom: 1px solid var(--line);
}

.hero-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: #050504;
}

.hero-media-content {
    width: 100%;
    height: 100%;
    opacity: 0.82;
    transition: opacity 240ms ease;
}

.hero-media-content img,
.hero-media-content video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(11, 11, 9, 0.96) 0%, rgba(11, 11, 9, 0.68) 42%, rgba(11, 11, 9, 0.1) 100%),
        linear-gradient(0deg, rgba(11, 11, 9, 0.98) 0%, rgba(11, 11, 9, 0.12) 58%, rgba(11, 11, 9, 0.72) 100%);
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.68fr);
    align-items: end;
    gap: 3rem;
    padding-top: 5rem;
    padding-bottom: 1.8rem;
}

.eyebrow {
    margin: 0 0 0.8rem;
    color: var(--mint);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    max-width: 820px;
    font-size: 4.8rem;
    line-height: 0.94;
    letter-spacing: 0;
}

.hero-lead {
    max-width: 720px;
    margin: 1.2rem 0 0;
    color: var(--muted);
    font-size: 1.13rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.65rem;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.72rem 1.15rem;
    cursor: pointer;
    font-size: 0.94rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.btn-primary {
    color: #10100e;
    background: var(--mint);
    border-color: var(--mint);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background: #a0f1d5;
}

.btn-quiet {
    color: var(--paper);
    background: rgba(246, 240, 223, 0.06);
    border-color: var(--line);
}

.btn-quiet:hover,
.btn-quiet:focus-visible {
    border-color: var(--amber);
    background: rgba(244, 181, 93, 0.1);
}

.spotlight {
    padding-left: 1.25rem;
    border-left: 2px solid var(--mint);
}

.spotlight-meta,
.project-kicker {
    margin: 0 0 0.7rem;
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.spotlight h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
}

.spotlight p {
    margin: 0.9rem 0 0;
    color: var(--muted);
}

.spotlight-facts,
.modal-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.2rem 0 0;
}

.spotlight-facts div,
.modal-facts div {
    min-width: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.65rem;
}

.spotlight-facts dt,
.modal-facts dt {
    color: var(--faint);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.spotlight-facts dd,
.modal-facts dd {
    margin: 0.18rem 0 0;
    color: var(--paper);
    font-size: 0.92rem;
}

.featured-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(168px, 220px);
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 228, 191, 0.58) rgba(246, 240, 223, 0.08);
}

.featured-strip::-webkit-scrollbar,
.filter-tabs::-webkit-scrollbar {
    height: 8px;
}

.featured-strip::-webkit-scrollbar-track,
.filter-tabs::-webkit-scrollbar-track {
    background: rgba(246, 240, 223, 0.08);
    border-radius: 999px;
}

.featured-strip::-webkit-scrollbar-thumb,
.filter-tabs::-webkit-scrollbar-thumb {
    background: rgba(120, 228, 191, 0.58);
    border-radius: 999px;
}

.strip-item {
    min-height: 74px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.55rem;
    color: var(--paper);
    background: rgba(11, 11, 9, 0.64);
    cursor: pointer;
    text-align: left;
    backdrop-filter: blur(10px);
    transition: border-color 160ms ease, background 160ms ease;
}

.strip-item:hover,
.strip-item:focus-visible,
.strip-item.is-active {
    border-color: var(--mint);
    background: rgba(120, 228, 191, 0.1);
    outline: none;
}

.strip-item img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
}

.strip-item span {
    overflow: hidden;
    color: var(--paper);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.18;
    text-overflow: ellipsis;
}

.section,
.process-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section-top {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.68fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.section-top h2,
.profile-copy h2,
.contact-section h2 {
    margin: 0;
    font-size: 2.75rem;
    line-height: 1.02;
    letter-spacing: 0;
}

.section-copy,
.profile-copy p,
.contact-section p {
    margin: 0;
    color: var(--muted);
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.case-card {
    min-width: 0;
    grid-column: span 4;
}

.case-card:first-child {
    grid-column: span 8;
}

.case-card:nth-child(2) {
    grid-column: span 4;
}

.case-card:nth-child(n + 3) {
    grid-column: span 4;
}

.case-hit,
.project-hit {
    width: 100%;
    height: 100%;
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    color: var(--paper);
    background: var(--surface);
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.case-hit:hover,
.case-hit:focus-visible,
.project-hit:hover,
.project-hit:focus-visible {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-3px);
    outline: none;
}

.case-image,
.project-image {
    position: relative;
    overflow: hidden;
    background: #080807;
}

.case-image {
    aspect-ratio: 16 / 10;
}

.project-image {
    aspect-ratio: 16 / 11;
}

.ratio-wide .case-image,
.ratio-wide .project-image {
    aspect-ratio: 16 / 9;
}

.ratio-square .case-image,
.ratio-square .project-image {
    aspect-ratio: 1 / 1;
}

.ratio-tall .case-image,
.ratio-tall .project-image {
    aspect-ratio: 4 / 5;
}

.case-image img,
.case-image video,
.project-image img,
.project-image video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.case-image video,
.project-image video {
    pointer-events: none;
}

.case-hit:hover .case-image img,
.case-hit:hover .case-image video,
.case-hit:focus-visible .case-image img,
.case-hit:focus-visible .case-image video,
.project-hit:hover .project-image img,
.project-hit:hover .project-image video,
.project-hit:focus-visible .project-image img,
.project-hit:focus-visible .project-image video {
    transform: scale(1.035);
}

.case-body,
.project-body {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.case-body h3,
.project-body h3 {
    margin: 0;
    font-size: 1.22rem;
    line-height: 1.12;
}

.case-card:first-child .case-body h3 {
    font-size: 1.55rem;
}

.case-body p,
.project-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.project-tags,
.modal-tags,
.skill-cloud {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.project-tags span {
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(246, 240, 223, 0.14);
    border-radius: 6px;
    padding: 0.18rem 0.42rem;
    color: var(--faint);
    background: rgba(246, 240, 223, 0.035);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
}

.modal-tags span,
.skill-cloud span {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.28rem 0.55rem;
    color: var(--muted);
    background: rgba(246, 240, 223, 0.04);
    font-size: 0.75rem;
    font-weight: 800;
}

.process-section {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    padding-left: clamp(1rem, 2vw, 1.6rem);
    padding-right: clamp(1rem, 2vw, 1.6rem);
    background:
        linear-gradient(135deg, rgba(120, 228, 191, 0.06), rgba(255, 118, 95, 0.04)),
        var(--bg-soft);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.process-card {
    min-height: 210px;
    display: grid;
    align-content: start;
    gap: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1.1rem;
    background: rgba(246, 240, 223, 0.04);
}

.process-card span {
    color: var(--amber);
    font-size: 0.78rem;
    font-weight: 800;
}

.process-card h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.14;
}

.process-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.archive-toolbar {
    margin: 1.75rem 0 0.8rem;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 0.82rem;
    color: var(--muted);
    background: rgba(246, 240, 223, 0.04);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 800;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filter-btn:hover,
.filter-btn:focus-visible,
.filter-btn.is-active {
    border-color: var(--mint);
    color: var(--paper);
    background: rgba(120, 228, 191, 0.1);
    outline: none;
}

.project-count {
    min-height: 1.3rem;
    margin: 0 0 1rem;
    color: var(--faint);
    font-size: 0.88rem;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.project-card {
    min-width: 0;
}

.profile-section {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 220px;
    gap: 2rem;
    align-items: center;
    border-top: 1px solid var(--line);
}

.profile-media {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-solid);
}

.profile-media img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.profile-copy {
    display: grid;
    gap: 1rem;
}

.profile-copy p {
    max-width: 760px;
    font-size: 1.03rem;
}

.social-panel {
    display: grid;
    gap: 0.55rem;
}

.social-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    color: var(--paper);
    background: rgba(246, 240, 223, 0.04);
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.social-panel a::after {
    content: "↗";
    color: var(--mint);
}

.social-panel a:hover,
.social-panel a:focus-visible {
    border-color: var(--mint);
    background: rgba(120, 228, 191, 0.08);
    outline: none;
}

.contact-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
    gap: 3rem;
    align-items: start;
    padding-top: 5rem;
    padding-bottom: 5rem;
    border-top: 1px solid var(--line);
}

.contact-section p {
    max-width: 560px;
    margin-top: 1rem;
}

.contact-telegram {
    margin-top: 1.4rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.85rem 0.95rem;
    color: var(--paper);
    background: rgba(246, 240, 223, 0.05);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-form textarea {
    min-height: 146px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--mint);
    box-shadow: 0 0 0 4px rgba(120, 228, 191, 0.12);
}

.contact-form button {
    justify-self: start;
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(18px);
}

.project-modal.is-open {
    display: grid;
}

.modal-frame {
    width: min(1180px, calc(100% - 96px));
    height: min(86vh, 840px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #080807;
    box-shadow: var(--shadow);
}

.modal-art {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(120, 228, 191, 0.08), rgba(255, 118, 95, 0.06)),
        #050504;
}

.modal-media {
    width: 100%;
    height: 100%;
}

.modal-media img,
.modal-media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-media video {
    background: #050504;
}

.modal-panel {
    display: grid;
    grid-template-rows: auto auto auto auto auto auto 1fr;
    align-content: start;
    gap: 1rem;
    min-height: 0;
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    background: var(--surface-solid);
}

.modal-panel h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
}

.modal-panel p {
    margin: 0;
    color: var(--muted);
}

.modal-details[hidden] {
    display: none;
}

.modal-links[hidden] {
    display: none;
}

.modal-detail-block {
    display: grid;
    gap: 0.45rem;
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
}

.modal-detail-block h3 {
    margin: 0;
    color: var(--amber);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.modal-detail-block ul {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding-left: 1rem;
    color: var(--muted);
}

.modal-links {
    display: grid;
    gap: 0.55rem;
    border-top: 1px solid var(--line);
    padding-top: 0.85rem;
}

.modal-links h3 {
    margin: 0;
    color: var(--amber);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.modal-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.modal-link-list a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    color: var(--paper);
    background: rgba(246, 240, 223, 0.05);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 160ms ease, background 160ms ease;
}

.modal-link-list a:hover,
.modal-link-list a:focus-visible {
    border-color: var(--mint);
    background: rgba(120, 228, 191, 0.08);
    outline: none;
}

.modal-link-list svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.modal-thumbs {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 0.45rem;
    padding-top: 0.4rem;
}

.thumb-btn {
    width: 64px;
    height: 64px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.thumb-btn.is-active,
.thumb-btn:hover,
.thumb-btn:focus-visible {
    border-color: var(--mint);
    outline: none;
}

.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--paper);
    background: rgba(246, 240, 223, 0.04);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
    border-color: var(--mint);
    color: var(--mint);
    background: rgba(120, 228, 191, 0.1);
    outline: none;
}

.modal-close {
    position: fixed;
    top: 1.3rem;
    right: 1.3rem;
    z-index: 3;
}

.modal-step {
    position: fixed;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
}

.modal-prev {
    left: 1.3rem;
}

.modal-next {
    right: 1.3rem;
}

.site-footer {
    padding-top: 2rem;
    padding-bottom: 2rem;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 0.88rem;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
        animation-duration: 1ms !important;
    }
}

@media (max-width: 1040px) {
    .site-nav {
        grid-template-columns: 1fr auto;
    }

    .nav-links {
        display: none;
    }

    .hero-layout,
    .section-top,
    .profile-section,
    .contact-section {
        grid-template-columns: 1fr;
    }

    .spotlight {
        max-width: 640px;
    }

    .case-card,
    .case-card:first-child,
    .case-card:nth-child(2),
    .case-card:nth-child(n + 3) {
        grid-column: span 6;
    }

    .project-grid,
    .process-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-section {
        align-items: start;
    }

    .profile-media {
        width: min(280px, 100%);
    }

    .social-panel {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .social-panel a {
        justify-content: center;
        text-align: center;
    }

    .social-panel a::after {
        display: none;
    }

    .modal-frame {
        grid-template-columns: 1fr;
        width: min(860px, calc(100% - 88px));
    }

    .modal-panel {
        max-height: 38vh;
        border-left: 0;
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 720px) {
    .page-pad {
        width: min(100% - 28px, 1180px);
    }

    .site-nav {
        height: 64px;
        padding: 0 0.85rem;
    }

    .brand-copy strong {
        font-size: 0.9rem;
    }

    .brand-copy span {
        display: none;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .hero {
        min-height: calc(100svh - 130px);
    }

    .hero-layout {
        gap: 1.2rem;
        padding-top: 2.4rem;
        padding-bottom: 0.9rem;
    }

    .hero-copy h1 {
        font-size: 3rem;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-actions {
        margin-top: 1.2rem;
    }

    .spotlight {
        padding-left: 0.85rem;
    }

    .spotlight p {
        margin-top: 0.55rem;
        font-size: 0.94rem;
    }

    .spotlight h2,
    .modal-panel h2 {
        font-size: 1.55rem;
    }

    .spotlight-facts {
        display: none;
    }

    .featured-strip {
        grid-auto-columns: minmax(154px, 184px);
        padding-bottom: 0.8rem;
    }

    .section,
    .process-section {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .section-top h2,
    .profile-copy h2,
    .contact-section h2 {
        font-size: 2rem;
    }

    .case-grid,
    .project-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .case-card,
    .case-card:first-child,
    .case-card:nth-child(2),
    .case-card:nth-child(n + 3) {
        grid-column: auto;
    }

    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    .filter-btn {
        flex: 0 0 auto;
    }

    .social-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-section {
        gap: 2rem;
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .contact-form button,
    .contact-telegram {
        width: 100%;
    }

    .project-modal {
        padding: 0;
    }

    .modal-frame {
        width: 100%;
        height: 100%;
        grid-template-rows: minmax(240px, 38vh) minmax(0, 1fr);
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .modal-panel {
        max-height: none;
        padding: 1rem;
    }

    .modal-facts {
        grid-template-columns: 1fr;
    }

    .modal-close {
        top: 0.85rem;
        right: 0.85rem;
        background: rgba(0, 0, 0, 0.52);
    }

    .modal-step {
        width: 38px;
        height: 38px;
        top: 24vh;
        background: rgba(0, 0, 0, 0.52);
    }

    .modal-prev {
        left: 0.85rem;
    }

    .modal-next {
        right: 0.85rem;
    }
}

@media (max-width: 420px) {
    .hero-copy h1 {
        font-size: 2.5rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .social-panel {
        grid-template-columns: 1fr;
    }
}
