/* ==========================================================
   Renkler, yazı tipleri
   Kâğıt zemin, mürekkep metin, tek vurgu: cerrahi örtü yeşili
   ========================================================== */
:root {
  --paper: #f4f0e8;
  --paper-2: #ebe5d9;
  --ink: #1d1c19;
  --ink-2: #45413a;
  --muted: #7a7366;
  --rule: #d6cdbd;
  --rule-strong: #a99f8c;
  --accent: #2c5a4a;
  --mark: #e2dac6;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --grain-opacity: .05;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15140f;
    --paper-2: #1e1d18;
    --ink: #ebe5d6;
    --ink-2: #c8c1b1;
    --muted: #8f8878;
    --rule: #34312a;
    --rule-strong: #57524a;
    --accent: #8cbfa8;
    --mark: #2b2d24;
    --grain-opacity: .035;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #15140f;
  --paper-2: #1e1d18;
  --ink: #ebe5d6;
  --ink-2: #c8c1b1;
  --muted: #8f8878;
  --rule: #34312a;
  --rule-strong: #57524a;
  --accent: #8cbfa8;
  --mark: #2b2d24;
  --grain-opacity: .035;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "kern" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Hafif kâğıt dokusu */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
ol, ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }

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

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font: 500 .85rem var(--sans);
  z-index: 100;
}
.skip:focus { top: 12px; }

/* ==========================================================
   Üst şerit
   ========================================================== */
.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner { display: flex; align-items: center; gap: 28px; min-height: 56px; }
.masthead__name {
  font-style: italic;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.masthead__nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.masthead__nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.masthead__nav a:hover { color: var(--ink); }
.masthead__nav a.is-current { color: var(--ink); border-bottom-color: var(--ink); }

.theme {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -6px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  transition: color .2s, transform .4s;
}
.theme:hover { color: var(--ink); transform: rotate(180deg); }

/* ==========================================================
   Giriş
   ========================================================== */
.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  column-gap: 64px;
  padding-top: clamp(56px, 10vw, 128px);
}

.kicker {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: .35em 0 .45em;
  font-size: clamp(3.1rem, 9vw, 6.6rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.025em;
}

.opening__lede {
  max-width: 30ch;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-2);
}

.portrait { margin: 0; align-self: end; }
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  mix-blend-mode: multiply;
}
.portrait figcaption {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .78rem;
  line-height: 1.45;
  color: var(--muted);
}

.facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(48px, 7vw, 72px) 0 0;
  border-top: 2px solid var(--ink);
}
.facts div { padding: 14px 20px 0 0; }
.facts dt {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 4px 0 0; font-size: .98rem; line-height: 1.45; overflow-wrap: anywhere; }
.facts a { text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.facts a:hover { text-decoration-color: var(--accent); }

/* ==========================================================
   Bölümler
   ========================================================== */
.sec {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  column-gap: 56px;
  padding-top: clamp(72px, 10vw, 120px);
}

.sec__head { border-top: 2px solid var(--ink); padding-top: 14px; }
.sec__no {
  display: block;
  font-style: italic;
  font-size: 1rem;
  color: var(--accent);
}
.sec__no::before { content: "§\00a0"; }
.sec__head h2 { margin-top: .15em; font-size: 1.6rem; line-height: 1.2; }

.sec__body {
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  max-width: 640px;
}
.sec__body--wide { max-width: none; }

/* Hakkında */
.prose { max-width: 560px; }
.prose p + p { margin-top: 1.1em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.first::first-letter {
  float: left;
  margin: .08em .1em 0 0;
  font-size: 3.6em;
  line-height: .8;
  font-weight: 500;
  color: var(--accent);
}

.sn-ref {
  margin-left: 1px;
  font-family: var(--sans);
  font-size: .65em;
  font-weight: 600;
  color: var(--accent);
}
.sidenote {
  display: block;
  margin: .9em 0;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  font-family: var(--sans);
  font-size: .86rem;
  line-height: 1.5;
  color: var(--muted);
}
.sidenote__mark {
  margin-right: 6px;
  font-weight: 600;
  color: var(--accent);
}

@media (min-width: 1140px) {
  .sidenote {
    float: right;
    clear: right;
    width: 200px;
    margin: .25em -236px 1em 0;
    padding-left: 0;
    border-left: 0;
  }
  .sidenote__mark { display: block; margin-bottom: 2px; }
}

/* Çalışma alanları */
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  counter-reset: field;
}
.fields li {
  counter-increment: field;
  padding: 0 0 36px;
}
.fields li:nth-child(n + 3) { border-top: 1px solid var(--rule); padding-top: 22px; }
.fields h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: .45em; }
.fields h3::before {
  content: counter(field, lower-roman) ".";
  display: inline-block;
  min-width: 2em;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.fields p { padding-left: 2em; color: var(--ink-2); }
.xref {
  margin-top: .7em;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted) !important;
}
.xref a { color: var(--accent); text-decoration: none; font-feature-settings: "tnum" 1; }
.xref a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Yayınlar */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-bottom: 28px;
  font-family: var(--sans);
  font-size: .88rem;
}
.filter button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1.5px solid transparent;
  background: none;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.filter span { font-size: .8em; color: var(--muted); font-feature-settings: "tnum" 1; }

.year {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.year__label {
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  font-feature-settings: "lnum" 1;
}

.ref {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 104px;
  column-gap: 14px;
  padding-bottom: 18px;
  border-radius: 2px;
  scroll-margin-top: 96px;
}
.ref__no {
  padding-top: 3px;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--muted);
  text-align: right;
  font-feature-settings: "tnum" 1;
}
.ref__no::before { content: "["; }
.ref__no::after { content: "]"; }
.ref p { font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.ref b { font-weight: 600; color: var(--ink); }
.ref i { color: var(--ink); }
.doi {
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.doi:hover { text-decoration: underline; text-underline-offset: 3px; }
.ref__type {
  padding-top: 4px;
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}
.ref.is-flash { animation: flash 2.4s ease-out; }
@keyframes flash {
  0%, 30% { background: var(--mark); box-shadow: 0 0 0 8px var(--mark); }
  100%    { background: transparent; box-shadow: 0 0 0 8px transparent; }
}

/* Özgeçmiş */
.spine {
  position: sticky;
  top: 96px;
  width: 108px;
  margin-top: 40px;
  color: var(--rule-strong);
}
.spine__cord { stroke: var(--accent); }
.spine__cauda { stroke: var(--accent); opacity: .7; }
.spine.is-ready .spine__cord,
.spine.is-ready .spine__cauda {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
}
.spine.is-ready .spine__cauda { transition: stroke-dashoffset 1.2s ease-out 2.2s; }
.spine.is-ready .spine__cord { transition: stroke-dashoffset 2.4s cubic-bezier(.45, 0, .2, 1) .2s; }
.spine.is-drawn .spine__cord,
.spine.is-drawn .spine__cauda { stroke-dashoffset: 0; }

.cv__group {
  margin: 44px 0 6px;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cv__group:first-child { margin-top: 0; }
.cv { margin: 0; }
.cv div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  column-gap: 20px;
  padding: 12px 0;
  border-bottom: 1px dotted var(--rule-strong);
}
.cv div:last-child { border-bottom: 0; }
.cv dt {
  padding-top: 3px;
  font-family: var(--sans);
  font-size: .88rem;
  color: var(--muted);
  font-feature-settings: "tnum" 1;
}
.cv dd { margin: 0; }
.cv strong { display: block; font-weight: 500; }
.cv dd span { display: block; font-size: .96rem; color: var(--ink-2); }
.cv .cv__note { margin-top: 6px; font-size: .9rem; color: var(--muted); }
.cv__more {
  margin-top: 32px;
  font-family: var(--sans);
  font-size: .9rem;
}
.cv__more a { color: var(--accent); text-underline-offset: 3px; }
.cv__more a::after { content: " ↗"; }

/* İletişim */
.contact__lede { color: var(--ink-2); max-width: 34em; }
.contact__mail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin: 22px 0 26px;
  font-size: clamp(1.35rem, 3.6vw, 2.1rem);
  line-height: 1.25;
}
.contact__mail a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.copy {
  padding: 3px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.copy:hover { color: var(--ink); border-color: var(--ink); }
.copy.is-done { color: var(--accent); border-color: var(--accent); }
.contact__place {
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--muted);
}
.notice {
  margin-top: 36px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--muted);
}

/* Alt bilgi */
.colophon {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 32px;
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: 16px;
  padding-bottom: 48px;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--muted);
}
.colophon::before {
  content: "";
  flex-basis: 100%;
  height: 0;
  border-top: 2px solid var(--ink);
  margin-bottom: 10px;
}
.colophon__type { margin-left: auto; font-style: italic; }

/* Koyu görünümde fotoğraf */
:root[data-theme="dark"] .portrait img { mix-blend-mode: normal; filter: grayscale(1) contrast(1.02) brightness(.88); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .portrait img { mix-blend-mode: normal; filter: grayscale(1) contrast(1.02) brightness(.88); }
}

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

/* ==========================================================
   Dar ekranlar
   ========================================================== */
@media (max-width: 900px) {
  .sec { grid-template-columns: 1fr; }
  .sec__head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 6px; }
  .sec__head h2 { margin: 0; }
  .sec__body { border-top: 0; padding-top: 14px; }
  .spine { display: none; }
  .opening { column-gap: 40px; grid-template-columns: minmax(0, 1fr) 160px; }
}

@media (max-width: 760px) {
  .masthead__inner { flex-wrap: wrap; gap: 0 16px; padding-top: 10px; }
  .theme { margin-left: auto; }
  .masthead__nav {
    order: 3;
    width: 100%;
    margin: 0;
    padding: 8px 0 10px;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
            mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .masthead__nav::-webkit-scrollbar { display: none; }
  html { scroll-padding-top: 108px; }
  .ref { scroll-margin-top: 120px; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .opening { grid-template-columns: 1fr; }
  .portrait { order: -1; width: 120px; align-self: start; margin-bottom: 32px; }
  .portrait figcaption { display: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .fields { grid-template-columns: 1fr; }
  .fields li:nth-child(n + 2) { border-top: 1px solid var(--rule); padding-top: 22px; }
  .fields p { padding-left: 0; }
  .year { grid-template-columns: 1fr; }
  .year__label { margin-bottom: 8px; }
  .ref { grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; }
  .ref__type { grid-column: 2; text-align: left; padding-top: 4px; }
  .cv div { grid-template-columns: 84px minmax(0, 1fr); column-gap: 14px; }
  .colophon__type { margin-left: 0; }
}

@media (max-width: 400px) {
  .facts { grid-template-columns: 1fr; }
}
