/* ==========================
   Portfolio Hero
========================== */

.portfolio-hero {
    max-width: 1050px;
    margin: 0 auto;
    padding: 100px 30px 70px;
    text-align: center;
}

.eyebrow {
    margin: 0 0 18px;

    color: #35ccff;
    font-family: "Orbitron", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.portfolio-hero h1 {
    margin: 0;

    font-family: "Orbitron", sans-serif;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.08;
}

.portfolio-hero h1 span {
    color: #36caff;

    text-shadow:
        0 0 18px rgba(54, 202, 255, 0.55);
}

.portfolio-hero > p:last-child {
    max-width: 720px;
    margin: 28px auto 0;

    color: #b9c5d8;
    font-size: 18px;
    line-height: 1.8;
}

/* ==========================
   Portfolio Layout
========================== */

.portfolio-section {
    padding: 30px 8% 110px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px 45px;

    max-width: 1450px;
    margin: 0 auto;
}

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

.project-content {
    padding: 35px 18px 0;
}

.project-type {
    margin: 0 0 12px;

    color: #9f55ff;
    font-family: "Orbitron", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.project-content h2 {
    margin: 0;

    color: #ffffff;
    font-family: "Orbitron", sans-serif;
    font-size: 26px;
    line-height: 1.3;
}

.project-content > p:not(.project-type) {
    margin: 18px 0;

    color: #b6c2d5;
    font-size: 16px;
    line-height: 1.75;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;

    margin: 22px 0 26px;
}

.project-tags span {
    padding: 8px 12px;

    color: #7fdcff;
    background: rgba(24, 113, 181, 0.12);
    border: 1px solid rgba(49, 198, 255, 0.25);
    border-radius: 999px;

    font-size: 12px;
    font-weight: 600;
}

.project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 13px 24px;

    color: #31c9ff;
    background: rgba(10, 20, 37, 0.72);
    border: 1px solid #31c9ff;
    border-radius: 999px;

    font-weight: 600;
    text-decoration: none;

    box-shadow:
        0 0 16px rgba(49, 201, 255, 0.12);

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

.project-button:hover,
.project-button:focus-visible {
    color: #04101a;
    background: #31c9ff;

    box-shadow:
        0 0 24px rgba(49, 201, 255, 0.5);

    transform: translateY(-2px);
}

/* ==========================
   CRT Monitor
========================== */

.crt-monitor {
    position: relative;

    padding: 18px 18px 22px;

    background:
        linear-gradient(
            145deg,
            #26334b 0%,
            #0b1220 42%,
            #1c2940 100%
        );

    border: 2px solid #466280;
    border-radius: 28px 28px 20px 20px;

    box-shadow:
        0 30px 55px rgba(0, 0, 0, 0.48),
        0 0 28px rgba(28, 174, 255, 0.15),
        inset 3px 3px 0 rgba(255, 255, 255, 0.08),
        inset -4px -4px 0 rgba(0, 0, 0, 0.35);

    transform: perspective(1200px) rotateX(1.2deg);

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

.portfolio-card:hover .crt-monitor {
    transform:
        perspective(1200px)
        rotateX(0deg)
        translateY(-8px);

    box-shadow:
        0 38px 70px rgba(0, 0, 0, 0.58),
        0 0 38px rgba(28, 174, 255, 0.24),
        inset 3px 3px 0 rgba(255, 255, 255, 0.08),
        inset -4px -4px 0 rgba(0, 0, 0, 0.35);
}

.crt-top {
    display: flex;
    justify-content: space-between;
    gap: 15px;

    padding: 0 8px 12px;

    color: #7a91ae;
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
}

.crt-top span:last-child {
    color: #42edb2;
}

.crt-screen {
    position: relative;

    aspect-ratio: 16 / 10;
    overflow: hidden;

    background: #02060b;
    border: 8px solid #070b12;
    border-radius: 34px / 24px;

    box-shadow:
        inset 0 0 35px rgba(0, 0, 0, 0.94),
        0 0 20px rgba(27, 190, 255, 0.12);
}

.crt-screen::after {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    box-shadow:
        inset 0 0 45px rgba(0, 0, 0, 0.65);

    pointer-events: none;
}

.crt-screen img {
    display: block;

    width: 100%;
    height: 100%;
    object-fit: cover;

    filter:
        saturate(1.08)
        contrast(1.06)
        brightness(0.91);
}

.crt-scanlines {
    position: absolute;
    inset: 0;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            rgba(0, 0, 0, 0.08) 2px,
            rgba(0, 0, 0, 0.08) 4px
        );

    mix-blend-mode: overlay;
    pointer-events: none;
}

.crt-glare {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            125deg,
            rgba(255, 255, 255, 0.16),
            transparent 24%,
            transparent 68%,
            rgba(49, 199, 255, 0.06)
        );

    pointer-events: none;
}

.crt-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 15px 10px 0;
}

.power-light {
    width: 10px;
    height: 10px;

    background: #42f0b0;
    border-radius: 50%;

    box-shadow:
        0 0 10px rgba(66, 240, 176, 0.9);
}

.control-buttons {
    display: flex;
    gap: 8px;
}

.control-buttons span {
    width: 18px;
    height: 7px;

    background: #080d16;
    border: 1px solid #34445c;
    border-radius: 4px;

    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

.crt-stand {
    position: absolute;
    left: 50%;
    bottom: -28px;

    width: 34%;
    height: 30px;

    background:
        linear-gradient(
            180deg,
            #1b2940,
            #090f1a
        );

    clip-path:
        polygon(
            18% 0,
            82% 0,
            100% 100%,
            0 100%
        );

    transform: translateX(-50%);
}

.crt-stand::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -9px;

    width: 150%;
    height: 10px;

    background: #080d16;
    border: 1px solid #2f425b;
    border-radius: 999px;

    transform: translateX(-50%);
}

/* ==========================
   CTA
========================== */

.portfolio-cta {
    padding: 40px 30px 120px;
}

.portfolio-cta > div {
    max-width: 1000px;
    margin: 0 auto;
    padding: 55px 35px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(15, 23, 41, 0.9),
            rgba(7, 12, 24, 0.9)
        );

    border: 1px solid rgba(49, 201, 255, 0.25);
    border-radius: 24px;

    box-shadow:
        0 0 34px rgba(49, 201, 255, 0.1);
}

.portfolio-cta h2 {
    margin: 0;

    font-family: "Orbitron", sans-serif;
    font-size: clamp(30px, 5vw, 46px);
}

.portfolio-cta p:not(.eyebrow) {
    max-width: 650px;
    margin: 20px auto 30px;

    color: #b7c3d7;
    line-height: 1.7;
}

/* ==========================
   Responsive
========================== */

@media (max-width: 1050px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        max-width: 760px;
    }
}

@media (max-width: 600px) {
    .portfolio-hero {
        padding-top: 70px;
    }

    .portfolio-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .crt-monitor {
        padding: 12px 12px 18px;
        border-radius: 20px;
    }

    .crt-screen {
        border-width: 5px;
        border-radius: 22px / 17px;
    }

    .crt-top {
        font-size: 8px;
    }

    .project-content {
        padding-left: 5px;
        padding-right: 5px;
    }

    .project-content h2 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .crt-monitor,
    .project-button {
        transition: none;
    }
}