/* Portfolio Page — extends homepage design system */

.section-header--center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-desc--center {
    margin-left: auto;
    margin-right: auto;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    gap: 0.375rem;
}

.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
}

.page-hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-primary);
}

.page-hero .hero-glow--1 {
    width: 50vw;
    max-width: 600px;
    height: 50vw;
    max-height: 600px;
    background: rgba(37, 99, 235, 0.1);
    top: -10%;
    right: -5%;
}

.page-hero .hero-glow--2 {
    width: 35vw;
    max-width: 420px;
    height: 35vw;
    max-height: 420px;
    background: rgba(59, 130, 246, 0.06);
    bottom: 0;
    left: -8%;
}

.page-hero-content {
    position: relative;
    text-align: center;
    max-width: 720px;
    padding: clamp(4rem, 8vw, 6rem) 0;
}

.page-hero-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 580px;
    margin: 0 auto 2.75rem;
}

.page-hero-buttons {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

body.loaded .page-hero-content > .reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Projects Section */
.projects-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

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

.project-card--full {
    display: flex;
    flex-direction: column;
}

.project-devices {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #080c14;
    padding: 2rem;
    overflow: hidden;
}

.project-devices--warm { background: #0a0e18; }
.project-devices--slate { background: #0c101a; }
.project-devices--green { background: #0a100e; }

.device-pair {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.device-pair--large {
    min-height: 280px;
}

.device-desktop {
    width: 78%;
    z-index: 1;
}

.device-mobile {
    position: absolute;
    right: 4%;
    bottom: 8%;
    width: 22%;
    z-index: 2;
}

.device-frame {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    background: #000;
}

.device-frame--desktop {
    aspect-ratio: 16 / 10;
}

.device-frame--mobile {
    aspect-ratio: 9 / 19;
    border-radius: 12px;
}

.device-frame__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.device-frame--ba {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

.project-hover-actions {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 13, 0.78);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    opacity: 0;
    transition: opacity 0.45s var(--ease);
}

.project-card--full:hover .project-hover-actions {
    opacity: 1;
}

.project-card--full:hover .device-frame {
    transform: scale(1.02);
    transition: transform 0.55s var(--ease);
}

.project-meta {
    margin-bottom: 0.625rem;
}

.project-category {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.tech-stack--lg li {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Mock variants */
.mock-site--mobile-preview .mock-site__hero h4 { font-size: 5px; }
.mock-site--mobile-preview .mock-site__cta { width: 18px; height: 4px; }

.mock-site--green { background: #0a100e; }
.mock-site--green .mock-site__hero {
    background: radial-gradient(ellipse at 50% 80%, rgba(34, 120, 80, 0.12) 0%, transparent 60%);
}

/* Case Study */
.case-study {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.case-study-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
    margin-bottom: clamp(3rem, 6vw, 5rem);
}

.case-study-showcase {
    padding: 2rem;
    overflow: hidden;
}

.case-study-showcase.glass-card:hover {
    transform: none;
}

.case-block {
    margin-bottom: 1.75rem;
}

.case-block h3 {
    font-size: 1rem;
    color: var(--blue-accent);
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.case-block p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.case-study-content .tech-stack {
    margin-top: 0.5rem;
}

/* Before / After */
.before-after {
    border-top: 1px solid var(--border);
    padding-top: clamp(3rem, 6vw, 4rem);
}

.before-after-title {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.before-after-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.ba-card {
    text-align: center;
}

.ba-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.375rem 0.875rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.ba-label--before {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.ba-label--after {
    background: var(--blue-muted);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--blue-accent);
}

.ba-preview {
    aspect-ratio: 16 / 10;
    background: #080c14;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.ba-preview--old {
    background: #1a1a1a;
}

.ba-mock {
    width: 85%;
    height: 75%;
    background: #2a2a2a;
    border-radius: 4px;
    padding: 8px;
}

.ba-mock--old { background: #333; }

.ba-bar {
    height: 6px;
    background: #555;
    border-radius: 2px;
    margin-bottom: 8px;
}

.ba-content--messy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;
}

.ba-line {
    height: 4px;
    background: #666;
    border-radius: 2px;
    width: 60%;
}

.ba-line--wide { width: 80%; background: #777; }
.ba-line--short { width: 40%; }

.ba-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.ba-arrow {
    color: var(--blue-accent);
    opacity: 0.6;
}

/* Skills */
.skills-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.skill-card {
    padding: 2rem 1.75rem;
    text-align: center;
}

.skill-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.4s var(--ease);
}

.skill-card:hover .skill-icon {
    color: var(--blue-accent);
    border-color: rgba(37, 99, 235, 0.2);
    background: var(--blue-muted);
    transform: translateY(-3px);
}

.skill-card h3 {
    margin-bottom: 0.625rem;
}

.skill-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* Dev Process Timeline */
.dev-process {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
}

.dev-timeline {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
    position: relative;
}

.dev-timeline::before {
    content: '';
    position: absolute;
    top: 28px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}

.dev-step {
    text-align: center;
    padding: 0 0.5rem;
    position: relative;
}

.dev-step-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.4s var(--ease);
}

.dev-step:hover .dev-step-icon {
    color: var(--blue-accent);
    border-color: rgba(37, 99, 235, 0.25);
    background: var(--blue-muted);
    transform: translateY(-4px);
}

.dev-step-num {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.dev-step h3 {
    font-size: 0.9375rem;
    margin-bottom: 0.4375rem;
}

.dev-step p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Client Results */
.results-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

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

.result-card {
    padding: 2.25rem;
}

.result-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.result-card:hover .result-icon {
    color: var(--blue-accent);
    border-color: rgba(37, 99, 235, 0.2);
}

.result-card h3 {
    margin-bottom: 0.75rem;
}

.result-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-style: italic;
    margin-bottom: 1rem;
}

.result-client {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .dev-timeline::before { display: none; }
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .case-study-layout {
        grid-template-columns: 1fr;
    }

    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ba-arrow {
        transform: rotate(90deg);
        justify-self: center;
    }
}

@media (max-width: 768px) {
    .page-hero {
        min-height: auto;
    }

    .page-hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .dev-timeline {
        grid-template-columns: 1fr;
        max-width: 360px;
        margin: 0 auto;
    }

    .dev-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        grid-template-rows: auto auto auto;
        gap: 0 1.25rem;
        text-align: left;
        padding: 1.25rem 0;
        border-bottom: 1px solid var(--border);
    }

    .dev-step:last-child { border-bottom: none; }

    .dev-step-icon {
        grid-row: 1 / 4;
        margin: 0;
        width: 48px;
        height: 48px;
    }

    .dev-step-num { grid-column: 2; }

    .results-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    /* Project cards — stack mockups above content, no overlap */
    .project-card--full {
        overflow: hidden;
    }

    .project-card--full .project-devices {
        position: relative;
        aspect-ratio: auto;
        min-height: 240px;
        height: auto;
        padding: 1.5rem 1rem 1.25rem;
        overflow: hidden;
        flex-shrink: 0;
    }

    .project-card--full .device-pair {
        position: relative;
        height: auto;
        min-height: 200px;
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        justify-content: center;
        gap: 0.75rem;
    }

    .project-card--full .device-desktop {
        position: relative;
        width: 68%;
        max-width: 320px;
        flex-shrink: 0;
    }

    .project-card--full .device-mobile {
        position: relative;
        right: auto;
        bottom: auto;
        width: 28%;
        max-width: 88px;
        flex-shrink: 0;
    }

    .project-card--full .project-hover-actions {
        display: none;
    }

    .project-card--full .project-body {
        position: relative;
        z-index: 1;
    }

    .project-card--full .project-actions {
        margin-top: 1.5rem;
        gap: 0.625rem;
    }

    .project-card--full .project-actions .btn-ghost { display: none; }
}

@media (max-width: 480px) {
    .project-card--full .project-devices {
        min-height: 210px;
        padding: 1.25rem 0.875rem 1rem;
    }

    .project-card--full .device-pair {
        min-height: 180px;
        gap: 0.5rem;
    }

    .project-card--full .device-desktop {
        width: 64%;
        max-width: 260px;
    }

    .project-card--full .device-mobile {
        width: 30%;
        max-width: 76px;
    }

    .project-card--full .project-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .project-card--full .project-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
