:root {
  --c-ink: #3f3f46;
  --c-ink-soft: #52525b;
  --c-accent: #a3e635;
  --c-accent-deep: #65a30d;
  --c-bg: #f4f4f5;
  --c-surface: #ffffff;
  --c-surface-2: #e4e4e7;
  --c-text: #27272a;
  --c-muted: #71717a;
  --c-line: #d4d4d8;
  --c-topbar: #3f3f46;
  --c-topbar-text: #fafafa;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(24, 24, 27, 0.06), 0 6px 18px rgba(24, 24, 27, 0.06);
  --font: "Nunito", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --c-ink: #e4e4e7;
  --c-ink-soft: #a1a1aa;
  --c-bg: #18181b;
  --c-surface: #27272a;
  --c-surface-2: #3f3f46;
  --c-text: #f4f4f5;
  --c-muted: #a1a1aa;
  --c-line: #3f3f46;
  --c-topbar: #111114;
  --c-topbar-text: #f4f4f5;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a { color: var(--c-accent-deep); }
:root[data-theme="dark"] a { color: var(--c-accent); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.skip { position: absolute; top: -60px; left: 12px; background: var(--c-accent); color: #1a2e05; padding: 0.5rem 0.9rem; border-radius: 6px; font-weight: 700; z-index: 99; }
.skip:focus { top: 12px; }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* Üst bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1.25rem;
  background: var(--c-topbar); color: var(--c-topbar-text);
  padding: 0.65rem 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.topbar-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.topbar-brand svg { --c-ink: #a3e635; --c-accent: #3f3f46; }
.topbar-nav { display: flex; gap: 0.15rem; margin-left: auto; flex-wrap: wrap; }
.topbar-nav a { color: inherit; text-decoration: none; padding: 0.4rem 0.75rem; border-radius: 6px; font-weight: 600; font-size: 0.93rem; opacity: 0.85; }
.topbar-nav a:hover { background: rgba(255, 255, 255, 0.1); opacity: 1; }
.topbar-nav a.is-active { background: var(--c-accent); color: #1a2e05; opacity: 1; }
.theme-switch { background: transparent; border: 1px solid rgba(255, 255, 255, 0.35); color: inherit; border-radius: 999px; width: 38px; height: 38px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-switch:hover { border-color: var(--c-accent); color: var(--c-accent); }
.theme-switch .ico-moon { display: none; }
:root[data-theme="dark"] .theme-switch .ico-sun { display: none; }
:root[data-theme="dark"] .theme-switch .ico-moon { display: block; }
.topbar-burger { display: none; background: none; border: 0; padding: 0.4rem; cursor: pointer; margin-left: auto; }
.topbar-burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px 0; color: var(--c-topbar-text); }

/* Çalışma alanı */
.workspace { flex: 1; width: min(1140px, 100% - 2.5rem); margin: 1.75rem auto; display: flex; flex-direction: column; gap: 1.5rem; }
.crumbs { font-size: 0.88rem; color: var(--c-muted); display: flex; gap: 0.5rem; margin-bottom: -0.5rem; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.panel { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 1.4rem; border-bottom: 1px solid var(--c-line); background: var(--c-surface-2); }
.panel-head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; }
.panel-head-title { background: transparent; flex-wrap: wrap; }
.panel-head-title h1 { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; color: var(--c-ink); }
.panel-link { font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.panel-body { padding: 1.4rem; }
.panel-foot { padding: 1rem 1.4rem; border-top: 1px solid var(--c-line); display: flex; gap: 0.75rem; flex-wrap: wrap; }
.panel-empty { text-align: center; padding: 3rem 1.5rem; }
.stamp { font-size: 0.8rem; color: var(--c-muted); background: var(--c-surface-2); padding: 0.25rem 0.6rem; border-radius: 999px; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #1a2e05; background: var(--c-accent); padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.9rem; }
.code404 { font-size: 4.5rem; font-weight: 800; margin: 0; color: var(--c-accent); line-height: 1; }

.hero-panel {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2rem;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2rem 2.25rem;
  border-left: 6px solid var(--c-accent);
}
.hero-panel h1 { margin: 0 0 0.6rem; font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; line-height: 1.15; color: var(--c-ink); }
.lead { font-size: 1.1rem; color: var(--c-muted); margin: 0 0 1.4rem; max-width: 60ch; }
.hero-panel-visual { position: relative; width: min(100%, 420px); }
.hero-panel-img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--c-line); box-shadow: var(--shadow); }
.hero-panel-meter { position: absolute; right: -0.6rem; bottom: -0.6rem; padding: 0.35rem 0.5rem 0.1rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 8px; box-shadow: var(--shadow); opacity: 0.95; }
.hero-panel-meter svg { width: 96px; height: 60px; display: block; }

/* İç sayfa: panel + yapışkan yan görsel kartı */
.with-media { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
.media-card { position: sticky; top: 4.5rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.media-card-figure { margin: 0; }
.media-card-img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.media-card-note { margin: 0; padding: 0.6rem 0.9rem; font-size: 0.8rem; color: var(--c-muted); background: var(--c-surface-2); border-top: 1px solid var(--c-line); display: flex; align-items: center; gap: 0.4rem; }

.btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.65rem 1.3rem; border-radius: 8px; font-weight: 800; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: 0.95rem; }
.btn-accent { background: var(--c-accent); color: #1a2e05; }
.btn-accent:hover { background: #bef264; }
.btn-ghost { border-color: var(--c-line); color: var(--c-text); background: transparent; }
.btn-ghost:hover { border-color: var(--c-accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.tile { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.25rem 1.3rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); text-decoration: none; color: var(--c-text); box-shadow: var(--shadow); transition: border-color 0.15s ease, transform 0.15s ease; }
.tile:hover { border-color: var(--c-accent); transform: translateY(-2px); }
.tile svg { color: var(--c-accent-deep); margin-bottom: 0.3rem; }
:root[data-theme="dark"] .tile svg { color: var(--c-accent); }
.tile strong { font-size: 1.05rem; font-weight: 800; }
.tile span { font-size: 0.9rem; color: var(--c-muted); }

.table-wrap { overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.grid th, .grid td { padding: 0.7rem 1.4rem; text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.grid th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); background: var(--c-surface-2); }
.grid tbody tr:hover { background: color-mix(in srgb, var(--c-accent) 10%, transparent); }
.grid tbody tr:last-child td { border-bottom: 0; }

.prose h2 { font-size: 1.35rem; margin: 1.6rem 0 0.6rem; font-weight: 800; color: var(--c-ink); }
.prose h3 { font-size: 1.1rem; margin: 1.3rem 0 0.5rem; font-weight: 700; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.3rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2rem; }
.prose th, .prose td { border: 1px solid var(--c-line); padding: 0.55rem 0.75rem; text-align: left; }
.prose th { background: var(--c-surface-2); }
.prose strong { font-weight: 800; }

.faq-list { display: flex; flex-direction: column; }
.faq-row { border-bottom: 1px solid var(--c-line); }
.faq-row:last-child { border-bottom: 0; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: none; border: 0; text-align: left; padding: 1rem 1.4rem; font: inherit; font-weight: 700; color: var(--c-text); cursor: pointer; }
.faq-q:hover { background: color-mix(in srgb, var(--c-accent) 12%, transparent); }
.faq-q svg { flex: none; transition: transform 0.2s ease; color: var(--c-accent-deep); }
.faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq-a { padding: 0 1.4rem 1.2rem; color: var(--c-ink-soft); }
.faq-a p { margin: 0 0 0.7rem; }

.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 1.5rem; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.9rem; }
.field input, .field textarea { font: inherit; padding: 0.65rem 0.8rem; border: 1px solid var(--c-line); border-radius: 8px; background: var(--c-bg); color: var(--c-text); }
.field input:focus, .field textarea:focus { border-color: var(--c-accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 35%, transparent); }
.field textarea { resize: vertical; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 0.8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 700; }
.notice-ok { background: color-mix(in srgb, var(--c-accent) 30%, var(--c-surface)); color: #365314; border: 1px solid var(--c-accent-deep); }
:root[data-theme="dark"] .notice-ok { color: #d9f99d; }
.notice-err { background: #fee2e2; color: #7f1d1d; border: 1px solid #f87171; }
:root[data-theme="dark"] .notice-err { background: #451a1a; color: #fecaca; }

/* Alt durum çubuğu */
.statusbar { background: var(--c-surface); border-top: 1px solid var(--c-line); margin-top: 1rem; }
.statusbar-inner { width: min(1140px, 100% - 2.5rem); margin: 0 auto; padding: 1.4rem 0; display: grid; gap: 0.6rem; font-size: 0.9rem; color: var(--c-muted); }
.statusbar-text { margin: 0; }
.statusbar-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.statusbar-links a { color: var(--c-text); text-decoration: none; font-weight: 600; }
.statusbar-links a:hover { color: var(--c-accent-deep); }
.statusbar-copy { margin: 0; display: flex; align-items: center; gap: 0.4rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 30%, transparent); display: inline-block; }

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 0.6rem 1rem; }
  .topbar-burger { display: block; }
  .theme-switch { order: 2; }
  .topbar-burger { order: 1; }
  .topbar-nav { display: none; order: 3; width: 100%; flex-direction: column; margin: 0.4rem 0 0.2rem; }
  .topbar-nav.is-open { display: flex; }
  .hero-panel { grid-template-columns: 1fr; padding: 1.5rem; }
  .hero-panel-visual { width: 100%; }
  .hero-panel-meter { display: none; }
  .with-media { grid-template-columns: 1fr; }
  .media-card { position: static; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .workspace { width: min(1140px, 100% - 1.5rem); margin: 1.25rem auto; }
  .statusbar-inner { width: min(1140px, 100% - 1.5rem); }
  .panel-body, .panel-head, .grid th, .grid td, .faq-q, .faq-a { padding-left: 1rem; padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Blog: kayıt akışı (feed), tekil kayıt (entry), ilgili kartlar, arşiv seçmeleri, son kayıtlar */
.feed-intro { margin: 0; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.4rem 1.1rem; align-items: start; padding: 1.1rem 1.4rem; border-top: 1px solid var(--c-line); }
.feed-row:has(.feed-thumb) { grid-template-columns: auto 160px minmax(0, 1fr); }
.feed-row:hover { background: color-mix(in srgb, var(--c-accent) 8%, transparent); }
.feed-no { font-size: 0.78rem; font-weight: 800; color: var(--c-muted); padding-top: 0.3rem; font-variant-numeric: tabular-nums; }
.feed-thumb { display: block; }
.feed-thumb img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--c-line); }
.feed-main { min-width: 0; }
.feed-title { margin: 0 0 0.2rem; font-size: 1.12rem; font-weight: 800; line-height: 1.3; }
.feed-title a { color: var(--c-ink); text-decoration: none; }
.feed-title a:hover { color: var(--c-accent-deep); text-decoration: underline; }
:root[data-theme="dark"] .feed-title a:hover { color: var(--c-accent); }
.feed-meta { margin: 0 0 0.4rem; font-size: 0.82rem; color: var(--c-muted); }
.feed-excerpt { margin: 0; color: var(--c-ink-soft); font-size: 0.95rem; }
.pager { align-items: center; justify-content: space-between; }
.pager-pos { font-size: 0.88rem; color: var(--c-muted); font-weight: 700; }

.entry-hero { margin: 0; }
.entry-hero img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--c-line); }
.entry-head h1 { max-width: 30ch; }
.entry-head .stamp { white-space: nowrap; }
.entry-body > :first-child { margin-top: 0; }
.entry-nav { justify-content: space-between; }
.entry-nav-link { display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; color: var(--c-text); max-width: 48%; }
.entry-nav-link small { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--c-muted); font-weight: 800; }
.entry-nav-link strong { font-weight: 700; }
.entry-nav-link:hover strong { color: var(--c-accent-deep); }
.entry-nav-next { margin-left: auto; text-align: right; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--c-line); }
.related-card { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.3rem; background: var(--c-surface); text-decoration: none; color: var(--c-text); }
.related-card:hover { background: color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)); }
.related-card strong { font-weight: 800; line-height: 1.3; }
.related-card time { font-size: 0.78rem; color: var(--c-muted); }
.related-card span { font-size: 0.88rem; color: var(--c-ink-soft); }

.archive-picks { list-style: none; margin: 0; padding: 0.4rem 0; }
.archive-pick { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 0.65rem 1.4rem; border-top: 1px solid var(--c-line); }
.archive-pick:first-child { border-top: 0; }
.archive-pick a { font-weight: 700; text-decoration: none; color: var(--c-ink); }
.archive-pick a:hover { text-decoration: underline; }
.archive-pick time { font-size: 0.8rem; color: var(--c-muted); white-space: nowrap; }

.recent-log td:first-child { white-space: nowrap; color: var(--c-muted); font-size: 0.88rem; }
.recent-log td a { font-weight: 800; text-decoration: none; color: var(--c-ink); }
.recent-log td a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .feed-row, .feed-row:has(.feed-thumb) { grid-template-columns: 1fr; padding-left: 1rem; padding-right: 1rem; }
  .feed-no { display: none; }
  .feed-thumb { max-width: 320px; }
  .entry-nav-link { max-width: 100%; }
  .entry-nav-next { margin-left: 0; text-align: left; }
  .archive-pick { flex-direction: column; gap: 0.1rem; padding-left: 1rem; padding-right: 1rem; }
}
