.portfolio-demo-section {
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 16%, rgba(35, 238, 205, 0.08), transparent 18rem),
        radial-gradient(circle at 78% 76%, rgba(22, 95, 196, 0.12), transparent 24rem),
        linear-gradient(180deg, rgba(4, 8, 18, 0.96), rgba(5, 8, 16, 1));
}

@media (min-width: 981px) {
    .included-section,
    .portfolio-demo-section {
        height: 100svh;
        min-height: 100svh;
    }

    @supports (height: 100dvh) {
        .included-section,
        .portfolio-demo-section {
            height: 100dvh;
            min-height: 100dvh;
        }
    }

    .included-layout,
    .portfolio-demo-layout {
        display: grid;
        align-content: center;
        height: 100%;
    }

    .included-layout {
        padding: clamp(40px, 6vh, 66px) 0;
    }
}

.portfolio-demo-layout {
    position: relative;
    z-index: 2;
    width: min(100% - 40px, 1180px);
    margin: 0 auto;
    padding: clamp(60px, 8vh, 82px) 0 clamp(46px, 6vh, 62px);
}

@media (min-width: 981px) {
    .portfolio-demo-layout {
        padding: clamp(28px, 4vh, 44px) 0;
    }
}

.portfolio-demo-grid {
    --portfolio-panel-height: clamp(500px, 62vh, 562px);
    display: grid;
    grid-template-columns: minmax(0, 2.35fr) minmax(330px, 0.98fr);
    gap: clamp(22px, 3vw, 40px);
    align-items: stretch;
}

@media (min-width: 981px) {
    .portfolio-demo-grid {
        height: var(--portfolio-panel-height);
    }
}

.portfolio-browser,
.portfolio-info-stack {
    min-height: clamp(320px, 40vh, 410px);
}

@media (min-width: 981px) {
    .portfolio-browser,
    .portfolio-info-stack {
        height: 100%;
        min-height: 0;
    }

    .portfolio-screen,
    .portfolio-preview-frame,
    .portfolio-preview-fallback {
        min-height: 0;
    }
}

.portfolio-browser {
    overflow: hidden;
    border-color: rgba(47, 126, 202, 0.48);
    border-radius: 18px;
    background: rgba(9, 20, 38, 0.66);
    box-shadow: 0 22px 84px rgba(0, 0, 0, 0.28);
}

.portfolio-preview-slide {
    display: none;
    height: 100%;
    animation: portfolioSlideIn 520ms ease both;
}

.portfolio-preview-slide.is-active {
    display: block;
}

.portfolio-browser-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    border-bottom: 1px solid rgba(47, 126, 202, 0.36);
    padding: 0 20px;
}

.browser-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    border-radius: 50%;
}

.browser-dot.is-red { background: #ff665c; }
.browser-dot.is-yellow { background: #ffbd3e; }
.browser-dot.is-green { background: #32d55a; }

.portfolio-browser-bar strong {
    display: flex;
    align-items: center;
    min-height: 42px;
    flex: 1;
    margin-left: 12px;
    border: 1px solid rgba(47, 126, 202, 0.58);
    border-radius: 8px;
    padding: 0 20px;
    color: rgba(104, 161, 197, 0.88);
    background: rgba(4, 8, 18, 0.74);
    font-size: clamp(0.92rem, 1.4vw, 1.22rem);
    font-weight: 600;
}

.portfolio-screen {
    position: relative;
    height: calc(100% - 62px);
    min-height: 300px;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 0%, rgba(20, 232, 210, 0.12), transparent 14rem),
        linear-gradient(135deg, rgba(5, 12, 24, 0.96), rgba(8, 18, 32, 0.9));
}

.portfolio-screen.has-live-preview {
    background: #ffffff;
}

.portfolio-preview-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: 0;
    background: #ffffff;
}

.portfolio-preview-fallback {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    min-height: 300px;
    padding: 32px;
    text-align: center;
}

.portfolio-preview-fallback strong {
    color: #14e8d2;
    font-size: clamp(1.28rem, 2.4vw, 2rem);
    font-weight: 900;
}

.portfolio-preview-fallback span {
    width: min(100%, 420px);
    color: rgba(173, 218, 248, 0.82);
    font-size: 0.98rem;
    line-height: 1.6;
    font-weight: 700;
}
.portfolio-info-card {
    display: none;
    min-height: 100%;
    grid-template-rows: auto auto auto 1fr auto auto;
    gap: clamp(10px, 1.4vh, 14px);
    padding: clamp(20px, 2vw, 28px);
    border-color: rgba(47, 126, 202, 0.5);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(14, 29, 51, 0.86), rgba(8, 15, 28, 0.78)),
        radial-gradient(circle at 88% 8%, rgba(20, 232, 210, 0.1), transparent 12rem);
    animation: portfolioSlideIn 520ms ease both;
}

.portfolio-info-card.is-active {
    display: grid;
}

.portfolio-type {
    justify-self: start;
    border: 1px solid rgba(20, 232, 210, 0.5);
    border-radius: 999px;
    padding: 7px 20px;
    color: #14e8d2;
    background: rgba(20, 232, 210, 0.08);
    font-size: 0.92rem;
    font-weight: 800;
}

.portfolio-info-card h3 {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: clamp(1.45rem, 2.25vw, 1.95rem);
    line-height: 1.18;
}

.portfolio-info-card p {
    margin: 0;
    color: rgba(104, 161, 197, 0.92);
    font-size: clamp(0.95rem, 1.25vw, 1.08rem);
    line-height: 1.5;
    font-weight: 600;
}

.portfolio-info-card ul {
    display: grid;
    align-content: end;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portfolio-info-card li {
    position: relative;
    padding-left: 24px;
    color: rgba(104, 161, 197, 0.94);
    font-size: clamp(0.9rem, 1.14vw, 1rem);
    font-weight: 700;
}

.portfolio-info-card li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 0.58em;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #14e8d2;
    box-shadow: 0 0 14px rgba(20, 232, 210, 0.48);
}

.portfolio-card-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

.portfolio-demo-button,
.portfolio-contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    border-radius: 12px;
    color: #020817;
    background: linear-gradient(135deg, #19f0d8, #10cdbd);
    font-size: clamp(0.92rem, 1.22vw, 1.05rem);
    font-weight: 950;
    transition: transform 220ms ease, filter 220ms ease, box-shadow 220ms ease;
}

.portfolio-demo-button:hover,
.portfolio-demo-button:focus-visible,
.portfolio-contact-button:hover,
.portfolio-contact-button:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
    outline: 0;
    box-shadow: 0 0 28px rgba(20, 232, 210, 0.28);
}

.portfolio-contact-button {
    border: 1px solid rgba(20, 232, 210, 0.44);
    color: #14e8d2;
    background: rgba(20, 232, 210, 0.08);
}

.portfolio-contact-button:hover,
.portfolio-contact-button:focus-visible {
    color: #ffffff;
    background: rgba(20, 232, 210, 0.16);
}
.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-tags span {
    border: 1px solid rgba(47, 126, 202, 0.48);
    border-radius: 999px;
    padding: 6px 12px;
    color: rgba(173, 218, 248, 0.88);
    background: rgba(3, 10, 21, 0.38);
    font-size: 0.8rem;
    font-weight: 800;
}

.portfolio-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: clamp(12px, 1.6vh, 18px);
}

.portfolio-nav-button {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 1px solid rgba(47, 126, 202, 0.56);
    border-radius: 50%;
    color: #14e8d2;
    background: rgba(7, 17, 32, 0.56);
    cursor: pointer;
    transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.portfolio-nav-button:hover,
.portfolio-nav-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(20, 232, 210, 0.76);
    background: rgba(20, 232, 210, 0.08);
    outline: 0;
    box-shadow: 0 0 26px rgba(20, 232, 210, 0.16);
}

.portfolio-nav-button svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portfolio-dots {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portfolio-dot {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(47, 126, 202, 0.58);
    cursor: pointer;
    transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.portfolio-dot.is-active {
    transform: scale(1.34);
    background: #14e8d2;
    box-shadow: 0 0 18px rgba(20, 232, 210, 0.42);
}
