/* ================================================
   AI PAGE — page-specific styles
   Builds on about.css shared patterns
   ================================================ */

/* ── Hero ─────────────────────────────────────── */
.ai-hero .hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.ai-hero .hero-tags span {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    backdrop-filter: blur(6px);
}

/* ── Intro / stats grid ───────────────────────── */
.ai-intro {
    padding: 80px 0 60px;
}

.ai-intro-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: start;
}

.ai-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 180px;
    padding-top: 0.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #eee);
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-number {
    font-family: 'Inter Tight', sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--body-muted, #888);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Projects section ─────────────────────────── */
.ai-projects-section {
    padding: 80px 0;
    background: var(--bg-alt, #fafafa);
}

.ai-project-rows {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color, #e5e5e5);
}

.ai-project-row {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1.5rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
    transition: background 0.2s ease;
    overflow: hidden;
}

.ai-project-row:hover {
    background: rgba(0,0,0,0.015);
}

.ai-project-num {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.06em;
    padding-top: 0.35rem;
    opacity: 0.7;
}

.ai-project-body {
    flex: 1;
}

.ai-project-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: start;
}

.ai-project-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--heading-color, #0d0d1a);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
    transform: translateY(110%);
    transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-project-row.row-visible .ai-project-title {
    transform: translateY(0);
}

.ai-project-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--body-muted, #666);
    margin: 0 0 1rem;
}

.ai-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ai-project-tags span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light, #e8f0fe);
    border: 1px solid var(--accent-border, #c5d7f8);
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

.ai-project-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.25rem;
    min-width: 120px;
    align-items: flex-end;
}

.ai-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--accent-border, #c5d7f8);
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-link-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.ai-link-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--body-muted, #999);
    font-style: italic;
}

/* ── Stack / Infrastructure section ──────────── */
.ai-stack-section {
    padding: 80px 0;
}

.ai-stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.ai-stack-card {
    background: var(--bg-alt, #fafafa);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.5s ease var(--achiev-delay, 0s),
                translate 0.5s cubic-bezier(0.16,1,0.3,1) var(--achiev-delay, 0s),
                box-shadow 0.25s ease,
                transform 0.25s ease;
}

.ai-stack-card.achiev-visible {
    opacity: 1;
    translate: 0 0;
}

.ai-stack-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

.ai-stack-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-light, #e8f0fe);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.ai-stack-icon i {
    color: var(--accent);
    font-size: 1.1rem;
}

.ai-stack-card h3 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--heading-color, #0d0d1a);
    margin: 0 0 0.6rem;
}

.ai-stack-card p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--body-muted, #666);
    margin: 0 0 1rem;
}

.ai-stack-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ai-stack-tags span {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--body-muted, #888);
    background: rgba(0,0,0,0.04);
    border: 1px solid var(--border-color, #e5e5e5);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

/* ── Client work section ──────────────────────── */
.ai-client-section {
    padding: 80px 0;
    background: var(--bg-alt, #fafafa);
}

.ai-client-rows .skill-row {
    background: transparent;
}

/* ── CTA overrides for this page ─────────────── */
.cta-primary-btn {
    background: var(--accent);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    transition: background 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.cta-primary-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.cta-secondary-btn {
    background: transparent;
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.4);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s ease;
    display: inline-block;
}

.cta-secondary-btn:hover {
    border-color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
    .ai-intro-grid {
        grid-template-columns: 1fr;
    }

    .ai-stats {
        flex-direction: row;
        min-width: unset;
    }

    .stat-item {
        border-bottom: none;
        border-right: 1px solid var(--border-color, #eee);
        padding-bottom: 0;
        padding-right: 1.5rem;
    }

    .stat-item:last-child {
        border-right: none;
    }

    .ai-stack-grid {
        grid-template-columns: 1fr;
    }

    .ai-project-header {
        grid-template-columns: 1fr;
    }

    .ai-project-links {
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .ai-stats {
        flex-direction: column;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color, #eee);
        padding-bottom: 1rem;
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .ai-project-row {
        grid-template-columns: 2rem 1fr;
        gap: 1rem;
    }
}
