/* ============ Brand fonts: Bahij TheSansArabic ============ */
@font-face { font-family: 'Bahij'; src: url('/fonts/Bahij-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Bahij'; src: url('/fonts/Bahij-Plain.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bahij'; src: url('/fonts/Bahij-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Bahij'; src: url('/fonts/Bahij-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Bahij'; src: url('/fonts/Bahij-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* ============ Tokens (from brand PSDs) ============ */
:root {
  --purple: #694FBC;
  --purple-600: #5D43B0;
  --purple-800: #4A348F;
  --purple-900: #3D2D74;
  --purple-950: #261C4C;
  --purple-50: #F1EEFA;
  --purple-100: #E4DEF6;
  --gold: #CDA061;
  --gold-soft: #F6ECDD;
  --bg: #F6F5FA;
  --surface: #FFFFFF;
  --text: #1E1838;
  --muted: #6B6585;
  --line: #E7E3F3;
  --ok: #1F9D6B;
  --ok-soft: #E3F5EE;
  --bad: #D64550;
  --bad-soft: #FCE8EA;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(61, 45, 116, .06), 0 8px 24px rgba(61, 45, 116, .07);
  --shadow-lg: 0 20px 50px rgba(61, 45, 116, .18);
  --max: 1180px;
  --brand-grad: linear-gradient(135deg, var(--purple-900) 0%, var(--purple-600) 55%, var(--purple) 100%);
  --arcs: repeating-radial-gradient(circle at 0% 100%, transparent 0 90px, rgba(255, 255, 255, .055) 90px 170px);
  --glow: radial-gradient(60% 55% at 25% 115%, rgba(205, 160, 97, .75), rgba(205, 160, 97, 0) 70%);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: 'Bahij', 'Segoe UI', Tahoma, sans-serif; font-size: 17px; line-height: 1.8;
  color: var(--text); background: var(--bg); text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-900); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 800; color: var(--text); }
p { margin: 0 0 1em; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ============ Buttons / chips ============ */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center; font: inherit; font-weight: 700; font-size: 16px;
  padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: .2s ease; white-space: nowrap;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-900); color: #fff; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--purple-950); }
.btn-gold:hover { background: #ddb173; color: var(--purple-950); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--purple); }
.btn-ghost:hover { background: var(--purple-50); }
.btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-light:hover { background: rgba(255,255,255,.22); color: #fff; }
.btn-sm { font-size: 14px; padding: .45em 1em; }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.chip { display: inline-flex; align-items: center; gap: .35em; font-size: 13px; font-weight: 700; padding: .2em .8em; border-radius: 999px; background: var(--purple-50); color: var(--purple); }
.chip.gold { background: var(--gold-soft); color: #8a6227; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============ Header ============ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 16px; height: 74px; }
.identity { display: flex; align-items: center; gap: 12px; color: var(--text); }
.identity img { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--purple-100); object-fit: cover; }
.identity .names { display: flex; flex-direction: column; line-height: 1.25; }
.identity .ar { font-weight: 700; font-size: 15px; white-space: nowrap; }
.identity .en { font-size: 13px; color: var(--muted); text-align: start; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; }
.nav a { color: var(--text); font-weight: 700; font-size: 15px; padding: .45em .75em; white-space: nowrap; border-radius: 999px; transition: .15s; }
.nav a:hover { background: var(--purple-50); color: var(--purple); }
.nav a.active { background: var(--purple); color: #fff; }
.menu-btn { display: none; background: var(--purple-50); color: var(--purple); border: 0; width: 44px; height: 44px; border-radius: 12px; cursor: pointer; }
.menu-btn .icon { width: 24px; height: 24px; }

.lang-btn { display: inline-flex; align-items: center; gap: 6px; padding: .4em .9em; border-radius: 999px; border: 1.5px solid var(--purple-100); color: var(--purple); font-weight: 700; font-size: 14px; white-space: nowrap; transition: .15s; }
.lang-btn:hover { background: var(--purple); border-color: var(--purple); color: #fff; }
html[dir="ltr"] .flip-x { transform: scaleX(-1); }
html[lang="en"] .hero h1 { letter-spacing: -1px; }
@media (max-width: 1140px) {
  .lang-btn { margin-inline-start: auto; }
  .menu-btn { display: inline-grid; place-items: center; }
  .nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; gap: 2px; padding: 12px 16px 20px; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateY(-120%); transition: transform .25s ease; z-index: -1;
  }
  .nav.open { transform: none; }
  .nav a { padding: .75em 1em; border-radius: 12px; }
}

/* ============ Brand panel (purple + arcs + gold glow) ============ */
.brand-panel { position: relative; color: #fff; background: var(--glow), var(--arcs), var(--brand-grad); overflow: hidden; isolation: isolate; }
.brand-panel h1, .brand-panel h2, .brand-panel h3 { color: #fff; }
.brand-panel a:not(.btn) { color: #fff; }
.hashtags { font-size: 14px; color: rgba(255,255,255,.85); display: flex; flex-wrap: wrap; gap: 4px 14px; }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero .grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 900; line-height: 1.2; margin: 14px 0 18px; letter-spacing: -.5px; }
.hero .lead { font-size: clamp(17px, 2vw, 20px); color: rgba(255,255,255,.88); max-width: 34em; }
.hero .who { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); padding: .35em 1em .35em .45em; border-radius: 999px; font-size: 15px; font-weight: 700; }
.hero .who .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(205,160,97,.25); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .portrait { position: relative; justify-self: center; width: min(380px, 80vw); aspect-ratio: 1; }
.hero .portrait::before { content: ''; position: absolute; inset: -22px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.25); animation: spin 60s linear infinite; }
.hero .portrait img { width: 100%; height: 100%; border-radius: 50%; border: 8px solid rgba(255,255,255,.95); box-shadow: 0 30px 60px rgba(20,10,50,.35); object-fit: cover; background: #fff; }
.hero .portrait .badge { position: absolute; bottom: 8%; inset-inline-start: -6%; background: #fff; color: var(--text); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 14px; line-height: 1.3; }
.hero .portrait .badge .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--gold-soft); color: #8a6227; display: grid; place-items: center; }
.hero .portrait .badge small { display: block; color: var(--muted); font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero .portrait::before { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 860px) {
  .hero { padding: 40px 0 72px; }
  .hero .grid { grid-template-columns: 1fr; gap: 36px; }
  .hero .portrait { order: -1; width: min(240px, 62vw); }
  .hero .portrait .badge { display: none; }
}

/* Stats */
.stats { margin-top: -48px; position: relative; z-index: 2; }
.stats .row { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.stat { padding: 22px 16px; text-align: center; border-inline-start: 1px solid var(--line); }
.stat:first-child { border-inline-start: 0; }
.stat b { display: block; font-size: 34px; font-weight: 900; color: var(--purple); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 14px; font-weight: 700; }
@media (max-width: 640px) { .stats .row { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-inline-start: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Page header (inner pages) */
.page-head { padding: 56px 0 64px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 48px); font-weight: 900; margin: 8px 0 8px; }
.page-head p { color: rgba(255,255,255,.85); max-width: 40em; margin: 0; font-size: 18px; }
.crumbs { font-size: 14px; color: rgba(255,255,255,.75); display: flex; gap: 8px; align-items: center; }
.crumbs a { color: rgba(255,255,255,.9) !important; }

/* ============ Sections ============ */
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0; font-weight: 900; }
.section-head .kicker { color: var(--purple); font-weight: 700; font-size: 15px; display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.section-head .kicker::before { content: ''; width: 24px; height: 3px; border-radius: 3px; background: var(--gold); }
.more-link { font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* ============ Cards ============ */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease; }
a.card, .card.hover { color: inherit; }
a.card:hover, .card.hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 20px; margin: 0; }
.card .meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.card .meta span { display: inline-flex; gap: 5px; align-items: center; }
.card p { color: var(--muted); margin: 0; font-size: 15.5px; }
.card .foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--purple); font-size: 15px; }

/* Cover art: real image or brand placeholder */
.cover { aspect-ratio: 16 / 9; background: var(--glow), var(--arcs), var(--brand-grad); position: relative; overflow: hidden; display: grid; place-items: center; color: #fff; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover .ph { padding: 18px 24px; font-weight: 900; font-size: 22px; line-height: 1.35; text-align: center; text-wrap: balance; }
.cover .tag { position: absolute; top: 12px; inset-inline-start: 12px; }
.cover .play { position: absolute; width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--purple); display: grid; place-items: center; box-shadow: var(--shadow-lg); bottom: 14px; inset-inline-end: 14px; }

/* ============ Timeline (LinkedIn-like) ============ */
.timeline { position: relative; display: flex; flex-direction: column; gap: 18px; }
.tl-item { display: grid; grid-template-columns: 56px 1fr; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.tl-logo { width: 56px; height: 56px; border-radius: 14px; background: var(--purple-50); color: var(--purple); display: grid; place-items: center; overflow: hidden; }
.tl-logo img { width: 100%; height: 100%; object-fit: cover; }
.tl-logo .icon { width: 26px; height: 26px; }
.tl-item h3 { font-size: 20px; margin: 0; }
.tl-item .co { font-weight: 700; color: var(--text); }
.tl-item .when { color: var(--muted); font-size: 14.5px; }
.tl-item .desc { margin-top: 10px; color: #3d3756; font-size: 16px; }
.tl-item .desc ul { margin: 0; padding-inline-start: 1.2em; }
.tl-item .chips { margin-top: 12px; }
.now { color: var(--ok); font-weight: 700; }
.tl-item.vol .tl-logo { background: var(--gold-soft); color: #8a6227; }

/* Experience page: section tabs */
.exp-tabs { position: sticky; top: 74px; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.exp-tabs .container { display: flex; gap: 6px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; max-width: 900px; }
.exp-tabs .container::-webkit-scrollbar { display: none; }
.exp-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: .45em 1em; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 15px; white-space: nowrap; transition: .15s; }
.exp-tabs a:hover { color: var(--purple); background: var(--purple-50); }
.exp-tabs a.active { background: var(--purple); color: #fff; }
.exp-tabs .count { font-size: 12px; background: rgba(105,79,188,.12); color: inherit; border-radius: 99px; padding: 0 7px; line-height: 1.6; }
.exp-tabs a.active .count { background: rgba(255,255,255,.25); }
.exp-section[id] { scroll-margin-top: 150px; }
.exp-section + .exp-section { margin-top: 56px; }

/* Accreditations */
.acc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acc-item { display: grid; grid-template-columns: 56px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.acc-item .tl-logo { background: var(--brand-grad); color: #fff; }
.acc-item h3 { font-size: 18px; margin: 0 0 2px; }
.acc-item .co { font-weight: 700; color: var(--purple); font-size: 15px; }
.acc-item .when { color: var(--muted); font-size: 14px; }
.acc-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 680px) { .acc-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .tl-item { grid-template-columns: 42px 1fr; gap: 12px; padding: 18px 16px; } .tl-logo { width: 42px; height: 42px; border-radius: 11px; } .tl-logo .icon { width: 20px; height: 20px; } }

/* ============ Prose (posts/about) ============ */
.prose { font-size: 18.5px; line-height: 2; color: #2a2445; }
.prose h2 { font-size: 28px; margin-top: 1.4em; font-weight: 900; }
.prose h3 { font-size: 23px; margin-top: 1.3em; }
.prose h4 { font-size: 19px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--purple); }
.prose blockquote { margin: 1.4em 0; padding: 16px 22px; background: var(--purple-50); border-inline-start: 5px solid var(--purple); border-radius: 14px; border-start-start-radius: 0; border-end-start-radius: 0; font-weight: 700; color: var(--purple-900); }
.prose code { background: var(--purple-50); padding: .1em .4em; border-radius: 6px; font-size: .9em; direction: ltr; unicode-bidi: isolate; }
.prose img { border-radius: 14px; margin: 1em 0; }
.prose strong { color: var(--purple-900); }

.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.article .paper { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 4vw, 48px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.article .cover-lg { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.author-card { text-align: center; padding: 26px 20px; }
.author-card img { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 10px; border: 4px solid var(--purple-100); }
.author-card .en { color: var(--muted); direction: ltr; font-size: 14px; }
@media (max-width: 960px) { .article { grid-template-columns: 1fr; } .sidebar { position: static; } }

/* ============ Certificates ============ */
.cert .thumb { aspect-ratio: 4 / 3; background: var(--purple-50); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); }
.cert .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cert .thumb .seal { width: 84px; height: 84px; border-radius: 50%; background: var(--brand-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 8px var(--purple-100); }
.cert .thumb .seal .icon { width: 38px; height: 38px; }
.cert .issuer { color: var(--purple); font-weight: 700; font-size: 15px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(20, 12, 45, .85); display: none; place-items: center; z-index: 100; padding: 20px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: 12px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; top: 16px; inset-inline-end: 16px; background: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: grid; place-items: center; }

/* ============ Course page ============ */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.player { background: #0e0920; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; padding: 20px; background: var(--glow), var(--arcs), var(--brand-grad); }
.lesson-info { margin-top: 20px; }
.lesson-info h2 { font-size: 26px; }
.lesson-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; flex-wrap: wrap; }
.lessons { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; position: sticky; top: 96px; }
.lessons .head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.lessons .head h3 { font-size: 18px; margin: 0 0 8px; }
.progress { height: 8px; background: var(--purple-50); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--purple)); border-radius: 99px; transition: width .4s; }
.progress-label { font-size: 13px; color: var(--muted); margin-top: 6px; }
.lessons ol { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow: auto; }
.lessons li button { width: 100%; text-align: start; display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; }
.lessons li button:hover { background: var(--purple-50); }
.lessons li button.active { background: var(--purple); color: #fff; }
.lessons li button.active .n { background: #fff; color: var(--purple); }
.lessons li .n { width: 32px; height: 32px; border-radius: 50%; background: var(--purple-50); color: var(--purple); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.lessons li.done .n { background: var(--ok); color: #fff; }
.lessons li .t { font-weight: 700; font-size: 15px; line-height: 1.45; }
.lessons li .d { font-size: 13px; opacity: .75; direction: ltr; }
.lessons .quiz-link { display: flex; gap: 10px; align-items: center; margin: 4px 8px 10px; padding: 12px; border-radius: 12px; background: var(--gold-soft); color: #7a531b; font-weight: 700; }
@media (max-width: 960px) { .course-layout { grid-template-columns: 1fr; } .lessons { position: static; } }

/* Quiz */
.quiz { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: clamp(20px, 4vw, 40px); }
.quiz .q { padding: 20px 0; border-bottom: 1px dashed var(--line); }
.quiz .q:last-of-type { border-bottom: 0; }
.quiz .q h4 { font-size: 19px; display: flex; gap: 10px; }
.quiz .q h4 .num { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--purple); color: #fff; display: grid; place-items: center; font-size: 14px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 2px solid var(--line); border-radius: 14px; margin-top: 10px; cursor: pointer; transition: .15s; font-size: 16px; }
.opt:hover { border-color: var(--purple-100); background: var(--purple-50); }
.opt input { accent-color: var(--purple); width: 18px; height: 18px; flex: none; }
.opt:has(input:checked) { border-color: var(--purple); background: var(--purple-50); }
.opt.right, .opt.right:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong, .opt.wrong:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
[id] { scroll-margin-top: 96px; }
.q-status { font-size: 14px; font-weight: 700; margin-top: 8px; }
.q-status.ok { color: var(--ok); } .q-status.bad { color: var(--bad); }
.result { border-radius: var(--radius); padding: 28px; margin-bottom: 24px; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.result.pass { background: var(--ok-soft); border: 2px solid var(--ok); }
.result.fail { background: var(--bad-soft); border: 2px solid var(--bad); }
.score-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(0,0,0,.07) 0); }
.score-ring b { width: 92px; height: 92px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: var(--c); }
.result.pass .score-ring { --c: var(--ok); } .result.fail .score-ring { --c: var(--bad); }
@media (max-width: 560px) { .result { grid-template-columns: 1fr; text-align: center; justify-items: center; } }

/* ============ Forms ============ */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, input[type=text], input[type=email], input[type=url], input[type=password], input[type=month], input[type=date], input[type=number], textarea, select {
  font: inherit; font-size: 16px; padding: .7em 1em; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--text); width: 100%; transition: .15s;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.8; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px var(--purple-50); }
.hp { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; display: flex; gap: 10px; align-items: center; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--bad-soft); color: var(--bad); }
.alert.info { background: var(--gold-soft); color: #7a531b; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: start; }
.contact-card { padding: 28px; border-radius: var(--radius); }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 14px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list .ic { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,.14); display: grid; place-items: center; flex: none; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; transition: .2s; }
.socials a:hover { background: var(--gold); color: var(--purple-950); }
.socials.dark a { background: var(--purple-50); color: var(--purple); }
.socials.dark a:hover { background: var(--purple); color: #fff; }

/* About */
.about-grid { display: grid; grid-template-columns: 340px 1fr; gap: 36px; align-items: start; }
.profile-card { text-align: center; padding: 30px 24px; position: sticky; top: 96px; }
.profile-card img { width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 16px; border: 6px solid var(--purple-100); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; } .profile-card { position: static; } }

/* CTA band */
.cta { border-radius: 28px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta h2 { font-size: clamp(24px, 3.4vw, 36px); margin: 0 0 6px; }
.cta p { margin: 0; color: rgba(255,255,255,.85); }
.cta .engage { display: flex; gap: 10px; margin-bottom: 14px; }
.cta .engage .icon { width: 28px; height: 28px; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.filters a { padding: .4em 1.1em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 14px; }
.filters a.active, .filters a:hover { background: var(--purple); color: #fff; border-color: var(--purple); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty-state .icon { width: 44px; height: 44px; color: var(--purple-100); margin: 0 auto 10px; }

/* ============ Footer ============ */
.site-footer { margin-top: 40px; padding: 56px 0 28px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 17px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer ul a { color: rgba(255,255,255,.8) !important; }
.site-footer ul a:hover { color: var(--gold) !important; }
.site-footer .identity { color: #fff; }
.site-footer .identity .en { color: rgba(255,255,255,.7); }
.site-footer .bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(255,255,255,.75); }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* Completion certificate (print) */
.completion { max-width: 1000px; margin: 40px auto; aspect-ratio: 1.414; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; display: grid; grid-template-columns: 34% 1fr; }
.completion .side { background: var(--glow), var(--arcs), var(--brand-grad); color: #fff; padding: 40px 30px; display: flex; flex-direction: column; justify-content: space-between; }
.completion .side img { width: 110px; height: 110px; border-radius: 50%; border: 5px solid #fff; }
.completion .main { padding: 50px 48px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.completion .name { font-size: clamp(30px, 4vw, 48px); font-weight: 900; color: var(--purple-900); border-bottom: 3px solid var(--gold); padding-bottom: 6px; display: inline-block; }
.print-bar { text-align: center; margin: 20px 0 40px; display: flex; gap: 10px; justify-content: center; }
@media (max-width: 700px) { .completion { grid-template-columns: 1fr; aspect-ratio: auto; } }
@media print {
  @page { size: A4 landscape; margin: 0; }
  body { background: #fff; }
  .site-header, .site-footer, .print-bar { display: none !important; }
  .completion { margin: 0; box-shadow: none; border-radius: 0; width: 100%; height: 100vh; aspect-ratio: auto; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
