:root {
  --bg: #0b0d10;
  --band: #10141a;
  --surface: #161b22;
  --surface-2: #1d242e;
  --text: #eef1f4;
  --muted: #9aa3ad;
  --line: #262d37;
  --accent: #2fe0b4;
  --accent-ink: #06211b;
  --ok: #2fe0b4;
  --yt: #ff3d3d;
  --radius: 16px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f8fa;
    --band: #eceff3;
    --surface: #ffffff;
    --surface-2: #f1f4f7;
    --text: #15191e;
    --muted: #5b6672;
    --line: #dde3ea;
    --accent: #0f9d7a;
    --accent-ink: #ffffff;
    --ok: #0f9d7a;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 5.5vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 20px; }
p { margin: 0 0 14px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.urdu { font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", serif; direction: rtl; line-height: 2; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Fraunces", Georgia, serif; font-size: 22px; font-weight: 600; }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand b { color: var(--accent); font-weight: inherit; }
.nav { display: flex; gap: 18px; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1px solid var(--line); background: var(--surface); transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.yt { background: var(--yt); color: #fff; border-color: transparent; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 720px) { .nav { display: none; } }

/* hero */
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding: 64px 0 48px; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 56ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 28px; }
.stats { display: flex; flex-wrap: wrap; gap: 28px; padding: 0; margin: 0; list-style: none; }
.stats b { display: block; font-family: "Fraunces", Georgia, serif; font-size: 30px; font-weight: 600; line-height: 1; }
.stats span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.portrait { position: relative; }
.portrait img { border-radius: 24px; aspect-ratio: 1; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -30px rgba(0,0,0,.7); }
.portrait .tag { position: absolute; left: 16px; bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.portrait .tag b { display: block; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } .portrait { max-width: 420px; } }

/* sections */
section.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head p { margin: 0; color: var(--muted); max-width: 60ch; }

/* video grids */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.video { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.video:hover { transform: translateY(-3px); border-color: var(--accent); }
.video .thumb { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.video .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video .thumb .dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.video .thumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .15s; background: rgba(0,0,0,.25); }
.video:hover .play { opacity: 1; }
.video .play svg { width: 56px; height: 56px; fill: #fff; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.video .body { padding: 14px 16px 16px; }
.video h3 { font-family: "Inter", system-ui, sans-serif; font-size: 15.5px; font-weight: 600; line-height: 1.35; margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video .meta { font-size: 13px; color: var(--muted); }
.featured { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* topics */
.topics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.topic { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; display: block; transition: transform .15s, border-color .15s; border-top: 4px solid var(--t, var(--accent)); }
.topic:hover { transform: translateY(-3px); border-color: var(--t, var(--accent)); }
.topic .ico { font-size: 28px; margin-bottom: 8px; line-height: 1; }
.topic h3 { font-size: 18px; margin-bottom: 4px; }
.topic p { font-size: 14px; color: var(--muted); margin: 0; }

/* courses */
.courses { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.course { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.course .n { font-family: "Fraunces", Georgia, serif; font-size: 40px; font-weight: 600; color: var(--accent); line-height: 1; }
.course p { color: var(--muted); font-size: 15px; flex: 1; }
.course .btn { align-self: flex-start; }

/* about */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about ul { padding-left: 20px; color: var(--muted); }
.about li { margin-bottom: 6px; }
.quote { border-left: 4px solid var(--accent); padding: 8px 0 8px 20px; font-family: "Fraunces", Georgia, serif; font-size: 22px; line-height: 1.4; margin: 20px 0; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

/* links / footer */
.links { display: flex; flex-wrap: wrap; gap: 12px; }
footer { padding: 36px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 20; }

/* books */
.books { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.book.lead-book { grid-column: 1 / -1; grid-template-columns: 200px 1fr; gap: 28px; }
.book.lead-book .cover { width: 200px; }
@media (max-width: 720px) { .book.lead-book { grid-template-columns: 120px 1fr; gap: 18px; } .book.lead-book .cover { width: 120px; } }
@media (max-width: 420px) { .books { grid-template-columns: 1fr; } }
.book { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: start; }
.book .cover { width: 120px; height: auto; aspect-ratio: 451 / 720; border-radius: 8px; object-fit: cover; box-shadow: 0 12px 30px -14px rgba(0,0,0,.8); }
.book .cover.placeholder { display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--surface-2), var(--band)); border: 1px dashed var(--line); color: var(--muted); font-family: "Fraunces", Georgia, serif; font-size: 15px; line-height: 1.3; }
.book h3 { margin-bottom: 4px; }
.book .sub { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.book p { font-size: 15px; color: var(--muted); }
.book .links { margin-top: 6px; }
.book .btn { font-size: 14px; padding: 8px 14px; }
.book.soon { opacity: .85; }
.soon-link { opacity: .55; cursor: default; pointer-events: none; }
@media (max-width: 420px) { .book { grid-template-columns: 1fr; } .book .cover { width: 140px; } }
