/* Open Source Projects — Portfolio subsection styling
   Kept separate from style.css to isolate feature-specific UI. */

.portfolio-subsection {
    margin-top: 72px;
    padding-top: 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.portfolio-subheader {
    margin-bottom: 40px;
    max-width: 860px;
}

.portfolio-sublabel {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gray);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.portfolio-subheader h3 {
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 600;
    color: var(--off-white);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.portfolio-subintro {
    color: var(--light-gray);
    font-size: 0.92rem;
    line-height: 1.8;
}

/* 2-up layout for the open source subsection */
.portfolio-grid--open-source {
    grid-template-columns: repeat(2, 1fr);
}

/* Slightly different card chrome vs brand cards */
.portfolio-card--open-source {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border-color: rgba(255, 255, 255, 0.07);
}

.portfolio-card--open-source:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border-color: rgba(255, 255, 255, 0.14);
}

.portfolio-card--featured {
    grid-column: 1 / -1;
    padding: 46px 42px;
    border-color: rgba(255, 255, 255, 0.1);
}

.portfolio-card--featured:hover {
    border-color: rgba(255, 255, 255, 0.18);
}

.portfolio-card--featured h3 {
    font-size: clamp(1.45rem, 2.4vw, 2.05rem);
    letter-spacing: -0.02em;
}

.portfolio-card--featured .portfolio-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 26px;
}

.portfolio-card--mission-control {
    position: relative;
    overflow: hidden;
}

/* Subtle accent: thin gradient edge, no neon. */
.portfolio-card--mission-control::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: 0;
    background: linear-gradient(135deg, rgba(130, 170, 255, 0.35), rgba(220, 200, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.9;
}

.portfolio-card--mission-control:hover::before {
    opacity: 1;
}

.gh-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 6px;
}

.gh-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px;
}

.gh-stat-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 4px;
}

.gh-stat-value {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--off-white);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.portfolio-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
}

.portfolio-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--off-white);
    transition: all var(--transition);
    white-space: nowrap;
}

.portfolio-action:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

.portfolio-action--primary {
    border-color: rgba(130, 170, 255, 0.28);
    background: rgba(130, 170, 255, 0.06);
}

.portfolio-action--primary:hover {
    border-color: rgba(130, 170, 255, 0.42);
    background: rgba(130, 170, 255, 0.1);
}

.portfolio-highlights {
    list-style: none;
    margin-top: 18px;
    padding-left: 0;
    color: var(--gray);
    font-size: 0.82rem;
    line-height: 1.6;
}

.portfolio-highlights li {
    position: relative;
    padding-left: 14px;
    margin-top: 8px;
}

.portfolio-highlights li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

@media (max-width: 768px) {
    .portfolio-subsection {
        margin-top: 56px;
        padding-top: 44px;
    }

    .portfolio-grid--open-source {
        grid-template-columns: 1fr;
    }

    .portfolio-card--featured {
        padding: 40px 34px;
    }

    .portfolio-card--featured .portfolio-highlights {
        grid-template-columns: 1fr;
    }

    .gh-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .portfolio-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

