/* Dalga ve Optik Laboratuvarı — Quatressence teması, yeşil vurgu */
:root {
  --bg: #ebe3cf;
  --panel: #f4eee0;
  --ink: #1f1d18;
  --muted: #6e6754;
  --line: #d2c7ac;
  --grid: rgba(70, 55, 25, .07);
  --c: #2f7d4f;
  --radius: 8px;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101214; --panel: #16191c; --ink: #e9e7e0; --muted: #8c8a83;
  --line: #2a2e33; --grid: rgba(255, 255, 255, .035); --c: #5cc98a; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh; display: flex; flex-direction: column;
  font-family: var(--sans); color: var(--ink); line-height: 1.5;
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 16px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }

.bar { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.logo img { width: 40px; height: 40px; object-fit: contain; }
.logo .sub { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: 14px; font-weight: 500; letter-spacing: 0; }

main { flex: 1; padding-top: 40px; padding-bottom: 64px; }
h1 { margin: 6px 0 28px; font-size: clamp(28px, 4vw, 42px); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }

/* Ders listesi (site ana sayfası) */
.dersler {
  list-style: none; margin: 0; padding: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); border-top: 4px solid var(--c);
}
.dersler li { border-bottom: 1px solid var(--line); }
.dersler li:last-child { border-bottom: 0; }
.dersler a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 16px 20px; text-decoration: none; }
.dersler .ad { font-size: 19px; font-weight: 600; }
.dersler .src, .src { color: var(--muted); font-size: 13px; }
.dersler .src { grid-column: 1; }
.dersler .go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--c); transition: transform .15s; }
.dersler a:focus-visible { outline: 2px solid var(--c); outline-offset: -2px; }
@media (hover: hover) { .dersler a:hover .ad { color: var(--c); } .dersler a:hover .go { transform: translateX(4px); } }

.dersler li.soon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 20px; }
.dersler li.soon .ad { color: var(--muted); font-weight: 500; }
.dersler li.soon small { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.back { display: inline-block; font-size: 14px; color: var(--muted); text-decoration: none; margin-bottom: 8px; }
.back:hover { color: var(--ink); }

/* Deney listesi */
.deneyler {
  list-style: none; margin: 0; padding: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  border-top: 4px solid var(--c);
}
.deneyler li {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: baseline; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.deneyler li:last-child { border-bottom: 0; }
.deneyler .no { font-family: var(--mono); font-size: 12px; color: var(--c); }
.deneyler .ad { font-size: 17px; font-weight: 500; }
.deneyler small { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }

footer { padding: 24px 0 32px; border-top: 2px solid var(--line); color: var(--muted); font-size: 13px; }

/* Tema anahtarı (MaLeTiLabs ile aynı) */
.theme-switch {
  position: relative; flex: none; width: 66px; height: 36px; padding: 0; cursor: pointer;
  border-radius: 999px; border: 2px solid var(--muted); background: #f6c945; transition: background .25s, border-color .25s;
}
.theme-switch:hover { border-color: var(--ink); }
.theme-switch:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
.theme-switch .knob {
  position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: #fff7d6; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .28s cubic-bezier(.4, .2, .2, 1.2), background .25s;
}
.theme-switch svg { width: 19px; height: 19px; grid-area: 1 / 1; transition: opacity .2s, transform .28s; }
.theme-switch .sun { color: #f2a900; }
.theme-switch .moon { color: #cfe2ff; opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .theme-switch { background: #8ec2ff; border-color: #F20707; }
:root[data-theme="dark"] .theme-switch .knob { transform: translateX(30px); background: #22324a; }
:root[data-theme="dark"] .theme-switch .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .theme-switch .moon { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .theme-switch .knob, .theme-switch svg { transition: none; } }

@media (max-width: 820px) {
  .bar { padding: 0 16px; height: 64px; }
  .logo { font-size: 18px; gap: 10px; }
  .logo img { width: 32px; height: 32px; }
  .logo img.wordmark { width: auto; height: 38px; }
  .logo .sub { display: none; }
  .theme-switch { transform: scale(.85); }
  main { padding-top: 24px; }
  .deneyler li { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 16px; }
  .deneyler .no { grid-column: 1 / -1; }
}

/* Açık tema şimdilik kapalı (tema.js: ACIK_TEMA): tema anahtarı gizli */
[data-theme-toggle] { display: none !important; }

/* Quatressence ana sayfasına dönüş */
.bar .home-link { margin-left: auto; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.bar .home-link:hover { color: var(--ink); }
.bar nav + .home-link { margin-left: 20px; }
@media (max-width: 820px) { .bar nav + .home-link { margin-left: auto; } .bar .home-link { font-size: 13px; } }


/* Geri dön düğmeleri: görünür hap düğme */
.bar nav a, .bar .home-link, .back {
  display: inline-flex; align-items: center; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.2; text-decoration: none; white-space: nowrap;
}
.bar nav a:hover, .bar .home-link:hover, .back:hover { border-color: var(--ink); color: var(--ink); }
.bar nav + .home-link { margin-left: 10px; }
.back { margin-bottom: 14px; }
@media (max-width: 820px) {
  .bar nav { display: flex; margin-left: auto; }
  .bar nav + .home-link { display: none; }   /* telefonda yalnız bağlamdaki geri düğmesi */
  .bar nav a, .bar .home-link, .back { padding: 6px 11px; font-size: 13px; }
}
