/*
|--------------------------------------------------------------------------
| Portfolio Hero
|--------------------------------------------------------------------------
*/

.portfolio-hero {
    position: relative;
    overflow: hidden;
    padding: 105px 0;
    color: var(--wc-white);
    background: var(--wc-black);
}

.portfolio-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );

    background-size: 42px 42px;
}

.portfolio-hero::after {
    position: absolute;
    top: -200px;
    right: -150px;
    width: 600px;
    height: 600px;
    content: "";
    pointer-events: none;

    background: radial-gradient(
        circle,
        rgba(37, 99, 235, 0.12) 0%,
        rgba(37, 99, 235, 0.04) 35%,
        transparent 70%
    );
}

.portfolio-hero .container {
    position: relative;
    z-index: 1;
}

.portfolio-hero-content {
    max-width: 850px;
}

.portfolio-hero .section-label {
    color: #8eb8ff;
}

.portfolio-hero h1 {
    max-width: 800px;
    margin: 0 0 25px;
    color: var(--wc-white);
    font-size: 4rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-hero p {
    max-width: 700px;
    margin: 0;
    color: #b8bec7;
    font-size: 1.1rem;
    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Portfolio About
|--------------------------------------------------------------------------
*/

.portfolio-about {
    padding: 105px 0;
    background: var(--wc-white);
}

.portfolio-about .section-heading {
    max-width: 760px;
    margin-bottom: 55px;
}

.portfolio-about .section-heading h2 {
    margin: 0 0 20px;
    color: var(--wc-black);
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-about .section-heading p {
    margin: 0;
    color: var(--wc-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.portfolio-about-card {
    height: 100%;
    padding: 32px;
    background: var(--wc-white);
    border: 1px solid var(--wc-border);
    border-radius: 12px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.portfolio-about-card:hover {
    border-color: #cbd9f2;
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.portfolio-about-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 28px;
    color: var(--wc-blue);
    background: var(--wc-blue-light);
    border-radius: 10px;
    font-size: 1.2rem;
}

.portfolio-about-card h3 {
    margin: 0 0 14px;
    color: var(--wc-black);
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 800;
}

.portfolio-about-card p {
    margin: 0;
    color: var(--wc-muted);
    line-height: 1.65;
}


/*
|--------------------------------------------------------------------------
| Portfolio Projects
|--------------------------------------------------------------------------
*/

.portfolio-projects {
    padding: 105px 0;
    color: var(--wc-dark);
}

.portfolio-projects .section-label {
    color: #8eb8ff;
}

.portfolio-projects .portfolio-heading {
    max-width: 760px;
    margin-bottom: 50px;
}

.portfolio-projects .portfolio-heading h2 {
    margin: 0 0 20px;
    color: var(--wc-dark);
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-projects .portfolio-heading p {
    max-width: 650px;
    margin: 0;
    color: #aeb5be;
    font-size: 1.05rem;
    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Portfolio Filters
|--------------------------------------------------------------------------
*/

.portfolio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 45px;
    padding-bottom: 20px;
    border-bottom: 1px solid #343941;
}

.portfolio-filter {
    padding: 9px 17px;
    color: #969da7;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.portfolio-filter:hover {
    color: var(--wc-white);
    background: rgba(37, 99, 235, 0.08);
}

.portfolio-filter.active {
    color: var(--wc-white);
    background: var(--wc-blue);
    border-color: var(--wc-blue);
}


/*
|--------------------------------------------------------------------------
| Portfolio Cards
|--------------------------------------------------------------------------
*/

.portfolio-project {
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

.portfolio-project.is-hidden {
    display: none;
}

.portfolio-project-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
    color: var(--wc-white);
    background: #15171a;
    border-radius: 14px;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.portfolio-project-card:hover {
    color: var(--wc-white);
    transform: translateY(-5px);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
}

.portfolio-project-large {
    min-height: 560px;
}


/*
|--------------------------------------------------------------------------
| Project Preview
|--------------------------------------------------------------------------
*/

.portfolio-project-preview {
    position: relative;
    height: 400px;
    min-height: 400px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    background:
        linear-gradient(
            135deg,
            #15171a 0%,
            #292e35 100%
        );
}

/* Контейнер прокрутки полноразмерного скриншота */
.portfolio-shot-scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(142, 184, 255, 0.4) transparent;
}

.portfolio-shot-scroll::-webkit-scrollbar {
    width: 6px;
}

.portfolio-shot-scroll::-webkit-scrollbar-thumb {
    background: rgba(142, 184, 255, 0.4);
    border-radius: 3px;
}

/* Полный скриншот: ширина 100%, высота — по содержимому (прокручивается) */
.portfolio-project-shot {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.portfolio-project-card:hover .portfolio-shot-scroll {
    scrollbar-color: rgba(142, 184, 255, 0.7) transparent;
}

/* Затемнение снизу для плавного перехода к контенту */
.portfolio-project-preview::after {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    content: "";
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(21, 23, 26, 0) 0%,
        rgba(21, 23, 26, 0.7) 100%
    );
}

.portfolio-project-number {
    position: absolute;
    z-index: 3;
    top: 25px;
    left: 28px;

    color: #8eb8ff;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 0.8rem;
    font-weight: 700;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

/* Подсказка о возможности прокрутки (внизу превью) */
.portfolio-shot-hint {
    position: absolute;
    z-index: 3;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;

    color: #cbd5e1;
    font-size: 0.72rem;
    white-space: nowrap;

    background: rgba(21, 23, 26, 0.55);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.12);

    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.portfolio-project-card:hover .portfolio-shot-hint {
    opacity: 1;
}

.portfolio-shot-hint i {
    animation: portfolio-hint-bounce 1.6s ease infinite;
}

@keyframes portfolio-hint-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}


/*
|--------------------------------------------------------------------------
| Project Content
|--------------------------------------------------------------------------
*/

.portfolio-project-content {
    padding: 30px;
    background: #15171a;
}

.portfolio-project-type {
    margin-bottom: 10px;
    color: #8eb8ff;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.portfolio-project-content h3 {
    margin: 0 0 14px;
    color: var(--wc-white);
    font-size: 1.65rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.portfolio-project-content p {
    max-width: 600px;
    margin: 0 0 22px;
    color: #969da7;
    line-height: 1.6;
}

.portfolio-project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--wc-white);
    font-size: 0.9rem;
    font-weight: 700;
}

.portfolio-project-link i {
    color: #8eb8ff;
    font-size: 0.75rem;

    transition:
        transform 0.2s ease;
}

.portfolio-project-card:hover .portfolio-project-link i {
    transform: translateX(5px);
}


/*
|--------------------------------------------------------------------------
| Portfolio Reviews
|--------------------------------------------------------------------------
*/

.portfolio-reviews {
    padding: 105px 0;
    background: var(--wc-dark);
}

.portfolio-reviews .portfolio-heading {
    max-width: 760px;
    margin-bottom: 55px;
}

.portfolio-reviews .portfolio-heading .section-label {
    color: var(--wc-blue);
}

.portfolio-reviews .portfolio-heading h2 {
    margin: 0 0 20px;
    color: var(--wc-white);
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-reviews .portfolio-heading p {
    max-width: 650px;
    margin: 0;
    color: var(--wc-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Review Card
|--------------------------------------------------------------------------
*/

.portfolio-review-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px;

    background: var(--wc-white);
    border: 1px solid var(--wc-border);
    border-radius: 12px;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.portfolio-review-card:hover {
    border-color: #cbd9f2;
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}


/*
|--------------------------------------------------------------------------
| Review Header
|--------------------------------------------------------------------------
*/

.portfolio-review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.portfolio-review-avatar {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f1f3f5;
    border-radius: 50%;
}

.portfolio-review-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-review-header > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.portfolio-review-header h3 {
    overflow: hidden;
    margin: 0 0 4px;
    color: var(--wc-black);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portfolio-review-header span {
    color: var(--wc-muted);
    font-size: 0.8rem;
}


/*
|--------------------------------------------------------------------------
| Review Rating
|--------------------------------------------------------------------------
*/

.portfolio-review-rating {
    display: flex;
    flex-shrink: 0;
    gap: 3px;
}

.portfolio-review-rating i {
    color: var(--wc-blue);
    font-size: 0.78rem;
}


/*
|--------------------------------------------------------------------------
| Review Text
|--------------------------------------------------------------------------
*/

.portfolio-review-card > p {
    margin: 0;
    color: var(--wc-text);
    font-size: 0.98rem;
    line-height: 1.7;
}


/*
|--------------------------------------------------------------------------
| Yandex Profile Link
|--------------------------------------------------------------------------
*/

.portfolio-reviews-source {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.portfolio-reviews-source a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--wc-text);
    font-weight: 700;
    text-decoration: none;

    transition:
        color 0.2s ease;
}

.portfolio-reviews-source a:hover {
    color: var(--wc-blue);
}

.portfolio-reviews-source i {
    color: var(--wc-blue);
    font-size: 0.8rem;

    transition:
        transform 0.2s ease;
}

.portfolio-reviews-source a:hover i {
    transform: translateX(4px);
}


/*
|--------------------------------------------------------------------------
| Portfolio Links
|--------------------------------------------------------------------------
*/

.portfolio-links {
    padding: 105px 0;
    color: var(--wc-white);
    background: var(--wc-dark);
}

.portfolio-links .portfolio-heading {
    max-width: 760px;
    margin-bottom: 50px;
}

.portfolio-links .section-label {
    color: #8eb8ff;
}

.portfolio-links .portfolio-heading h2 {
    margin: 0 0 20px;
    color: var(--wc-white);
    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-links .portfolio-heading p {
    max-width: 650px;
    margin: 0;
    color: #aeb5be;
    font-size: 1.05rem;
    line-height: 1.7;
}

.portfolio-external-card {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 100%;
    padding: 28px 30px;

    color: var(--wc-white);
    background: #15171a;
    border: 1px solid #343941;
    border-radius: 12px;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        background-color 0.25s ease;
}

.portfolio-external-card:hover {
    color: var(--wc-white);
    background: #1a1d21;
    border-color: #4a5059;
    transform: translateY(-4px);
}

.portfolio-external-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;

    color: #8eb8ff;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(142, 184, 255, 0.15);
    border-radius: 10px;
    font-size: 1.1rem;
}

.portfolio-external-content {
    flex: 1;
}

.portfolio-external-content h3 {
    margin: 0 0 6px;
    color: var(--wc-white);
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 800;
}

.portfolio-external-content p {
    margin: 0;
    color: #969da7;
    font-size: 0.92rem;
    line-height: 1.5;
}

.portfolio-external-card > i {
    flex-shrink: 0;
    color: #68717c;
    font-size: 0.8rem;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.portfolio-external-card:hover > i {
    color: #8eb8ff;
    transform: translateX(5px);
}


/*
|--------------------------------------------------------------------------
| Portfolio CTA
|--------------------------------------------------------------------------
*/

.portfolio-cta {
    padding: 105px 0;
    background: var(--wc-white);
}

.portfolio-cta-block {
    position: relative;
    overflow: hidden;
    padding: 75px 60px;

    text-align: center;

    background: var(--wc-white);
    border: 1px solid var(--wc-border);
    border-radius: 14px;
}

.portfolio-cta-block::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 90px;
    height: 3px;
    content: "";
    background: var(--wc-blue);
    transform: translateX(-50%);
}

.portfolio-cta-block::after {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 70px;
    height: 70px;
    content: "";

    border-top: 1px solid rgba(37, 99, 235, 0.15);
    border-right: 1px solid rgba(37, 99, 235, 0.15);
}

.portfolio-cta-block .section-label {
    margin-bottom: 20px;
    color: var(--wc-blue);
}

.portfolio-cta-block h2 {
    position: relative;
    z-index: 1;

    max-width: 800px;
    margin: 0 auto 20px;

    color: var(--wc-black);

    font-size: 3rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.portfolio-cta-block p {
    position: relative;
    z-index: 1;

    max-width: 650px;
    margin: 0 auto 30px;

    color: var(--wc-muted);
    line-height: 1.7;
}

.portfolio-cta-block .btn {
    position: relative;
    z-index: 1;
}


/*
|--------------------------------------------------------------------------
| Portfolio Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {

    .portfolio-hero {
        padding: 80px 0;
    }

    .portfolio-hero h1 {
        font-size: 3.5rem;
    }

    .portfolio-about {
        padding: 80px 0;
    }

    .portfolio-about .section-heading h2 {
        font-size: 2.5rem;
    }

    .portfolio-projects {
        padding: 80px 0;
    }

    .portfolio-projects .portfolio-heading h2 {
        font-size: 2.5rem;
    }

    .portfolio-project-card,
    .portfolio-project-large {
        min-height: 470px;
    }

    .portfolio-reviews {
        padding: 80px 0;
    }

    .portfolio-reviews .portfolio-heading h2 {
        font-size: 2.5rem;
    }

    .portfolio-links {
        padding: 80px 0;
    }

    .portfolio-links .portfolio-heading h2 {
        font-size: 2.5rem;
    }

    .portfolio-cta {
        padding: 80px 0;
    }

    .portfolio-cta-block {
        padding: 65px 40px;
    }

    .portfolio-cta-block h2 {
        font-size: 2.5rem;
    }

    .portfolio-project-preview {
        height: 340px;
        min-height: 340px;
    }

}


/*
|--------------------------------------------------------------------------
| Portfolio Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 575.98px) {

    .portfolio-hero {
        padding: 60px 0;
    }

    .portfolio-hero h1 {
        font-size: 2.8rem;
    }

    .portfolio-hero p {
        font-size: 1rem;
    }

    .portfolio-about {
        padding: 70px 0;
    }

    .portfolio-about .section-heading {
        margin-bottom: 40px;
    }

    .portfolio-about .section-heading h2 {
        font-size: 2.2rem;
    }

    .portfolio-about .section-heading p {
        font-size: 1rem;
    }

    .portfolio-about-card {
        padding: 26px;
    }

    .portfolio-projects {
        padding: 70px 0;
    }

    .portfolio-projects .portfolio-heading {
        margin-bottom: 40px;
    }

    .portfolio-projects .portfolio-heading h2 {
        font-size: 2.2rem;
    }

    .portfolio-projects .portfolio-heading p {
        font-size: 1rem;
    }

    .portfolio-filters {
        gap: 6px;
        margin-bottom: 35px;
    }

    .portfolio-filter {
        padding: 8px 13px;
        font-size: 0.85rem;
    }

    .portfolio-project-card,
    .portfolio-project-large {
        min-height: 430px;
    }

    .portfolio-project-preview {
        height: 340px;
        min-height: 340px;
    }

    .portfolio-project-content {
        padding: 25px;
    }

    .portfolio-project-content h3 {
        font-size: 1.4rem;
    }

    .portfolio-reviews {
        padding: 70px 0;
    }

    .portfolio-reviews .portfolio-heading {
        margin-bottom: 40px;
    }

    .portfolio-reviews .portfolio-heading h2 {
        font-size: 2.2rem;
    }

    .portfolio-reviews .portfolio-heading p {
        font-size: 1rem;
    }

    .portfolio-review-card {
        padding: 25px;
    }

    .portfolio-review-header {
        gap: 11px;
        margin-bottom: 20px;
    }

    .portfolio-review-avatar {
        width: 46px;
        height: 46px;
    }

    .portfolio-review-header h3 {
        font-size: 0.92rem;
    }

    .portfolio-review-header span {
        font-size: 0.75rem;
    }

    .portfolio-review-rating {
        gap: 2px;
    }

    .portfolio-review-rating i {
        font-size: 0.68rem;
    }

    .portfolio-review-card > p {
        font-size: 0.94rem;
        line-height: 1.65;
    }

    .portfolio-reviews-source {
        margin-top: 40px;
    }

    .portfolio-links {
        padding: 70px 0;
    }

    .portfolio-links .portfolio-heading {
        margin-bottom: 40px;
    }

    .portfolio-links .portfolio-heading h2 {
        font-size: 2.2rem;
    }

    .portfolio-links .portfolio-heading p {
        font-size: 1rem;
    }

    .portfolio-external-card {
        gap: 16px;
        padding: 22px;
    }

    .portfolio-external-icon {
        width: 46px;
        height: 46px;
    }

    .portfolio-external-content h3 {
        font-size: 1.05rem;
    }

    .portfolio-external-content p {
        font-size: 0.85rem;
    }

    .portfolio-cta {
        padding: 70px 0;
    }

    .portfolio-cta-block {
        padding: 55px 25px;
    }

    .portfolio-cta-block h2 {
        font-size: 2.2rem;
    }

    .portfolio-cta-block::after {
        top: 18px;
        right: 18px;
        width: 50px;
        height: 50px;
    }

    .portfolio-project-preview {
        height: 300px;
        min-height: 300px;
    }

}