:root {
  --bg: #ffffff;
  --bg-alt: #f6f8f7;
  --surface: #ffffff;
  --fg: #14181b;
  --muted: #5a646d;
  --line: #e3e7ea;
  --accent: #00bf63;       /* channel brand green: fills, marks */
  --accent-ink: #007a45;   /* darker green for text on light bg (contrast) */
  --accent-soft: #e6f8ee;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgb(16 24 32 / 0.04), 0 8px 24px rgb(16 24 32 / 0.06);
  --radius: 14px;
  --sans: "Ubuntu", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Ubuntu Mono", ui-monospace, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1012;
    --bg-alt: #12171a;
    --surface: #161b1f;
    --fg: #e8ecef;
    --muted: #9ba6b0;
    --line: #242b31;
    --accent-ink: #3fd88b;
    --accent-soft: #0f2a1d;
    --on-accent: #04170d;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

:root[data-theme="dark"] {
  --bg: #0d1012;
  --bg-alt: #12171a;
  --surface: #161b1f;
  --fg: #e8ecef;
  --muted: #9ba6b0;
  --line: #242b31;
  --accent-ink: #3fd88b;
  --accent-soft: #0f2a1d;
  --on-accent: #04170d;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.icon {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px;
  font: 500 16px var(--sans); white-space: nowrap;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #00a956; }
.btn-ghost { border-color: var(--line); color: var(--fg); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-small { height: 38px; padding: 0 16px; font-size: 15px; }
.btn-yt { background: var(--fg); color: var(--bg); }
.btn-yt .icon { fill: currentColor; stroke: none; width: 14px; height: 14px; }
.btn-yt:hover { opacity: .88; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 17px var(--sans); color: var(--fg); margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--on-accent); font: 700 14px var(--mono); letter-spacing: .02em;
}
.nav-links { display: flex; gap: 6px; }
.nav-links a { color: var(--muted); font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--fg); background: var(--bg-alt); }

/* theme toggle: moon in light mode, sun in dark mode */
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg);
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-top: 80px; padding-bottom: 88px;
}
.eyebrow {
  display: inline-block; font: 500 14px var(--sans); color: var(--accent-ink);
  background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 20px;
}
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 20px; }
.lead { font-size: 19px; color: var(--muted); max-width: 52ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* video cards */
.video-card { display: block; color: var(--fg); }
.thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.video-card:hover .thumb img { transform: scale(1.03); }
.play {
  position: absolute; inset: 0; margin: auto; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(0 0 0 / .55); color: #fff;
  transition: background .2s;
}
.play .icon { fill: currentColor; stroke: none; width: 24px; height: 24px; margin-left: 3px; }
.video-card:hover .play { background: var(--accent); }
.video-meta { padding-top: 12px; }
.video-label { font: 500 13px var(--sans); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.video-title { font-weight: 500; margin-top: 4px; }

.hero-video .thumb { box-shadow: var(--shadow); }
.hero-video .play { width: 72px; height: 72px; }
.hero-video .video-title { font-size: 19px; }

/* sections */
.section { padding: 88px 0; }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -0.01em; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 18px; }
.section-head p + p { margin-top: 12px; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; max-width: none; }
.section-head-row > div { max-width: 640px; }

/* videos */
.sub-head { font-size: 15px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.recent { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.recent .play { width: 48px; height: 48px; }
.recent .play .icon { width: 20px; height: 20px; }

.series { display: grid; gap: 12px; margin-bottom: 56px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; font-weight: 500; font-size: 17px;
}
.group summary::-webkit-details-marker { display: none; }
.group summary:hover { background: var(--bg-alt); }
/* keep the hover fill inside the rounded box when the box does not clip (hover preview) */
.group summary { border-radius: var(--radius) var(--radius) 0 0; }
.group:not([open]) summary { border-radius: var(--radius); }
.group-range { font: 400 15px var(--mono); color: var(--accent-ink); white-space: nowrap; }
.group summary .icon { margin-left: auto; color: var(--muted); transition: transform .2s; }
.group[open] summary .icon { transform: rotate(180deg); }
.episodes { list-style: none; margin: 0; padding: 4px 10px 12px; border-top: 1px solid var(--line); }
.episodes a {
  display: flex; gap: 14px; align-items: baseline; padding: 10px 12px; border-radius: 8px; color: var(--fg); font-size: 16px;
}
.episodes a:hover { background: var(--bg-alt); }
.episodes .num { font: 400 15px var(--mono); color: var(--muted); min-width: 3ch; }
.episodes .len { margin-left: auto; padding-left: 12px; font: 400 14px var(--mono); color: var(--muted); }

/* about: text + YouTube profile photo */
.about { display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.about .section-head { margin-bottom: 0; }
.about-photo {
  flex: none; width: 240px; height: 240px; border-radius: 50%; object-fit: cover;
  margin: 8px; /* room for the ring so it stays inside the page gutter */
  box-shadow: 0 0 0 8px var(--accent-soft), var(--shadow);
}

/* playlist cards (home) */
.lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.list-card { display: block; color: var(--fg); }
.list-card:hover .thumb img { transform: scale(1.03); }
.list-card:hover .play { background: var(--accent); }
.list-card .play { width: 48px; height: 48px; }
.list-card .play .icon { width: 20px; height: 20px; }
.list-card h3 { font-size: 19px; margin: 14px 0 4px; }
.list-card p { color: var(--muted); font-size: 16px; }

/* playlist page */
.list-page { padding-top: 48px; }
.list-page h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 12px; }
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.back:hover { color: var(--fg); }
.back .icon { width: 18px; height: 18px; }
/* list page rows: number, thumbnail, title, duration */
.episodes.with-thumbs a { align-items: center; padding: 10px 12px; }
.lesson-thumb { flex: none; width: 160px; aspect-ratio: 16 / 9; position: relative; }
.lesson-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 8px; border: 1px solid var(--line); background: var(--bg-alt);
}
.episodes.with-thumbs .lesson-title { font-weight: 500; }
.episodes a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Hover preview: only the image grows, over the list, without moving other rows.
   The box keeps its small size and is the only hover target; the grown image ignores
   the pointer, so moving down to the next thumbnail switches the preview at once.
   Mouse/trackpad only; on touch screens a tap opens the video. */
@media (hover: hover) {
  .group:has(.with-thumbs) { overflow: visible; }
  .lesson-thumb img {
    position: relative; transform-origin: left center; pointer-events: none;
    transition: transform .2s ease, box-shadow .2s ease;
  }
  .lesson-thumb:hover img,
  .episodes.with-thumbs a:focus-visible .lesson-thumb img {
    z-index: 5; transform: scale(2.5);
    box-shadow: 0 12px 32px rgb(0 0 0 / .28);
  }
}

/* list page layout: curriculum + sticky playlist card */
/* the heading gets its own row so the card's top lines up with the curriculum box */
.course {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; column-gap: 32px; align-items: start;
  grid-template-areas: "head ." "main card";
}
.course-head { grid-area: head; }
.course-main { grid-area: main; }
.course-card { grid-area: card; }
.course-card {
  position: sticky; top: 92px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.course-card:empty { display: none; }
.course-card .play { width: 56px; height: 56px; }
.card-actions { display: grid; gap: 10px; margin-top: 16px; }
.card-actions .btn { justify-content: center; }
.card-sections { display: grid; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.card-sections .sub-head { font-size: 13px; margin-bottom: 6px; }
.card-sections a { color: var(--fg); font-size: 15px; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; }
.card-sections a:hover { background: var(--bg-alt); }
.course-main .group { scroll-margin-top: 92px; }

/* a list without sections: lessons sit directly in the box */
.group > .episodes:first-child { border-top: 0; padding-top: 10px; }

/* contact */
.contact {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 40px; border-radius: 20px; background: var(--bg-alt); border: 1px solid var(--line);
}
.contact h2 { font-size: 30px; margin-bottom: 8px; }
.contact p { color: var(--muted); font-size: 18px; }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
#listeler, #hakkimda, #iletisim { padding-top: 0; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 15px; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--fg); }

/* responsive */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; padding-bottom: 64px; }
  .recent { grid-template-columns: 1fr 1fr; }
  .recent > :nth-child(3) { display: none; }
  .lists { grid-template-columns: 1fr 1fr; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .about { flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
  .about-photo { width: 160px; height: 160px; }
  .course { grid-template-columns: 1fr; grid-template-areas: "card" "head" "main"; }
  .course-card { position: static; margin-bottom: 32px; }
  .card-sections { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 0; gap: 0; }   /* keep only the mark on phones */
  .section { padding: 64px 0; }
  .lead { font-size: 17px; }
  .recent, .lists { grid-template-columns: 1fr; }
  .recent > :nth-child(3) { display: block; }
  .contact { padding: 28px 22px; }
  .group summary { padding: 16px; font-size: 16px; }
  .lesson-thumb { width: 104px; }
  .episodes.with-thumbs a { gap: 10px; padding: 8px 6px; font-size: 15px; }
}
