/* ─────────────────────────────────────────────
   AtaCoskun.com — tek stil dosyası, JS yok.
   Renk paleti kasıtlı olarak iki renktir:
   mürekkep (ink) ve kağıt (paper). Aradaki
   griler yalnızca ince çizgiler ve ikincil
   metin içindir.
   ───────────────────────────────────────────── */

:root {
  --paper: #ffffff;
  --ink: #0b0b0b;
  --muted: #6f6f6f;
  --rule: #e3e3e0;

  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 66ch;
  --gutter: clamp(1.4rem, 5vw, 4.5rem);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b0b0b;
    --ink: #f2f1ee;
    --muted: #8b8b8b;
    --rule: #242423;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

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

a { color: inherit; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ── kabuk ───────────────────────────────── */

.shell {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── ana sayfa ───────────────────────────── */

.masthead {
  padding: clamp(5rem, 19vh, 11rem) 0 clamp(3rem, 9vh, 5.5rem);
}

.wordmark {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.7rem, 8.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.042em;
}

.tagline {
  margin: 1.2rem 0 0;
  max-width: 32ch;
  color: var(--muted);
  font-size: 1rem;
  text-wrap: pretty;
}

/* numaralı dizin */

.index { border-top: 1px solid var(--rule); }

.index-row {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: baseline;
  gap: 0 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.index-row .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.18s ease;
}

.index-row .name {
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.32s cubic-bezier(0.2, 0.7, 0.2, 1);
  padding-bottom: 2px;
}

.index-row .arrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.18s ease;
}

.index-row:hover .name,
.index-row:focus-visible .name { background-size: 100% 1px; }

.index-row:hover .num,
.index-row:hover .arrow { color: var(--ink); }

.index-row:hover .arrow { transform: translateX(4px); }

/* ── alt sayfa iskeleti ──────────────────── */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.topbar a { text-decoration: none; }
.topbar .home-link { color: var(--ink); font-size: 0.95rem; font-weight: 500; letter-spacing: -0.022em; text-transform: none; }
.topbar .back { transition: color 0.18s ease; }
.topbar .back:hover { color: var(--ink); }

.page-head { padding: clamp(3rem, 11vh, 6.5rem) 0 clamp(2rem, 5vh, 3rem); }

.page-head .label { display: block; margin-bottom: 1.15rem; }

h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(2.1rem, 6.5vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -0.036em;
  text-wrap: balance;
}

.lede {
  margin: 1.3rem 0 0;
  max-width: 50ch;
  font-size: 1.06rem;
  letter-spacing: -0.008em;
  color: var(--muted);
  text-wrap: pretty;
}

/* iki kolonlu bölüm: solda etiket, sağda metin */

.section {
  display: grid;
  gap: 0.6rem 2.75rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule);
}

@media (min-width: 52rem) {
  .section { grid-template-columns: 9rem minmax(0, var(--measure)); }
}

.section > h2 {
  margin: 0.4rem 0 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── metin ───────────────────────────────── */

.prose { max-width: var(--measure); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 1.05em; text-wrap: pretty; }

.prose h3 {
  margin: 1.9em 0 0.5em;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.014em;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--muted);
  transition: text-decoration-color 0.18s ease;
}
.prose a:hover { text-decoration-color: var(--ink); }

.prose ul {
  margin: 0 0 1.05em;
  padding: 0 0 0 1.15rem;
  list-style: none;
}

.prose li {
  position: relative;
  margin: 0 0 0.45em;
}

.prose li::before {
  content: "—";
  position: absolute;
  left: -1.15rem;
  color: var(--muted);
}

.prose small { font-size: 0.85rem; color: var(--muted); }

.note {
  margin: 1.7rem 0;
  padding: 0.1rem 0 0.1rem 1.05rem;
  border-left: 2px solid var(--ink);
  color: var(--muted);
  font-size: 0.95rem;
}
.note p:last-child { margin-bottom: 0; }

/* etiket / değer satırları */

.pairs { margin: 0; }

.pair {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.2rem 1.5rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}

.pair:first-of-type { border-top: 1px solid var(--rule); }

.pair dt { color: var(--muted); font-size: 0.95rem; }

.pair dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.85rem;
  text-align: right;
}
.pair dd a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.pair dd a:hover { border-bottom-color: var(--ink); }

/* ── uygulama listesi ────────────────────── */

.apps { border-top: 1px solid var(--rule); }

.app-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.35rem 1.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}

.app-row .app-name { font-size: 1.12rem; font-weight: 500; letter-spacing: -0.02em; }
.app-row .app-desc { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.app-row .app-meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.app-row:hover .app-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

.empty {
  padding: 2.5rem 0 2.8rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
}
.empty p { margin: 0 0 0.6em; max-width: var(--measure); }
.empty p:last-child { margin-bottom: 0; }

/* ── proje grupları ──────────────────────── */

.group { padding-top: 2.7rem; }
.group + .group { padding-top: 3.4rem; }

.group > .label {
  display: block;
  margin-bottom: 1rem;
}

/* ── sayfa altı ──────────────────────────── */

.pagenav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding: 2.2rem 0 0;
  border-top: 1px solid var(--rule);
}

.pagenav a {
  text-decoration: none;
  font-size: 0.93rem;
  color: var(--muted);
  transition: color 0.18s ease;
}
.pagenav a:hover { color: var(--ink); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-top: clamp(2.5rem, 8vh, 5rem);
  padding: 1.3rem 0 3rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.foot a { text-decoration: none; transition: color 0.18s ease; }
.foot a:hover { color: var(--ink); }

/* ── 404 ─────────────────────────────────── */

.center-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem;
}
