:root {
  color-scheme: dark;
  --bg: #070b16;
  --surface: #0f172a;
  --surface-2: #131e34;
  --surface-3: #18243c;
  --text: #f7f9fc;
  --muted: #aeb8ca;
  --subtle: #7f8ba2;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --blue: #6598ff;
  --blue-strong: #4f82e8;
  --aqua: #55d6c2;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --content: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 360px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(79, 130, 232, 0.11), transparent);
  pointer-events: none;
}
a { color: #9bbcff; text-underline-offset: 0.2em; }
a:hover { color: #c5d7ff; }
button, input { font: inherit; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: #071024;
  font-weight: 800;
}
.skip-link:focus { top: 1rem; }
.wrap { width: min(var(--content), calc(100% - 32px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 22, 0.94);
}
.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #4f82e8;
  box-shadow: 0 10px 28px rgba(79, 130, 232, 0.24);
  font-size: 1.05rem;
  font-weight: 900;
}
.brand-copy small {
  display: block;
  color: var(--subtle);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  padding: 0.55rem 0.72rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.site-nav a[aria-current="page"] { background: rgba(101, 152, 255, 0.13); color: #cfe0ff; }
.lang-btn {
  min-width: 46px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 850;
}
.lang-btn:hover { border-color: rgba(101, 152, 255, 0.55); }
.lang-btn:focus-visible, .site-nav a:focus-visible, .footer-links a:focus-visible, .quick-card:focus-visible {
  outline: 3px solid rgba(101, 152, 255, 0.65);
  outline-offset: 3px;
}

.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 3rem; align-items: end; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  color: #a9c4ff;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 20px; height: 2px; border-radius: 99px; background: var(--aqua); }
h1 { max-width: 760px; margin: 0; font-size: clamp(2.55rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: -0.06em; }
.lead { max-width: 760px; margin: 1.4rem 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.22rem); line-height: 1.65; }
.meta { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.5rem; }
.pill { padding: 0.4rem 0.7rem; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.035); color: #c9d1df; font-size: 0.78rem; font-weight: 700; }
.equation-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.equation-card::after {
  content: "7 × 6";
  position: absolute;
  right: -0.6rem;
  bottom: -2.8rem;
  color: rgba(101, 152, 255, 0.1);
  font-size: 6.8rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}
.number-tile { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 14px; background: var(--blue-strong); color: #fff; font-size: 1.45rem; font-weight: 900; transform: rotate(-4deg); }
.equation-card h2 { position: relative; z-index: 1; margin: 1.35rem 0 0.35rem; font-size: 1.35rem; letter-spacing: -0.03em; }
.equation-card p { position: relative; z-index: 1; margin: 0; color: var(--muted); }

.page-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 1.6rem; align-items: start; padding-bottom: 5rem; }
.toc { position: sticky; top: 94px; padding: 0.9rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-title { padding: 0.3rem 0.55rem 0.65rem; color: var(--subtle); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.11em; text-transform: uppercase; }
.toc a { display: block; padding: 0.43rem 0.55rem; border-radius: 9px; color: var(--muted); font-size: 0.82rem; font-weight: 650; line-height: 1.4; text-decoration: none; }
.toc a:hover { background: rgba(101, 152, 255, 0.1); color: #dce7ff; }
.document { padding: clamp(1.4rem, 5vw, 3.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.document section { scroll-margin-top: 100px; }
.document section + section { padding-top: 2.2rem; }
.document h2 { margin: 0 0 0.65rem; color: #fff; font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.25; letter-spacing: -0.035em; }
.document h3 { margin: 1.25rem 0 0.35rem; font-size: 1.02rem; }
.document p { margin: 0.65rem 0; color: #c2cbda; }
.document ul, .document ol { margin: 0.7rem 0; padding-left: 1.4rem; color: #c2cbda; }
.document li + li { margin-top: 0.42rem; }
.notice { margin: 1.1rem 0; padding: 1rem 1.1rem; border-left: 3px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; background: rgba(101, 152, 255, 0.09); color: #dbe6fb; }
.small-note { margin-top: 2rem !important; color: var(--subtle) !important; font-size: 0.84rem; }

.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin: 1rem 0 2.4rem; }
.quick-card { min-height: 118px; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); color: var(--text); text-decoration: none; }
.quick-card:hover { border-color: rgba(101, 152, 255, 0.45); background: var(--surface-3); color: var(--text); }
.quick-card span { display: block; color: var(--aqua); font-size: 0.75rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.quick-card strong { display: block; margin-top: 0.45rem; font-size: 1rem; line-height: 1.35; }
.steps { counter-reset: steps; padding: 0 !important; list-style: none; }
.steps li { position: relative; min-height: 44px; padding-left: 3.3rem; }
.steps li::before { counter-increment: steps; content: counter(steps); position: absolute; left: 0; top: 0.05rem; width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid rgba(101, 152, 255, 0.4); border-radius: 9px; background: rgba(101, 152, 255, 0.1); color: #bcd0ff; font-size: 0.82rem; font-weight: 850; }
.contact-box { margin-top: 2.4rem; padding: clamp(1.2rem, 4vw, 2rem); border: 1px solid rgba(85, 214, 194, 0.3); border-radius: var(--radius); background: #10232c; }
.contact-box h2 { margin-bottom: 0.4rem; }
.contact-link { display: inline-flex; margin-top: 0.65rem; padding: 0.72rem 0.95rem; border-radius: 10px; background: var(--aqua); color: #061a1d; font-weight: 850; text-decoration: none; }
.contact-link:hover { background: #83e5d6; color: #061a1d; }

.site-footer { border-top: 1px solid var(--line); padding: 1.7rem 0 2.4rem; color: var(--subtle); font-size: 0.84rem; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

[data-lang="tr"] { display: none; }
body.lang-tr [data-lang="en"] { display: none; }
body.lang-tr [data-lang="tr"] { display: revert; }
body.lang-tr span[data-lang="tr"], body.lang-tr a[data-lang="tr"], body.lang-tr strong[data-lang="tr"] { display: inline; }

@media (max-width: 900px) {
  .hero-grid, .page-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
  .toc { display: none; }
  .equation-card { min-height: 190px; }
}
@media (max-width: 720px) {
  .nav-shell { display: grid; grid-template-columns: 1fr auto; padding: 0.65rem 0 0.5rem; }
  .brand-copy small { display: none; }
  .nav-actions { display: contents; }
  .lang-btn { grid-column: 2; grid-row: 1; }
  .site-nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .site-nav a { text-align: center; }
  .quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wrap { width: min(var(--content), calc(100% - 22px)); }
  .nav-shell { min-height: 64px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { padding-top: 2.7rem; }
  .document { padding: 1.25rem; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
