/* ============================================
   Project Detail Page — Styles
   Inherits dark-mode variables from ../styles.css
   ============================================ */

/* We re-declare the variables here so this page can work standalone */
:root {
    --bg-primary: #0a0a0f;
    --bg-surface: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #22223a;
    --accent: #4f8ff7;
    --accent-dark: #3a6fd8;
    --accent-glow: rgba(79, 143, 247, .2);
    --accent-glow-lg: rgba(79, 143, 247, .08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, .06);
    --border-accent: rgba(79, 143, 247, .3);
    --gradient-accent: linear-gradient(135deg, #4f8ff7, #6c63ff);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, .4);
    --shadow-glow: 0 0 30px rgba(79, 143, 247, .15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: .3s cubic-bezier(.4, 0, .2, 1);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============ NAVBAR (same as main) ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: rgba(10, 10, 15, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-back:hover {
    color: var(--accent);
}

.nav-back svg {
    transition: var(--transition);
}

.nav-back:hover svg {
    transform: translateX(-3px);
}

/* ============ PROJECT HERO ============ */
.project-hero {
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

.project-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(79, 143, 247, .04) 0%, transparent 50%);
    pointer-events: none;
}

.project-hero .container {
    position: relative;
    z-index: 2;
}

.project-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.project-hero-info {
    max-width: 700px;
}

.project-category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.project-hero-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1.5px;
}

.project-hero-tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 580px;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: var(--gradient-accent);
    color: #fff;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition);
    flex-shrink: 0;
    margin-top: 16px;
    border: none;
    cursor: pointer;
}

.launch-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(79, 143, 247, .35);
}

.launch-btn svg {
    transition: var(--transition);
}

.launch-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Meta strip */
.project-meta-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-top: 10px;
}

.project-meta-item {
    padding: 24px 28px;
    border-right: 1px solid var(--border);
}

.project-meta-item:last-child {
    border-right: none;
}

.project-meta-item span {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.project-meta-item strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============ MAIN CONTENT GRID ============ */
.project-content {
    padding: 60px 0 100px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
}

/* Left: Main content */

/* Live Preview */
.live-preview-section {
    margin-bottom: 48px;
}

.live-preview-section h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-preview-frame {
    width: 100%;
    height: 500px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    position: relative;
}

.live-preview-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
    z-index: 2;
    background:
        radial-gradient(800px 320px at 20% 0%, rgba(79, 143, 247, .16), transparent 55%),
        radial-gradient(700px 280px at 90% 15%, rgba(108, 99, 255, .12), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, 0)),
        var(--bg-surface);
}

.preview-placeholder-inner {
    max-width: 520px;
}

.preview-placeholder-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: var(--radius-xl);
    background: rgba(79, 143, 247, .14);
    border: 1px solid rgba(79, 143, 247, .28);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.preview-placeholder h4 {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.6px;
    line-height: 1.2;
    margin-bottom: 10px;
}

.preview-placeholder p {
    color: var(--text-secondary);
    font-size: .95rem;
    line-height: 1.7;
}

.live-preview-frame .iframe-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    pointer-events: none;
    z-index: 1;
}

.preview-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: var(--accent);
    font-size: .88rem;
    font-weight: 600;
    transition: var(--transition);
}

.preview-link:hover {
    gap: 12px;
}

/* Content Sections */
.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-section h2 .section-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
}

.content-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 14px;
    white-space: pre-line;
}

.content-section ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.content-section li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
    font-size: .95rem;
    line-height: 1.7;
}

.content-section li::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 10px;
}

/* ============ SIDEBAR ============ */
.project-sidebar {
    position: sticky;
    top: 100px;
}

/* Tech Stack */
.tech-card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
}

.tech-card h3 {
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--accent);
    margin-bottom: 20px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: .82rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tech-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

.tech-tag .tech-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

/* CTA Card */
.cta-card {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-align: center;
}

.cta-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.cta-card p {
    color: var(--text-secondary);
    font-size: .88rem;
    margin-bottom: 20px;
}

.cta-card .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gradient-accent);
    color: #fff;
    border-radius: var(--radius-xl);
    font-family: var(--font);
    font-size: .9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-card .cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 143, 247, .3);
}

/* ============ FOOTER ============ */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer p {
    color: var(--text-muted);
    font-size: .88rem;
}

.footer p .accent {
    color: var(--accent);
}

/* ============ REVEAL ============ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============ RESPONSIVE ============ */
@media (max-width:1024px) {
    .project-hero-title {
        font-size: 2.5rem;
    }

    .project-grid {
        grid-template-columns: 1fr 300px;
        gap: 32px;
    }
}

@media (max-width:768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-sidebar {
        position: static;
    }

    .project-hero-title {
        font-size: 2rem;
    }

    .project-hero-top {
        flex-direction: column;
    }

    .project-meta-strip {
        grid-template-columns: 1fr 1fr;
    }

    .project-meta-item:nth-child(2) {
        border-right: none;
    }

    .live-preview-frame {
        height: 350px;
    }
}

@media (max-width:480px) {
    .container {
        padding: 0 16px;
    }

    .project-hero {
        padding: 120px 0 40px;
    }

    .project-hero-title {
        font-size: 1.7rem;
        letter-spacing: -1px;
    }

    .project-meta-strip {
        grid-template-columns: 1fr;
    }

    .project-meta-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .project-meta-item:last-child {
        border-bottom: none;
    }

    .live-preview-frame {
        height: 280px;
    }

    .launch-btn {
        width: 100%;
        justify-content: center;
    }
}
