/* ========================================
   PORTFOLIO — extends style.css only
   ======================================== */

.nav-links a.active {
    color: var(--accent);
    text-decoration: underline;
}

/* ========================================
   PORTFOLIO GRID — 3-col card index
   ======================================== */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* — Project card — */

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--black);
    border: 4px solid var(--black);
    box-shadow: 8px 8px 0 var(--black);
    color: var(--white);
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
}

.project-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0 var(--accent);
}

.project-card--wip {
    opacity: 0.45;
    pointer-events: none;
}

/* — Thumbnail — */

.project-card__thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--grey-light);
    overflow: hidden;
}

.project-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card__label {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--black);
    padding: 0.3rem 0.6rem;
    z-index: 1;
    letter-spacing: 0.04em;
}

/* — Body — */

.project-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    border-top: 2px solid var(--grey-dark);
}

.project-card__title {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--white);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.project-card__desc {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--grey-text);
    line-height: 1.5;
    flex: 1;
}

/* — Footer row — */

.project-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
}

.project-card__year {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--grey-text);
    letter-spacing: 0.06em;
}

.project-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--accent);
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.1s, color 0.1s;
}

.project-card:hover .project-card__arrow {
    background: var(--accent);
    color: var(--black);
}

/* — Tags — */

.tags-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tag {
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.65rem;
    background: var(--black);
    border: 2px solid var(--grey-dark);
    color: var(--grey-text);
}

/* — Case study breadcrumb bar — */

.cs-breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--black);
    border: 4px solid var(--black);
    box-shadow: 8px 8px 0 var(--black);
    padding: 0.75rem 1.25rem;
    margin-bottom: 2rem;
}

.cs-breadcrumb-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.04em;
}

/* — Case study inline meta bar — */

.cs-meta-bar {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.75rem 1rem;
    background: var(--grey-dark);
    border-left: 6px solid var(--grey-text);
    /*border-top: 4px solid var(--grey-text);*/
    margin-top: 1.5rem;
    max-width: clamp(380px, 55vw, 750px);
    box-shadow: var(--shadow);
}

.cs-meta-bar li {
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--grey-text);
    line-height: 1.8;
}

/* — Case study back link — */

.cs-back {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: opacity 0.1s;
}

.cs-back:hover {
    opacity: 0.7;
}

.cs-back--lg {
    font-size: 0.85rem;
    display: block;
    margin-bottom: 2rem;
}

/* — Case study meta grid — */

.cs-meta-grid {
    grid-template-columns: repeat(4, 1fr);
}

.cs-meta-grid .service-item h3 {
    font-size: 0.95rem;
    text-transform: none;
    font-weight: 500;
    color: var(--white);
}

/* — Browser chrome — */

.browser-chrome {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: var(--black);
    border: var(--border-orange);
    border-bottom: none;
}

.browser-chrome--sm {
    padding: 0.45rem 0.75rem;
    margin-bottom: 1rem;
}

.browser-dots {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.browser-dots span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: block;
}

.browser-dots span:first-child {
    background: #ff5f57;
}

.browser-dots span:nth-child(2) {
    background: #febc2e;
}

.browser-dots span:nth-child(3) {
    background: #28c840;
}

.browser-url {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--grey-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* — Screenshots — */

.screenshot-hero-wrap {
    width: 70%;
    margin: 0 auto;
    border: var(--border-orange);
    box-shadow: var(--shadow-orange);
}

.screenshot-hero-wrap .browser-chrome {
    border: none;
    border-bottom: 2px solid var(--accent);
}

.screenshot-hero-scroll {
    position: relative;
    max-height: 600px;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #1a1a1a;
}

.screenshot-hero-scroll--no-hint::before {
    display: none;
}

.screenshot-hero-scroll::before {
    content: '↓ scroll to view whole page';
    position: sticky;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1.5rem;
    height: 120px;
    margin-bottom: -120px;
    background: linear-gradient(to top, transparent, rgba(10, 10, 10, 0.9));
    font-family: var(--mono);
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: var(--white);
    pointer-events: none;
    z-index: 1;
}

.screenshot-hero {
    display: block;
    width: 100%;
}

.screenshot-card {
    padding: 2rem;
}

.screenshot-card__desc {
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--grey);
    margin: 0.4rem 0 1.25rem;
    line-height: 1.5;
}

.screenshot-screen {
    display: block;
    width: 100%;
    border: var(--border-orange);
    border-top: none;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 960px) {
    .cs-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .screenshot-hero-wrap {
        width: 100%;
    }

    .cs-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
