/* =========================================================
   Tüm temaların ortak temeli.
   Temalar aşağıdaki değişkenleri ezerek görünümü belirler.
   ========================================================= */
:root {
  --accent: #0a3d79;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #1f2933;
  --heading: #0f1720;
  --muted: #5f6b7a;
  --line: #e4e8ee;
  --chip-bg: color-mix(in srgb, var(--accent) 9%, transparent);
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --radius: 10px;
  --maxw: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font-body); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--heading); line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* Bölümler */
.section { margin: 0 0 2.6rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-title { font-size: 1.3rem; }
.more { font-size: .9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.page-title { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin-bottom: 1.4rem; }

/* Serbest metin */
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose h4, .prose h5 { font-size: 1rem; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: .3em; }
.prose blockquote { margin: 1.2em 0; padding: .2em 1.1em; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.prose code { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: var(--chip-bg); padding: .1em .35em; border-radius: 5px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.prose h2, .prose h3, .prose h4 { scroll-margin-top: 90px; }
.prose .md-img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.4em auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .08); }
.prose p > .md-img:only-child { margin: .4em auto; }
.md-table { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.md-table table { width: 100%; border-collapse: collapse; font-size: .94em; }
.md-table th, .md-table td { padding: .6em .9em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.md-table thead th { background: var(--chip-bg); color: var(--heading); font-weight: 600; }
.md-table tr:last-child td { border-bottom: 0; }
.md-toc { margin: 0 0 1.6em; padding: 1em 1.3em; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.md-toc ul { list-style: none; margin: 0; padding: 0; }
.md-toc li { margin: .25em 0 !important; }
.md-toc .toc-l3 { padding-left: 1.1em; font-size: .94em; }
.md-toc a { text-decoration: none; }
.md-toc a:hover { text-decoration: underline; }

/* Blog / haberler */
.posts { display: grid; gap: 1.1rem; }
.post-card { display: grid; gap: 1.2rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.post-card:last-child { border-bottom: 0; padding-bottom: 0; }
.post-card.has-cover { grid-template-columns: 200px minmax(0, 1fr); align-items: start; }
.post-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.post-date { margin: 0 0 .2rem; color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: .5rem; }
.post-draft { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .1rem .45rem; border-radius: 4px; background: #fef3c7; color: #92400e; }
.post-title { font-size: 1.15rem; margin: 0 0 .35rem; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--accent); }
.post-summary { color: var(--muted); margin: 0 0 .4rem; }
.posts-compact { gap: .2rem; }
.posts-compact .post-card { grid-template-columns: 130px minmax(0, 1fr); gap: 1rem; padding: .6rem 0; align-items: baseline; }
.posts-compact .post-text { display: contents; }
.posts-compact .post-title { font-size: 1rem; margin: 0; font-weight: 600; }
.post-full .post-lead { font-size: 1.15rem; color: var(--muted); line-height: 1.6; margin: .4rem 0 1.4rem; }
.post-hero { width: 100%; max-height: 440px; object-fit: cover; border-radius: var(--radius); margin: 0 0 1.6rem; }
.post-back { margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.post-back a { text-decoration: none; font-weight: 600; }

/* Özgeçmiş */
.cv-list { list-style: none; margin: 0; padding: 0; }
.cv-item { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.2rem; padding: .85rem 0; border-bottom: 1px dashed var(--line); }
.cv-item:last-child { border-bottom: 0; }
.cv-period { color: var(--accent); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.cv-title { font-weight: 600; color: var(--heading); }
.cv-title a { color: inherit; }
.cv-org { color: var(--muted); font-style: italic; font-size: .95rem; }
.cv-desc { margin-top: .4rem; font-size: .95rem; }
.site-nav .is-external span { font-size: .8em; opacity: .7; }

/* Etiketler */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li { padding: .32rem .8rem; border-radius: 99px; background: var(--chip-bg); color: var(--accent); font-size: .88rem; font-weight: 500; }

/* Yayınlar */
.pubs { list-style: none; margin: 0; padding: 0; counter-reset: pub; }
.pub { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.pub:first-child { padding-top: .3rem; }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; color: var(--heading); line-height: 1.4; }
.pub-title a { color: inherit; text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-meta { color: var(--muted); font-size: .93rem; margin-top: .2rem; }
.pub-meta > span + span::before { content: " · "; }
.pub-venue { font-style: italic; }
.pub-links { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .5rem; }
.pub-note { font-size: .82rem; color: var(--muted); margin-right: .3rem; }
.chip { display: inline-flex; align-items: center; padding: .14rem .6rem; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 6px; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-decoration: none; color: var(--accent); text-transform: uppercase; transition: background .15s, color .15s; }
.chip:hover { background: var(--accent); color: #fff; }
.pub-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.pub-toc a { padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 99px; text-decoration: none; font-size: .9rem; color: var(--text); }
.pub-toc a:hover { border-color: var(--accent); color: var(--accent); }
.pub-toc small { color: var(--muted); margin-left: .2rem; }

/* Dersler */
.courses { display: grid; gap: 1rem; }
.course { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.course-head { display: flex; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.course-code { font-weight: 700; font-size: .82rem; color: var(--accent); background: var(--chip-bg); padding: .1rem .5rem; border-radius: 5px; white-space: nowrap; }
.course-name { font-size: 1.08rem; margin: 0; }
.course-name a { color: inherit; }
.course-meta { color: var(--muted); font-size: .88rem; margin: .3rem 0 .6rem; }
.course-desc { font-size: .95rem; }
.course-mini { list-style: none; margin: 0; padding: 0; }
.course-mini li { display: flex; align-items: baseline; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.course-mini li:last-child { border-bottom: 0; }
.course-mini small { margin-left: auto; color: var(--muted); white-space: nowrap; }

/* İletişim */
.contact-list { margin: 0 0 1.2rem; display: grid; gap: .55rem; }
.contact-row { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; }
.contact-row dt { color: var(--muted); font-size: .9rem; }
.contact-row dd { margin: 0; overflow-wrap: anywhere; }
.profile-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.profile-link { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 99px; border: 1px solid var(--line); text-decoration: none; font-size: .87rem; font-weight: 500; color: var(--text); background: var(--surface); transition: border-color .15s, color .15s; }
.profile-link::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: .7; }
.profile-link:hover { border-color: var(--accent); color: var(--accent); }
.profile-link.is-cv { background: var(--accent); border-color: var(--accent); color: #fff; }
.profile-link.is-cv::before { background: #fff; }

/* Mobil menü (JS gerektirmez) */
.site-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.site-nav-button { display: none; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.site-nav-button span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.site-nav a { text-decoration: none; }

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: .7rem; }
.footer-logo { width: 34px; height: 34px; border-radius: 50%; background: #fff; padding: 1px; flex: none; }

@media (max-width: 760px) {
  .site-nav-button { display: inline-flex; }
  .site-nav { display: none; width: 100%; }
  .site-nav ul { flex-direction: column; }
  .site-nav-toggle:checked ~ .site-nav { display: block; }
  .site-nav-toggle:checked + .site-nav-button span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-nav-toggle:checked + .site-nav-button span:nth-child(2) { opacity: 0; }
  .site-nav-toggle:checked + .site-nav-button span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .contact-row { grid-template-columns: 1fr; gap: 0; }
  .cv-item, .post-card.has-cover, .posts-compact .post-card { grid-template-columns: 1fr; gap: .3rem; }
}

@media print {
  .site-nav, .site-nav-button, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Bölüm sayfaları: alt sayfa listesi ve üst bölüm bağlantısı */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section-children { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.child-teaser { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.child-teaser:last-child { border-bottom: 0; }
.child-title { margin: 0 0 .35rem; font-size: 1.12rem; }
.child-title a { color: var(--heading); text-decoration: none; }
.child-title a:hover { color: var(--accent); }
.child-excerpt { margin: 0 0 .4rem; color: var(--muted); }
.child-more { font-size: .9rem; font-weight: 600; text-decoration: none; }
.crumb { margin: 0 0 1rem; font-size: .9rem; }
.crumb a { text-decoration: none; }

/* Kod blokları (```) */
.prose .md-code { margin: 1em 0; padding: .8rem 1rem; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: #f6f8fa; color: #24292f; font: .85em/1.5 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; white-space: pre; }
.prose .md-code code { padding: 0; background: none; font: inherit; }
.t-academics .pub-footer, .pub-footer { margin-top: 1.4rem; padding-top: .8rem; border-top: 1px solid var(--line); font-size: .92em; color: var(--muted); }
