/* =============================================================================
   NARVEIN — Grimdark Tema
   ============================================================================= */

:root,
[data-theme="dark"] {
    --bg-base: #0e0d0c;
    --bg-surface: #161412;
    --bg-raised: #1e1b18;
    --bg-overlay: #252019;
    --text-primary: #d4c9b0;
    --text-secondary: #9a8f7a;
    --text-muted: #5e584e;
    --text-heading: #e8dfc8;
    --accent: #8b1a1a;
    --accent-light: #b52020;
    --accent-dark: #5c0e0e;
    --accent-glow: rgba(139, 26, 26, 0.25);
    --border: #2e2820;
    --border-light: #3d3428;
    --nav-bg: rgba(10, 9, 8, 0.95);
    --nav-height: 64px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.7);
    --shadow-accent: 0 0 20px rgba(139,26,26,0.3);
    --transition: 200ms ease;
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Merriweather', Georgia, 'Times New Roman', serif;
    --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 3px;
    --radius-md: 6px;
    --radius-lg: 10px;
}

[data-theme="light"] {
    --bg-base: #f5f0e8;
    --bg-surface: #ede6d8;
    --bg-raised: #e4dbc8;
    --bg-overlay: #d9cfba;
    --text-primary: #2a2218;
    --text-secondary: #5a4e3c;
    --text-muted: #8a7e6c;
    --text-heading: #1a1208;
    --border: #c8bca8;
    --border-light: #ddd0b8;
    --nav-bg: rgba(240,234,220,0.97);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.nrv-body {
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(139,26,26,0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(180,140,60,0.03) 0%, transparent 50%);
}

::selection { background: var(--accent); color: var(--text-heading); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
    line-height: 1.25;
    font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { margin-bottom: 1rem; }
a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-heading); }

.nrv-title-decorated {
    position: relative;
    display: inline-block;
    padding-bottom: .5rem;
}
.nrv-title-decorated::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 60px; height: 2px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

/* NAV */
.nrv-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.nrv-nav-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.nrv-brand {
    color: var(--text-heading);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: .02em;
    flex-shrink: 0;
}
.nrv-brand:hover { color: var(--text-heading); }
.nrv-nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    flex: 1;
}
.nrv-nav-link {
    display: block;
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: color var(--transition), background var(--transition);
}
.nrv-nav-link:hover, .nrv-nav-link.active {
    color: var(--text-heading);
    background: rgba(139,26,26,.12);
}
.nrv-nav-link.active {
    color: var(--accent-light);
    border-bottom: 1px solid var(--accent);
}
.nrv-nav-tools {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.nrv-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.nrv-tool-btn:hover {
    background: var(--bg-raised);
    color: var(--text-heading);
}
.nrv-lang-link {
    font-family: var(--font-ui);
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .1em;
    padding: .35rem .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.nrv-lang-link:hover { color: var(--text-heading); border-color: var(--accent-dark); }
.nrv-btn-ghost {
    padding: .35rem .9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    color: var(--accent-light);
    font-family: var(--font-ui);
    font-size: .8rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    transition: all var(--transition);
}
.nrv-btn-ghost:hover {
    background: var(--accent);
    color: #fff;
}
.nrv-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}
.nrv-nav-toggle span {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-secondary);
    transition: all var(--transition);
}

/* MAIN */
#main-content {
    padding-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}
.nrv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.nrv-container--narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.nrv-section { padding: 4rem 0; }

/* HERO */
.nrv-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 6rem 1.5rem 4rem;
}
.nrv-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(139,26,26,.15) 0%, transparent 60%),
        linear-gradient(180deg, transparent 60%, var(--bg-base) 100%);
}
.nrv-hero-content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}
.nrv-hero-eyebrow {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 1.2rem;
    padding: .3rem .8rem;
    border: 1px solid var(--accent-dark);
    border-radius: var(--radius-sm);
}
.nrv-hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: 1.5rem;
}
.nrv-hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.9;
}

/* BUTONLAR */
.nrv-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.8rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-ui);
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}
.nrv-btn--primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px rgba(139,26,26,.3);
}
.nrv-btn--primary:hover {
    background: var(--accent-light);
    color: #fff;
    box-shadow: 0 0 30px rgba(139,26,26,.5);
    transform: translateY(-1px);
}
.nrv-btn--outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}
.nrv-btn--outline:hover {
    border-color: var(--accent);
    color: var(--text-heading);
}

/* KARTLAR */
.nrv-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}
.nrv-card:hover {
    border-color: var(--accent-dark);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
    color: inherit;
}
.nrv-card-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: var(--bg-raised);
    filter: grayscale(.3) sepia(.1);
    transition: filter var(--transition);
}
.nrv-card:hover .nrv-card-img { filter: grayscale(0) sepia(0); }
.nrv-card-img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 3rem;
    background: var(--bg-overlay);
}
.nrv-card-body { padding: 1.25rem; }
.nrv-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-heading);
    margin-bottom: .4rem;
}
.nrv-card-meta {
    font-family: var(--font-ui);
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

.nrv-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.nrv-grid--wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* BÖLÜM LİSTESİ */
.nrv-chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nrv-chapter-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}
.nrv-chapter-item:hover {
    background: var(--bg-raised);
    padding-left: 1.3rem;
}
.nrv-chapter-number {
    font-family: var(--font-ui);
    font-size: .75rem;
    color: var(--text-muted);
    letter-spacing: .1em;
    min-width: 80px;
}
.nrv-chapter-title-link {
    flex: 1;
    font-family: var(--font-heading);
    color: var(--text-primary);
}
.nrv-chapter-meta {
    font-family: var(--font-ui);
    font-size: .7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* KARAKTER */
.nrv-character-hero {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 3rem 0;
}
.nrv-character-portrait {
    width: 220px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}
.nrv-character-portrait img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    display: block;
    filter: grayscale(.2) sepia(.15);
}
.nrv-character-info { flex: 1; }
.nrv-character-name {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: .25rem;
}
.nrv-character-title-text {
    font-family: var(--font-ui);
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 1.2rem;
}
.nrv-character-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.nrv-character-stat-label {
    font-family: var(--font-ui);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: .2rem;
}
.nrv-character-stat-value {
    font-family: var(--font-heading);
    font-size: .95rem;
    color: var(--text-heading);
}
.nrv-relation-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-raised);
    font-family: var(--font-ui);
    font-size: .72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .06em;
    transition: all var(--transition);
    margin: .15rem;
}
.nrv-relation-badge:hover {
    border-color: var(--accent-dark);
    color: var(--text-heading);
}

/* HANE */
.nrv-house-banner {
    height: 200px;
    background: var(--bg-raised);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* FORM */
.nrv-form-group { margin-bottom: 1.4rem; }
.nrv-label {
    display: block;
    font-family: var(--font-ui);
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: .5rem;
}
.nrv-input,
.nrv-select,
.nrv-textarea {
    width: 100%;
    padding: .7rem 1rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: .9rem;
    transition: border-color var(--transition);
    outline: none;
}
.nrv-input:focus,
.nrv-select:focus,
.nrv-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.nrv-textarea { resize: vertical; min-height: 120px; }

/* FLASH */
.nrv-flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 1rem);
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 380px;
}
.nrv-flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-raised);
    font-family: var(--font-ui);
    font-size: .85rem;
    box-shadow: var(--shadow-md);
}
.nrv-flash--success { border-color: #2d5a27; color: #8bc87e; }
.nrv-flash--error   { border-color: var(--accent-dark); color: #e07070; }
.nrv-flash--warning { border-color: #6b4c00; color: #d4a843; }
.nrv-flash--info    { border-color: #1a3d5c; color: #6ab0d4; }
.nrv-flash-close {
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: .6;
}
.nrv-flash-close:hover { opacity: 1; }

/* SAYFALAMA */
.nrv-pagination {
    display: flex;
    justify-content: center;
    gap: .4rem;
    margin: 3rem 0;
}
.nrv-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: .82rem;
    transition: all var(--transition);
}
.nrv-page-btn:hover {
    background: var(--bg-raised);
    border-color: var(--accent-dark);
    color: var(--text-heading);
}
.nrv-page-btn--active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* FOOTER */
.nrv-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}
.nrv-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}
.nrv-footer-brand {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-heading);
}
.nrv-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem 1.5rem;
}
.nrv-footer-nav a {
    font-family: var(--font-ui);
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.nrv-footer-nav a:hover { color: var(--accent-light); }
.nrv-footer-disclaimer {
    font-size: .78rem;
    color: var(--text-muted);
    max-width: 480px;
    font-style: italic;
}
.nrv-footer-copy {
    font-family: var(--font-ui);
    font-size: .72rem;
    color: var(--text-muted);
    letter-spacing: .05em;
}

/* HATA */
.nrv-error-page {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}
.nrv-error-code {
    font-family: var(--font-heading);
    font-size: clamp(5rem, 15vw, 10rem);
    color: var(--accent-dark);
    line-height: 1;
    opacity: .4;
    margin-bottom: -1rem;
}
.nrv-error-title { margin-bottom: 1rem; }
.nrv-error-desc {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
}

/* SPOILER */
.nrv-spoiler {
    border: 1px solid var(--accent-dark);
    border-radius: var(--radius-md);
    background: rgba(139,26,26,.05);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
}
.nrv-spoiler-warning {
    font-family: var(--font-ui);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: .5rem;
}
.nrv-spoiler-content { display: none; }
.nrv-spoiler.revealed .nrv-spoiler-content { display: block; }

/* TIMELINE */
.nrv-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.nrv-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--border) 5%, var(--border) 95%, transparent);
    transform: translateX(-50%);
}
.nrv-timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 2.5rem);
    margin-bottom: 3rem;
    position: relative;
}
.nrv-timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 2.5rem);
}
.nrv-timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 1.2rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-base);
    transform: translateX(-50%);
    z-index: 1;
    box-shadow: 0 0 12px var(--accent-glow);
}
.nrv-timeline-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    max-width: 380px;
    width: 100%;
}
.nrv-timeline-year {
    font-family: var(--font-ui);
    font-size: .68rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: .4rem;
}
.nrv-timeline-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-heading);
    margin-bottom: .5rem;
}
.nrv-timeline-desc {
    font-size: .85rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* MOBİL */
@media (max-width: 900px) {
    .nrv-nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0; right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
    }
    .nrv-nav-links.open { display: flex; }
    .nrv-nav-toggle { display: flex; }
    .nrv-character-hero { flex-direction: column; }
    .nrv-character-portrait { width: 160px; }
}
@media (max-width: 700px) {
    .nrv-timeline::before { left: 16px; }
    .nrv-timeline-item,
    .nrv-timeline-item:nth-child(even) {
        justify-content: flex-start;
        padding-left: 3rem;
        padding-right: 0;
    }
    .nrv-timeline-item::before { left: 16px; }
    .nrv-timeline-card { max-width: 100%; }
}
@media (max-width: 600px) {
    .nrv-flash-container { left: 1rem; right: 1rem; max-width: none; }
    .nrv-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
