/* ==========================================
   PROJECT DETAIL PAGE - MATCHING STARFIELD DESIGN
   Modern Card-Based Layout
   ========================================== */

/* Import main styles */
:root {
    --color-bg-primary: #0a0e1a;
    --color-bg-secondary: #121827;
    --color-surface: #1e2638;
    --color-primary: #ef4444;
    --color-secondary: #f59e0b;
    --color-blue: #60a5fa;
    --color-purple: #a78bfa;
    --color-green: #34d399;
    --color-text-primary: #ffffff;
    --color-text-secondary: #e2e8f0;
    --color-text-tertiary: #94a3b8;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Navigation - Same as main page */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(96, 165, 250, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 100%;
    margin: 0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}

.nav-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-identity {
    display: flex;
    flex-direction: column;
}

.nav-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
}

.nav-tagline {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link.external {
    color: var(--color-blue);
}

/* Starfield */
#starfieldCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Main Content */
.project-content {
    position: relative;
    z-index: 1;
    padding-top: 90px;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.project-hero {
    margin-top: 40px;
    /* padding-top: 140px; */
    padding: 4rem 0 6rem;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--color-blue);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--color-text-primary);
}

.project-header {
    margin-bottom: 3rem;
}

.project-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 9999px;
    font-size: 0.9rem;
    color: var(--color-blue);
    margin-bottom: 1.5rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-tertiary);
    max-width: 800px;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
}

.meta-item i {
    color: var(--color-blue);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-blue);
    border: 2px solid var(--color-blue);
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.1);
}

.project-image-hero {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.project-image-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 14, 26, 0.6), transparent);
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-image-hero:hover .image-overlay {
    opacity: 1;
}

.overlay-badge {
    background: rgba(52, 211, 153, 0.2);
    border: 1px solid var(--color-green);
    color: var(--color-green);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* Overview Section */
.overview-section {
    padding: 4rem 0;
    background: rgba(18, 24, 39, 0.5);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.overview-card {
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.overview-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-blue);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.overview-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.overview-card p {
    color: var(--color-text-tertiary);
    line-height: 1.8;
}

/* Technical Details */
.details-section {
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-primary);
}

.section-title i {
    color: var(--color-blue);
}

.architecture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.architecture-card {
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.architecture-card:hover {
    border-color: var(--color-blue);
    transform: translateY(-5px);
}

.card-number {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(96, 165, 250, 0.1);
    font-family: var(--font-display);
}

.architecture-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-blue);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-secondary);
}

.feature-list i {
    color: var(--color-green);
    font-size: 1.1rem;
}

/* Usage Section */
.usage-section {
    padding: 4rem 0;
    background: rgba(18, 24, 39, 0.5);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-card {
    display: flex;
    gap: 2rem;
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--color-blue);
    transform: translateX(10px);
}

.step-icon {
    flex-shrink: 0;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.step-content p {
    color: var(--color-text-tertiary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.step-visual {
    background: rgba(10, 14, 26, 0.5);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(96, 165, 250, 0.1);
}

.pseudo-slider {
    margin-bottom: 1rem;
}

.pseudo-slider span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.slider-bar {
    width: 100%;
    height: 6px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
    overflow: hidden;
}

.slider-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-purple) 100%);
    border-radius: 9999px;
}

.prediction-example {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prediction-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.prediction-badge.benign {
    background: rgba(52, 211, 153, 0.15);
    border: 2px solid var(--color-green);
    color: var(--color-green);
}

.confidence-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.conf-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.conf-bar span {
    min-width: 80px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.conf-bar .bar {
    flex: 1;
    height: 8px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
    overflow: hidden;
}

.conf-bar .fill {
    height: 100%;
    border-radius: 9999px;
}

.conf-bar .fill.green {
    background: var(--color-green);
}

.conf-bar .fill.red {
    background: var(--color-primary);
}

.viz-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(96, 165, 250, 0.1);
    border-radius: 0.75rem;
    color: var(--color-blue);
}

/* Features Section */
.features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.feature-box {
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: var(--color-blue);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-box h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--color-text-tertiary);
}

/* Tech Stack Section */
.tech-stack-section {
    padding: 4rem 0;
    background: rgba(18, 24, 39, 0.5);
}

.tech-categories {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tech-category h3 {
    font-size: 1.25rem;
    color: var(--color-blue);
    margin-bottom: 1rem;
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-badge {
    padding: 0.65rem 1.25rem;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 9999px;
    font-size: 0.95rem;
    color: var(--color-blue);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(96, 165, 250, 0.25);
    border-color: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

/* CTA Section */
.cta-section {
    padding: 6rem 0;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--color-text-tertiary);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cta-buttons-large {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary-large,
.btn-secondary-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Related Projects */
.related-section {
    padding: 4rem 0;
    background: rgba(18, 24, 39, 0.5);
}

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

.related-card {
    background: rgba(30, 38, 56, 0.7);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.related-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-blue);
}

.related-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.1);
}

.related-info {
    padding: 1.5rem;
}

.related-info h4 {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.related-info p {
    color: var(--color-text-tertiary);
    font-size: 0.9rem;
}

/* Footer - Same as main page */
.footer {
    background: var(--color-bg-primary);
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    position: relative;
    z-index: 1;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--color-blue);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-blue);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(96, 165, 250, 0.1);
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .overview-grid,
    .architecture-grid,
    .features-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .cta-buttons-large {
        flex-direction: column;
    }

    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
    }
}