/* =====================================================
   PROJECT PAGE STYLES
   ===================================================== */

/* Project Hero */
.project-hero {
    padding: calc(80px + var(--space-4xl)) var(--space-xl) var(--space-3xl);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 0%, var(--orange-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 100%, rgba(255,107,53,0.08) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
}

.project-hero .container {
    position: relative;
    z-index: 1;
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.project-hero h1 {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 800px;
}

.hero-badges {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Content Grid */
.project-content {
    padding: var(--space-4xl) 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-3xl);
}

.content-main {
    min-width: 0;
}

.content-section {
    margin-bottom: var(--space-3xl);
}

.content-section h2 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.45rem;
    letter-spacing: -0.015em;
    color: #fff;
    margin: 0 0 var(--space-lg);
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--border);
}
.content-section h2::before {
    content: '//';
    color: #ff6b35;
    margin-right: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    font-weight: 500;
}
/* extra air between sections */
.content-section { margin-bottom: 3.4rem; }

/* ── readability system (2026-08-31): the global * reset kills browser
   paragraph margins, so all prose spacing is defined here explicitly ── */
.content-main { max-width: 740px; }

.content-section p {
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1.02rem;
    /* !important overrides the 1em inline margins the template renderer
       bakes into each paragraph — consistent 1.2em separation everywhere */
    margin: 0 0 1.2em !important;
}
/* the template's #long-description <p> wrapper ends up empty after the
   renderer hoists its innerHTML out — collapse it so it adds no gap */
.content-section p#long-description:empty,
.content-section p#long-description:not(:has(*)) { margin: 0 !important; display: none; }
.content-section p:last-child { margin-bottom: 0; }
.content-section p + p { margin-top: 0.2em; }

/* sub-headers inside long descriptions */
.content-section h3 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.02rem;
    color: #fff;
    letter-spacing: 0.01em;
    margin: 1.9em 0 0.7em;
    padding-left: 0.75rem;
    border-left: 2px solid #ff6b35;
}
.content-section h3:first-child { margin-top: 0.3em; }

/* emphasis + inline elements pop against secondary-color body text */
.content-section strong, .content-section b { color: #fff; font-weight: 600; }
.content-section em { color: var(--text); }
.content-section code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    padding: 0.08em 0.4em;
}
.content-section a {
    color: #ff8555;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,107,53,0.4);
}
.content-section a:hover { color: #fff; border-bottom-color: #fff; }

/* lists inside descriptions */
.content-section ul, .content-section ol {
    margin: 0 0 1.2em;
    padding-left: 1.3rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-size: 1.02rem;
}
.content-section li { margin: 0.45em 0; }
.content-section li::marker { color: #ff6b35; }
.content-section ul { list-style: square; }

/* Feature List */
.feature-list {
    list-style: none;
    display: grid;
    gap: var(--space-md);
}

.feature-list li {
    padding: var(--space-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--orange);
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-list li::before {
    content: '✓';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--gradient-fire);
    color: var(--void);
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: var(--space-sm);
    font-weight: bold;
}

/* Screenshots */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.screenshot-placeholder {
    aspect-ratio: 16/9;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.25rem;
}

/* Sidebar */
.content-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}

.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.sidebar-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.status-indicator {
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-lg);
    text-align: center;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.tech-item {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.link-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.link-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.link-item:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.related-projects {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.related-project {
    padding: var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition-fast);
}

.related-project:hover {
    border-color: #ff6b35;
    transform: translateX(4px);
}

.related-project-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.related-project-category {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-sidebar {
        position: static;
    }
    
    .project-hero h1 {
        font-size: 2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PROJECT SOCIAL v2 (2026-08-31) — square, left-aligned, engineered.
   The hero container centers text; everything below re-asserts left.
   ═══════════════════════════════════════════════════════════════════ */
.ps-root {
    text-align: left;               /* kill inherited centering */
    margin-top: 3rem;
    border-top: 2px solid var(--border);
    padding-top: 1.8rem;
}
.ps-root * { text-align: left; }

/* header row: title + like on one line */
.ps-like-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.6rem;
}
.ps-like {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; font-weight: 500;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--border);
    padding: 0.55rem 1.2rem;
    cursor: pointer;
    transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.ps-like:hover { color: #ff6b35; border-color: rgba(255,107,53,0.6); }
.ps-like.liked {
    color: #0a0a0f; background: #ff6b35; border-color: #ff6b35; font-weight: 700;
}

.ps-head { margin-bottom: 1.1rem; }
.ps-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem; margin-bottom: 0.25rem; color: #fff;
    letter-spacing: 0.01em;
}
.ps-sub { font-size: 0.78rem; color: var(--text-muted); margin: 0; }

/* comments: square items with accent left-rules */
.ps-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 1.6rem; }
.ps-item {
    background: transparent;
    border: 1px solid var(--border); border-top-width: 0;
    padding: 0.85rem 1rem;
}
.ps-item:first-child { border-top-width: 1px; }
.ps-item-meta {
    display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
}
.ps-item-name { font-weight: 700; font-size: 0.78rem; color: var(--text); }
.ps-item-name::before { content: '> '; color: #ff6b35; }
.ps-item-ts { font-size: 0.64rem; color: var(--text-muted); }
.ps-item-persp {
    font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: #3d9bff; border: 1px solid rgba(61,155,255,0.35);
    padding: 0.08rem 0.45rem;
}
.ps-item-msg {
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem; color: var(--text-secondary); line-height: 1.55;
    overflow-wrap: anywhere;
}
.ps-empty { font-size: 0.82rem; color: var(--text-muted); font-style: italic; padding: 0.6rem 0; }

/* form: labelled, square, roomy */
.ps-form { display: flex; flex-direction: column; gap: 0.7rem; max-width: 560px; }
.ps-form label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--text-muted);
    display: block; margin-bottom: 0.3rem;
}
.ps-name, .ps-msg {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 0.7rem 0.9rem;
    outline: none;
    border-radius: 0;
    transition: border-color 0.16s;
    width: 100%;
}
.ps-name { max-width: 280px; }
.ps-name:focus, .ps-msg:focus { border-color: #ff6b35; }
.ps-msg { min-height: 96px; resize: vertical; }
.ps-submit {
    align-self: flex-start;
    background: #ff6b35;
    border: 1px solid #ff6b35;
    color: #0a0a0f;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700; font-size: 0.8rem;
    padding: 0.6rem 1.6rem;
    cursor: pointer;
    transition: background 0.16s, color 0.16s;
}
.ps-submit:hover { background: transparent; color: #ff6b35; }
.ps-submit:disabled { opacity: 0.5; cursor: wait; }
.ps-form-msg { font-family: 'JetBrains Mono', monospace; font-size: 0.74rem; min-height: 1em; }
.ps-form-msg.ps-info { color: #10b981; }
.ps-form-msg.ps-warn { color: #f59e0b; }

/* impact strip under hero */
.ps-impact {
    display: flex; align-items: flex-start; gap: 0.5rem;
    max-width: 720px;
    margin: 0 auto 0.9rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem; font-weight: 500; line-height: 1.5;
    color: #ffb27a;
    background: rgba(255,107,53,0.07);
    border: 1px solid rgba(255,107,53,0.3);
    border-left: 3px solid #ff6b35;
    padding: 0.7rem 1rem;
    text-align: left;
}
.ps-impact-bolt { flex: 0 0 auto; }

/* engineering notes: spec-sheet rows */
.ps-eng { margin-bottom: 2.4rem; }
.ps-eng h2, .ps-related h2, .ps-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem; letter-spacing: -0.015em;
    margin-bottom: 1rem; color: #fff;
}
.ps-eng h2::before, .ps-related h2::before, .ps-head h2::before {
    content: '//';
    color: #ff6b35;
    margin-right: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    font-weight: 500;
}
.ps-eng-row {
    display: grid; grid-template-columns: 160px 1fr; gap: 1.1rem;
    padding: 0.9rem 0;
    border-left: 1px solid var(--border);
    padding-left: 1.1rem;
    border-bottom: 1px dotted rgba(42,42,53,0.7);
}
.ps-eng-row:last-child { border-bottom: none; }
.ps-eng-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em;
    text-transform: uppercase; color: #22d3ee;
    padding-top: 0.25rem;
}
.ps-eng-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }

/* related posts */
.ps-related { margin-bottom: 2.4rem; }
.ps-related-list { display: flex; flex-direction: column; gap: 0; }
.ps-related-link {
    display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.88rem; font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: transparent;
    border: 1px solid var(--border); border-top-width: 0;
    padding: 0.6rem 1rem;
    transition: border-color 0.16s, color 0.16s, background 0.16s;
}
.ps-related-link:first-child { border-top-width: 1px; }
.ps-related-link:hover { border-color: rgba(255,107,53,0.5); color: #ff6b35; background: rgba(255,107,53,0.05); }
@media (max-width: 560px) { .ps-eng-row { grid-template-columns: 1fr; gap: 0.15rem; } }

/* ── project report (2026-08-31): problem/investigation/interesting/helpful ── */
.ps-report {
    margin-bottom: 2.6rem;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
    padding: 1.6rem 1.7rem 1.3rem;
}
.ps-report-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid var(--border);
}
.ps-report-head h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.45rem; color: #fff; margin: 0; letter-spacing: -0.015em;
}
.ps-report-head h2::before {
    content: '//';
    color: #ff6b35;
    margin-right: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    font-weight: 500;
}
.ps-report-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--text-muted);
}
.ps-report .ps-eng-row { border-left: none; padding-left: 0; }
.ps-report .ps-eng-label { color: #ff8555; }


/* ═══ mobile (2026-08-31): phones get a real layout too ═══ */
@media (max-width: 900px) {
    .content-grid { grid-template-columns: 1fr; }
    .project-hero { padding: calc(72px + 1.5rem) 1.2rem 2rem; }
    .project-hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .hero-description { font-size: 1.02rem; }
}
@media (max-width: 640px) {
    .hero-actions a, .hero-actions button {
        display: flex; justify-content: center;
        width: 100%; padding: 0.85rem 1.2rem;
        font-size: 1rem; min-height: 48px;      /* tappable */
    }
    .breadcrumb { font-size: 0.78rem; word-break: break-word; }
    .ps-impact { margin-left: 0; margin-right: 0; }
    .ps-report { padding: 1.1rem 1rem 0.9rem; }
    .ps-like { min-height: 44px; }
    .ps-related-link, .ps-submit { min-height: 44px; }
    .content-section p, .content-section ul, .content-section ol { font-size: 0.98rem; }
}
/* ── GMKtec partner panel (affiliate, disclosed) ── */
.ps-partner {
    margin-bottom: 2.4rem;
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border);
    border-left: 3px solid #ff6b35;
    padding: 1.1rem 1.3rem 1.2rem;
}
.ps-partner-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 0.8rem;
}
.ps-partner-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em;
    text-transform: uppercase; color: #ff8555;
}
.ps-partner-disc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); border: 1px dashed rgba(148,163,184,0.4);
    padding: 0.1rem 0.5rem;
}
.ps-partner-body { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ps-partner-qr {
    width: 88px; height: 88px; flex: 0 0 88px;
    image-rendering: pixelated;
    border: 1px solid var(--border);
}
.ps-partner-text { flex: 1 1 260px; min-width: 0; }
.ps-partner-text p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin: 0 0 0.4rem; }
.ps-partner-note { font-size: 0.72rem !important; color: var(--text-muted) !important; }
.ps-partner-cta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem; font-weight: 700;
    color: #ff8555; text-decoration: none;
    border: 1px solid rgba(255,107,53,0.5);
    padding: 0.65rem 1.2rem;
    white-space: nowrap;
    transition: background 0.16s, color 0.16s;
}
.ps-partner-cta:hover { background: #ff6b35; color: #0a0a0f; }
@media (max-width: 560px) { .ps-partner-cta { width: 100%; text-align: center; } }
