.portfolio-hero {
    padding: 120px 0 60px;
    background: var(--bg-main);
}

.portfolio-hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.portfolio-hero p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-grid-section {
    padding: 4rem 0 8rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--bg-surface);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    overflow: hidden;
    --desktop-width: 1400px;
}

.project-preview iframe {
    width: 400%;
    /* Represents 1400px for a 350px card */
    height: 400%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transform: scale(0.25);
    transition: all 0.5s ease;
    pointer-events: none;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.1);
    /* Lighter since we want to see the desktop view */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    cursor: pointer;
}

.project-card:hover .preview-overlay {
    opacity: 1;
}

.visit-link {
    padding: 12px 24px;
    background: var(--color-primary-light);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.visit-link:hover {
    background: var(--color-accent);
    transform: scale(1.05);
}

.project-info {
    padding: 2rem;
}

.project-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-primary-light);
    font-weight: 700;
    display: block;
    margin-bottom: 0.75rem;
}

.project-info h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.portfolio-seo-content {
    padding: 8rem 0;
    background: rgba(123, 63, 242, 0.03);
}

.seo-text-block {
    max-width: 900px;
    margin: 0 auto;
}

.seo-text-block h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 2rem;
}

.seo-text-block p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
}

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

    .project-preview {
        height: 250px;
    }

    /* Mobile Miniature Logic for Homepage Spotlight */
    .mobile-scale-wrapper {
        width: 100%;
        overflow: hidden;
        position: relative;
        padding-bottom: 2rem;
    }

    .portfolio-grid.mobile-mini-scale {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        width: 300% !important;
        /* Force desktop width simulated on mobile */
        transform: scale(0.3333);
        transform-origin: top left;
        margin-bottom: -130%;
        /* Collapses the empty space left by scaling */
        gap: 2.5rem;
    }
}