/* ─────────────────────────────────────────────────
   Project Page – Additional Styles
   (Builds on top of styles.css design tokens)
───────────────────────────────────────────────── */

/* ── Back-link nav ── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-head);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clr-muted);
    transition: color var(--transition), gap var(--transition);
}

.back-link:hover {
    color: var(--clr-blue);
    gap: 12px;
}

/* Override: keep nav always frosted on project page */
#navbar {
    background: rgba(8, 12, 20, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--clr-border);
}

/* ── Project Hero ── */
#project-hero {
    padding: 140px 0 60px;
    background: var(--clr-bg);
    position: relative;
    overflow: hidden;
}

/* Subtle grid bg same as main site hero */
#project-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 180, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 180, 255, 0.035) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.project-meta-tag {
    padding: 4px 14px;
    border-radius: 100px;
    font-family: var(--font-head);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(0, 180, 255, 0.12);
    border: 1px solid rgba(0, 180, 255, 0.3);
    color: var(--clr-blue);
}

.project-meta-year {
    font-family: var(--font-head);
    font-size: 0.7rem;
    color: var(--clr-muted);
    letter-spacing: 0.15em;
    margin-left: auto;
}

.project-hero-title {
    font-family: var(--font-head);
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.06;
    color: var(--clr-white);
    margin-bottom: 24px;
}

.project-hero-title span {
    color: var(--clr-blue);
}

.project-hero-summary {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--clr-muted);
    max-width: 680px;
    line-height: 1.75;
    margin-bottom: 32px;
}

/* Tech tags row */
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 7px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    background: rgba(255, 255, 255, 0.03);
    transition: all var(--transition);
}

.tech-tag:hover {
    border-color: var(--clr-blue);
    color: var(--clr-blue);
    background: var(--clr-blue-glow);
}

/* ── YouTube Embed ── */
#project-video {
    padding: 0 0 80px;
    background: var(--clr-bg);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 180, 255, 0.06);
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Project Details Two-Column ── */
#project-details {
    background: var(--clr-surface);
    padding: 100px 0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: start;
}

.detail-col-label {
    font-family: var(--font-head);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--clr-blue);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.detail-col-title {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--clr-white);
    line-height: 1.2;
    margin-bottom: 24px;
}

.detail-col-title span {
    color: var(--clr-blue);
}

.detail-col p {
    color: var(--clr-muted);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 18px;
}

.detail-col p strong {
    color: var(--clr-text);
}

/* ── Code Block ── */
.code-block {
    background: #060a10;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--clr-border);
}

.code-lang {
    font-family: var(--font-head);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--clr-blue);
}

.code-file {
    font-family: 'Fira Code', monospace;
    font-size: 0.72rem;
    color: var(--clr-muted);
}

.code-block pre {
    margin: 0;
    padding: 22px 22px 24px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.75;
    color: #cdd6f4;
    white-space: pre;
}

/* Syntax colours */
.c-comment {
    color: #6c7086;
}

.c-type {
    color: #89b4fa;
}

.c-fn {
    color: #cba6f7;
}

.c-kw {
    color: #f38ba8;
}

.c-num {
    color: #fab387;
}

/* ── Learnings Grid ── */
#project-learnings {
    background: var(--clr-bg);
    padding: 100px 0;
}

.learnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.learning-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.learning-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--clr-blue), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.learning-card:hover {
    border-color: var(--clr-blue-dim);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.learning-card:hover::before {
    opacity: 1;
}

.learning-icon {
    font-size: 2.2rem;
    margin-bottom: 18px;
    display: block;
}

.learning-card h3 {
    font-family: var(--font-head);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--clr-white);
    letter-spacing: 0.06em;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.learning-card p {
    color: var(--clr-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ── Call to Action ── */
#project-cta {
    background: var(--clr-surface);
    padding: 100px 0;
}

.cta-box {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: 24px;
    padding: 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative glow behind the CTA box */
.cta-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-label {
    font-family: var(--font-head);
    font-size: 0.7rem;
    letter-spacing: 0.25em;
    color: var(--clr-blue);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.cta-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--clr-white);
    margin-bottom: 16px;
}

.cta-description {
    color: var(--clr-muted);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

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

    .cta-box {
        padding: 48px 28px;
    }
}

@media (max-width: 600px) {
    .project-meta-year {
        margin-left: 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-buttons .btn {
        justify-content: center;
    }

    #project-hero {
        padding-bottom: 40px;
    }
}