/* ==========================================================================
   SIGTEKX CORE — GPU ENGINE DEEP DIVE
   ========================================================================== */

.sigtekx-core-page {
    padding: 4rem 20px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* --- Hero --- */
.core-hero {
    margin-bottom: 5rem;
    border-bottom: 1px solid #222;
    padding-bottom: 3rem;
}

.core-hero .breadcrumb {
    font-family: 'Kode Mono', monospace;
    font-size: 0.75rem;
    color: #555;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 8px;
    align-items: center;
}

.core-hero .breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.core-hero .breadcrumb a:hover {
    color: var(--accent-primary);
}

.core-hero .breadcrumb .sep {
    color: #444;
}

.core-hero h1 {
    font-size: 3rem;
    color: #fff;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.core-hero .module-tag {
    font-family: 'Kode Mono', monospace;
    font-size: 1rem;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    display: block;
}

.core-hero .abstract {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #d0d0d0;
    max-width: 800px;
}

/* --- Section Titles --- */
.core-section {
    margin-bottom: 5rem;
}

.core-section-title {
    font-size: 1.5rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.core-section-title::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(90deg, #333, transparent);
}

.section-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #d0d0d0;
    margin-bottom: 2rem;
}

.section-text code {
    font-family: 'Kode Mono', monospace;
    font-size: 0.95em;
    color: var(--accent-primary);
    background: rgba(255, 69, 0, 0.06);
    padding: 1px 6px;
    border: 1px solid rgba(255, 69, 0, 0.15);
}

/* --- Diagram Containers --- */
.diagram-container {
    background: #0d0d0d;
    border: 1px solid #333;
    padding: 30px;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: zoom-in;
    transition: border-color 0.3s ease;
    position: relative;
}

.diagram-container:hover {
    border-color: var(--accent-primary);
}

.diagram-container::before {
    content: "CLICK TO EXPLORE";
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: 'Kode Mono', monospace;
    font-size: 0.6rem;
    color: var(--accent-primary);
    letter-spacing: 1px;
    opacity: 0.5;
}

.diagram-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Compact mode for very tall diagrams — height-capped preview */
.diagram-container.compact img {
    max-height: 440px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.diagram-caption {
    font-family: 'Kode Mono', monospace;
    font-size: 0.8rem;
    color: #888;
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #222;
    padding-top: 10px;
    width: 100%;
}

/* --- Screenshot Containers --- */
.screenshot-container {
    background: #0d0d0d;
    border: 1px solid #333;
    padding: 4px;
    margin: 2rem 0;
    transition: border-color 0.3s ease;
    cursor: zoom-in;
    position: relative;
}

.screenshot-container:hover {
    border-color: var(--accent-primary);
}

.screenshot-container::before {
    content: "CLICK TO EXPLORE";
    position: absolute;
    top: 10px;
    right: 10px;
    font-family: 'Kode Mono', monospace;
    font-size: 0.6rem;
    color: var(--accent-primary);
    letter-spacing: 1px;
    opacity: 0.5;
    z-index: 2;
}

.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-label {
    font-family: 'Kode Mono', monospace;
    font-size: 0.8rem;
    color: #888;
    padding: 10px 12px;
    border-top: 1px solid #222;
    text-align: center;
}

/* --- Architecture Layer Grid --- */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2px;
    background: #222;
    border: 1px solid #222;
    margin-bottom: 3rem;
}

.layer-item {
    background: #0a0a0a;
    padding: 1.5rem;
}

.layer-name {
    font-family: 'Kode Mono', monospace;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.layer-role {
    font-size: 0.85rem;
    color: #888;
    line-height: 1.5;
}

/* --- Dual Executor Cards --- */
.executor-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #222;
    border: 1px solid #222;
    margin: 2rem 0 3rem 0;
}

.executor-card {
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
}

.executor-header {
    padding: 1.3rem 1.8rem;
    background: rgba(255, 69, 0, 0.04);
    border-bottom: 1px solid #1a1a1a;
}

.executor-name {
    font-family: 'Kode Mono', monospace;
    font-size: 1.1rem;
    color: #fff;
    margin: 0 0 4px 0;
}

.executor-role {
    font-family: 'Kode Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.executor-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid #1a1a1a;
}

.executor-stat {
    padding: 1.2rem 1.8rem;
    border-right: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

.executor-stat:nth-child(2n) {
    border-right: none;
}

.executor-stat:nth-last-child(-n+2) {
    border-bottom: none;
}

.stat-label {
    font-family: 'Kode Mono', monospace;
    font-size: 0.65rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.stat-value {
    font-family: 'Kode Mono', monospace;
    font-size: 0.9rem;
    color: #fff;
}

.stat-value.accent {
    color: var(--accent-primary);
}

.executor-traits {
    padding: 1.5rem 1.8rem;
    list-style: none;
    margin: 0;
    flex-grow: 1;
}

.executor-traits li {
    font-size: 0.85rem;
    color: #888;
    padding: 7px 0 7px 14px;
    border-bottom: 1px solid #1a1a1a;
    position: relative;
    line-height: 1.5;
}

.executor-traits li::before {
    content: ">";
    position: absolute;
    left: 0;
    top: 7px;
    color: #444;
    font-family: 'Kode Mono', monospace;
}

.executor-traits li:last-child {
    border-bottom: none;
}

/* --- Engineering Highlights Grid --- */
.highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    background: #222;
    border: 1px solid #222;
    margin: 2rem 0;
}

.highlight-card {
    background: #0a0a0a;
    padding: 2rem;
}

.highlight-title {
    font-family: 'Kode Mono', monospace;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 0.8rem;
}

.highlight-body {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
}

.highlight-body strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.highlight-body code {
    font-family: 'Kode Mono', monospace;
    font-size: 0.95em;
    color: var(--accent-primary);
    background: rgba(255, 69, 0, 0.06);
    padding: 1px 6px;
    border: 1px solid rgba(255, 69, 0, 0.15);
}

/* --- Performance Metrics --- */
.perf-wrap {
    background: #0a0a0a;
    border: 1px solid #222;
    padding: 2rem;
    margin: 2rem 0;
}

.perf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid #1a1a1a;
    border-left: 1px solid #1a1a1a;
}

.perf-metric {
    padding: 1.5rem;
    border-right: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    background: #0d0d0d;
}

.perf-value {
    font-family: 'Kode Mono', monospace;
    font-size: 1.5rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 6px;
}

.perf-label {
    font-family: 'Kode Mono', monospace;
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.perf-context {
    font-family: 'Kode Mono', monospace;
    font-size: 0.75rem;
    color: #555;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #1a1a1a;
    line-height: 1.8;
    text-align: right;
}

/* --- Coverage screenshots side by side --- */
.screenshots-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 2rem 0;
}

/* --- Actions --- */
.core-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 4rem;
    flex-wrap: wrap;
}

/* --- Explorer Modal --- */
#diagram-explorer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    z-index: 99999;
    display: none;
    flex-direction: column;
}

.explorer-header {
    padding: 20px 40px;
    background: #000;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.explorer-title {
    font-family: 'Kode Mono', monospace;
    color: var(--accent-primary);
    font-size: 0.9rem;
}

.explorer-btns {
    display: flex;
    gap: 20px;
    align-items: center;
}

.explorer-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.explorer-content:active {
    cursor: grabbing;
}

#explorer-img {
    position: absolute;
    transform-origin: center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    max-width: none;
}

.close-btn {
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-primary);
}

.explorer-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #666;
    padding: 8px 15px;
    border: 1px solid #222;
    font-family: 'Kode Mono', monospace;
    font-size: 0.7rem;
    pointer-events: none;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .core-hero h1 {
        font-size: 2.2rem;
    }

    .executor-duo {
        grid-template-columns: 1fr;
    }

    .highlight-grid {
        grid-template-columns: 1fr;
    }

    .perf-grid {
        grid-template-columns: 1fr 1fr;
    }

    .screenshots-duo {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .executor-stats {
        grid-template-columns: 1fr;
    }

    .executor-stat {
        border-right: none !important;
    }

    .perf-grid {
        grid-template-columns: 1fr;
    }

    .perf-context {
        text-align: left;
    }

    .layer-grid {
        grid-template-columns: 1fr;
    }
}
