@media (min-width: 1600px) {
    .section { width: min(1350px, 90%); }
    .hero-text { width: min(760px, 100%); }
}

@media (max-width: 1100px) {
    .project-grid { grid-template-columns: repeat(2, 1fr); }
    .experience-grid { grid-template-columns: 1fr; }
    .small-grid, .studio-grid, .studios-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
    body {
        background:
            linear-gradient(180deg, rgba(4, 10, 24, 0.7) 0%, rgba(4, 10, 24, 0.9) 100%),
            url("../section-bg.webp") center top / cover no-repeat,
            var(--bg);
    }

    body::after,
    .hero::before,
    .section::before,
    .hero-particle,
    .shooting-star {
        display: none !important;
    }

    .navbar {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
        gap: 14px;
        backdrop-filter: none;
    }

    .nav-links {
        margin-left: 0;
        flex-wrap: wrap;
        gap: 14px;
    }

    .logo {
        font-size: 22px;
        letter-spacing: 7px;
    }

    .hero {
        min-height: 92vh;
        padding: 70px 24px;
        transition: none;
        background:
            linear-gradient(180deg, rgba(3, 8, 20, 0.62) 0%, rgba(3, 8, 20, 0.82) 52%, rgba(3, 8, 20, 0.98) 100%),
            url("../hero-bg-harmonized.webp") 62% center / cover no-repeat;
    }

    .hero h1 { font-size: clamp(42px, 13vw, 70px); }
    .description { font-size: 16px; }

    .btn.secondary,
    .socials a,
    .about-text,
    .card,
    .experience-card,
    .contact-card,
    .tags span {
        backdrop-filter: none;
    }

    .section {
        width: min(100% - 28px, 1180px);
        padding: 72px 0;
    }

    #about {
        margin-top: 0;
        padding-top: 72px;
    }

    .project-grid,
    .small-grid,
    .studio-grid,
    .studios-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .project-card img { height: 220px; }
}

@media (max-width: 480px) {
    .buttons { flex-direction: column; }
    .btn { width: 100%; }
    .section h2 { font-size: 36px; }

    .about-text,
    .card,
    .experience-card,
    .contact-card {
        padding: 24px;
    }

    .roblox-stats { gap: 8px; }
    .roblox-stats .stat-value { font-size: 16px; }
    .roblox-stats .stat-label { font-size: 9px; }
    .hero-reach { width: 100%; }
    .hero-reach-stats { justify-content: space-between; gap: 10px; }
    .hero-reach-stat { flex-direction: column; gap: 4px; }
    .hero-reach-stat strong { font-size: 24px; }
}

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

button { font: inherit; color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 4px; }
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 1000; padding: 10px 14px; border-radius: 10px; background: var(--primary); color: #04111f; font-weight: 700; }
.skip-link:focus { top: 18px; }

.menu-toggle { display: none; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: rgba(13, 30, 65, 0.5); cursor: pointer; }
.lang-switch button.active { color: var(--primary-2); border-color: var(--border-strong); background: rgba(122, 156, 255, 0.18); }
.social-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text);
    background: rgba(13, 30, 65, 0.5);
    border: 1px solid rgba(175, 200, 255, 0.14);
    cursor: pointer;
    transition: 0.25s ease;
}
.social-link:hover { background: rgba(122, 156, 255, 0.2); }
.availability-status {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(175, 200, 255, 0.2);
    border-radius: 999px;
    background: rgba(13, 30, 65, 0.5);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    border-color: rgba(175, 200, 255, 0.28);
    background: rgba(16, 38, 79, 0.58);
    box-shadow: inset 0 0 0 1px rgba(122, 156, 255, 0.05), 0 8px 28px rgba(3, 8, 20, 0.18);
}
.availability-status > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #8dd9bc; box-shadow: 0 0 12px rgba(141, 217, 188, 0.7); }

.social-icon { width: 17px; height: 17px; flex: 0 0 auto; fill: currentColor; }

.about-blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.section-intro { max-width: 820px; margin: -18px 0 28px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.about-blocks article { padding: 22px; position: relative; z-index: 2; }
.about-blocks article:nth-child(odd) { border-right: 1px solid rgba(175, 200, 255, 0.12); }
.about-blocks article:nth-child(-n+2) { border-bottom: 1px solid rgba(175, 200, 255, 0.12); }
.about-blocks h3 { margin-bottom: 9px; font-size: 20px; }
.about-blocks p { margin: 0; font-size: 16px; line-height: 1.7; }

.skills-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.skill-group { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.skill-group h3 { margin-bottom: 18px; font-size: 21px; }
.skill-group .tags { gap: 9px; }
.skill-group .tags span { padding: 9px 13px; font-size: 13px; }

.qa-card { display: flex; flex-direction: column; }
.qa-card, .studios-card { min-width: 0; overflow-wrap: anywhere; }
.studio-heading { flex-wrap: wrap; }
.studio-contribution { line-height: 1.7; }
#contributionGrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); max-width: 580px; }
.contribution-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.contribution-stats .stat-value { font-size: 15px; overflow-wrap: normal; }
.contribution-card > .studio-group-link { align-self: flex-start; margin-top: 16px; }
@media (min-width: 801px) and (max-width: 1200px) {
    .navbar { flex-wrap: wrap; gap: 14px; }
    .nav-links { flex-wrap: wrap; }
}
.project-placeholder {
    width: 100%;
    height: 104px;
    margin-bottom: 22px;
    display: grid;
    place-content: center;
    text-align: center;
    border: 1px solid rgba(175, 200, 255, 0.16);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(122, 156, 255, 0.2), rgba(13, 30, 65, 0.7));
    position: relative;
    z-index: 2;
}
.project-placeholder strong { font-size: 32px; letter-spacing: -1px; }
.project-placeholder small { color: var(--soft); font-size: 10px; letter-spacing: 2px; }
.project-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; position: relative; z-index: 2; }
.project-heading > span { color: var(--primary-2); font-size: 12px; white-space: nowrap; }
.testing-types { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 16px; position: relative; z-index: 2; }
.testing-types span { padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(175, 200, 255, 0.16); background: rgba(13, 30, 65, 0.55); color: var(--soft); font-size: 12px; line-height: 1.5; }
.project-role.is-lead { align-self: flex-start; width: fit-content; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: rgba(122, 156, 255, 0.18); color: var(--text) !important; }
.roblox-stats[hidden] { display: none; }

.qa-featured { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.qa-featured > .qa-card { grid-column: span 2; }
.qa-featured > .qa-span-half { grid-column: span 3; }
.qa-featured > .qa-span-full { grid-column: span 6; }
.qa-featured > .qa-span-half img, .qa-featured > .qa-span-full img { height: 220px; }
@media (max-width: 1100px) {
    .qa-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qa-featured > .qa-card, .qa-featured > .qa-span-half, .qa-featured > .qa-span-full { grid-column: auto; }
    .qa-featured > .qa-card:last-child:nth-child(odd) { grid-column: span 2; }
}
@media (max-width: 800px) {
    .qa-featured { grid-template-columns: 1fr; }
    .qa-featured > .qa-card:last-child:nth-child(odd) { grid-column: auto; }
}
.qa-subheading { margin: 44px 0 18px; color: var(--muted); font-size: 18px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.qa-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qa-compact-card { display: flex; flex-direction: row; align-items: flex-start; gap: 18px; padding: 20px; min-height: 0; }
.qa-compact-thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 14px; border: 1px solid rgba(175, 200, 255, 0.16); object-fit: cover; display: grid; place-items: center; background: linear-gradient(135deg, rgba(122, 156, 255, 0.2), rgba(13, 30, 65, 0.7)); color: var(--text); font-size: 15px; font-weight: 800; position: relative; z-index: 2; }
.qa-compact-body { display: flex; flex-direction: column; min-width: 0; flex: 1; position: relative; z-index: 2; }
.qa-compact-card h3 { font-size: 19px; margin-bottom: 6px; }
.qa-compact-card .project-description { font-size: 14px !important; line-height: 1.65; margin-bottom: 12px; }
.qa-compact-card .testing-types { margin: 0 0 12px; }
.qa-compact-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 !important; font-size: 14px !important; color: var(--soft) !important; }
.qa-compact-meta strong { color: var(--text); font-weight: 800; }
.project-role { margin-bottom: 8px !important; color: var(--primary-2) !important; font-weight: 700; font-size: 14px !important; }
.project-description { font-size: 15px !important; }
.qa-card .stats-updated { margin-top: 8px; }
.stats-unavailable { color: var(--soft); }

.studio-role { color: var(--primary-2) !important; font-size: 14px !important; }
.studio-projects { color: var(--muted) !important; font-size: 14px !important; }
.studios-stats p { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid rgba(175, 200, 255, 0.1); font-size: 14px; }
.studios-stats strong { color: var(--text); }
.studios-card .stats-updated { margin-top: 14px; }

.studio-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.studio-group-link { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 12px; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.studio-group-link:hover { color: var(--text); border-color: var(--border-strong); transform: translateY(-1px); }
.studio-games { margin-top: 18px; }
.studio-games h4 { margin-bottom: 10px; font-size: 14px; color: var(--primary-2); }
.studio-games-list { display: grid; gap: 8px; }
.studio-game-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 8px; border: 1px solid rgba(175, 200, 255, 0.12); border-radius: 12px; background: rgba(6, 18, 37, 0.28); }
a.studio-game-item:hover { border-color: var(--border-strong); background: rgba(20, 42, 82, 0.42); }
.studio-game-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; }
.studio-game-thumb-fallback { display: grid; place-items: center; background: rgba(122, 156, 255, 0.12); color: var(--primary-2); font-weight: 800; }
.studio-game-info { display: grid; gap: 3px; min-width: 0; }
.studio-game-info strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.studio-game-info span { color: var(--soft); font-size: 11px; line-height: 1.4; }
.studio-games-more { margin-top: 9px; }
.studio-games-more summary { width: fit-content; cursor: pointer; color: var(--primary-2); font-size: 13px; }
.studio-games-more[open] summary { margin-bottom: 9px; }
.studio-history-state { margin-top: 12px; }

.compact-contacts { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 780px; }
button.contact-card { width: 100%; text-align: left; cursor: pointer; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
    .menu-toggle { display: block; margin-left: auto; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: rgba(13, 30, 65, 0.6); cursor: pointer; }
    .navbar { flex-direction: row; align-items: center; flex-wrap: wrap; }
    .nav-links { display: none; width: 100%; flex-basis: 100%; order: 3; flex-direction: column; align-items: flex-start; }
    .nav-links.open { display: flex; }
    .lang-switch { margin-left: 0; }
    .hero { flex-direction: column; align-items: flex-start; }
    .skills-groups, .compact-contacts, .qa-compact { grid-template-columns: 1fr; }
    .project-placeholder { height: 120px; }
}

@media (max-width: 560px) {
    .about-blocks { grid-template-columns: 1fr; }
    .about-blocks article:nth-child(odd) { border-right: 0; }
    .about-blocks article { border-bottom: 1px solid rgba(175, 200, 255, 0.12); padding: 18px 0; }
    .about-blocks article:last-child { border-bottom: 0; }
    .skill-group { padding: 20px; }
    .qa-compact-card { gap: 14px; padding: 18px; }
    .qa-compact-thumb { flex-basis: 48px; width: 48px; height: 48px; border-radius: 12px; font-size: 12px; }
}
