/* ---------- Tokens ---------- */
@import url("https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400..800;1,400..800&display=swap");

:root {
  --bg: #fdfdfb;
  --fg: #1c1c1c;
  --muted: #6f6f6a;
  --rule: #e4e4df;
  --code-bg: #f1f1ed;
  --mark: #fff2a8;
  --measure: 38rem;
  --font: "Alegreya", ui-serif, Georgia, "Times New Roman", serif;
  --font-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131313;
    --fg: #e6e6e1;
    --muted: #8d8d88;
    --rule: #2a2a28;
    --code-bg: #1d1d1b;
    --mark: #5a4b00;
  }
} 


/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol, pre { margin: 0; }
img, video, svg, canvas { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Base ---------- */
body {
  max-width: calc(var(--measure) + 2.5rem);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.65;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--fg); color: var(--bg); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}

/* ---------- Header / nav ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 3.5rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
.site-title { font-weight: 600; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover,
.site-header nav a[aria-current] { color: var(--fg); text-decoration: underline; }

/* ---------- Hamburger menü ---------- */
.menu-toggle { display: none; }

@media (max-width: 40rem) {
  .site-header { align-items: center; }

  .js .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.5rem;
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
  }
  .menu-toggle span {
    display: block;
    height: 2px;
    background: var(--fg);
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .is-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .is-open .menu-toggle span:nth-child(2) { opacity: 0; }
  .is-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .js .site-header nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rule);
    font-size: 1rem;
  }
  .js .site-header.is-open nav { display: flex; }
}


/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.25; font-weight: 700; text-wrap: balance; }
h1 { font-size: 1.9rem; margin-bottom: 0.4rem; }
h2 { font-size: 1.3rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }
h4, h5, h6 { font-size: 1rem; margin: 1.75rem 0 0.5rem; }
h6 { color: var(--muted); }
h2.year {
  margin-top: 2rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.lead { margin-bottom: 1.5rem; font-size: 1.15rem; color: var(--muted); }

/* ---------- Prose (yazı gövdesi) ---------- */
.prose > :first-child { margin-top: 0; }
.prose > * + * { margin-top: 1.1rem; }
.prose > h2, .prose > h3, .prose > h4 { margin-top: 2.25rem; }

.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.3rem; }
.prose li > ul, .prose li > ol { margin-top: 0.3rem; }

.prose blockquote {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
.prose blockquote p + p { margin-top: 0.75rem; }
.prose blockquote footer, .prose cite { font-size: 0.9em; font-style: normal; }
.prose blockquote footer::before { content: "— "; }

.prose figure { margin: 1.75rem 0; }
.prose figure img { margin: 0; }
.prose figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}
.prose img { margin: 1.5rem 0; }

/* Video / iframe gömmeleri */
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; }
.prose video { width: 100%; }
.prose .video, .prose .embed { margin: 1.75rem 0; }

/* Kod */
.prose code, .prose kbd, .prose samp {
  padding: 0.1em 0.35em;
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 0.86em;
  border-radius: 3px;
}
.prose pre {
  overflow-x: auto;
  padding: 1rem;
  background: var(--code-bg);
  font-size: 0.85rem;
  line-height: 1.5;
  border-radius: 4px;
  tab-size: 2;
}
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose kbd { border: 1px solid var(--rule); }

/* Tablo */
.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.prose th, .prose td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; }

/* Diğer satır içi öğeler */
.prose mark { background: var(--mark); color: inherit; padding: 0 0.15em; }
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.prose small { font-size: 0.85em; color: var(--muted); }
.prose sub, .prose sup { font-size: 0.75em; line-height: 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose dt { font-weight: 600; }
.prose dd { margin-left: 1.25rem; }
.prose details { padding: 0.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.prose summary { cursor: pointer; font-family: var(--font-ui); font-size: 0.9rem; }
.prose .footnotes { font-size: 0.85rem; color: var(--muted); }

/* ---------- Yazı listesi ---------- */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.35rem 0;
}
.posts time, .post-header time {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.post-header { margin-bottom: 2rem; }

/* ---------- Önceki / sonraki ---------- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.post-nav span:last-child { text-align: right; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }

/* ---------- Formlar (iletişim vb.) ---------- */
input, textarea, select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--fg); outline-offset: 1px; }
label { display: block; margin-bottom: 0.25rem; font-family: var(--font-ui); font-size: 0.85rem; }
button, .button {
  padding: 0.5rem 1rem;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: 3px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  cursor: pointer;
}

ul, ol {
list-style-type:none;
margin:0;
padding:0;
}
ul li, ol li {
margin:0;
padding:0;
}
li a {
margin:0;
padding:0;
}
input, textarea, button { font: inherit; padding: .4rem; margin: .25rem 0; }
input[type=text], input[type=search], textarea { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--muted); }
.hp { position: absolute; left: -9999px; }
.comment { border-top: 1px solid var(--muted); padding: .75rem 0; }
.error { color: #c00; }
nav a[aria-current] { font-weight: bold; }

/* ---------- Mobil ---------- */
@media (max-width: 30rem) {
  html { font-size: 106.25%; }
  body { padding-top: 1.25rem; }
  .site-header { margin-bottom: 2.5rem; }
  h1 { font-size: 1.6rem; }
  .posts li { flex-direction: column; gap: 0; padding: 0.5rem 0; }
}

/* ---------- Yazdırma ---------- */
@media print {
  :root { --bg: #fff; --fg: #000; --muted: #444; }
  .site-header nav, .post-nav { display: none; }
  a { text-decoration: none; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}