.studio-page {
    padding: 0 6% 7rem;
}

.studio-showcase {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.studio-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 480px);
    align-items: end;
    gap: 3rem;
    margin: 4rem 0 2.5rem;
}

.studio-eyebrow {
    display: block;
    margin-bottom: .75rem;
    color: var(--primary);
    font-family: monospace;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.studio-intro h2 {
    margin: 0;
    color: var(--secondary);
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.studio-intro p {
    margin: 0 0 .35rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.9;
}

.studio-filters {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem;
    margin: 0 0 2.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    background: color-mix(in srgb, var(--bg-light) 75%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(11, 35, 59, .06);
}

[data-theme="dark"] .studio-filters {
    background: rgba(7, 17, 30, .78);
}

.studio-filters::-webkit-scrollbar {
    display: none;
}

.studio-filter {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 46px;
    padding: .75rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: .86rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: color .25s ease, background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.studio-filter i {
    font-size: 1.05rem;
}

.studio-filter:hover {
    color: var(--secondary);
    transform: translateY(-1px);
}

.studio-filter.is-active {
    color: var(--btn-primary-text);
    background: var(--btn-primary-bg);
    box-shadow: var(--btn-primary-shadow);
}

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

.studio-project-card {
    grid-column: span 6;
    min-width: 0;
    border-radius: 28px;
    opacity: 0;
    transform: translateY(22px);
    animation: studio-card-in .65s cubic-bezier(.2, .8, .2, 1) forwards;
    animation-delay: calc(var(--project-index) * 70ms);
}

.studio-project-card:nth-child(3n + 1) {
    grid-column: span 7;
}

.studio-project-card:nth-child(3n + 2) {
    grid-column: span 5;
}

.studio-project-card[hidden] {
    display: none !important;
}

/* Large interactive website cards */
.studio-project-card--website,
.studio-project-card--website:nth-child(3n + 1),
.studio-project-card--website:nth-child(3n + 2) {
    grid-column: 1 / -1 !important;
    justify-self: center;
    width: 100%;
    max-width: 1280px;
}

.website-card-shell {
    overflow: hidden;
    border: 1px solid rgba(148, 128, 94, .18);
    border-radius: 28px;
    background: var(--bg-light);
    box-shadow: 0 30px 90px rgba(11, 35, 59, .15);
}

.website-card-toolbar {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 58px;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(148, 128, 94, .14);
    background: rgba(148, 128, 94, .055);
}

.browser-controls {
    display: flex;
    align-items: center;
    gap: .42rem;
}

.browser-controls span {
    display: block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff6b6b;
}

.browser-controls span:nth-child(2) {
    background: #f6c453;
}

.browser-controls span:nth-child(3) {
    background: #58c98b;
}

.website-address {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .55rem;
    min-width: 0;
    max-width: 720px;
    min-height: 36px;
    padding: .55rem .9rem;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(148, 128, 94, .14);
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, .48);
    font-family: monospace;
    font-size: .76rem;
    white-space: nowrap;
}

.website-address i {
    flex: 0 0 auto;
    color: #58a978;
}

.website-address span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.interactive-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 34px;
    padding: .5rem .75rem;
    border: 1px solid rgba(88, 169, 120, .22);
    border-radius: 999px;
    color: #3c8058;
    background: rgba(88, 169, 120, .09);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.interactive-badge i {
    font-size: 1rem;
}

.website-viewport {
    position: relative;
    width: 100%;
    height: 720px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .25s ease;
}

.website-viewport:focus-within {
    box-shadow: inset 0 0 0 3px rgba(148, 128, 94, .3);
}

.website-viewport::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(11, 35, 59, .05);
}

.website-viewport iframe {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    width: 1440px;
    height: 900px;
    border: 0;
    background: #fff;
    transform: scale(.8);
    transform-origin: top left;
    pointer-events: auto;
}

.website-card-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
    padding: 1.5rem 1.75rem 1.7rem;
    border-top: 1px solid rgba(148, 128, 94, .14);
}

.website-card-copy {
    min-width: 0;
}

.website-card-meta {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .7rem;
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 800;
}

.website-card-meta > span:not(.website-control-hint) {
    display: inline-flex;
    align-items: center;
    min-height: 29px;
    padding: .38rem .62rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
}

.website-project-number {
    color: var(--primary);
    font-family: monospace;
    letter-spacing: .12em;
}

.website-control-hint {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: #4c9870;
}

.website-card-copy h3 {
    margin: 0 0 .45rem;
    color: var(--secondary);
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.website-card-copy p {
    max-width: 760px;
    margin: 0;
    color: var(--text-muted);
    font-size: .94rem;
    line-height: 1.7;
}

.website-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 46px;
    padding: .75rem 1.05rem;
    border-radius: 999px;
    color: var(--btn-primary-text);
    background: var(--btn-primary-bg);
    box-shadow: var(--btn-primary-shadow);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
    transition: transform .25s ease, filter .25s ease;
}

.website-open-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

[data-theme="dark"] .website-card-shell {
    background: #0b1522;
}

[data-theme="dark"] .website-card-toolbar {
    background: rgba(255, 255, 255, .035);
}

[data-theme="dark"] .website-address {
    background: rgba(255, 255, 255, .04);
}

[data-theme="dark"] .interactive-badge,
[data-theme="dark"] .website-control-hint {
    color: #7ed5a0;
}

.project-visual {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    border: 1px solid rgba(148, 128, 94, .16);
    border-radius: 28px;
    background: #07111e;
    box-shadow: 0 28px 80px rgba(11, 35, 59, .14);
    isolation: isolate;
}

.project-visual > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .8s ease;
}

.studio-project-card:hover .project-visual > img {
    transform: scale(1.045);
    filter: saturate(1.08);
}

.project-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: rgba(255, 255, 255, .34);
    background:
        radial-gradient(circle at 50% 35%, rgba(148, 128, 94, .28), transparent 35%),
        linear-gradient(135deg, #102339, #050a12);
}

.project-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .15;
    background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px);
    background-size: 44px 44px;
}

.project-placeholder i {
    font-size: 5rem;
}

.project-placeholder span {
    font-family: monospace;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .22em;
}

.project-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(3, 9, 18, .06) 20%, rgba(3, 9, 18, .3) 48%, rgba(3, 9, 18, .96) 100%);
    pointer-events: none;
}

.project-topline {
    position: absolute;
    inset: 1.35rem 1.35rem auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.project-number,
.project-category {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: .55rem .85rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    color: #fff;
    background: rgba(3, 9, 18, .45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: .72rem;
    font-weight: 800;
}

.project-number {
    font-family: monospace;
    letter-spacing: .15em;
}

.project-overlay {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    padding: 7rem 2rem 2rem;
    color: #fff;
}

.project-overlay h3 {
    margin: 0 0 .65rem;
    color: #fff;
    font-size: clamp(1.65rem, 2.5vw, 2.5rem);
    line-height: 1.1;
    letter-spacing: -.025em;
}

.project-overlay p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .7);
    font-size: .96rem;
    line-height: 1.7;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-top: 1.35rem;
    padding: .8rem 1.1rem;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px;
    color: #fff;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 800;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}

.project-link:hover {
    color: #07111e;
    background: #fff;
    transform: translateY(-2px);
}

.studio-empty {
    padding: 5rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--glass-border);
    border-radius: 28px;
}

.studio-empty i {
    display: block;
    margin-bottom: 1rem;
    font-size: 3.5rem;
    color: var(--primary);
}

.studio-empty h3 {
    margin-bottom: .5rem;
    color: var(--secondary);
}

.studio-empty p {
    margin: 0;
}

@keyframes studio-card-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .studio-intro {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

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

    .project-visual {
        min-height: 430px;
    }

    .website-card-content {
        gap: 1.25rem;
    }
}

@media (max-width: 760px) {
    .studio-page {
        padding: 0 1rem 4rem !important;
    }

    .studio-page .page-header-liquid {
        padding-top: 92px;
    }

    .studio-page .hero-liquid-stage {
        height: 240px;
        border-radius: 26px;
    }

    .studio-page .lab-telemetry {
        left: 1rem;
        right: 1rem;
        font-size: .58rem;
        letter-spacing: .06em;
    }

    .studio-intro {
        margin: 2.5rem 0 1.5rem;
    }

    .studio-intro p {
        font-size: .95rem;
        line-height: 1.75;
    }

    .studio-filters {
        margin-right: -1rem;
        margin-left: -1rem;
        padding: .55rem 1rem;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .studio-filter {
        min-height: 42px;
        padding: .65rem .95rem;
        font-size: .79rem;
    }

    .studio-projects {
        display: block;
    }

    .studio-project-card,
    .studio-project-card:nth-child(3n + 1),
    .studio-project-card:nth-child(3n + 2) {
        margin-bottom: 1rem;
    }

    .studio-project-card--website,
    .studio-project-card--website:nth-child(3n + 1),
    .studio-project-card--website:nth-child(3n + 2) {
        width: 100%;
        max-width: none;
        margin-bottom: 1.25rem;
    }

    .website-card-shell {
        border-radius: 21px;
    }

    .website-card-toolbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: .75rem;
        min-height: 52px;
        padding: .65rem .75rem;
    }

    .browser-controls {
        gap: .3rem;
    }

    .browser-controls span {
        width: 8px;
        height: 8px;
    }

    .website-address {
        width: 100%;
        min-height: 34px;
        padding: .45rem .65rem;
        font-size: .68rem;
    }

    .interactive-badge {
        display: none;
    }

    .website-viewport {
        height: 620px;
    }

    .website-card-content {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
        padding: 1.2rem;
    }

    .website-card-meta {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .website-control-hint {
        flex-basis: 100%;
    }

    .website-open-link {
        width: 100%;
    }

    .project-visual {
        min-height: 430px;
        border-radius: 22px;
    }

    .project-topline {
        inset: 1rem 1rem auto;
    }

    .project-overlay {
        padding: 6rem 1.25rem 1.35rem;
    }

    .project-overlay p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

@media (prefers-reduced-motion: reduce) {
    .studio-project-card {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .project-visual > img,
    .studio-filter,
    .project-link {
        transition: none;
    }
}
