:root {
    --metal-0: #f5f5f3;
    --metal-1: #e8e8e4;
    --metal-2: #c8c8c2;
    --metal-3: #a0a098;
    --metal-4: #787870;
    --metal-5: #505048;
    --metal-6: #323230;
    --metal-7: #1a1a18;
    --metal-8: #0e0e0c;
    --accent: #b8860b;
    --accent-light: #d4a017;
    --accent-dim: rgba(184, 134, 11, 0.15);
    --accent-border: rgba(184, 134, 11, 0.35);
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.13);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--metal-8);
    color: var(--metal-1);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    background: rgba(14, 14, 12, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--border);
}

.nav-logo {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 3px;
    color: var(--metal-0);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .logo-maker {
    color: var(--accent-light);
}

.nav-logo .logo-sep {
    width: 1px;
    height: 18px;
    background: var(--border-strong);
    display: inline-block;
}

.nav-logo .logo-product {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 4px;
    color: var(--metal-4);
}

.nav-badge {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-light);
    background: var(--accent-dim);
    border: 0.5px solid var(--accent-border);
    padding: 4px 12px;
    border-radius: 2px;
}

.nav-back {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--metal-3);
    text-decoration: none;
    border: 1px solid var(--border-strong);
    padding: 8px 20px;
    transition: all 0.2s;
}

.nav-back:hover {
    color: var(--metal-0);
    border-color: var(--metal-3);
}

/* ─── PAGE LAYOUT ─── */
.page-wrap {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

aside {
    width: 280px;
    background: #111110;
    border-right: 0.5px solid var(--border);
    padding: 40px 24px;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    overflow-y: auto;
    flex-shrink: 0;
}

/* Scrollbar styling for sidebar */
aside::-webkit-scrollbar {
    width: 4px;
}

aside::-webkit-scrollbar-track {
    background: transparent;
}

aside::-webkit-scrollbar-thumb {
    background: var(--metal-6);
    border-radius: 2px;
}

.sidebar-group {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
}

.sidebar-group-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--metal-5);
    margin-bottom: 12px;
    padding-left: 8px;
}

.sidebar-link {
    font-size: 13px;
    color: var(--metal-3);
    text-decoration: none;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 2px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    color: var(--metal-1);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-link.active {
    color: var(--accent-light);
    background: var(--accent-dim);
    font-weight: 400;
}

.sidebar-link .s-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--metal-5);
    transition: background 0.2s;
}

.sidebar-link.active .s-dot {
    background: var(--accent-light);
}

main {
    flex-grow: 1;
    padding: 60px 8% 120px;
    max-width: 1100px;
}

/* ─── CONTENT TYPOGRAPHY & ELEMENTS ─── */
.page-header {
    margin-bottom: 60px;
}

.page-eyebrow {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-eyebrow::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
    display: block;
}

.page-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 700;
    color: var(--metal-0);
    line-height: 1.1;
    margin-bottom: 16px;
}

.page-title .gold {
    color: var(--accent-light);
}

.page-desc {
    font-size: 15px;
    color: var(--metal-3);
    max-width: 700px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 60px 0;
}

.comp-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.comp-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.comp-icon-badge {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.02);
    border: 0.5px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comp-icon-badge svg {
    width: 20px;
    height: 20px;
}

.comp-section-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--metal-0);
    line-height: 1.2;
}

.comp-section-sub {
    font-size: 12px;
    color: var(--metal-4);
    letter-spacing: 1px;
}

.prose {
    font-size: 14px;
    color: var(--metal-2);
    margin-bottom: 24px;
    line-height: 1.8;
}

.prose strong {
    color: var(--metal-0);
    font-weight: 500;
}

/* TABLES */
.ref-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 13px;
    text-align: left;
}

.ref-table th,
.ref-table td {
    padding: 12px 16px;
    border-bottom: 0.5px solid var(--border);
}

.ref-table th {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--metal-4);
    background: rgba(255, 255, 255, 0.02);
}

.ref-table tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.comp-name {
    color: var(--metal-0);
    font-weight: 400;
}

/* INFO GRID */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 0.5px solid var(--border);
    margin-bottom: 24px;
}

.info-cell {
    background: var(--metal-8);
    padding: 16px 20px;
}

.info-cell-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-light);
    margin-bottom: 6px;
}

.info-cell-value {
    font-size: 13px;
    color: var(--metal-2);
}

.tag {
    background: rgba(255, 255, 255, 0.04);
    border: 0.5px solid var(--border-strong);
    padding: 1px 6px;
    border-radius: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--metal-1);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-light);
    font-size: 12px;
}

/* CODE BLOCKS */
.code-block {
    border: 0.5px solid var(--border-strong);
    background: #0a0a09;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 24px;
}

.code-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 16px;
    border-bottom: 0.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
}

.code-lang {
    color: var(--accent-light);
    font-weight: 700;
    text-transform: uppercase;
}

.code-title {
    color: var(--metal-4);
}

.code-body {
    padding: 16px;
    overflow-x: auto;
}

.code-body pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--metal-1);
}

/* SYNTAX HIGHLIGHTING (Basic Manual simulation) */
pre .kw {
    color: #c678dd;
}

/* Keywords / Define */
pre .ty {
    color: #e5c07b;
}

/* Types */
pre .fn {
    color: #61afef;
}

/* Functions */
pre .cn {
    color: #d19a66;
}

/* Constants / Pins */
pre .nm {
    color: #d19a66;
}

/* Numbers */
pre .st {
    color: #98c379;
}

/* Strings */
pre .cm {
    color: #5c6370;
    font-style: italic;
}

/* Comments */
pre .pt {
    color: #abb2bf;
}

/* Punctuation / Operators */

/* RESPONSIVE */
@media (max-width: 900px) {
    .page-wrap {
        flex-direction: column;
    }

    aside {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 0.5px solid var(--border);
        padding: 24px 5%;
    }

    .sidebar-group {
        margin-bottom: 16px;
    }

    main {
        padding: 40px 5% 80px;
    }

    .nav-badge {
        display: none;
    }
}

/* Kenar çubuğu grubu içindeki tüm liste ve boşlukları sıfırla */
.sidebar-group {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 0 24px 0;
    list-style: none;
    /* Olası liste noktalarını tamamen engeller */
}

.sidebar-group-label {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: var(--text-muted, #666);
    margin-bottom: 12px;
    padding-left: 10px;
}

/* Linklerin sola tam hizalanması ve düzgün görünmesi */
.sidebar-link {
    display: block;
    width: 100%;
    padding: 10px 14px;
    color: var(--text-main, #ccc);
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

/* Aktif link vurgusu */
.sidebar-link.active {
    background: rgba(212, 175, 55, 0.1);
    /* Gold rengi hafif şeffaf arka plan */
    color: var(--accent, #d4af37);
    /* Aktif yazı rengi */
    font-weight: 500;
    border-left: 3px solid var(--accent, #d4af37);
    padding-left: 11px;
    /* Kenarlık eklenince kayma olmaması için dengeleme */
}

.sidebar-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}