/* Layout: tek sütun, geniş tipografi; projeler bir "dizin" listesi olarak, zaman çizelgesi gerçek repo tarihlerinden çizilir. */
:root {
  --paper: #f2f3f6;
  --surface: #ffffff;
  --ink: #12151f;
  --muted: #5b6172;
  --line: #d9dce4;
  --accent: #2b44e0;
  --accent-soft: #e3e7fd;
  --live: #0f8a5f;
  --bar-archive: #b9bfcd;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4.5vw, 3rem);
  --step-4: clamp(2.75rem, 8vw, 6rem);

  --wrap: 72rem;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d0f15; --surface: #151822; --ink: #e9ebf2; --muted: #9298a9;
    --line: #262a37; --accent: #8193ff; --accent-soft: #1d2346; --live: #3fcf96; --bar-archive: #3a3f50;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d0f15; --surface: #151822; --ink: #e9ebf2; --muted: #9298a9;
  --line: #262a37; --accent: #8193ff; --accent-soft: #1d2346; --live: #3fcf96; --bar-archive: #3a3f50;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.85rem; }
.brand { font-family: var(--font-mono); font-weight: 500; text-decoration: none; font-size: 0.95rem; }
.brand b { color: var(--accent); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.nav a:hover { color: var(--ink); }
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 0.8rem; font-family: var(--font-mono);
  padding: 0.3rem 0.6rem; border-radius: 999px; cursor: pointer;
}
@media (max-width: 640px) { .nav { gap: 0.8rem; } .nav a, .theme-btn { white-space: nowrap; } .nav a { font-size: 0.85rem; } .theme-btn { padding-inline: 0.5rem; font-size: 0.72rem; } .nav a:not(.keep) { display: none; } }

/* Hero */
.hero { padding-block: clamp(3rem, 9vw, 6.5rem) 2.5rem; }
.hero .label { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.hero h1 { font-size: var(--step-4); font-weight: 700; margin-top: 1.25rem; max-width: 14ch; font-variation-settings: "wdth" 85; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-intro { margin-top: 1.5rem; max-width: 62ch; font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.facts { display: flex; flex-wrap: wrap; gap: 0.5rem 2.25rem; margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.fact { display: grid; gap: 0.1rem; }
.fact strong { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.fact span { color: var(--muted); font-size: 0.875rem; }

/* Sections */
.section { padding-block: 3.5rem; scroll-margin-top: 1.5rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.section-head h2 { font-size: var(--step-3); font-weight: 650; }
.section-head p { color: var(--muted); max-width: 46ch; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  font: inherit; font-size: 0.85rem; padding: 0.35rem 0.8rem; border-radius: 999px; cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Project index */
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { border-bottom: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 14rem; align-items: center; gap: 1.25rem; }
.row-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 5.5rem 9rem minmax(0, 1fr) minmax(0, 10rem) 1.25rem;
  gap: 1.25rem; align-items: center;
  padding-block: 1.1rem; text-decoration: none;
  transition: background 0.2s ease, padding 0.2s ease;
}
.row-link:hover { background: var(--surface); padding-inline: 0.75rem; }
.row-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.row-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.row-thumb.phone img { object-position: 50% 8%; }
.row-thumb.none { display: grid; place-items: center; font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; color: var(--muted); }
.live {
  justify-self: start; display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.8rem; text-decoration: none; white-space: nowrap;
  padding: 0.5rem 0.8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
}
.live::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--live); }
.live:hover { border-color: var(--accent); color: var(--accent); }
.row-year { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.row-main { min-width: 0; }
.row-name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; }
.row-tag { margin-top: 0.3rem; color: var(--muted); }
.row-meta { min-width: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: flex-end; }
.row-arrow { color: var(--muted); transition: transform 0.2s ease, color 0.2s ease; }
.row-link:hover .row-arrow { transform: translateX(4px); color: var(--accent); }
.version { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent); background: var(--accent-soft); padding: 0.1rem 0.45rem; border-radius: 4px; letter-spacing: 0; }
.pill { font-size: 0.75rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.55rem; color: var(--muted); white-space: nowrap; }
.empty { padding: 2rem 0; color: var(--muted); }
@media (max-width: 960px) {
  .row-link { grid-template-columns: 9rem minmax(0, 1fr) 1.25rem; gap: 0.35rem 1.25rem; }
  .row-year { grid-column: 2; align-self: end; }
  .row-thumb { grid-column: 1; grid-row: 1 / span 3; }
  .row-main, .row-meta { grid-column: 2; }
  .row-meta { justify-content: flex-start; }
  .row-arrow { grid-row: 2; grid-column: 3; }
}
@media (max-width: 640px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .row-link { grid-template-columns: minmax(0, 1fr) 1.25rem; }
  .row-thumb { grid-column: 1 / -1; grid-row: auto; margin-bottom: 0.5rem; }
  .row-thumb.none { display: none; }
  .row-year { grid-column: 1 / -1; }
  .row-main, .row-meta { grid-column: 1; }
  .row-arrow { grid-row: auto; grid-column: 2; }
  .live { margin-bottom: 1.1rem; min-height: 2.75rem; }
}

/* Archive grid */
.archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.archive a { background: var(--paper); padding: 1.25rem; text-decoration: none; display: grid; gap: 0.4rem; align-content: start; transition: background 0.2s ease; }
.archive a:hover { background: var(--surface); }
.archive h3 { font-size: var(--step-1); font-weight: 600; }
.archive p { color: var(--muted); font-size: 0.925rem; }

/* Timeline */
.timeline { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; overflow-x: auto; }
.tl { min-width: 36rem; display: grid; grid-template-columns: 11rem 1fr; row-gap: 0.45rem; column-gap: 1rem; align-items: center; }
.tl-axis { position: relative; height: 1.4rem; }
.tl-axis span { position: absolute; top: 0; padding-left: 0.35rem; border-left: 1px solid var(--muted); font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.tl-name { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.tl-name:hover { color: var(--accent); }
.tl-track { position: relative; height: 0.9rem; }
.tl-bar { position: absolute; top: 0; bottom: 0; min-width: 6px; border-radius: 3px; background: var(--bar-archive); }
.tl-bar.active { background: var(--accent); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-size: 0.8rem; color: var(--muted); }
.tl-legend i { display: inline-block; width: 0.8rem; height: 0.5rem; border-radius: 2px; margin-right: 0.4rem; vertical-align: middle; background: var(--bar-archive); }
.tl-legend i.active { background: var(--accent); }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1.5rem; counter-reset: step; }
.process li { counter-increment: step; display: grid; gap: 0.5rem; align-content: start; padding-top: 1rem; border-top: 2px solid var(--ink); }
.process li::before { content: counter(step, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent); }
.process h3 { font-size: var(--step-1); font-weight: 600; }
.process p { color: var(--muted); font-size: 0.925rem; }
.agents { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-family: var(--font-mono); font-size: 0.85rem; }
.agents .agent { border: 1px solid var(--line); background: var(--surface); padding: 0.3rem 0.7rem; border-radius: 6px; }
.agents .agent.lead { border-color: var(--accent); color: var(--accent); }
.agents .sep { color: var(--muted); }

/* Stack */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 2rem; }
.stack h3 { font-size: var(--step-0); font-family: var(--font-mono); font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 0.75rem; }
.stack ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack li { font-size: 0.9rem; padding: 0.25rem 0.65rem; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.stack li small { color: var(--muted); font-family: var(--font-mono); margin-left: 0.3rem; }

/* Contact */
.contact { padding-block: 4rem 5rem; }
.contact h2 { font-size: var(--step-4); font-weight: 700; font-variation-settings: "wdth" 85; }
.contact p { margin-top: 1rem; color: var(--muted); font-size: var(--step-1); max-width: 50ch; }
.contact-links { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.1rem; border-radius: 999px; text-decoration: none; font-weight: 500; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: inherit; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }

.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; color: var(--muted); font-size: 0.85rem; }

/* Detail view */
.detail { padding-block: 2.5rem 4rem; }
.back { display: inline-flex; gap: 0.4rem; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.back:hover { color: var(--accent); }
.detail-head { margin-top: 2rem; display: grid; gap: 1rem; }
.detail-head h1 { font-size: var(--step-4); font-weight: 700; font-variation-settings: "wdth" 85; }
.detail-head .lead { font-size: var(--step-1); color: var(--muted); max-width: 52ch; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 2rem; }
.meta div { background: var(--surface); padding: 0.9rem 1rem; display: grid; gap: 0.2rem; min-width: 0; }
.meta dd { margin: 0; font-weight: 500; }
.meta dt { margin: 0; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; }
.status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--bar-archive); }
.status.active::before { background: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 25%, transparent); }
.detail-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 3rem; margin-top: 3rem; }
@media (max-width: 820px) { .detail-body { grid-template-columns: minmax(0, 1fr); gap: 2rem; } }
.detail-body h2 { font-size: var(--step-1); font-weight: 600; margin-bottom: 1rem; }
.detail-body .summary { font-size: 1.075rem; line-height: 1.7; max-width: 65ch; }
.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.highlights li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: 0.5rem; }
.highlights li::before { content: "→"; color: var(--accent); font-family: var(--font-mono); }
.visit { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; color: var(--muted); font-size: 0.9rem; }
.shots { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
.shots.wides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots.wides figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.shots.phones { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.shots figure { margin: 0; min-width: 0; }
.shots figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.shots figcaption strong { display: block; color: var(--ink); font-weight: 600; }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: zoom-in; transition: border-color 0.2s ease; }
.phones .shot { border-radius: 18px; }
.shot:hover { border-color: var(--accent); }
.shot img { display: block; width: 100%; height: auto; }
@media (max-width: 820px) {
  .shots.phones { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 46%); overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.75rem; }
  .shots.phones figure { scroll-snap-align: start; }
}
@media (max-width: 640px) { .shots.wides { grid-template-columns: minmax(0, 1fr); } }
.box { border: 0; padding: 0; margin: 0; width: 100%; height: 100%; max-width: none; max-height: none; background: rgba(8, 9, 13, 0.94); color: #e9ebf2; }
.box[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.box::backdrop { background: transparent; }
.box-img { display: grid; place-items: center; min-height: 0; padding: 1rem 1rem 0; cursor: zoom-out; }
.box-img img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; border-radius: 8px; }
.box-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem; padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px)); font-size: 0.9rem; }
.box-bar button { min-height: 2.75rem; min-width: 2.75rem; padding: 0 0.9rem; border: 1px solid #3a3f50; border-radius: 999px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.soon { margin-top: 2.5rem; padding: 1.25rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: grid; gap: 0.2rem; }
.pager a:last-child { text-align: right; margin-left: auto; }
.pager strong { font-family: var(--font-display); font-size: var(--step-1); }
