/* =========================================================================
   Eren'in Mühendislik Gazetesi
   Tasarım notu: gazete tipografisi — okumak için serif gövde, arayüz için
   sans. Renk paleti "kağıt + mürekkep"; tek vurgu rengi manşet kırmızısı.
   ========================================================================= */

:root {
  color-scheme: light dark;

  --paper:        #fbfaf7;
  --paper-raised: #ffffff;
  --paper-sunken: #f2efe9;
  --ink:          #16150f;
  --ink-soft:     #4a4740;
  --ink-faint:    #6d695e;   /* küçük punto meta metni — WCAG AA için >= 4.5:1 */
  --rule:         #ddd8cd;
  --rule-strong:  #16150f;
  --accent:       #b3251c;
  --accent-soft:  #fbeae8;
  --link:         #1c4f8f;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", "Noto Serif", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --wrap: 1160px;
  --wrap-narrow: 720px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(20, 18, 12, .05), 0 8px 24px rgba(20, 18, 12, .05);
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --paper:        #14140f;
    --paper-raised: #1c1c16;
    --paper-sunken: #100f0b;
    --ink:          #ece8dd;
    --ink-soft:     #b3ad9f;
    --ink-faint:    #8b8675;
    --rule:         #33322a;
    --rule-strong:  #ece8dd;
    --accent:       #f0655a;
    --accent-soft:  #2b1a17;
    --link:         #8ab6ec;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

:root[data-theme="dark"] {
  --paper:        #14140f;
  --paper-raised: #1c1c16;
  --paper-sunken: #100f0b;
  --ink:          #ece8dd;
  --ink-soft:     #b3ad9f;
  --ink-faint:    #8b8675;
  --rule:         #33322a;
  --rule-strong:  #ece8dd;
  --accent:       #f0655a;
  --accent-soft:  #2b1a17;
  --link:         #8ab6ec;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.center { text-align: center; }
.muted { color: var(--ink-faint); }
.small { font-size: .82rem; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* --- başlık / masthead --------------------------------------------------- */
.masthead {
  border-bottom: 3px double var(--rule-strong);
  background: var(--paper);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.6) blur(8px);
}

.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 14px; padding-bottom: 14px;
  flex-wrap: wrap;
}

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }

.logo-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; flex: none;
  background: var(--ink); color: var(--paper);
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .02em;
}

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong {
  font-family: var(--serif); font-size: 1.32rem; font-weight: 700;
  letter-spacing: -.015em;
}
.logo-text em {
  font-style: normal; font-size: .74rem; color: var(--ink-faint);
  letter-spacing: .04em; margin-top: 3px;
}

.masthead-nav { display: flex; align-items: center; gap: 4px; }
.masthead-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: .88rem; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius);
}
.masthead-nav a:hover { color: var(--ink); background: var(--paper-sunken); }

.tema {
  display: grid; place-items: center;
  width: 36px; height: 36px; margin-left: 6px;
  background: none; border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink-soft); cursor: pointer;
}
.tema:hover { color: var(--ink); border-color: var(--ink-faint); }
.tema svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ico-moon { display: none; }
:root[data-theme="dark"] .ico-sun { display: none; }
:root[data-theme="dark"] .ico-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .ico-sun { display: none; }
  :root[data-theme="auto"] .ico-moon { display: block; }
}

/* --- tarih satırı -------------------------------------------------------- */
.dateline {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--rule);
  font-size: .84rem; color: var(--ink-faint);
  letter-spacing: .02em;
}
.dateline-date {
  font-family: var(--serif); font-size: 1rem; font-weight: 700;
  color: var(--ink); letter-spacing: 0;
}
.dateline-sep { color: var(--rule); }

/* --- editör notu --------------------------------------------------------- */
.editor-note {
  margin: 26px 0 4px; padding: 18px 22px;
  background: var(--paper-sunken);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.editor-note p {
  margin: 6px 0 0; font-family: var(--serif); font-size: 1.02rem;
  color: var(--ink-soft); line-height: 1.55;
}

.label {
  margin: 0; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .11em;
  color: var(--ink-faint); font-family: var(--sans);
}

.kicker {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent);
  padding: 3px 0;
  border-bottom: 2px solid var(--accent);
}
.kicker-sm { font-size: .62rem; letter-spacing: .1em; border-bottom-width: 1px; }

/* --- rozet / künye ------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 600; letter-spacing: .01em;
  color: var(--ink-soft); text-decoration: none;
  padding: 3px 9px 3px 8px;
  border: 1px solid var(--rule); border-radius: 100px;
  background: var(--paper-raised);
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand, var(--ink-faint)); flex: none;
}
.badge:hover { border-color: var(--brand, var(--ink-faint)); color: var(--ink); }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  font-size: .76rem; color: var(--ink-faint);
}
.meta-item { white-space: nowrap; }

.level {
  padding: 2px 8px; border-radius: 100px;
  font-size: .68rem; font-weight: 600;
  background: var(--paper-sunken); border: 1px solid var(--rule);
}
.level-baslangic { color: #1f7a45; border-color: #1f7a4544; }
.level-orta      { color: #8a6410; border-color: #8a641044; }
.level-ileri     { color: #9c2c2c; border-color: #9c2c2c44; }
:root[data-theme="dark"] .level-baslangic { color: #63d18f; }
:root[data-theme="dark"] .level-orta      { color: #dfb44e; }
:root[data-theme="dark"] .level-ileri     { color: #f08a7d; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .level-baslangic { color: #63d18f; }
  :root[data-theme="auto"] .level-orta      { color: #dfb44e; }
  :root[data-theme="auto"] .level-ileri     { color: #f08a7d; }
}

/* --- kapak yazısı -------------------------------------------------------- */
.cover {
  padding: 34px 0 40px;
  border-bottom: 3px double var(--rule-strong);
}
.cover-head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px; margin-bottom: 20px;
}
.cover-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 5.2vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.022em;
  font-weight: 700;
  max-width: 20ch;
}
.cover-title a { color: var(--ink); text-decoration: none; }
.cover-title a:hover { color: var(--accent); }

.original-title {
  margin: 0 0 22px;
  font-size: .84rem; color: var(--ink-faint); font-style: italic;
  max-width: 60ch;
}

/* --- gövde metni --------------------------------------------------------- */
.prose { font-family: var(--serif); color: var(--ink); }
.prose p { margin: 0 0 1.05em; line-height: 1.72; }
.prose > p:first-child { font-size: 1.16rem; }
.cover .prose { max-width: 68ch; font-size: 1.09rem; }
.cover .prose > p:first-child { font-size: 1.28rem; line-height: 1.6; color: var(--ink); }
.prose-sm { font-size: .97rem; }
.prose-sm p { margin-bottom: .85em; }
.prose code, .prose-page code {
  font-family: var(--mono); font-size: .86em;
  background: var(--paper-sunken); padding: 1px 5px;
  border-radius: 3px; border: 1px solid var(--rule);
}
.prose strong { font-weight: 700; }

/* --- öne çıkanlar -------------------------------------------------------- */
.keypoints {
  margin: 26px 0; padding: 20px 24px;
  background: var(--paper-raised);
  border: 1px solid var(--rule); border-radius: var(--radius);
  max-width: 68ch;
}
.keypoints ul { margin: 12px 0 0; padding-left: 20px; }
.keypoints li {
  margin-bottom: 9px; font-family: var(--serif);
  font-size: 1rem; line-height: 1.6;
}
.keypoints li::marker { color: var(--accent); }

.keypoints-inline {
  margin: 12px 0 0; padding-left: 18px;
  font-size: .9rem; line-height: 1.55; color: var(--ink-soft);
}
.keypoints-inline li { margin-bottom: 6px; }
.keypoints-inline li::marker { color: var(--accent); }

/* --- vurgu kutuları ------------------------------------------------------ */
.callouts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 26px 0; max-width: 68ch;
}
.callout {
  padding: 16px 18px; border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: var(--paper-raised);
}
.callout p {
  margin: 8px 0 0; font-size: .94rem; line-height: 1.6;
  color: var(--ink-soft);
}
.callout-why { border-left: 3px solid var(--accent); }
.callout-you { border-left: 3px solid var(--link); background: var(--paper-sunken); }
.callout-sm { margin: 14px 0 0; padding: 12px 14px; }
.callout-sm p { font-size: .88rem; }

/* --- sözlük -------------------------------------------------------------- */
.terms {
  margin: 24px 0 0; padding-top: 18px;
  border-top: 1px solid var(--rule); max-width: 68ch;
}
.terms dl { margin: 12px 0 0; }
.term { margin-bottom: 12px; }
.term dt { margin-bottom: 2px; }
.term-en {
  font-family: var(--mono); font-size: .83rem; font-weight: 600;
  color: var(--ink);
}
.term-tr { font-size: .83rem; color: var(--accent); margin-left: 6px; }
.term dd {
  margin: 0; font-size: .88rem; color: var(--ink-soft); line-height: 1.55;
}

/* --- etiketler / alt bilgi ----------------------------------------------- */
.article-foot {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 14px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.tags a {
  font-size: .74rem; color: var(--ink-faint); text-decoration: none;
  padding: 3px 9px; border-radius: 100px; background: var(--paper-sunken);
}
.tags a:hover { color: var(--accent); background: var(--accent-soft); }

.readmore {
  font-size: .84rem; font-weight: 600; text-decoration: none;
  color: var(--accent); white-space: nowrap;
}
.readmore:hover { text-decoration: underline; }

/* --- bölümler ------------------------------------------------------------ */
.section { margin: 44px 0; }
.section-title {
  display: flex; align-items: center; gap: 16px;
  margin: 0 0 6px;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
}
.section-title::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}
.section-note {
  margin: 0 0 22px; font-size: .86rem; color: var(--ink-faint);
  max-width: 62ch;
}
.section-title + .grid, .section-title + .daylist { margin-top: 22px; }

/* --- kısa kısa grid ------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-top: 22px;
}
.brief {
  display: flex; flex-direction: column;
  padding: 22px;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.brief .article-foot { margin-top: auto; }
.brief-title {
  margin: 12px 0 6px;
  font-family: var(--serif); font-size: 1.32rem; line-height: 1.22;
  letter-spacing: -.012em; font-weight: 700;
}
.brief-title a { color: var(--ink); text-decoration: none; }
.brief-title a:hover { color: var(--accent); }
.brief .original-title { margin-bottom: 14px; font-size: .78rem; }
.brief-archive { background: var(--paper-sunken); border-style: dashed; }

/* --- önceki sayılar ------------------------------------------------------ */
.prev-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px; margin-bottom: 26px;
}
.prev-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 18px; text-decoration: none;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-raised); color: var(--ink);
}
.prev-card:hover { border-color: var(--accent); }
.prev-date {
  font-size: .72rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
}
.prev-title {
  font-family: var(--serif); font-size: 1rem; line-height: 1.34;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.prev-count { font-size: .74rem; color: var(--ink-faint); margin-top: auto; }

.btn {
  display: inline-block; padding: 10px 22px;
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  color: var(--ink); text-decoration: none;
  font-size: .86rem; font-weight: 600;
  background: var(--paper-raised);
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --- sayfalayıcı --------------------------------------------------------- */
.pager {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px;
  margin: 48px 0; padding-top: 26px;
  border-top: 3px double var(--rule-strong);
}
.pager-link {
  display: flex; flex-direction: column; gap: 3px;
  text-decoration: none; color: var(--ink);
  padding: 12px 16px; border-radius: var(--radius);
}
.pager-link:hover { background: var(--paper-sunken); }
.pager-next { text-align: right; align-items: flex-end; }
.pager-label { font-size: .74rem; color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.pager-title { font-family: var(--serif); font-size: 1rem; }
.pager-mid { font-size: .82rem; color: var(--ink-faint); text-decoration: none; }

/* --- sayfa başlıkları ---------------------------------------------------- */
.page-head {
  padding: 40px 0 26px;
  border-bottom: 3px double var(--rule-strong);
  margin-bottom: 8px;
}
.page-kicker {
  display: block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent); margin-bottom: 10px;
}
.page-title {
  margin: 0 0 10px;
  font-family: var(--serif); font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  line-height: 1.1; letter-spacing: -.02em; font-weight: 700;
}
.brand-underline { border-bottom: 4px solid var(--brand, var(--accent)); display: inline-block; padding-bottom: 6px; }
.page-sub { margin: 0 0 4px; color: var(--ink-faint); font-size: .92rem; }

/* --- listeler ------------------------------------------------------------ */
.rowlist, .daylist { list-style: none; margin: 22px 0 0; padding: 0; }

.row, .dayrow { border-bottom: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: 14px; padding-right: 4px; }

.row-link, .dayrow-link {
  display: flex; gap: 18px; flex: 1; min-width: 0;
  padding: 16px 4px; text-decoration: none; color: var(--ink);
  align-items: baseline;
}
.row-link:hover, .dayrow-link:hover { background: var(--paper-sunken); }

.row-date, .dayrow-date {
  flex: none; width: 118px;
  font-size: .76rem; color: var(--ink-faint);
  letter-spacing: .02em; padding-top: 2px;
}
.row-body, .dayrow-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.row-body strong, .dayrow-body strong {
  font-family: var(--serif); font-size: 1.08rem; font-weight: 700; line-height: 1.32;
}
.row-orig { font-size: .78rem; color: var(--ink-faint); font-style: italic; }
.row-sum, .dayrow-meta { font-size: .84rem; color: var(--ink-faint); line-height: 1.5; }
.dayrow-meta { font-size: .78rem; }

/* --- etiket bulutu / kaynak grid ----------------------------------------- */
.tagcloud, .sourcegrid { list-style: none; margin: 22px 0 0; padding: 0; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 100px;
  background: var(--paper-raised); border: 1px solid var(--rule);
  text-decoration: none; color: var(--ink); font-size: .86rem;
}
.tagcloud a:hover { border-color: var(--accent); color: var(--accent); }
.count { font-size: .74rem; color: var(--ink-faint); }

.sourcegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.sourcegrid a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius);
  border-left: 4px solid var(--brand);
  background: var(--paper-raised);
}
.sourcegrid a:hover { background: var(--paper-sunken); }
.sourcegrid strong { font-size: .94rem; }

/* --- arama --------------------------------------------------------------- */
.searchbar {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px;
}
.searchbar input, .searchbar select {
  font-family: var(--sans); font-size: .95rem; color: var(--ink);
  background: var(--paper-raised);
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 12px 14px;
}
.searchbar input { flex: 1 1 280px; }
.searchbar input:focus, .searchbar select:focus { border-color: var(--accent); }
.search-count { margin: 0; font-size: .84rem; }
mark { background: var(--accent-soft); color: inherit; padding: 0 2px; border-radius: 2px; }

/* --- hakkında sayfası ---------------------------------------------------- */
.prose-page { max-width: 68ch; font-size: 1.04rem; padding-top: 12px; }
.prose-page h2 {
  margin: 40px 0 12px; font-size: 1.4rem; letter-spacing: -.01em;
  font-family: var(--serif);
}
.prose-page ul, .prose-page ol { padding-left: 22px; }
.prose-page li { margin-bottom: 10px; line-height: 1.65; }
.about-sources { list-style: none; padding: 0; }
.about-sources li { padding-left: 14px; border-left: 3px solid var(--brand, var(--rule)); }
.about-sources a { font-weight: 600; }
.about-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* --- alt bilgi ----------------------------------------------------------- */
.footer {
  margin-top: 70px; padding: 46px 0 26px;
  border-top: 3px double var(--rule-strong);
  background: var(--paper-sunken);
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-col h3 {
  margin: 0 0 12px; font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .11em; color: var(--ink);
}
.footer-col p { margin: 0 0 8px; font-size: .88rem; line-height: 1.6; }
.footer-sources, .footer-links { list-style: none; margin: 0; padding: 0; }
.footer-sources li, .footer-links li { margin-bottom: 6px; }
.footer-sources a, .footer-links a {
  font-size: .84rem; color: var(--ink-soft); text-decoration: none;
}
.footer-sources a:hover, .footer-links a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--rule);
}

/* --- duyarlılık ---------------------------------------------------------- */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .masthead-inner { padding-top: 12px; padding-bottom: 12px; }
  .masthead-nav a { padding: 7px 9px; font-size: .84rem; }
  .logo-text em { display: none; }
  .grid { grid-template-columns: 1fr; gap: 18px; }
  .callouts { grid-template-columns: 1fr; }
  .cover { padding: 26px 0 30px; }
  .row-link, .dayrow-link { flex-direction: column; gap: 6px; }
  .row-date, .dayrow-date { width: auto; }
  .pager { grid-template-columns: 1fr; gap: 6px; text-align: left; }
  .pager-next { text-align: left; align-items: flex-start; }
  .pager-mid { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media print {
  .masthead, .footer, .pager, .tema, .skip { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .brief, .keypoints, .callout { break-inside: avoid; }
}
