:root {
  --bg: #fdfcfa;
  --text: #1c1b19;
  --muted: #6e6b66;
  --faint: #a19d96;
  --rule: #e6e2dc;
  --box: #f1eee9;
  --link: #b8430e;
  --maxw: 680px;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161514;
    --text: #e8e5e0;
    --muted: #a09c95;
    --faint: #6f6b65;
    --rule: #2c2a27;
    --box: #211f1d;
    --link: #f08a4b;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #161514;
  --text: #e8e5e0;
  --muted: #a09c95;
  --faint: #6f6b65;
  --rule: #2c2a27;
  --box: #211f1d;
  --link: #f08a4b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- header ---------- */
.site-header .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 8px;
}
.brand { color: var(--text); text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav { display: flex; align-items: baseline; gap: 18px; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
.theme-btn {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
  padding: 0;
}
.theme-btn:hover { color: var(--text); }

/* ---------- typography ---------- */
h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.01em; }
h2 {
  font-size: 1.05rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .85em; }

.section { margin-top: 56px; }

/* ---------- giriş ---------- */
.intro { padding-top: 40px; }
.photo {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
}
.role { color: var(--muted); margin-bottom: 24px; }
.now { color: var(--muted); font-size: .95rem; }
.now b { color: var(--text); font-weight: 600; }
.contact { color: var(--muted); font-size: .95rem; margin-top: 20px; }

.email { color: var(--text); font-family: var(--mono); font-size: .88em; }

/* ---------- oyunlar ---------- */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
.game { color: var(--text); text-decoration: none; display: block; }
.game .shot {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: var(--box);
  margin-bottom: 10px;
}
.game:hover .title { text-decoration: underline; text-underline-offset: 3px; }
.game .title { font-weight: 600; }
.game .sub { color: var(--muted); font-size: .92rem; line-height: 1.5; }

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shot .placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: .8rem;
}

/* ---------- liste satırları (projeler, sertifikalar, eğitim) ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 10px 0;
}
.row .when { color: var(--faint); font-family: var(--mono); font-size: .82rem; padding-top: 4px; }
.row .what { min-width: 0; }
.row .name { font-weight: 600; }
.row a.name { color: var(--text); text-decoration: none; }
.row a.name:hover { text-decoration: underline; }
.row .desc { color: var(--muted); font-size: .94rem; line-height: 1.55; }
.row .stack { color: var(--faint); font-size: .85rem; font-family: var(--mono); margin-top: 2px; }
.status { color: var(--link); font-size: .8rem; font-weight: 400; margin-left: 6px; }

.skills { margin: 0; }
.skills div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 4px 0; }
.skills dt { color: var(--muted); }
.skills dd { margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 24px; font-size: .95rem; }
.filter {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 6px; }

/* ---------- oyun oynatıcı ---------- */
.player {
  position: relative;
  width: 100%;
  max-height: 80vh;
  margin: 28px auto 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #111;
}
.player.portrait { max-width: 400px; }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.player img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.player .play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  padding: 10px 22px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 4px;
  background: rgba(0,0,0,.35);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.player .play-btn:hover { background: rgba(0,0,0,.55); }
.player .msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #ccc;
  font-size: .95rem;
}
.player:fullscreen { border-radius: 0; max-height: none; max-width: none; background: #000; }
/* Dikey oyun tam ekranda bütün monitöre yayılmasın: 9:16 kalsın, ortalansın. Daha az piksel = daha akıcı. */
.player.portrait:fullscreen iframe { height: 100%; width: auto; aspect-ratio: 9 / 16; max-width: 100%; margin: 0 auto; }

.player-bar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.note { color: var(--muted); font-size: .9rem; margin: 12px 0; font-style: italic; }

/* ---------- proje sayfası ---------- */
.back { display: inline-block; margin: 36px 0 20px; font-size: .92rem; }
.project-meta { color: var(--faint); font-family: var(--mono); font-size: .82rem; margin-bottom: 6px; }
.project-links { margin-top: 4px; }
.project-links a { margin-right: 14px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: .95rem;
}
.pager .next { margin-left: auto; text-align: right; }

/* ---------- makale ---------- */
.article { margin-top: 40px; }
.article h2 { border: 0; padding: 0; font-size: 1.25rem; margin: 32px 0 10px; }
.article h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.article img { max-width: 100%; border-radius: 4px; }
.article blockquote {
  margin: 16px 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--rule);
  color: var(--muted);
}
.article pre {
  background: var(--box);
  padding: 14px;
  border-radius: 4px;
  overflow-x: auto;
  font-size: .85rem;
}
.article code { font-family: var(--mono); font-size: .88em; }

/* ---------- 404 ---------- */
.empty { padding: 80px 0; }

/* ---------- footer ---------- */
.site-footer .wrap {
  margin-top: 72px;
  padding-top: 16px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: .85rem;
}

/* ---------- telefon ---------- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .intro { padding-top: 28px; }
  .games { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; gap: 0; }
  .row .when { padding-top: 0; }
  .skills div { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
  .nav { gap: 12px; font-size: .9rem; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 4px; }
}
