/* ============================================================================
   PORTAL PEMBELAJARAN DAC — STYLE
   Tema: soft minimal · ungu muda & biru · sesuai untuk pelajar Gen-Z
   ========================================================================== */

/* ------------------------------- VARIABLES ------------------------------- */
:root {
  --bg: #f8f8ff;
  --bg-soft: #f0f1fc;
  --surface: #ffffff;
  --surface-2: #fbfbff;

  --purple: #7c6cf0;
  --purple-deep: #5b4bd6;
  --purple-soft: #ece9fd;
  --blue: #3f8cf2;
  --blue-deep: #2a6fd6;
  --blue-soft: #e7f1fe;
  --gradient: linear-gradient(135deg, #8f7bf7 0%, #5aa7f5 100%);
  --gradient-soft: linear-gradient(135deg, rgba(143, 123, 247, 0.12), rgba(90, 167, 245, 0.12));

  --text: #232040;
  --text-soft: #55517a;
  --text-muted: #8a87a8;
  --border: rgba(124, 108, 240, 0.14);
  --border-strong: rgba(124, 108, 240, 0.26);

  --shadow-xs: 0 1px 3px rgba(90, 80, 190, 0.06);
  --shadow-sm: 0 4px 14px rgba(90, 80, 190, 0.07);
  --shadow-md: 0 12px 34px rgba(90, 80, 190, 0.12);
  --shadow-lg: 0 24px 60px rgba(80, 70, 190, 0.18);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;

  --nav-h: 72px;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ------------------------------- THEME COLORS ---------------------------- */
.c-purple { --c: #7c6cf0; --c2: #a78bfa; --c-soft: #ece9fd; }
.c-blue   { --c: #3f8cf2; --c2: #6fb5ff; --c-soft: #e7f1fe; }
.c-indigo { --c: #5b5ef0; --c2: #8f8ffd; --c-soft: #e9e9fd; }
.c-sky    { --c: #21aef2; --c2: #7fd0ff; --c-soft: #e2f5fe; }

/* -------------------------------- RESET ---------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(143, 123, 247, 0.08), transparent 60%),
    radial-gradient(900px 400px at 0% 20%, rgba(63, 140, 242, 0.06), transparent 55%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
}

::selection {
  background: var(--purple-soft);
  color: var(--purple-deep);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------ LAYOUT ----------------------------------- */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.view {
  display: none;
  padding: calc(var(--nav-h) + 28px) 0 90px;
  animation: fadeUp 0.45s ease both;
}

.view.active {
  display: block;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------- NAVBAR ---------------------------------- */
#site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 16px rgba(124, 108, 240, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.nav-link.active {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 4px 12px rgba(124, 108, 240, 0.32);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.lang-toggle button {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  transition: all 0.2s;
}

.lang-toggle button.active {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 3px 8px rgba(124, 108, 240, 0.3);
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.icon-btn:hover {
  color: var(--purple-deep);
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.icon-btn.is-saved,
.saved-btn.active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
}

.icon-btn-lg {
  width: 48px;
  height: 48px;
  border-radius: 15px;
}

.icon-btn.is-saved svg {
  fill: currentColor;
}

.badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 8px rgba(63, 140, 242, 0.4);
}

.menu-btn {
  display: none;
}

/* ------------------------------- BUTTONS --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 18px rgba(124, 108, 240, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 108, 240, 0.42);
}

.btn-ghost {
  color: var(--purple-deep);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-soon {
  opacity: 0.75;
  background: var(--bg-soft);
  color: var(--text-soft);
  box-shadow: none;
  border: 1px dashed var(--border-strong);
}

.btn-soon:hover {
  transform: none;
  box-shadow: none;
}

/* -------------------------------- HERO ----------------------------------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding-top: 26px;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}

.blob-a {
  width: 420px;
  height: 420px;
  background: rgba(143, 123, 247, 0.35);
  top: -120px;
  right: -80px;
}

.blob-b {
  width: 320px;
  height: 320px;
  background: rgba(63, 140, 242, 0.3);
  bottom: -60px;
  left: -90px;
}

.hero-copy {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-deep);
  background: var(--purple-soft);
  border: 1px solid rgba(124, 108, 240, 0.2);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 18px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 16.5px;
  color: var(--text-soft);
  max-width: 520px;
  margin-bottom: 28px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, border-color 0.25s;
  max-width: 560px;
}

.search-bar:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 108, 240, 0.14), var(--shadow-md);
}

.search-bar > svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 15px;
  color: var(--text);
  padding: 9px 0;
  min-width: 0;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-sm {
  max-width: 340px;
  border-radius: 14px;
  padding-left: 14px;
}

.search-sm input {
  font-size: 14px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}

.stat strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.stat span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Hero visual (decorative player) */
.hero-visual {
  position: relative;
  min-height: 420px;
}

.mplayer {
  position: absolute;
  inset: 30px 0 auto 0;
  border-radius: 26px;
  padding: 26px;
  color: #fff;
  background: linear-gradient(140deg, var(--c, #8f7bf7), var(--c2, #5aa7f5));
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
  animation: floaty 6s ease-in-out infinite;
}

@keyframes floaty {
  0%, 100% {
    transform: rotate(1.5deg) translateY(0);
  }
  50% {
    transform: rotate(1.5deg) translateY(-9px);
  }
}

.mplayer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 42px;
}

.mplayer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.mplayer-time {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.mplayer-mid {
  display: grid;
  place-items: center;
  margin-bottom: 42px;
}

.mplayer-play {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--purple-deep);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.mplayer-bottom strong {
  display: block;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 2px;
}

.mplayer-bottom > span {
  font-size: 13px;
  opacity: 0.88;
}

.mplayer-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  margin-top: 16px;
  overflow: hidden;
}

.mplayer-bar i {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 999px;
  background: #fff;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 11px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}

.float-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
}

.float-card small {
  font-size: 11.5px;
  color: var(--text-muted);
}

.fc-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.fc-note {
  bottom: 70px;
  left: -18px;
  animation: floaty 7s ease-in-out 1s infinite;
}

.fc-check {
  top: -6px;
  right: -6px;
  animation: floaty 7s ease-in-out 0.5s infinite;
}

.fc-check .fc-ico {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  z-index: -1;
}

.orb-a {
  width: 90px;
  height: 90px;
  background: linear-gradient(135deg, #f0abfc, #c4b5fd);
  top: -16px;
  right: 40px;
  opacity: 0.7;
}

.orb-b {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #bfdbfe, #a5b4fc);
  bottom: 40px;
  right: 90px;
  opacity: 0.8;
}

/* ------------------------------- SECTIONS -------------------------------- */
.section {
  margin-top: 84px;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 8px;
}

.sec-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sec-head p {
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 560px;
}

/* --------------------------------- GRIDS --------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.grid-courses {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* --------------------------------- CARDS --------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.card-title {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.card-topic {
  font-size: 13.5px;
  color: var(--text-soft);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.meta svg {
  color: var(--purple);
  flex-shrink: 0;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* chips inside cards */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--c, var(--purple));
  background: var(--c-soft, var(--purple-soft));
  white-space: nowrap;
}

.chip-sm {
  font-size: 11px;
  padding: 3px 8px;
}

/* Video card */
.vcard {
  cursor: pointer;
}

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  background: linear-gradient(140deg, var(--c, #8f7bf7), var(--c2, #5aa7f5));
  overflow: hidden;
}

.thumb-dots {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.55) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}

.play-orb {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: var(--purple-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease;
}

.play-orb svg {
  transform: translateX(1px);
}

.thumb:hover .play-orb {
  transform: scale(1.1);
}

.type-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(4px);
}

.dur-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(10, 8, 30, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}

/* Doc card */
.doc-card {
  position: relative;
}

.doc-ico {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 26px 20px 10px;
  color: var(--c, var(--purple));
  background: linear-gradient(180deg, var(--c-soft, var(--purple-soft)), transparent);
}

.doc-ico > svg {
  width: 40px;
  height: 40px;
}

.fmt {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 7px;
  background: #e63e55;
  color: #fff;
}

.py-card {
  position: relative;
  padding-top: 0;
}

.py-card .doc-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

.py-card .doc-card:hover {
  transform: none;
  box-shadow: none;
}

.py-card .doc-ico {
  border-radius: 0 0 0 0;
}

.py-session {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f472b6, #a78bfa);
  box-shadow: 0 4px 12px rgba(244, 114, 182, 0.35);
}

/* Subject card */
.subject-card {
  padding: 24px 22px 20px;
}

.subj-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.subj-ico {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--c, var(--purple));
  background: var(--c-soft, var(--purple-soft));
}

.subj-code {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 5px 10px;
  border-radius: 8px;
}

.subject-card h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.subj-sem {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--purple);
  margin: 2px 0 8px;
}

.subj-desc {
  font-size: 13.5px;
  color: var(--text-soft);
}

.count-pill {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: 6px 13px;
}

/* ------------------------- FILTER CHIPS & TOOLBAR ------------------------ */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.chip-f {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.chip-f:hover {
  border-color: var(--border-strong);
  color: var(--purple-deep);
  transform: translateY(-1px);
}

.chip-f.active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 5px 14px rgba(124, 108, 240, 0.3);
}

.chip-f.c-purple:not(.active):hover,
.chip-f.c-blue:not(.active):hover,
.chip-f.c-indigo:not(.active):hover,
.chip-f.c-sky:not(.active):hover {
  color: var(--c);
  background: var(--c-soft);
  border-color: var(--c);
}

.view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.result-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ------------------------------ EMPTY STATE ------------------------------ */
.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.empty-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: var(--purple-soft);
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ---------------------------- LECTURER CARD ------------------------------ */
.lecturer-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: linear-gradient(120deg, var(--purple-soft), var(--blue-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 34px;
  flex-wrap: wrap;
}

.lecturer-avatar {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.lecturer-info {
  flex: 1;
  min-width: 240px;
}

.lecturer-info h3 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lecturer-info p {
  color: var(--text-soft);
  font-size: 14.5px;
  margin-top: 6px;
}

/* -------------------------------- ABOUT ---------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-xs);
}

.about-card.main {
  text-align: center;
}

.about-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 32px;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-md);
}

.about-card.main h3 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.about-role {
  color: var(--purple);
  font-weight: 700;
  font-size: 14.5px;
}

.about-poly {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.about-bio {
  text-align: left;
  color: var(--text-soft);
  font-size: 14.5px;
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-contact {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--text-soft);
}

.about-contact a,
.about-contact span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.about-contact svg {
  color: var(--purple);
  flex-shrink: 0;
}

.about-contact a:hover {
  color: var(--purple-deep);
}

.about-socials {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple-deep);
  background: var(--purple-soft);
  transition: all 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.about-side {
  display: grid;
  gap: 24px;
}

.about-card h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 16px;
}

.cred-list {
  list-style: none;
  display: grid;
  gap: 14px;
}

.cred-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cred-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

.cred-list strong {
  display: block;
  font-size: 14px;
}

.cred-list small {
  color: var(--text-muted);
  font-size: 12px;
}

.exp-big {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.exp-sub {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* -------------------------------- MODAL ---------------------------------- */
#modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}

#modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 20, 55, 0.55);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.modal {
  position: relative;
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

.modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
}

.modal-video {
  aspect-ratio: 16 / 9;
  background: #14122b;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-video-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 40px 30px;
  color: #fff;
  background: linear-gradient(140deg, #2a2450, #3d3a6e);
}

.soon-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gradient);
  box-shadow: 0 10px 30px rgba(124, 108, 240, 0.45);
  margin-bottom: 6px;
}

.modal-video-soon h3 {
  font-size: 19px;
  font-weight: 800;
}

.modal-video-soon p {
  font-size: 13.5px;
  opacity: 0.8;
  max-width: 380px;
}

.modal-doc {
  position: relative;
  display: grid;
  place-items: center;
  padding: 44px 20px;
  color: var(--c, var(--purple));
  background: linear-gradient(180deg, var(--c-soft, var(--purple-soft)), var(--surface));
}

.modal-doc .doc-ico {
  background: none;
  padding: 0;
}

.modal-doc .doc-ico > svg {
  width: 60px;
  height: 60px;
}

.fmt-lg {
  position: static;
  margin-top: 12px;
  font-size: 12px;
  padding: 6px 12px;
}

.modal-body {
  padding: 24px 28px 28px;
}

.modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.modal-topic {
  color: var(--purple);
  font-weight: 700;
  font-size: 14px;
  margin-top: 2px;
}

.modal-desc {
  color: var(--text-soft);
  font-size: 14.5px;
  margin: 10px 0 14px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.modal-hint {
  flex: 1;
  font-size: 13px;
  color: var(--text-muted);
}

/* -------------------------------- TOAST ---------------------------------- */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translate(-50%, 80px);
  z-index: 300;
  background: #232040;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------- FOOTER --------------------------------- */
#site-footer {
  margin-top: 40px;
  background: linear-gradient(160deg, #232040, #2c2a58);
  color: #cfcdea;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 24px 40px;
}

.f-brand .brand-logo {
  margin-bottom: 14px;
}

.f-brand strong {
  display: block;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.f-brand p {
  font-size: 13.5px;
  margin-top: 8px;
  max-width: 260px;
  opacity: 0.75;
}

.f-col h5 {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.f-col a,
.f-col span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  padding: 5px 0;
  opacity: 0.75;
  transition: opacity 0.2s, transform 0.2s;
}

.f-col a:hover {
  opacity: 1;
  transform: translateX(3px);
  color: #fff;
}

.f-col svg {
  color: #a5b4fc;
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  opacity: 0.6;
}

.footer-bottom > span {
  margin: 0 auto;
}

/* ------------------------------ RESPONSIVE ------------------------------- */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-visual {
    display: none;
  }

  .hero-sub {
    max-width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 18px;
    display: none;
    box-shadow: var(--shadow-md);
  }

  #site-nav.menu-open .nav-links {
    display: flex;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 15px;
  }

  .menu-btn {
    display: grid;
  }

  .nav-links {
    margin: 0;
  }
}

@media (max-width: 640px) {
  .view {
    padding-top: calc(var(--nav-h) + 12px);
  }

  .brand-text em {
    display: none;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 10px 14px;
  }

  .section {
    margin-top: 60px;
  }

  .lecturer-card {
    padding: 24px 20px;
    justify-content: center;
    text-align: center;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 44px 24px 30px;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .modal-body {
    padding: 20px;
  }

  #toast {
    max-width: calc(100vw - 40px);
    white-space: normal;
    text-align: center;
  }
}

/* ============================================================================
   MOD PENTADBIR (ADMIN EDITOR)
   ========================================================================== */

#admin-app {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
}

#admin-app.open {
  display: block;
}

.admin {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: fadeIn 0.25s ease both;
}

/* --- Gate --- */
.admin-gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(160deg, #232040, #3a3567);
}

.admin-gate-card {
  width: min(400px, 100%);
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.admin-gate-card .brand-logo {
  margin: 0 auto 18px;
}

.admin-gate-card h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-gate-card > p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 8px 0 20px;
}

.admin-gate-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px 6px 4px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.admin-gate-input:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 108, 240, 0.14);
}

.admin-gate-input svg {
  color: var(--text-muted);
}

.admin-gate-input input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font-size: 15px;
  padding: 10px 0;
  min-width: 0;
}

.admin-gate-err {
  color: #e5484d !important;
  font-weight: 700;
  font-size: 13px !important;
  margin: 10px 0 0 !important;
}

.admin-gate-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

/* --- Head --- */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 26px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-logo {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 6px 16px rgba(124, 108, 240, 0.35);
}

.admin-title strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-title small {
  color: var(--text-muted);
  font-size: 12.5px;
}

.admin-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-head-actions label.btn {
  cursor: pointer;
}

/* --- Tabs --- */
.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 26px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

.admin-tab {
  padding: 10px 18px;
  border-radius: 12px 12px 0 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--purple-deep);
  background: var(--purple-soft);
}

.admin-tab.active {
  color: var(--purple-deep);
  border-bottom-color: var(--purple);
  background: var(--bg);
}

/* --- Body --- */
.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 26px 40px;
}

.adm-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.adm-count {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.adm-list {
  display: grid;
  gap: 10px;
}

.adm-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.adm-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.adm-row-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--c, var(--purple));
  background: var(--c-soft, var(--purple-soft));
}

.adm-row-main {
  flex: 1;
  min-width: 0;
}

.adm-row-main strong {
  display: block;
  font-size: 14.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-row-main small {
  color: var(--text-muted);
  font-size: 12.5px;
}

.adm-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.adm-empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
}

/* --- Buttons (small / danger) --- */
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn.danger {
  color: #d5384f;
  border-color: rgba(213, 56, 79, 0.3);
}

.btn.danger:hover {
  background: #fdecee;
  border-color: rgba(213, 56, 79, 0.5);
  color: #b02a3e;
}

/* --- Form sheet --- */
.adm-form-sheet {
  position: absolute;
  inset: 0;
  display: none;
  background: rgba(24, 20, 55, 0.45);
  backdrop-filter: blur(6px);
}

.adm-form-sheet.open {
  display: flex;
  justify-content: flex-end;
}

.adm-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.adm-sheet-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.adm-sheet-title h3 {
  font-size: 16.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-sheet-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.adm-sheet-body {
  padding: 24px;
  overflow-y: auto;
}

.adm-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.adm-field.adm-wide {
  grid-column: 1 / -1;
}

.adm-field > span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
}

.adm-field .req {
  color: #e5484d;
  font-style: normal;
}

.adm-field input,
.adm-field select,
.adm-field textarea {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.adm-field textarea {
  resize: vertical;
  min-height: 64px;
}

.adm-field input:focus,
.adm-field select:focus,
.adm-field textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 108, 240, 0.14);
}

.adm-error {
  grid-column: 1 / -1;
  color: #d5384f;
  font-size: 13px;
  font-weight: 700;
  background: #fdecee;
  border: 1px solid rgba(213, 56, 79, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
}

/* --- Foot --- */
.admin-foot {
  padding: 12px 26px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
  .admin-head {
    padding: 14px 16px;
  }

  .admin-body {
    padding: 18px 14px 40px;
  }

  .adm-row {
    flex-wrap: wrap;
  }

  .adm-row .chip {
    display: none;
  }

  .adm-row-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .adm-form-sheet.open {
    justify-content: center;
  }

  .adm-fields {
    grid-template-columns: 1fr;
  }
}

/* --------------------------- REDUCED MOTION ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}
