:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #16161d;
  --muted: #5b5b6b;
  --border: #e4e4ee;
  --accent: #8b5cf6;
  --accent-2: #ec4899;
  --accent-soft: rgba(139, 92, 246, 0.1);
  --code-bg: #f0eff7;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b10;
    --surface: #15151d;
    --text: #ececf3;
    --muted: #a1a1b3;
    --border: #262633;
    --accent: #a78bfa;
    --accent-2: #f472b6;
    --accent-soft: rgba(167, 139, 250, 0.12);
    --code-bg: #1d1d28;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0b10;
  --surface: #15151d;
  --text: #ececf3;
  --muted: #a1a1b3;
  --border: #262633;
  --accent: #a78bfa;
  --accent-2: #f472b6;
  --accent-soft: rgba(167, 139, 250, 0.12);
  --code-bg: #1d1d28;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
}

/* Page nav */
.page-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 16px 0 0;
}
.page-nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.page-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Content */
main { padding: 8px 0 48px; }

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 28px 0 6px;
  letter-spacing: -0.02em;
}
.updated {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 28px;
}
h2 {
  font-size: 20px;
  margin: 36px 0 10px;
  padding-top: 8px;
  letter-spacing: -0.01em;
}
h3 { font-size: 16px; margin: 20px 0 6px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }

.summary {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 20px;
}
.summary ul { margin: 0; padding-left: 20px; }
.summary li:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 16px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
th { font-weight: 600; background: var(--code-bg); }
tr:last-child td { border-bottom: 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 0 0 14px;
}
.card h3 { margin-top: 0; }

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin: 0 0 24px;
}
.contact-card a.email { font-size: 18px; font-weight: 700; }

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 0 10px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 18px;
  list-style-position: outside;
}
details > div { padding: 0 18px 4px; }

code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 0.92em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  padding: 20px 0 32px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Language visibility: English is the no-JS default */
[data-lang-block="tr"] { display: none; }
html[lang="tr"] [data-lang-block="tr"] { display: revert; }
html[lang="tr"] [data-lang-block="en"] { display: none; }

@media (max-width: 520px) {
  h1 { font-size: 26px; }
  body { font-size: 15.5px; }
}
