/* ========================================
   PROJECT DETAIL PAGE
   ======================================== */

/* Page Layout */
.project-page {
    padding-top: 100px;
}

/* Hero Section */
.project-hero {
    padding: 40px 0 80px;
}

.project-hero-content {
    max-width: 800px;
}

.project-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 6px 16px;
    margin-bottom: 24px;
}

.project-hero-title {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.1;
}

.project-hero-tagline {
    font-size: 20px;
    color: var(--text-dim);
    margin-bottom: 32px;
    font-style: italic;
}

.project-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 40px 0 80px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

/* Content Sections */
.content-section {
    padding: 80px 0;
}

.content-section:nth-child(even) {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    margin-bottom: 32px;
}

.section-content {
    max-width: 800px;
}

.section-content p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dim);
    margin-bottom: 24px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    padding: 32px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px var(--accent-dim);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    font-size: 20px;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Tech Stack */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.tech-category {
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    padding: 24px;
}

.tech-category-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-item {
    position: relative;
    padding: 12px;
    border: 1px solid var(--border);
    background-color: var(--bg-lighter);
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.tech-item:hover {
    border-color: var(--accent);
    background-color: var(--accent-dim);
}

.tech-item-name {
    font-size: 14px;
    font-weight: 500;
}

.tech-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background-color: var(--bg);
    border: 1px solid var(--accent);
    padding: 12px;
    font-size: 12px;
    color: var(--text-dim);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

/* Architecture Diagram */
.architecture-container {
    position: relative;
    padding: 40px;
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    overflow: hidden;
}

.architecture-svg {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.architecture-svg .node {
    fill: var(--bg-lighter);
    stroke: var(--border);
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.architecture-svg .node:hover {
    fill: var(--accent-dim);
    stroke: var(--accent);
}

.architecture-svg .node-text {
    fill: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.architecture-svg .connection {
    stroke: var(--accent);
    stroke-width: 2;
    fill: none;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.architecture-svg .connection.animated {
    animation: drawLine 2s ease forwards;
}

.architecture-svg .connection-arrow {
    fill: var(--accent);
}

/* Knowledge Graph */
.knowledge-graph-container {
    position: relative;
    height: 500px;
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    overflow: hidden;
}

#knowledge-graph {
    width: 100%;
    height: 100%;
}

.graph-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px;
    background-color: var(--bg);
    border: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-dim);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.graph-info {
    position: absolute;
    top: 20px;
    right: 20px;
    max-width: 250px;
    padding: 16px;
    background-color: var(--bg);
    border: 1px solid var(--accent);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.graph-info.visible {
    opacity: 1;
    transform: translateX(0);
}

.graph-info-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
}

.graph-info-description {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

/* Highlights Section */
.highlights-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.highlight-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    border: 1px solid var(--border);
    background-color: var(--bg-light);
    transition: border-color 0.3s ease;
}

.highlight-item:hover {
    border-color: var(--accent);
}

.highlight-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.highlight-content {
    flex: 1;
}

.highlight-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.highlight-description {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Navigation */
.project-nav {
    display: flex;
    justify-content: space-between;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.project-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

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

.project-nav-link .arrow {
    transition: transform 0.3s ease;
}

.project-nav-link:hover .arrow {
    transform: translateX(4px);
}

.project-nav-link.prev:hover .arrow {
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
    .project-hero {
        padding: 20px 0 40px;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .content-section {
        padding: 40px 0;
    }

    .knowledge-graph-container {
        height: 400px;
    }

    .graph-legend {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 16px;
    }

    .highlight-item {
        flex-direction: column;
    }
}
