/* ==========================================================================
   Tokens
   ========================================================================== */
/* Palet, logodaki üç renkten türetildi:
   mor #7c3bed · turkuaz #3abacd · lacivert #232d5b */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-2: #eef0f7;
    --text: #1d2550;
    --text-soft: #454c73;
    --muted: #6a7096;
    --border: #e1e4f0;
    --accent: #7c3bed;
    --accent-hover: #6424d6;
    --accent-soft: #f0e9fe;
    --accent-contrast: #ffffff;
    --teal: #3abacd;
    --teal-text: #0e7a8b;
    --teal-soft: #e3f6f9;
    --ink: #232d5b;
    --gradient: linear-gradient(120deg, #7c3bed 0%, #5b6ee0 55%, #3abacd 100%);
    --success: #0f8a5f;
    --success-soft: #e3f6ee;
    --danger: #c42a4b;
    --danger-soft: #fdebef;
    --info: #3abacd;
    --info-soft: #e3f6f9;
    --shadow: 0 1px 2px rgba(35, 45, 91, .05), 0 8px 24px -12px rgba(35, 45, 91, .16);
    --shadow-lg: 0 2px 4px rgba(35, 45, 91, .05), 0 24px 48px -20px rgba(35, 45, 91, .28);

    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;

    --radius: 14px;
    --radius-sm: 8px;
    --container: 1120px;
    --reading: 720px;

    color-scheme: light;
}

/* Koyu tema: kullanıcı elle seçtiyse (data-theme="dark") ya da hiç seçmemiş
   ve sistemi koyu moddaysa. Elle "light" seçildiyse sistem ayarı yok sayılır.
   İki blok aynı değerleri taşır; birini değiştirirken diğerini de güncelleyin. */
:root[data-theme="dark"] {
    --bg: #0d1130;
    --surface: #151a3f;
    --surface-2: #1d2350;
    --text: #eceefb;
    --text-soft: #c4c8e6;
    --muted: #9096bd;
    --border: #272e5e;
    --accent: #a07cf7;
    --accent-hover: #b99cfa;
    --accent-soft: #261f59;
    --accent-contrast: #140b33;
    --teal: #5fd3e3;
    --teal-text: #6fdcea;
    --teal-soft: #11304a;
    --ink: #c9cdf0;
    --gradient: linear-gradient(120deg, #a07cf7 0%, #7d93f0 55%, #5fd3e3 100%);
    --success: #4ade9b;
    --success-soft: #0f2c2a;
    --danger: #ff7b93;
    --danger-soft: #3a1630;
    --info: #5fd3e3;
    --info-soft: #11304a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0d1130;
        --surface: #151a3f;
        --surface-2: #1d2350;
        --text: #eceefb;
        --text-soft: #c4c8e6;
        --muted: #9096bd;
        --border: #272e5e;
        --accent: #a07cf7;
        --accent-hover: #b99cfa;
        --accent-soft: #261f59;
        --accent-contrast: #140b33;
        --teal: #5fd3e3;
        --teal-text: #6fdcea;
        --teal-soft: #11304a;
        --ink: #c9cdf0;
        --gradient: linear-gradient(120deg, #a07cf7 0%, #7d93f0 55%, #5fd3e3 100%);
        --success: #4ade9b;
        --success-soft: #0f2c2a;
        --danger: #ff7b93;
        --danger-soft: #3a1630;
        --info: #5fd3e3;
        --info-soft: #11304a;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
        --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -20px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    word-spacing: .08em;
    margin: 0 0 .5em;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow { max-width: calc(var(--reading) + 40px); }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }

.brand-mark { display: block; width: 40px; height: auto; }

.logo { display: block; width: 100%; height: auto; }
.logo-purple { fill: #7c3bed; }
.logo-teal { fill: #3abacd; }
.logo-ink { fill: var(--ink); }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-links, .nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-actions { margin-left: auto; gap: 8px; }

.nav-link {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: .95rem;
    font-weight: 500;
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 2px;
    border-radius: 2px;
    background: var(--accent);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.theme-toggle {
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: color .15s, border-color .15s, background-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 760px) {
    .site-header .container { gap: 10px; }
    .theme-toggle { margin-left: auto; }
    .nav-toggle { display: grid; place-items: center; margin-left: 0; }
    .nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px 20px 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav.is-open { display: flex; }
    .nav-links, .nav-actions { flex-direction: column; align-items: stretch; margin: 0; }
    .nav-link.is-active::after { display: none; }
    .nav-link.is-active { background: var(--surface-2); }
    .nav-actions .btn { width: 100%; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s, transform .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

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

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }

.btn-sm { padding: 7px 14px; font-size: .875rem; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ==========================================================================
   Messages
   ========================================================================== */
.messages {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 60;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(380px, calc(100vw - 40px));
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--info);
    box-shadow: var(--shadow-lg);
    font-size: .95rem;
    animation: slide-in .25s ease-out;
}
.message-success { border-left-color: var(--success); }
.message-error, .message-warning { border-left-color: var(--danger); }
.message p { margin: 0; flex: 1; }
.message button {
    background: none; border: 0; padding: 0 2px;
    color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.message.is-leaving { opacity: 0; transform: translateX(16px); transition: all .25s; }

@keyframes slide-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    padding: 96px 0 72px;
    overflow-x: clip;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -30% -12% auto auto;
    width: 720px; height: 720px;
    border-radius: 50%;
    background:
        radial-gradient(closest-side at 35% 45%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
        radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--teal) 14%, transparent), transparent);
    z-index: -1;
}
.hero .container { position: relative; }
.hero-art {
    position: absolute;
    right: 20px;
    top: 50%;
    width: 300px;
    transform: translateY(-50%);
}
@media (max-width: 960px) { .hero-art { display: none; } }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 14px; height: 8px;
    background: var(--teal);
    clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%);
}

.hero h1 {
    max-width: 720px;
    margin: 20px 0 20px;
    font-size: clamp(2.4rem, 6vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -.02em;
}
.hero h1 em {
    font-style: normal;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p.lead {
    max-width: 580px;
    margin: 0 0 32px;
    color: var(--text-soft);
    font-size: 1.15rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 56px 0 88px; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.section-head h2 { margin: 0; font-size: 1.9rem; }
.section-head p { margin: 4px 0 0; color: var(--muted); }

.page-head { padding: 64px 0 32px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.page-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }

/* ==========================================================================
   Article cards
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.03); }

.cover-placeholder {
    display: grid;
    place-items: center;
    width: 100%; height: 100%;
    background:
        radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 58%),
        radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--teal) 30%, transparent), transparent 55%),
        var(--surface-2);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 22px 20px;
}

.card-title { font-size: 1.3rem; margin: 10px 0 10px; }
.card-title a { color: var(--text); }
.card-title a::after { content: ""; position: absolute; inset: 0; }
.card { position: relative; }

.card-excerpt {
    flex: 1;
    margin: 0 0 18px;
    color: var(--text-soft);
    font-size: .95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--muted);
}

.meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted);
    font-size: .85rem;
}
.meta .dot::before { content: "·"; }

.stat { display: inline-flex; align-items: center; gap: 5px; }
.stat svg { width: 15px; height: 15px; }

/* Avatar */
.author { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }

.avatar {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--gradient);
    color: #ffffff;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
}
.avatar-lg { width: 44px; height: 44px; font-size: 1.05rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2.6rem; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Kartın tamamı yazıya link; yazar linki onun üstünde tıklanabilir kalsın */
.card-footer .author { position: relative; z-index: 1; }
.card-footer .author:hover, .author-name:hover, .comment-author:hover { color: var(--accent); }
a.author-name { color: var(--text); }
.comment-author { color: var(--text); font-weight: 600; }

/* Menüdeki profil linki */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
    border-radius: 999px;
    color: var(--text);
    font-weight: 500;
}
.nav-profile .avatar { width: 32px; height: 32px; }
.nav-profile:hover, .nav-profile.is-active { box-shadow: 0 0 0 2px var(--accent); color: var(--text); }
.nav-profile-name { display: none; }
@media (max-width: 760px) {
    .nav-profile { padding: 8px 12px; border-radius: var(--radius-sm); }
    .nav-profile:hover, .nav-profile.is-active { box-shadow: none; background: var(--surface-2); }
    .nav-profile-name { display: inline; }
}

/* Profil sayfası */
.profile-head {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: 56px 0 40px;
}
.profile-head .avatar-xl { box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--accent-soft); }
.profile-info { flex: 1; min-width: 0; }
.profile-info h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 2px; }
.profile-handle { margin: 0 0 12px; color: var(--muted); }
.profile-bio { max-width: 620px; margin: 0 0 14px; color: var(--text-soft); font-size: 1.05rem; white-space: pre-line; }
@media (max-width: 640px) {
    .profile-head { flex-direction: column; align-items: center; text-align: center; }
    .profile-head .meta { justify-content: center; }
    .profile-bio { margin-left: auto; margin-right: auto; }
}

.settings-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.settings-preview .avatar-xl { width: 80px; height: 80px; font-size: 2rem; }
.settings-preview strong { display: block; font-size: 1.15rem; }
.settings-preview span:not(.avatar) { color: var(--muted); }

.dash-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ==========================================================================
   Search + pagination
   ========================================================================== */
.search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(420px, 100%);
    padding: 6px 6px 6px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.search-summary { margin: -12px 0 28px; color: var(--muted); }
.search-summary a { font-weight: 500; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}
.pagination .current { padding: 0 12px; color: var(--muted); font-size: .9rem; }

/* ==========================================================================
   Empty state
   ========================================================================== */
.empty {
    padding: 56px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}
.empty-icon {
    display: grid;
    place-items: center;
    width: 56px; height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
}
.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { color: var(--text); font-size: 1.3rem; margin-bottom: 6px; }
.empty p { margin: 0 0 20px; }
.empty p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Article detail
   ========================================================================== */
.post-header { padding: 64px 0 32px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 500;
}
.back-link:hover { color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

.post-header h1 {
    font-size: clamp(2.1rem, 5.5vw, 3.1rem);
    letter-spacing: -.02em;
    margin-bottom: 24px;
}

.post-meta { display: flex; align-items: center; gap: 14px; }
.post-meta .author-name { display: block; color: var(--text); font-weight: 600; }

.post-cover {
    margin: 8px auto 48px;
    max-width: 960px;
    padding: 0 20px;
}
.post-cover img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
}

/* Rich text from CKEditor */
.prose {
    color: var(--text);
    font-size: 1.125rem;
    line-height: 1.8;
    overflow-wrap: break-word;
}
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table, .prose figure { margin: 0 0 1.4em; }
.prose h1, .prose h2 { font-size: 1.75rem; margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.4rem; margin: 1.6em 0 .5em; }
.prose h4 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--teal-text); }
.prose img { border-radius: var(--radius-sm); margin: 1.6em auto; height: auto !important; }
.prose blockquote {
    padding: 4px 0 4px 22px;
    border-left: 3px solid var(--teal);
    color: var(--text-soft);
    font-family: var(--font-sans);
    font-size: 1.2rem;
    font-weight: 500;
}
.prose code {
    padding: .15em .4em;
    border-radius: 5px;
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: .88em;
}
.prose pre {
    padding: 18px 20px;
    border-radius: var(--radius-sm);
    background: #161c45;
    color: #e6e8fb;
    font-family: var(--font-mono);
    font-size: .9rem;
    line-height: 1.6;
    overflow-x: auto;
}
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); }

/* Comments */
.comments {
    margin-top: 64px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}
.comments h2 { font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.count-badge {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 600;
}

.comment-form {
    margin: 24px 0 36px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.comment-form textarea { min-height: 96px; resize: vertical; }
.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: .85rem;
}

.login-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0 36px;
    padding: 20px 22px;
    background: var(--accent-soft);
    border-radius: var(--radius);
}
.login-prompt p { margin: 0; color: var(--text-soft); }

.comment-list { list-style: none; margin: 0; padding: 0; }
.comment { display: flex; gap: 14px; padding: 20px 0; }
.comment + .comment { border-top: 1px solid var(--border); }
.comment-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-head strong { font-weight: 600; }
.comment-head time { color: var(--muted); font-size: .85rem; }
.comment-body p { margin: 0; color: var(--text-soft); overflow-wrap: anywhere; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 20px; }

.field label, .field-label {
    display: block;
    margin-bottom: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
}
.field .required { color: var(--accent); margin-left: 2px; }

input[type="text"], input[type="password"], input[type="email"], input[type="search"],
textarea, select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.search input { width: auto; padding: 6px 0; border: 0; background: transparent; box-shadow: none; }

input:focus, textarea:focus, select:focus {
    outline: 0;
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.search input:focus { box-shadow: none; }

.field.has-error input, .field.has-error textarea { border-color: var(--danger); }

.field-help { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }

.errorlist {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    color: var(--danger);
    font-size: .875rem;
    font-weight: 500;
}
.form-errors {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--danger-soft);
}
.form-errors .errorlist { margin: 0; }

/* File input */
.file-input {
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: .9rem;
    color: var(--text-soft);
}
.file-input a { font-weight: 500; }
.file-input input[type="file"] { display: block; margin-top: 6px; color: var(--muted); font: inherit; max-width: 100%; }
.file-input input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.file-input input[type="checkbox"] { accent-color: var(--accent); margin: 0 4px 0 8px; }

/* Rich text editor (django-prose-editor) follows the site theme */
.prose-editor {
    --prose-editor-background: var(--bg);
    --prose-editor-foreground: var(--text);
    --prose-editor-border-color: var(--border);
    --prose-editor-active-color: var(--accent);
    --prose-editor-disabled-color: var(--muted);
}
.prose-editor .ProseMirror {
    min-height: 360px;
    padding: 4px 18px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 1.05rem;
    line-height: 1.7;
}
.prose-editor .ProseMirror:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.prose-editor .ProseMirror pre { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); font-family: var(--font-mono); font-size: .9rem; }
.prose-editor .ProseMirror blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--accent); color: var(--text-soft); }
.prose-editor-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }

/* Figures produced by the editor */
.prose figure img { margin-bottom: .6em; }
.prose figcaption { color: var(--muted); font-size: .9rem; text-align: center; }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

/* Auth */
.auth {
    display: grid;
    place-items: center;
    padding: 64px 20px 96px;
}
.auth .panel { width: 100%; max-width: 420px; padding: 36px 32px; }
.auth-head { text-align: center; margin-bottom: 28px; }
.auth-head .brand-mark { width: 64px; margin: 0 auto 20px; }
.auth-head h1 { font-size: 1.8rem; margin-bottom: 6px; }
.auth-head p { margin: 0; color: var(--muted); }
.auth-switch { margin: 24px 0 0; text-align: center; color: var(--muted); font-size: .95rem; }
.auth-switch a { font-weight: 600; }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 56px 0 28px;
}
.dash-head h1 { font-size: 2.2rem; margin-bottom: 4px; }
.dash-head p { margin: 0; color: var(--muted); }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.stat-card {
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.stat-card span { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat-card strong { display: block; margin-top: 4px; font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--ink); }
.stat-card:nth-child(1) { border-top: 3px solid var(--accent); }
.stat-card:nth-child(2) { border-top: 3px solid var(--teal); }
.stat-card:nth-child(3) { border-top: 3px solid var(--ink); }

.post-list {
    list-style: none;
    margin: 0 0 96px;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.post-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
}
.post-row + .post-row { border-top: 1px solid var(--border); }
.post-row:hover { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }

.post-thumb {
    width: 72px; height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface-2);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .cover-placeholder { font-size: 1.4rem; }

.post-info { flex: 1; min-width: 0; }
.post-info a { display: block; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-info a:hover { color: var(--accent); }
.post-info .meta { margin-top: 2px; }

.post-actions { display: flex; gap: 8px; flex-shrink: 0; }
.post-actions form { margin: 0; }

@media (max-width: 600px) {
    .post-row { flex-wrap: wrap; }
    .post-actions { width: 100%; padding-left: 90px; }
    .panel { padding: 22px 18px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

/* ==========================================================================
   About
   ========================================================================== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px 0 0;
}
.feature {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.feature .empty-icon { margin: 0 0 14px; width: 44px; height: 44px; }
.feature .empty-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--text-soft); font-size: .95rem; }

.own-note {
    margin: 24px 0 28px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: var(--text-soft);
}

/* Bot tuzağı: insanlara görünmez, ekran okuyuculardan gizli */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer .brand { font-size: 1rem; color: var(--muted); }
.site-footer .brand-mark { width: 26px; }
.site-footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    font-size: .9rem;
}
.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
