/* Shared styles for project write-up pages.
   Inherits design tokens (--color-primary, --card-bg, etc.) from /style.css */

.project-page {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

/* --- Nav / back-link --- */
.project-nav {
    margin-bottom: 2.5rem;
}

.back-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

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

/* --- Header --- */
.project-header {
    margin-bottom: 3.5rem;
}

.project-header h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 0.75rem;
    background: linear-gradient(to right, var(--color-text), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.project-tagline {
    font-size: 1.2rem;
    opacity: 0.8;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.project-tags {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags li {
    padding: 0.3rem 0.85rem;
    background: rgba(0, 255, 135, 0.08);
    border: 1px solid rgba(0, 255, 135, 0.25);
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- Content / prose --- */
.project-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.project-content section {
    margin-bottom: 3rem;
}

.project-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--card-border);
}

.project-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    opacity: 0.95;
}

.project-content p {
    margin: 0 0 1.1rem;
    opacity: 0.88;
}

.project-content ul,
.project-content ol {
    padding-left: 1.5rem;
    margin: 0 0 1.1rem;
    opacity: 0.88;
}

.project-content li {
    margin-bottom: 0.4rem;
}

.project-content a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 255, 135, 0.3);
    transition: border-color 0.2s ease;
}

.project-content a:hover {
    border-bottom-color: var(--color-primary);
}

.project-content strong {
    color: var(--color-text);
    font-weight: 700;
}

/* --- Code --- */
.project-content pre {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    font-size: 0.88rem;
    margin: 1.25rem 0;
    line-height: 1.55;
}

.project-content code {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-size: 0.9em;
}

.project-content :not(pre) > code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    color: var(--color-accent);
}

/* --- Callouts / blockquotes --- */
.project-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 0.4rem 0 0.4rem 1.25rem;
    margin: 1.5rem 0;
    opacity: 0.88;
    font-style: italic;
}

/* --- Metrics grid (for Results section) --- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 0.5rem;
}

.metric {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--card-radius);
    padding: 1.25rem 1.1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.metric-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.65;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    line-height: 1.1;
}

/* --- Figures / images --- */
.project-content figure {
    margin: 1.75rem 0;
}

.project-content figure img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    display: block;
}

.project-content figcaption {
    font-size: 0.85rem;
    opacity: 0.65;
    text-align: center;
    margin-top: 0.6rem;
}

/* --- Footer --- */
.project-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .project-page {
        padding: 1.5rem 1.25rem 3rem;
    }

    .project-header h1 {
        font-size: 2.25rem;
    }

    .project-tagline {
        font-size: 1.05rem;
    }
}
