/* Portfolio Page */

/* Hero — same dark treatment as blog-hero */
.portfolio-page-hero.hero {
    padding: 200px 0 120px;
    background: var(--gradient-hero);
}

.portfolio-page-hero .bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

.portfolio-page-hero .container {
    display: block;
}

.portfolio-page-hero .page-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.portfolio-page-hero h1 {
    font-size: 56px;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1.1;
    font-weight: 800;
}

.portfolio-page-hero h1 .text-white {
    color: #ffffff;
}

.portfolio-page-hero .hero-sub {
    margin-top: 20px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.65);
    max-width: 460px;
    line-height: 1.6;
}

/* Projects Grid Section */
.portfolio-projects-section {
    padding: 100px 0 140px;
    background: var(--white);
}

.portfolio-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* Individual Project Card */
.portfolio-project-card {
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 4px 24px rgba(10, 37, 64, 0.06);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.35s ease;
    cursor: pointer;
}

.portfolio-project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(10, 37, 64, 0.13);
    border-color: rgba(99, 91, 255, 0.3);
}

/* Browser-chrome top bar */
.card-browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f0f2f5;
    border-bottom: 1px solid var(--border);
}

.browser-dots {
    display: flex;
    gap: 5px;
}

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

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

.browser-url {
    flex: 1;
    background: #e2e6ec;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0;
}

.card-browser-bar .ext-icon {
    width: 20px;
    height: 20px;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.portfolio-project-card:hover .ext-icon {
    color: var(--primary);
}

/* Screenshot area */
.card-screenshot {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8ecf0;
}

.card-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-project-card:hover .card-screenshot img {
    transform: scale(1.04);
}

/* Overlay gradient on hover */
.card-screenshot::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(99, 91, 255, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.portfolio-project-card:hover .card-screenshot::after {
    opacity: 1;
}

/* Screenshot loading placeholder */
.card-screenshot-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f2f5 0%, #e2e6ec 100%);
}

.card-screenshot-placeholder span {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}

/* Card info footer */
.card-info {
    padding: 20px 24px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-info-left h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 4px;
}

.card-info-left .card-url {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 400;
}

.card-link-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-body);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.portfolio-project-card:hover .card-link-badge {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.card-link-badge svg {
    width: 13px;
    height: 13px;
}

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

    .portfolio-page-hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .portfolio-page-hero.hero {
        padding: 160px 0 80px;
    }

    .portfolio-page-hero h1 {
        font-size: 36px;
    }

    .portfolio-projects-section {
        padding: 72px 0 100px;
    }
}
