/* ==========================================================================
   2026 ARCHITECTURAL & INTERACTIVE FEATURES SYSTEM
   Engineered for Ibrahim Tarek — .NET Architect Portfolio
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Arabic (RTL) System & Typography
   -------------------------------------------------------------------------- */
[dir="rtl"], .is-rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
}

[dir="rtl"] .topbar nav,
[dir="rtl"] .hero-actions,
[dir="rtl"] .social-row,
[dir="rtl"] .proof-strip,
[dir="rtl"] .filters,
[dir="rtl"] .tag-row,
[dir="rtl"] .project-links {
    flex-direction: row;
}

[dir="rtl"] .hero-lead {
    text-align: right;
}

[dir="rtl"] .section-heading,
[dir="rtl"] .contact-heading {
    text-align: right;
}

[dir="rtl"] .top-arrow,
[dir="rtl"] .btn-arrow,
[dir="rtl"] .round-link {
    transform: scaleX(-1);
    display: inline-block;
}

.topbar-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #d1edbd;
    font: 11px 'DM Mono', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
}

.topbar-lang-btn:hover {
    background: rgba(199, 243, 107, 0.12);
    border-color: rgba(199, 243, 107, 0.45);
    color: #e2ff9c;
    transform: translateY(-1px);
}

.mobile-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding: 11px;
    background: rgba(199, 243, 107, 0.08);
    border: 1px solid rgba(199, 243, 107, 0.3);
    border-radius: 8px;
    color: #d5fb83;
    font: 12px 'DM Mono', monospace;
    font-weight: 600;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   1. Voice Greeting Widget
   -------------------------------------------------------------------------- */
.voice-greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
    margin-bottom: 6px;
    padding: 10px 20px;
    background: rgba(199, 243, 107, 0.08);
    border: 1px solid rgba(199, 243, 107, 0.4);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(12px);
    width: fit-content;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 16px rgba(199, 243, 107, 0.12);
}

.voice-greeting-badge:hover,
.voice-greeting-badge.is-playing {
    background: rgba(199, 243, 107, 0.14);
    border-color: rgba(199, 243, 107, 0.7);
    box-shadow: 0 6px 24px rgba(199, 243, 107, 0.22);
    transform: translateY(-2px);
}

.voice-play-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c7f36b;
    color: #090b0e;
    border: none;
    display: grid;
    place-items: center;
    font-size: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s;
}

.voice-greeting-badge:hover .voice-play-btn {
    transform: scale(1.1);
}

.voice-info {
    display: flex;
    flex-direction: column;
}

.voice-title {
    font: 600 11px Manrope, sans-serif;
    color: #e4e8eb;
}

.voice-sub {
    font: 9px 'DM Mono', monospace;
    color: #8c989c;
}

.voice-waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
    padding-left: 6px;
}

.wave-bar {
    width: 2.5px;
    height: 6px;
    background: #80f2e2;
    border-radius: 2px;
    transition: height 0.2s;
}

.voice-greeting-badge.is-playing .wave-bar:nth-child(1) { animation: wave-jump 0.8s infinite ease-in-out alternate; }
.voice-greeting-badge.is-playing .wave-bar:nth-child(2) { animation: wave-jump 0.6s infinite ease-in-out alternate 0.15s; }
.voice-greeting-badge.is-playing .wave-bar:nth-child(3) { animation: wave-jump 0.9s infinite ease-in-out alternate 0.3s; }
.voice-greeting-badge.is-playing .wave-bar:nth-child(4) { animation: wave-jump 0.7s infinite ease-in-out alternate 0.1s; }
.voice-greeting-badge.is-playing .wave-bar:nth-child(5) { animation: wave-jump 0.85s infinite ease-in-out alternate 0.25s; }

@keyframes wave-jump {
    0% { height: 4px; }
    100% { height: 16px; background: #c7f36b; }
}

/* --------------------------------------------------------------------------
   2. Live Interactive ASP.NET Core Web API Explorer
   -------------------------------------------------------------------------- */
.api-explorer-card {
    margin: 48px 0;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: linear-gradient(145deg, #10151a, #0b0e12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    position: relative;
    isolation: isolate;
}

.api-badge, .arch-badge, .benchmark-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(199, 243, 107, 0.08);
    border: 1px solid rgba(199, 243, 107, 0.25);
    border-radius: 4px;
    color: #c7f36b;
    font: 9px 'DM Mono', monospace;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.api-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #c7f36b;
    box-shadow: 0 0 10px #c7f36b;
    animation: api-pulse-anim 2s infinite;
}

@keyframes api-pulse-anim {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.api-heading-row, .arch-heading-row, .benchmark-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.api-title, .arch-title, .benchmark-title {
    font-size: clamp(24px, 3.5vw, 36px);
    margin: 0 0 8px;
    color: #e6ebed;
    line-height: 1.15;
}

.api-title em, .arch-title em, .benchmark-title em {
    font-style: italic;
    color: #c7f36b;
}

.api-subtitle, .arch-subtitle, .benchmark-subtitle {
    font-size: 13px;
    line-height: 1.6;
    color: #949ea3;
    max-width: 680px;
    margin: 0;
}

.api-env-badge, .benchmark-env-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    font: 10px 'DM Mono', monospace;
    color: #b5bec2;
}

.env-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #80f2e2;
    box-shadow: 0 0 8px #80f2e2;
}

.env-time {
    color: #c7f36b;
    font-weight: 700;
}

.api-endpoint-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.api-ep-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #c2c9cc;
    cursor: pointer;
    font: 11px 'DM Mono', monospace;
    white-space: nowrap;
    transition: all 0.22s;
}

.api-ep-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.api-ep-btn.active {
    background: rgba(199, 243, 107, 0.08);
    border-color: rgba(199, 243, 107, 0.4);
    color: #e2ff9c;
    box-shadow: 0 4px 18px rgba(199, 243, 107, 0.08);
}

.method-tag {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.method-get {
    background: rgba(128, 242, 226, 0.15);
    color: #80f2e2;
    border: 1px solid rgba(128, 242, 226, 0.35);
}

.method-post {
    background: rgba(199, 243, 107, 0.15);
    color: #c7f36b;
    border: 1px solid rgba(199, 243, 107, 0.35);
}

.path-tag {
    font-weight: 600;
}

.ep-desc {
    color: #727c82;
    font-size: 10px;
}

.api-console-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .api-console-grid {
        grid-template-columns: 1fr;
    }
}

.api-panel {
    background: rgba(9, 12, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font: 10px 'DM Mono', monospace;
    color: #8b969b;
}

.btn-execute {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: #c7f36b;
    color: #0a0d10;
    border: none;
    border-radius: 6px;
    font: 700 11px 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-execute:hover {
    background: #d8ffa0;
    box-shadow: 0 0 16px rgba(199, 243, 107, 0.35);
}

.btn-execute.loading {
    opacity: 0.75;
    pointer-events: none;
}

.exec-spinner {
    width: 10px;
    height: 10px;
    border: 2px solid #0a0d10;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.request-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font: 11px 'DM Mono', monospace;
}

.req-url {
    color: #e2e8eb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.req-section {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-micro-label {
    display: block;
    font: 9px 'DM Mono', monospace;
    letter-spacing: 0.1em;
    color: #727e85;
    margin-bottom: 8px;
}

.param-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.param-row {
    display: grid;
    grid-template-columns: 80px 1fr;
    align-items: center;
    gap: 10px;
    font: 11px 'DM Mono', monospace;
}

.param-row label {
    color: #9cb0b8;
}

.param-row input, .body-editor {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #c7f36b;
    font: 11px 'DM Mono', monospace;
    width: 100%;
    box-sizing: border-box;
}

.param-row input:focus, .body-editor:focus {
    border-color: #c7f36b;
    outline: none;
    box-shadow: 0 0 10px rgba(199, 243, 107, 0.2);
}

.body-editor {
    resize: vertical;
    line-height: 1.45;
}

.req-headers-summary {
    padding: 14px 16px;
}

.header-chips {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-chips code {
    font: 10px 'DM Mono', monospace;
    color: #8b999f;
    background: rgba(255, 255, 255, 0.02);
    padding: 3px 6px;
    border-radius: 4px;
}

.response-tabs {
    display: flex;
    gap: 6px;
}

.resp-tab-btn {
    padding: 5px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #8a969b;
    font: 10px 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.resp-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.resp-meta-indicators {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 10px 'DM Mono', monospace;
}

.status-pill {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.status-200, .status-201 {
    background: rgba(199, 243, 107, 0.15);
    color: #c7f36b;
    border: 1px solid rgba(199, 243, 107, 0.3);
}

.latency-pill {
    color: #80f2e2;
}

.size-pill {
    color: #a89cf9;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    max-height: 420px;
    padding: 16px;
    background: #07090c;
}

.json-viewer pre, .headers-viewer, .code-viewer pre {
    margin: 0;
    font: 11px 'DM Mono', monospace;
    line-height: 1.5;
    color: #d1edbd;
    white-space: pre-wrap;
    word-break: break-all;
}

.headers-viewer {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.header-line strong {
    color: #80f2e2;
    margin-right: 8px;
}

.header-line span {
    color: #c2ced1;
}

.code-viewer pre {
    color: #e3ebec;
}

.code-banner {
    padding: 6px 10px;
    background: rgba(168, 156, 249, 0.12);
    border: 1px solid rgba(168, 156, 249, 0.25);
    border-radius: 4px;
    color: #c5bdfc;
    font: 10px 'DM Mono', monospace;
    margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   3. Architecture & ERD Diagram Viewer
   -------------------------------------------------------------------------- */
.arch-viewer-card {
    margin: 48px 0;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: linear-gradient(145deg, #0e1216, #090c0f);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.project-pill-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.proj-select-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: #b8c4c7;
    font: 11px 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.proj-select-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.proj-select-pill.active {
    background: rgba(199, 243, 107, 0.1);
    border-color: rgba(199, 243, 107, 0.4);
    color: #e2ff9c;
}

.viewer-mode-tabs {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    overflow-x: auto;
}

.mode-tab-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #8c979c;
    font: 11px 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-tab-btn.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(199, 243, 107, 0.3);
    color: #d8ffa0;
}

.topology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.topo-layer-card {
    background: rgba(13, 17, 21, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.layer-meta {
    margin-bottom: 10px;
}

.layer-num {
    font: 700 10px 'DM Mono', monospace;
    display: block;
    margin-bottom: 4px;
}

.topo-layer-card h4 {
    margin: 0 0 4px;
    font-size: 15px;
    color: #fff;
}

.layer-focus {
    font: 10px 'DM Mono', monospace;
    color: #88969b;
}

.layer-desc {
    font-size: 12px;
    line-height: 1.55;
    color: #9cb0b5;
    margin: 8px 0 14px;
}

.comp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
}

.comp-chip {
    font: 9px 'DM Mono', monospace;
    padding: 3px 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #b5c7cb;
}

.layer-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font: 9px 'DM Mono', monospace;
    color: #80f2e2;
}

.dataflow-indicator {
    text-align: center;
    margin-top: 20px;
    font: 10px 'DM Mono', monospace;
    color: #7d8b91;
    letter-spacing: 0.06em;
}

.erd-stage {
    margin-top: 24px;
}

.erd-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(128, 242, 226, 0.06);
    border: 1px solid rgba(128, 242, 226, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
}

.erd-banner strong {
    color: #80f2e2;
    font-size: 14px;
}

.erd-banner p {
    margin: 3px 0 0;
    font-size: 12px;
    color: #a4b6bb;
}

.erd-counter {
    font: 11px 'DM Mono', monospace;
    color: #c7f36b;
}

.erd-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.erd-table-box {
    background: #090d10;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.table-box-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.table-icon {
    color: #c7f36b;
}

.table-name {
    font: 700 12px 'DM Mono', monospace;
    color: #fff;
    flex: 1;
}

.table-type {
    font: 9px 'DM Mono', monospace;
    color: #80f2e2;
    background: rgba(128, 242, 226, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.table-columns {
    display: flex;
    flex-direction: column;
}

.table-col-row {
    display: grid;
    grid-template-columns: 24px 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 12px;
    font: 11px 'DM Mono', monospace;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.table-col-row.is-pk {
    background: rgba(199, 243, 107, 0.06);
}

.table-col-row.is-fk {
    background: rgba(168, 156, 249, 0.06);
}

.col-key b {
    color: #c7f36b;
    font-size: 9px;
}

.col-name {
    color: #e4eaed;
}

.col-type {
    color: #7b8b90;
    font-size: 10px;
}

.col-extra {
    color: #9cb282;
    font-size: 9px;
}

.table-indexes {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    font: 9px 'DM Mono', monospace;
}

.idx-label {
    color: #6d7b81;
    margin-right: 6px;
}

.idx-tag {
    color: #93a5ab;
    margin-right: 6px;
}

.adr-stage {
    margin-top: 24px;
}

.adr-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.adr-card {
    background: rgba(13, 17, 21, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 24px;
}

.adr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.adr-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 10px 'DM Mono', monospace;
    color: #c7f36b;
}

.adr-status-approved {
    background: rgba(199, 243, 107, 0.15);
    color: #c7f36b;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid rgba(199, 243, 107, 0.3);
}

.adr-date {
    font: 10px 'DM Mono', monospace;
    color: #717d83;
}

.adr-card h4 {
    margin: 0 0 16px;
    font-size: 17px;
    color: #fff;
}

.adr-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

@media (max-width: 760px) {
    .adr-split-grid {
        grid-template-columns: 1fr;
    }
}

.adr-col {
    background: rgba(0, 0, 0, 0.25);
    padding: 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.col-label {
    display: block;
    font: 9px 'DM Mono', monospace;
    letter-spacing: 0.1em;
    color: #7b8c93;
    margin-bottom: 6px;
}

.adr-col p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #c1ccd0;
}

.impact-metrics-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.impact-metric-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(199, 243, 107, 0.08);
    border: 1px solid rgba(199, 243, 107, 0.25);
    border-radius: 6px;
    font: 11px 'DM Mono', monospace;
    color: #d8ffa0;
}

.impact-check {
    color: #c7f36b;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   4. C# Performance & BenchmarkDotNet Showcase
   -------------------------------------------------------------------------- */
.benchmark-card {
    margin: 48px 0;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: linear-gradient(145deg, #0e1216, #080b0e);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.benchmark-scenarios {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scenario-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #bcc6c9;
    font: 11px 'DM Mono', monospace;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.scenario-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.scenario-btn.active {
    background: rgba(128, 242, 226, 0.1);
    border-color: rgba(128, 242, 226, 0.35);
    color: #a4fff2;
}

.bench-view-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.bench-tab {
    padding: 7px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: #8c979c;
    font: 11px 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s;
}

.bench-tab.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(199, 243, 107, 0.35);
    color: #e2ff9c;
}

.chart-summary-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.summary-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
}

.stat-label {
    display: block;
    font: 9px 'DM Mono', monospace;
    color: #79868c;
    margin-bottom: 4px;
}

.stat-highlight {
    font-size: 18px;
    color: #c7f36b;
    font-family: 'DM Mono', monospace;
}

.bars-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bar-legend {
    display: flex;
    justify-content: space-between;
    font: 11px 'DM Mono', monospace;
}

.method-baseline {
    background: rgba(242, 143, 131, 0.15);
    color: #f28f83;
    border: 1px solid rgba(242, 143, 131, 0.3);
}

.method-optimized {
    background: rgba(199, 243, 107, 0.15);
    color: #c7f36b;
    border: 1px solid rgba(199, 243, 107, 0.35);
}

.metric-val {
    color: #adbabb;
}

.bar-track {
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 12px;
    font: 700 11px 'DM Mono', monospace;
    transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar-fill-baseline {
    background: linear-gradient(90deg, #f28f8366, #f28f83aa);
    color: #fff;
}

.bar-fill-optimized {
    background: linear-gradient(90deg, #c7f36b66, #c7f36bcc);
    color: #000;
}

.bench-insight-card {
    background: rgba(199, 243, 107, 0.05);
    border: 1px solid rgba(199, 243, 107, 0.2);
    border-radius: 8px;
    padding: 18px;
}

.insight-badge {
    font: 700 9px 'DM Mono', monospace;
    color: #c7f36b;
    display: block;
    margin-bottom: 6px;
}

.bench-insight-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #c4d0d3;
}

.table-terminal {
    background: #080b0e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font: 10px 'DM Mono', monospace;
    color: #7b888e;
}

.terminal-bar span {
    font-size: 8px;
    color: #556268;
}

.table-responsive {
    overflow-x: auto;
}

.benchmark-tbl {
    width: 100%;
    border-collapse: collapse;
    font: 11px 'DM Mono', monospace;
    text-align: left;
}

[dir="rtl"] .benchmark-tbl {
    text-align: right;
}

.benchmark-tbl th {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    color: #7b8990;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.benchmark-tbl td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #c1ccd0;
}

.row-baseline td strong {
    color: #f28f83;
}

.row-optimized td strong {
    color: #c7f36b;
}

.fast-val {
    color: #c7f36b;
    font-weight: 700;
}

.ratio-val {
    color: #80f2e2;
    font-weight: 700;
}

.alloc-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
}

.alloc-badge.bad {
    background: rgba(242, 143, 131, 0.15);
    color: #f28f83;
}

.alloc-badge.zero {
    background: rgba(199, 243, 107, 0.15);
    color: #c7f36b;
}

.code-box {
    background: #080b0e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.code-box-header {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font: 10px 'DM Mono', monospace;
    color: #80f2e2;
}

.code-box pre {
    margin: 0;
    padding: 16px;
    font: 11px 'DM Mono', monospace;
    color: #cbe9aa;
    line-height: 1.55;
    overflow-x: auto;
}

/* --------------------------------------------------------------------------
   5. Articles & Engineering Notes
   -------------------------------------------------------------------------- */
.articles-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.article-card {
    background: rgba(16, 21, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: rgba(199, 243, 107, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 20px rgba(199, 243, 107, 0.08);
}

.article-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.article-tag {
    font: 9px 'DM Mono', monospace;
    letter-spacing: 0.1em;
    color: #c7f36b;
    background: rgba(199, 243, 107, 0.08);
    padding: 3px 8px;
    border-radius: 4px;
}

.article-read-time {
    font: 10px 'DM Mono', monospace;
    color: #7b888e;
}

.article-title {
    font-size: 17px;
    line-height: 1.35;
    color: #fff;
    margin: 0 0 10px;
}

.article-snippet {
    font-size: 13px;
    line-height: 1.6;
    color: #929ea3;
    margin: 0 0 18px;
}

.article-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.article-date {
    font: 10px 'DM Mono', monospace;
    color: #6d7b81;
}

.article-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #c7f36b;
    font: 700 11px 'DM Mono', monospace;
    cursor: pointer;
}

.article-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: grid;
    place-items: center;
    padding: 20px;
}

.article-modal-sheet {
    background: #0c1014;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    width: min(840px, 100%);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.modal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font: 10px 'DM Mono', monospace;
}

.modal-tag {
    color: #c7f36b;
    background: rgba(199, 243, 107, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
}

.modal-time, .modal-date {
    color: #8b999f;
}

.btn-modal-close {
    background: transparent;
    border: none;
    color: #8b999f;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}

.modal-article-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
}

.modal-article-title {
    font-size: clamp(24px, 3.5vw, 32px);
    color: #fff;
    line-height: 1.2;
    margin: 0 0 12px;
}

.article-author-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    font: 10px 'DM Mono', monospace;
    color: #80f2e2;
    margin-bottom: 24px;
}

.author-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #80f2e2;
}

.article-content-prose {
    font-size: 14px;
    line-height: 1.75;
    color: #bcc6c9;
}

.article-content-prose p.lead {
    font-size: 15px;
    color: #e2ebed;
    border-left: 3px solid #c7f36b;
    padding-left: 14px;
    margin-bottom: 24px;
}

[dir="rtl"] .article-content-prose p.lead {
    border-left: none;
    border-right: 3px solid #c7f36b;
    padding-left: 0;
    padding-right: 14px;
}

.article-content-prose h3 {
    color: #fff;
    font-size: 18px;
    margin: 28px 0 12px;
}

.article-content-prose ul, .article-content-prose ol {
    padding-left: 20px;
    margin-bottom: 20px;
}

[dir="rtl"] .article-content-prose ul, [dir="rtl"] .article-content-prose ol {
    padding-left: 0;
    padding-right: 20px;
}

.article-content-prose li {
    margin-bottom: 8px;
}

.article-content-prose pre {
    background: #07090c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font: 11px 'DM Mono', monospace;
    color: #d1edbd;
    margin: 16px 0 24px;
}

.modal-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   6. Competitive Programming & Mentorship Showcase
   -------------------------------------------------------------------------- */
.cp-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

.cp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 32px;
}

@media (max-width: 860px) {
    .cp-grid {
        grid-template-columns: 1fr;
    }
}

.cp-stat-card {
    background: rgba(14, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.cp-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: 9px 'DM Mono', monospace;
    color: #80f2e2;
    background: rgba(128, 242, 226, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.1em;
}

.cp-verified {
    font: 10px 'DM Mono', monospace;
    color: #c7f36b;
}

.cp-hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.cp-metric-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
}

.cp-num {
    display: block;
    font: 700 24px 'DM Mono', monospace;
    color: #c7f36b;
}

.cp-label {
    display: block;
    font: 600 11px Manrope, sans-serif;
    color: #fff;
    margin-top: 4px;
}

.cp-metric-box small {
    display: block;
    font: 9px 'DM Mono', monospace;
    color: #7b888e;
    margin-top: 2px;
}

.cp-narrative p {
    font-size: 13px;
    line-height: 1.65;
    color: #a4b2b6;
    margin: 0 0 12px;
}

.cp-topics-card {
    background: rgba(14, 18, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 28px;
}

.card-kicker {
    display: block;
    font: 9px 'DM Mono', monospace;
    letter-spacing: 0.12em;
    color: #80f2e2;
    margin-bottom: 16px;
}

.topics-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topic-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 14px;
}

.topic-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.topic-icon {
    font-size: 14px;
}

.topic-header strong {
    font-size: 13px;
    color: #fff;
    flex: 1;
}

.complexity-tag {
    font: 10px 'DM Mono', monospace;
    color: #c7f36b;
    background: rgba(199, 243, 107, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.topic-item p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #98a5a9;
}
