/* =========================================================
   HushSave teması — kırık beyaz ve siyah
   Açık/koyu tema cihazın (sistem) ayarına göre otomatik seçilir.
   Renkli tek vurgu yok: vurgu rengi metin rengidir (siyah / kırık beyaz).
   Yeşil ve kırmızı yalnızca portföydeki yükseliş/düşüş için kullanılır.
   Bootstrap 5.1 üzerine yazılmıştır.
   ========================================================= */

:root {
  --bg: #f6f3ec;           /* kırık beyaz */
  --surface: #fdfcf9;
  --surface-2: #eeeae2;
  --text: #111111;         /* siyah */
  --muted: #5c5a55;
  --border: #e0dbd1;
  --accent: #111111;
  --accent-hover: #000000;
  --accent-soft: #ebe7de;
  --on-accent: #f6f3ec;
  --danger: #b42318;
  --up: #157a3c;           /* yükseliş */
  --down: #c0392b;         /* düşüş */
  --up-soft: #e6f2ea;
  --down-soft: #f8e7e5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .06);

  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Google Fonts */
  --font-serif: var(--font-sans); /* tüm sitede tek font: Poppins */
  --radius: .75rem;

  color-scheme: light dark;
}

/* Koyu tema: siyah zemin, kırık beyaz yazı.
   Varsayılan olarak cihaz ayarı izlenir; ziyaretçi üstteki düğmeyle açık ya da koyuyu seçerse
   <html data-theme="light|dark"> ile cihaz ayarı geçersiz kılınır. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #161616;
    --surface-2: #202020;
    --text: #f2efe8;
    --muted: #a3a09a;
    --border: #2b2b2b;
    --accent: #f2efe8;
    --accent-hover: #ffffff;
    --accent-soft: #1f1f1f;
    --on-accent: #0d0d0d;
    --danger: #f2766b;
    --up: #4ade80;
    --down: #f87171;
    --up-soft: #12261a;
    --down-soft: #2a1514;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
}
:root[data-theme="light"] { color-scheme: light; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0d0d;
    --surface: #161616;
    --surface-2: #202020;
    --text: #f2efe8;
    --muted: #a3a09a;
    --border: #2b2b2b;
    --accent: #f2efe8;
    --accent-hover: #ffffff;
    --accent-soft: #1f1f1f;
    --on-accent: #0d0d0d;
    --danger: #f2766b;
    --up: #4ade80;
    --down: #f87171;
    --up-soft: #12261a;
    --down-soft: #2a1514;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .35);
  }

}

.input-group-text { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

/* ---------- Temel ---------- */
html { font-size: 16px; }

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

main { flex: 1 0 auto; padding-top: 2.75rem; }
@media (min-width: 768px) { main { padding-top: 4rem; } }

h1, h2, h3, .serif {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}

h4, h5, h6 { color: var(--text); }

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

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

.text-muted { color: var(--muted) !important; }
.text-dark { color: var(--text) !important; }
.bg-light { background-color: var(--surface-2) !important; }
.border, .border-top, .border-bottom { border-color: var(--border) !important; }
hr { border-color: var(--border); opacity: 1; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}

.container-narrow { max-width: 760px; margin-inline: auto; }

/* ---------- Üst menü ---------- */
.site-header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.site-header .navbar { padding-block: .75rem; }

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text) !important;
  text-decoration: none;
  letter-spacing: -.02em;
}
.brand-dot { color: var(--accent); }

.site-header .nav-link {
  color: var(--muted) !important;
  font-weight: 500;
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--text) !important; }

.navbar-toggler { border-color: var(--border); }
.navbar-toggler-icon { filter: var(--toggler-filter, none); }

.header-search .form-control {
  border-radius: 999px;
  padding-left: 2.1rem;
  min-width: 200px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238a8178' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.868-3.834zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E") no-repeat .75rem center;
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle .icon-sun { display: none; }

/* ---------- Alt bilgi ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .9rem;
  padding: 2rem 0;
  margin-top: 4rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Bileşenler ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.card-img-top { border-top-left-radius: calc(var(--radius) - 1px); border-top-right-radius: calc(var(--radius) - 1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
  color: var(--on-accent) !important;
}
.btn-outline-primary { color: var(--accent); border-color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

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

.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-outline-danger { color: var(--danger); border-color: var(--danger); }
.btn-outline-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.text-danger { color: var(--danger) !important; }

.form-control, .form-select {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.form-control::placeholder { color: var(--muted); opacity: .8; }
.form-control:focus, .form-select:focus { background-color: var(--surface); color: var(--text); }
.form-control[readonly] { background-color: var(--surface-2); }
.form-text { color: var(--muted); }
.form-check-input { background-color: var(--surface); border-color: var(--border); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

.table { color: var(--text); border-color: var(--border); --bs-table-striped-bg: var(--surface-2); --bs-table-striped-color: var(--text); --bs-table-hover-bg: var(--surface-2); --bs-table-hover-color: var(--text); }
.table > :not(caption) > * > * { background-color: transparent; border-bottom-color: var(--border); color: var(--text); }
.table-light, .table-light > th { --bs-table-bg: var(--surface-2); color: var(--text); }
.table-bordered > :not(caption) > * > * { border-color: var(--border); }

.dropdown-menu { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.dropdown-item { color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--surface-2); color: var(--text); }

.alert { border-radius: var(--radius); border-color: var(--border); }
.alert-info { background: var(--accent-soft); color: var(--text); }
.alert-warning { background: #fdf3d8; color: #5c4400; border-color: #f2dd9a; }
.alert-danger { background: #fbe4e4; color: #7a1c1c; border-color: #f2c2c2; }

.breadcrumb { --bs-breadcrumb-divider-color: var(--muted); }
.breadcrumb-item.active { color: var(--muted); }

.pagination .page-link {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.pagination .page-link:hover { background: var(--surface-2); color: var(--text); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pagination .page-item.disabled .page-link { background: var(--surface); color: var(--muted); border-color: var(--border); }

/* ---------- Etiket rozetleri ---------- */
.tag-chip {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.4;
}
.tag-chip:hover { color: var(--accent); border-color: var(--accent); }
button.tag-chip { cursor: pointer; font-family: inherit; }
button.tag-chip[hidden] { display: none; }
.tag-chip.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tag-chip .count { opacity: .7; margin-left: .15rem; }

/* ---------- Sayfa başlığı ---------- */
.page-intro { padding: 2.5rem 0 1.5rem; }
.page-intro h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: .35rem; }
.page-intro p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.eyebrow {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}

/* ---------- Yazı kartları ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.post-card .thumb { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--surface-2); }
.post-card .body { padding: 1.25rem; display: flex; flex-direction: column; flex: 1; }
.post-card h2 { font-size: 1.25rem; line-height: 1.3; margin-bottom: .5rem; }
.post-card h2 a { color: var(--text); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; } /* tüm kart tıklanabilir */
.post-card { position: relative; }
.post-card .tags { position: relative; z-index: 1; } /* etiketler ayrı tıklanabilir */
.post-card .excerpt { color: var(--muted); font-size: .95rem; margin-bottom: 1rem; }
.post-meta { color: var(--muted); font-size: .85rem; }
.post-meta .sep { margin: 0 .4rem; opacity: .6; }

/* Öne çıkan (ilk) yazı */
.post-featured { display: grid; grid-template-columns: 1fr; }
.post-featured .thumb { aspect-ratio: 16 / 9; }
.post-featured .body { padding: 1.75rem; justify-content: center; }
.post-featured h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
@media (min-width: 768px) {
  .post-featured.has-image { grid-template-columns: 1.2fr 1fr; }
  .post-featured.has-image .thumb { aspect-ratio: auto; height: 100%; min-height: 320px; }
}

/* ---------- Yan sütun ---------- */
.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-block h2 { font-family: var(--font-sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .85rem; }

/* ---------- Yazı sayfası ---------- */
.article-header { padding: 2.5rem 0 1.5rem; }
.article-header h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-bottom: 1rem; }
.article-lead { font-size: 1.25rem; color: var(--muted); font-family: var(--font-serif); line-height: 1.5; }
.article-cover { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }

.post-content {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--text);
  overflow-wrap: break-word;
}
.post-content p, .post-content ul, .post-content ol, .post-content blockquote, .post-content pre { margin-bottom: 1.4em; }
.post-content h2 { font-size: 1.75rem; margin: 2em 0 .6em; }
.post-content h3 { font-size: 1.35rem; margin: 1.6em 0 .5em; }
.post-content img { max-width: 100%; height: auto; border-radius: .5rem; }
.post-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-content blockquote { border-left: 3px solid var(--accent); padding-left: 1.25rem; color: var(--muted); font-style: italic; }
.post-content pre, .post-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.post-content pre { background: var(--surface-2); padding: 1rem 1.25rem; border-radius: .5rem; overflow-x: auto; }
.post-content :not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: .25rem; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: .5rem .75rem; }

.like-button { border-radius: 999px; padding-inline: 1rem; }

.comment { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.section-title { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* ---------- Kimlik doğrulama sayfaları ---------- */
.auth-card {
  max-width: 420px;
  margin: 3rem auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.validation-summary-valid.alert { display: none; }

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  padding: .55rem 1rem;
}
.btn-google:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .8rem;
  margin: 1.25rem 0;
}
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }

.otp-input { letter-spacing: .35em; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }

/* QR kod koyu temada da okunabilsin diye beyaz zemin */
.qr-box { background: #fff; padding: .75rem; border-radius: .5rem; width: max-content; }
.qr-box svg { display: block; width: 180px; height: 180px; }

/* ---------- Admin ---------- */
.stat-card { padding: 1.25rem; }
.stat-card .value { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; line-height: 1.1; }
.stat-card .label { color: var(--muted); font-size: .85rem; }
.views-chart { display: flex; align-items: flex-end; gap: .35rem; height: 160px; padding-top: 1.25rem; }
.views-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.views-chart .bar { width: 100%; max-width: 28px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: .85; }
.views-chart .bar-col:hover .bar { opacity: 1; }
.views-chart .bar-value { font-size: .7rem; color: var(--muted); margin-bottom: .2rem; }
.views-chart .bar-label { font-size: .65rem; color: var(--muted); margin-top: .3rem; white-space: nowrap; }
@media (max-width: 576px) { .views-chart .bar-label { writing-mode: vertical-rl; transform: rotate(180deg); } }

.admin-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.admin-nav a {
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
}
.admin-nav a:hover { color: var(--text); }
.admin-nav a.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.admin-page h1 { font-size: 1.75rem; }

/* Froala editörünü koyu modda okunur tut */

/* Başarı mesajı */
.flash {
  background: var(--accent-soft);
  color: var(--text);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: .5rem;
  padding: .6rem 1rem;
  margin-bottom: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .post-card { transition: none; }
  .post-card:hover { transform: none; }
}

/* =========================================================
   HushSave — kullanıcı dostu arayüz bileşenleri
   ========================================================= */

/* Logo */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9rem; height: 1.9rem; border-radius: .55rem;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; line-height: 1;
}

/* Dil seçici */
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-size: .75rem; font-weight: 600; padding: .35rem .6rem; line-height: 1;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--accent); color: var(--on-accent); }

.avatar-sm { width: 1.75rem; height: 1.75rem; font-size: .8rem; }
.avatar-xl { width: 4.5rem; height: 4.5rem; font-size: 2rem; }

/* Ana sayfa karşılama alanı */
.hero { text-align: center; padding: 3.5rem 0 2.5rem; max-width: 760px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.15; margin-bottom: .75rem; }
.hero > p { color: var(--muted); font-size: 1.15rem; margin-bottom: 1.5rem; }
.hero-search { display: flex; gap: .5rem; max-width: 560px; margin: 0 auto; }
.hero-search .form-control { border-radius: 999px; padding-left: 1.25rem; }
.hero-search .btn { border-radius: 999px; padding-inline: 1.5rem; }
@media (max-width: 576px) { .hero { padding-top: 2rem; } .hero-search { flex-direction: column; } }

.list-heading {
  font-family: var(--font-sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 2rem 0 .5rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border);
}

/* Yazı listesi: solda küçük resim, sağda başlık ve bilgiler */
.post-list { display: flex; flex-direction: column; }
.post-row {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1.1rem;
  align-items: start;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.post-list .post-row:last-child { border-bottom: 0; }
.post-thumb {
  display: block; border-radius: .6rem; overflow: hidden; text-decoration: none;
  aspect-ratio: 4 / 3; background: var(--surface-2);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.post-row:hover .post-thumb img { transform: scale(1.04); }
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-family: var(--font-serif); font-size: 2rem; font-weight: 700;
  color: var(--muted);
  background: linear-gradient(135deg, var(--surface-2), var(--border));
}
.post-body { min-width: 0; }
.post-title { font-size: 1.2rem; line-height: 1.3; margin: 0 0 .35rem; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a::after { content: ""; position: absolute; inset: 0; } /* tüm satır tıklanabilir */
.post-row:hover .post-title a { color: var(--accent); }
.post-excerpt {
  color: var(--muted); font-size: .95rem; margin-bottom: .4rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-cat { position: relative; z-index: 1; color: var(--accent); font-weight: 600; text-decoration: none; }
.post-cat:hover { text-decoration: underline; }

/* Öne çıkan (en yeni) yazı: daha büyük resim */
.post-row.is-featured {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem; padding: 0 0 1.5rem; align-items: center;
}
.post-row.is-featured .post-thumb { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.post-row.is-featured .post-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.post-row.is-featured .post-excerpt { -webkit-line-clamp: 4; font-size: 1.02rem; }
.post-row.is-featured .thumb-placeholder { font-size: 4rem; }

/* İlgili yazılar: küçük satırlar */
.post-row.is-compact { grid-template-columns: 84px 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 0; }
.post-row.is-compact .post-title { font-size: 1rem; }
.post-row.is-compact .thumb-placeholder { font-size: 1.4rem; }

@media (max-width: 576px) {
  .post-row { grid-template-columns: 96px 1fr; gap: .85rem; }
  .post-title { font-size: 1.05rem; }
  .post-row .post-excerpt { -webkit-line-clamp: 2; font-size: .9rem; }
  .post-row.is-featured { grid-template-columns: 1fr; }
}

.sidebar-sticky { position: sticky; top: 5.5rem; }
.sidebar-cta { background: var(--accent-soft); border-color: transparent; }
@media (max-width: 991px) { .sidebar-sticky { position: static; } }

/* Boş durum */
.empty-state {
  text-align: center; padding: 3rem 1.5rem; color: var(--muted);
  border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface);
}
.empty-icon { font-size: 2.25rem; margin-bottom: .5rem; }

/* Yazı sayfası */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1030; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

.article-hero {
  margin: 1.5rem auto 0; max-width: 1040px; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
}
.article-hero img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.article .article-header { padding-top: 1.25rem; }

.article-actions {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.25rem 0; margin: 2rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.share { display: flex; align-items: center; gap: .4rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.2rem; height: 2.2rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 700; font-size: .9rem; text-decoration: none;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

.related { max-width: 1040px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--border); }

/* Yazı içindeki görseller (editörden eklenenler) */
.post-content img { display: block; max-width: 100%; height: auto; margin: 1.75rem auto; border-radius: .6rem; }
.post-content img.fr-dii { display: inline-block; margin: .5rem; }
.post-content img.fr-fil { float: left; margin: .25rem 1.25rem .75rem 0; max-width: 50%; }
.post-content img.fr-fir { float: right; margin: .25rem 0 .75rem 1.25rem; max-width: 50%; }
.post-content::after { content: ""; display: table; clear: both; }
.post-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: .6rem; margin: 1.5rem 0; }
@media (max-width: 576px) { .post-content img.fr-fil, .post-content img.fr-fir { float: none; max-width: 100%; margin: 1.25rem auto; } }

/* Başa dön */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1020;
  width: 2.75rem; height: 2.75rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
  font-size: 1.1rem; opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { color: var(--accent); border-color: var(--accent); }

/* Portföy */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.portfolio-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.portfolio-card .thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.portfolio-card .thumb-placeholder { aspect-ratio: 4 / 3; height: auto; font-size: 2.5rem; }
.portfolio-card .body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }

.profile-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  padding: 2rem 0 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.profile-header h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); }

/* Dokunmatik ekranlarda daha büyük tıklama alanları */
@media (pointer: coarse) {
  .tag-chip { padding: .35rem .8rem; }
  .site-header .nav-link { padding-block: .6rem; }
}

/* ---------- Sonsuz kaydırma ---------- */
.load-more { display: none; justify-content: center; padding: 1.5rem 0; }
.load-more.show { display: flex; }
.spinner {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ---------- Portföy ---------- */
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.stat-card .value.up, .stat-card .value.down { font-variant-numeric: tabular-nums; }
.portfolio-table td, .portfolio-table th { font-variant-numeric: tabular-nums; }
.weight-bar { height: 4px; width: 64px; margin-left: auto; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.weight-bar span { display: block; height: 100%; background: var(--accent); }
.goal-pct { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-bar { height: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.goal-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s ease; }
.month-returns { display: flex; flex-wrap: wrap; gap: .4rem; }
.month-return {
  text-align: center; padding: .35rem .6rem; border-radius: .5rem; min-width: 76px; font-size: .82rem; line-height: 1.35;
  border: 1px solid var(--border); background: var(--surface);
}
.month-return.up { background: var(--up-soft); border-color: transparent; }
.month-return.down { background: var(--down-soft); border-color: transparent; }
.report-summary { font-size: 1.02rem; line-height: 1.7; background: var(--surface-2); padding: 1rem 1.25rem; border-radius: .6rem; }

/* ---------- Koyu tema: bileşen ayarları (cihaz ayarına göre) ---------- */
/* Koyu temada bileşen ayarları: elle seçilen koyu tema ([data-theme=dark]) ... */
html[data-theme="dark"] .navbar-toggler-icon { filter: invert(1); }
html[data-theme="dark"] .alert-warning { background: #2b2410; color: #f3d98a; border-color: #4a3d16; }
html[data-theme="dark"] .alert-danger { background: #2a1514; color: #f6c0bb; border-color: #4a2220; }
html[data-theme="dark"] .form-select { background-color: var(--surface); color: var(--text); }
html[data-theme="dark"] .btn-close { filter: invert(1); }
html[data-theme="dark"] .btn-outline-success { color: var(--up); border-color: var(--up); }
html[data-theme="dark"] .btn-check:checked + .btn-outline-success { background: var(--up); border-color: var(--up); color: #0d0d0d; }
html[data-theme="dark"] .btn-outline-danger { color: var(--down); border-color: var(--down); }
html[data-theme="dark"] .btn-check:checked + .btn-outline-danger { background: var(--down); border-color: var(--down); color: #0d0d0d; }
html[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--text); }
html[data-theme="dark"] .ql-snow .ql-fill { fill: var(--text); }
html[data-theme="dark"] .ql-snow .ql-picker { color: var(--text); }

/* ... ve tema seçilmemişken cihazın koyu teması */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .navbar-toggler-icon { filter: invert(1); }
  html:not([data-theme="light"]) .alert-warning { background: #2b2410; color: #f3d98a; border-color: #4a3d16; }
  html:not([data-theme="light"]) .alert-danger { background: #2a1514; color: #f6c0bb; border-color: #4a2220; }
  html:not([data-theme="light"]) .form-select { background-color: var(--surface); color: var(--text); }
  html:not([data-theme="light"]) .btn-close { filter: invert(1); }
  html:not([data-theme="light"]) .btn-outline-success { color: var(--up); border-color: var(--up); }
  html:not([data-theme="light"]) .btn-check:checked + .btn-outline-success { background: var(--up); border-color: var(--up); color: #0d0d0d; }
  html:not([data-theme="light"]) .btn-outline-danger { color: var(--down); border-color: var(--down); }
  html:not([data-theme="light"]) .btn-check:checked + .btn-outline-danger { background: var(--down); border-color: var(--down); color: #0d0d0d; }
  /* Yazı editörünün simgeleri koyu temada görünür kalsın */
  html:not([data-theme="light"]) .ql-snow .ql-stroke { stroke: var(--text); }
  html:not([data-theme="light"]) .ql-snow .ql-fill { fill: var(--text); }
  html:not([data-theme="light"]) .ql-snow .ql-picker { color: var(--text); }
}

/* ---------- Hisse arama önerileri (yönetim > portföy) ---------- */
.stock-results {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: .25rem 0 0; padding: .25rem;
  list-style: none; max-height: 280px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; box-shadow: var(--shadow);
}
.stock-results li { display: flex; gap: .6rem; align-items: baseline; padding: .45rem .6rem; border-radius: .4rem; cursor: pointer; }
.stock-results li span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-results li.active, .stock-results li:hover { background: var(--surface-2); }
.stock-results li.empty { cursor: default; color: var(--muted); font-size: .85rem; }
.month-return .small { font-size: .7rem; }
.month-return .net { font-size: .72rem; opacity: .85; white-space: nowrap; }

/* Pozisyonlar: alış ayrıntıları */
.trades summary { cursor: pointer; color: var(--muted); font-size: .78rem; list-style: none; }
.trades summary::-webkit-details-marker { display: none; }
.trades summary::before { content: "▸ "; }
.trades[open] summary::before { content: "▾ "; }
.trades li { font-size: .78rem; color: var(--muted); padding: .15rem 0; white-space: normal; }
.positions-table td, .positions-table th { font-variant-numeric: tabular-nums; }
/* =========================================================
   Tipografi ayarı (Poppins geniş ve koyu durduğu için boyut/kalınlıklar hafifletildi)
   ========================================================= */
html { font-size: 15px; }
body { line-height: 1.65; font-weight: 400; }
h1, h2, h3, .serif, .h1, .h2, .h3 { font-weight: 600; letter-spacing: -.015em; }
h4, h5, h6, .h4, .h5, .h6 { font-weight: 600; }
.h3 { font-size: 1.35rem; }
.h4 { font-size: 1.15rem; }
.h5 { font-size: 1.02rem; }
.h6 { font-size: .92rem; }
strong, b, .fw-bold { font-weight: 600 !important; }
.fw-semibold { font-weight: 500 !important; }
.btn { font-weight: 500; }
.table > thead th { font-weight: 500; font-size: .8rem; color: var(--muted); }
.form-label { font-weight: 500 !important; font-size: .9rem; }

.brand { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.page-intro { padding: 2rem 0 1.25rem; }
.page-intro h1 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
.page-intro p { font-size: 1rem; }
.admin-page h1 { font-size: 1.4rem; }
.section-title { font-size: 1.15rem; }
.list-heading { font-size: .72rem; }

.post-title { font-size: 1.02rem; font-weight: 600; line-height: 1.35; }
.post-row.is-featured .post-title { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
.post-row.is-compact .post-title { font-size: .92rem; }
.post-excerpt { font-size: .9rem; }
.post-meta { font-size: .78rem; }

.article-header h1 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); line-height: 1.25; margin-bottom: .75rem; }
.article-lead { font-size: 1.05rem; line-height: 1.6; }
.post-content { font-size: 1rem; line-height: 1.8; }
.post-content h2 { font-size: 1.3rem; }
.post-content h3 { font-size: 1.1rem; }

.stat-card .value { font-size: 1.4rem; font-weight: 600; }
.stat-card .label { font-size: .78rem; }
.tag-chip { font-size: .75rem; }
.sidebar-block h2 { font-size: .72rem; }
.lang-note { font-size: .82rem; color: var(--muted); background: var(--surface-2); border-radius: .5rem; padding: .45rem .75rem; margin-bottom: .9rem; display: inline-block; }

/* =========================================================
   Üst ve alt çubuk: zeminden bir tık daha ayrışsın (açık ve koyu)
   ========================================================= */
:root { --chrome-bg: #fffefb; --chrome-border: #d9d3c7; }
:root[data-theme="dark"] { --chrome-bg: #171717; --chrome-border: #303030; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chrome-bg: #171717; --chrome-border: #303030; } }

.site-header {
  background: var(--chrome-bg);
  backdrop-filter: none;
  border-bottom: 1px solid var(--chrome-border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02), 0 4px 14px rgba(0, 0, 0, .05);
}
.site-footer {
  background: var(--chrome-bg);
  border-top: 1px solid var(--chrome-border);
  color: var(--muted);
  margin-top: 4rem;
}
.site-footer .brand { color: var(--text); }

/* Yazı formundaki dil sekmeleri */
.lang-tabs { border-bottom: 0; }
.lang-tabs .nav-link { color: var(--muted); border: 1px solid transparent; border-bottom: 0; font-weight: 500; }
.lang-tabs .nav-link.active { color: var(--text); background: var(--surface); border-color: var(--border); }
.lang-card { border-top-left-radius: 0; }
/* Dil sekmesi içindeki alanlar arası boşluk (yalnızca görünen sekmede) */
.lang-pane.active { display: grid; gap: 1rem; }

/* =========================================================
   Yazı editörü (Quill) — temaya uyumlu
   ========================================================= */
.rich-editor { background: var(--surface); border-radius: .5rem; }
.rich-editor .ql-toolbar.ql-snow { border-color: var(--border); border-radius: .5rem .5rem 0 0; background: var(--surface-2); font-family: var(--font-sans); }
.rich-editor .ql-container.ql-snow { border-color: var(--border); border-radius: 0 0 .5rem .5rem; font-family: var(--font-sans); font-size: 1rem; color: var(--text); }
.rich-editor .ql-editor { min-height: inherit; line-height: 1.75; }
.rich-editor .ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.rich-editor .ql-editor img { max-width: 100%; height: auto; border-radius: .4rem; }
.rich-editor .ql-snow .ql-picker-options { background: var(--surface); border-color: var(--border); }
.rich-editor .ql-snow .ql-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow); }
.rich-editor .ql-snow .ql-tooltip input[type=text] { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.rich-editor:focus-within { box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--accent) 25%, transparent); }

/* Okuyucu tarafı: editörde verilen hizalama, girinti ve videolar */
.post-content .ql-align-center { text-align: center; }
.post-content .ql-align-right { text-align: right; }
.post-content .ql-align-justify { text-align: justify; }
.post-content .ql-indent-1 { padding-left: 2em; }
.post-content .ql-indent-2 { padding-left: 4em; }
.post-content .ql-indent-3 { padding-left: 6em; }
.post-content iframe.ql-video { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: .6rem; margin: 1.5rem 0; }
.post-content pre.ql-syntax { background: var(--surface-2); padding: 1rem 1.25rem; border-radius: .5rem; overflow-x: auto; white-space: pre-wrap; }
.post-content li[data-list="bullet"] { list-style-type: disc; }
.post-content li[data-list="ordered"] { list-style-type: decimal; }
.post-content .ql-ui { display: none; }
/* ---------------------------------------------------------------- Portföy karşılaştırma grafiği
   Portföy: sitenin mürekkep rengi (vurgulu). Kıyaslar: doğrulanmış kategorik paletin ilk üç rengi
   (mavi, turuncu, su yeşili) — açık ve koyu temada ayrı adımlar, renk körlüğü testinden geçti. */
.pchart {
  --s-portfolio: var(--text);
  --s-bist100: #2a78d6;
  --s-gold: #eb6834;
  --s-btc: #1baf7a;
  --grid: color-mix(in srgb, var(--border) 70%, transparent);
}
:root[data-theme="dark"] .pchart { --s-bist100: #3987e5; --s-gold: #d95926; --s-btc: #199e70; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .pchart { --s-bist100: #3987e5; --s-gold: #d95926; --s-btc: #199e70; }
}
.pchart-ranges { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface-2); border-radius: 999px; }
.pchart-ranges button {
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .8rem;
  padding: .2rem .7rem; border-radius: 999px; cursor: pointer;
}
.pchart-ranges button:hover { color: var(--text); }
.pchart-ranges button.active { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pchart-legend { display: flex; flex-wrap: wrap; gap: .35rem 1rem; list-style: none; padding: 0; margin: 0 0 .5rem; font-size: .82rem; color: var(--muted); }
.pchart-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.pchart-legend .swatch { width: 16px; height: 0; border-top: 2px solid; border-radius: 2px; }
.pchart-legend .swatch.main { border-top-width: 3px; }
.pchart-plot { position: relative; min-height: 280px; }
.pchart-plot svg { display: block; width: 100%; height: 280px; overflow: visible; }
.pchart-plot .axis-text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pchart-plot .end-label { fill: var(--text); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pchart-plot .end-label .nm { fill: var(--muted); font-weight: 400; }
.pchart-plot .loading, .pchart-plot .empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.pchart-tip {
  position: absolute; pointer-events: none; z-index: 2; min-width: 170px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: .5rem;
  box-shadow: var(--shadow); padding: .45rem .6rem; font-size: .8rem; line-height: 1.5;
}
.pchart-tip .d { color: var(--muted); margin-bottom: .15rem; }
.pchart-tip .r { display: flex; align-items: center; gap: .45rem; }
.pchart-tip .r .v { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.pchart-tip .k { width: 10px; height: 0; border-top: 2px solid; }
.pchart-table td, .pchart-table th { font-size: .85rem; font-variant-numeric: tabular-nums; }
.pchart-table .swatch { display: inline-block; width: 12px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: .45rem; }
.pchart-bars { position: relative; }
.pchart-bars svg { display: block; width: 100%; height: 200px; overflow: visible; }
.pchart-bars .axis-text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.pchart-bars .end-label { fill: var(--text); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pchart-bars .bar { transition: opacity .15s; }
.pchart-bars .bar.hover { opacity: .8; }
