/* ========================================
   PORTFOLIO PAGE — uses tokens from style.css
   (--ink, --navy, --blue, --blue-bright, --blue-pale,
    --ice, --line, --radius, --font-display, --font-body, --font-mono)
   ======================================== */

/* ---- Simple Hero: eyebrow + h1 + p only ---- */
.portfolio-hero {
    background: var(--ink);
    color: #fff;
    padding: 6rem 1.5rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.portfolio-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(79, 163, 255, 0.14) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 163, 255, 0.14) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
    pointer-events: none;
}

.portfolio-hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.portfolio-hero-content .hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-bright);
    display: inline-block;
    margin-bottom: 1.2rem;
    padding: 0.4rem 0.9rem;
    border: 1px solid rgba(79, 163, 255, 0.4);
    border-radius: 999px;
    background: rgba(31, 111, 224, 0.12);
}

.portfolio-hero-content h1 {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #fff;
}

.portfolio-hero-content p {
    font-size: 1.1rem;
    color: #d7e3f5;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .portfolio-hero {
        padding: 4rem 1.2rem 3rem;
    }

    .portfolio-hero-content h1 {
        font-size: 1.8rem;
    }

    .portfolio-hero-content p {
        font-size: 1rem;
    }
}

/* ---- Portfolio Grid: 3 columns / 1 row ---- */
.portfolio-grid-section {
    background: var(--ice);
    padding: 4rem 1.5rem;
}

.portfolio-grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.portfolio-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 14px 32px rgba(10, 25, 48, 0.12);
    border-color: var(--blue);
}

/* Browser-style mock frame for the preview area */
.portfolio-browser {
    background: var(--navy);
}

.browser-bar {
    display: flex;
    gap: 6px;
    padding: 0.7rem 0.9rem;
    background: var(--ink);
}

.browser-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.browser-bar span:nth-child(1) {
    background: #ff5f57;
}

.browser-bar span:nth-child(2) {
    background: #febc2e;
}

.browser-bar span:nth-child(3) {
    background: #28c840;
}

.browser-preview {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        repeating-linear-gradient(135deg,
            rgba(79, 163, 255, 0.10),
            rgba(79, 163, 255, 0.10) 10px,
            rgba(79, 163, 255, 0.03) 10px,
            rgba(79, 163, 255, 0.03) 20px);
}

/* Actual screenshot, once dropped into /images/portfolio/ */
.browser-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* shows the top of the page (hero) rather than the middle */
    display: block;
}

.preview-fallback {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--blue-bright);
    text-align: center;
    padding: 0 1rem;
    letter-spacing: 0.02em;
}

.placeholder-preview .preview-fallback {
    color: #7c93b8;
}

.portfolio-card-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.portfolio-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-pale);
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    width: fit-content;
}

.portfolio-card-body h3 {
    font-size: 1.25rem;
    color: var(--navy);
}

.portfolio-card-body p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

.portfolio-btn {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
    width: fit-content;
}

.portfolio-btn:hover {
    background: var(--navy);
}

.portfolio-card-placeholder {
    border-style: dashed;
    border-color: #b9c9e2;
    background: #fbfdff;
    grid-column: span 2;
}

.portfolio-card-placeholder .browser-preview {
    height: 160px;
}

@media (max-width: 640px) {
    .portfolio-card-placeholder {
        grid-column: span 1;
    }
}

.portfolio-card-placeholder .portfolio-tag {
    color: #7c93b8;
    background: #eef2f8;
}

/* ---- Responsive: 2 columns then 1 column ---- */
@media (max-width: 992px) {
    .portfolio-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .portfolio-grid-section {
        padding: 3rem 1.2rem;
    }

    .portfolio-grid-container {
        grid-template-columns: 1fr;
    }
}

/* Highlight current nav item */
.nav-links a.active-link {
    color: var(--blue-bright);
}