/* ==========================================================================
   Med Adel — shared stylesheet for index.html and certificates.html
   ========================================================================== */
:root {
  --ink: #16132e;
  --ink-2: #3b3757;
  --muted: #6a6684;
  --bg: #faf9fe;
  --surface: #ffffff;
  --line: #e9e6f4;
  --accent: #7a3ff0;          /* brand purple (from the original site) */
  --accent-ink: #5b23c9;
  --accent-soft: #f1eafe;
  --accent-2: #ff6b4a;        /* warm highlight, used sparingly */
  --ok: #0f9d74;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22,19,46,.04), 0 8px 28px rgba(22,19,46,.06);
  --shadow-lg: 0 2px 4px rgba(22,19,46,.05), 0 20px 50px rgba(74,40,160,.12);
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1160px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; letter-spacing: -0.015em; color: var(--ink); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); margin: 14px 0 14px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(122,63,240,.28); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-size: 20px; text-decoration: none;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--accent-ink); border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(250,249,254,.86); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(22,19,46,.04); }
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #a974ff); color: #fff; font: 700 16px/1 var(--font-head);
}
.brand-name { font: 700 18px/1.1 var(--font-head); }
.brand-name small { display: block; font: 600 12.5px/1.2 var(--font-body); color: var(--accent-ink); letter-spacing: .02em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; white-space: nowrap;
}
.nav a:hover { color: var(--accent-ink); background: var(--accent-soft); }
.nav a.active { color: var(--accent-ink); font-weight: 600; }
.nav a.nav-cert { color: var(--accent-ink); font-weight: 600; }
.nav a .badge { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 700; }

.lang-switch { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; min-width: 40px; height: 32px; border-radius: 999px;
  font: 700 13px/1 var(--font-body); color: var(--muted); letter-spacing: .04em;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, background .2s; }
.menu-toggle .bars { position: relative; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); font-size: 18px; color: var(--ink); cursor: pointer; }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; box-shadow: 0 18px 30px rgba(22,19,46,.08);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .18s ease;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px 12px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
  .header-cv { display: none; }
}
@media (max-width: 420px) { .brand-name small { display: none; } }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 720px; height: 720px; right: -220px; top: -260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(122,63,240,.14), transparent 70%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; }
.hello { font-size: 17px; color: var(--ink-2); margin: 0 0 16px; }
.hello b { color: var(--ink); }
.hello .nick { color: var(--accent-ink); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; font-family: var(--font-head); }
.brand-mark { font-size: 19px !important; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 19px; color: var(--ink-2); max-width: 600px; margin-bottom: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cred-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.cred {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.cred i { color: var(--accent); }
a.cred:hover { border-color: var(--accent); }
.hero-art { position: relative; }
.hero-art img { width: 100%; max-width: 520px; margin-left: auto; }
.hero-photo { margin: 0 0 0 auto; position: relative; width: calc(100% - 24px); max-width: 440px; }
.hero-photo::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border-radius: 28px; background: linear-gradient(135deg, var(--accent-soft), #e7dcff); z-index: -1; }
.hero-photo img { width: 100%; max-width: none; aspect-ratio: 4 / 5; object-fit: cover; object-position: center; border-radius: 28px; box-shadow: var(--shadow-lg); }
.hero-photo figcaption { position: absolute; right: 16px; top: 16px; background: rgba(255,255,255,.94); padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.hero-photo figcaption i { color: var(--accent); }
.hero-art { z-index: 0; }
.hero-card {
  position: absolute; left: -10px; bottom: 10%; z-index: 2; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  padding: 14px 18px; display: flex; gap: 12px; align-items: center; max-width: 270px;
}
.hero-card .num { font: 700 30px/1 var(--font-head); color: var(--accent); }
.hero-card .lbl { font-size: 14px; color: var(--ink-2); line-height: 1.35; }

/* ---------- Impact stats ---------- */
.stats { padding: 0 0 24px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.stat { padding: 26px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font: 700 34px/1 var(--font-head); color: var(--ink); }
.stat .num span { color: var(--accent); }
.stat .lbl { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.4; }
a.stat { text-decoration: none; transition: background .15s; }
a.stat:hover { background: var(--accent-soft); }
a.stat .lbl { color: var(--accent-ink); font-weight: 600; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-grid .section-head { margin-bottom: 22px; }
.about-text p { color: var(--ink-2); }
.about-text strong { color: var(--ink); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 26px 0 28px; }
.fact { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.fact i { color: var(--accent); font-size: 18px; margin-top: 3px; width: 20px; text-align: center; }
.fact b { display: block; font-size: 15px; }
.fact span { font-size: 14px; color: var(--muted); line-height: 1.4; display: block; }

/* ---------- Experience ---------- */
.xp-group-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 600 14px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.xp-group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.xp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 44px; }
.xp {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: grid; grid-template-columns: 76px 1fr; gap: 18px; align-items: start; transition: box-shadow .2s, border-color .2s;
}
.xp:hover { box-shadow: var(--shadow-lg); border-color: #dcd3f7; }
.xp-logo { width: 76px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; padding: 8px; }
.xp-logo img { max-height: 38px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.xp-logo.mono { background: var(--accent-soft); border-color: transparent; font: 700 18px/1 var(--font-head); color: var(--accent-ink); }
.xp h3 { font-size: 20px; }
.xp .org { font-weight: 600; color: var(--accent-ink); font-size: 15px; margin: 4px 0 10px; }
.xp ul { margin: 0; padding: 0; list-style: none; }
.xp li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 15.5px; margin-bottom: 6px; line-height: 1.5; }
.xp li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .7; }
.roles { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.role { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); }
.role b { color: var(--accent-ink); font-weight: 700; }
.xp.lead-role { border-left: 4px solid var(--accent); }

.xp-compact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.xp-compact .xp { grid-template-columns: 56px 1fr; padding: 18px; gap: 14px; }
.xp-compact .xp-logo { width: 56px; height: 44px; padding: 6px; }
.xp-compact .xp-logo img { max-height: 28px; }
.quote img { flex: none; }
.xp-compact h3 { font-size: 17px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 172px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), #d9ccfb 30%, var(--line)); }
.tl-item { display: grid; grid-template-columns: 172px 1fr; gap: 0 34px; position: relative; margin-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: 166px; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-date { padding-top: 22px; text-align: right; padding-right: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); line-height: 1.4; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.now { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ok); background: #e6f7f1; padding: 3px 8px; border-radius: 999px; }
.now::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.timeline .xp { margin-left: 0; }
.timeline .xp-logo { width: 96px; height: 60px; }
.timeline .xp { grid-template-columns: 96px 1fr; }
.xp .loc { display: inline-flex; gap: 6px; align-items: baseline; margin-left: 10px; font-weight: 500; color: var(--muted); font-size: 14px; }
.xp .loc i { font-size: 12px; }
.xp li b { color: var(--ink); font-weight: 600; }
.sector { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.award { margin-top: 12px; display: inline-flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 600; color: #8a5300; background: #fff5e0; border-radius: 8px; padding: 6px 10px; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--line); }
.gallery figure.wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(14,11,32,.82)); color: #fff; font-size: 13.5px; line-height: 1.35; }
.gallery figcaption b { display: block; font-size: 15px; }
.gallery figcaption span { color: #dcd7f0; }

/* ---------- Portrait (about) ---------- */
.about-art.portrait { margin: 0 22px 22px 0; position: relative; max-width: 420px; justify-self: center; width: calc(100% - 22px); }
.about-art.portrait img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); }
.about-art.portrait::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border-radius: 22px; background: var(--accent-soft); z-index: -1; }
.about-art.portrait figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(255,255,255,.94); padding: 8px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.about-art.portrait figcaption i { color: var(--accent); }
#about { position: relative; z-index: 0; }

.now-line { display: flex; gap: 10px; align-items: baseline; font-size: 15.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; max-width: 600px; margin: -10px 0 26px; }
.now-line .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px #d8f3e9; transform: translateY(-1px); }
.now-line b { color: var(--ink); font-weight: 600; }

/* ---------- How I deliver ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.pillar .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 20px; margin-bottom: 18px; }
.pillar h3 { font-size: 19px; margin-bottom: 10px; }
.pillar p { color: var(--ink-2); font-size: 15.5px; margin-bottom: 14px; }
.pillar .proof { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; margin: 0; }
.pillar .proof b { color: var(--ink-2); }
.toolbox { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.toolbox .lbl { font-weight: 600; color: var(--muted); font-size: 14px; margin-right: 6px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-2); }

/* ---------- Programs ---------- */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.program { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.program .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.tag.org { background: #fff1ec; color: #b2401f; }
.program h3 { font-size: 19px; margin-bottom: 10px; }
.program p { color: var(--ink-2); font-size: 15.5px; margin: 0; }
.program .highlight { margin-top: 14px; font-size: 14px; color: var(--ok); font-weight: 600; display: flex; gap: 8px; align-items: baseline; }

/* ---------- Credentials preview (home) ---------- */
.cred-panel { display: grid; grid-template-columns: 1fr 1.25fr; gap: 28px; align-items: stretch; }
.cred-summary { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 34px; display: flex; flex-direction: column; }
.cred-summary .big { font: 700 64px/1 var(--font-head); color: #c9b0ff; }
.cred-summary h3 { color: #fff; font-size: 24px; margin: 10px 0 20px; }
.cat-bars { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.cat-bars li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 14.5px; color: #dcd7f0; }
.cat-bars a { color: #dcd7f0; text-decoration: none; }
.cat-bars a:hover { color: #fff; text-decoration: underline; }
.cat-bars .n { font-weight: 700; color: #fff; }
.cat-bars .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.cat-bars .bar span { display: block; height: 100%; background: linear-gradient(90deg, #a974ff, #c9b0ff); border-radius: 6px; }
.cred-summary .btn { margin-top: auto; align-self: flex-start; }
.cred-summary .btn-primary { background: #fff; color: var(--ink); box-shadow: none; }
.cred-summary .btn-primary:hover { background: #ece5ff; }

.key-certs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.key-certs h3 { grid-column: 1 / -1; font-size: 15px; font-family: var(--font-body); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* ---------- Certificate item (shared) ---------- */
.cert {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cert:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.cert-logo { width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.cert-logo { position: relative; }
.cert-logo img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; background: #fff; }
.cert-logo .fallback { font: 700 14px/1 var(--font-head); color: var(--accent-ink); }
.cert-logo:has(.fallback:only-child) { background: var(--accent-soft); border-color: transparent; }
.cert-title { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.cert-meta { font-size: 13.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cert-key { color: #a15c00; background: #fff5e0; font-weight: 700; font-size: 11.5px; padding: 2px 7px; border-radius: 5px; letter-spacing: .03em; text-transform: uppercase; }
.cert-open { color: var(--muted); font-size: 15px; }
.cert:hover .cert-open { color: var(--accent); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; position: relative; margin: 0; }
.quote::before { content: "\201C"; position: absolute; top: 6px; right: 22px; font: 700 90px/1 Georgia, serif; color: var(--accent-soft); }
.quote blockquote { margin: 0 0 22px; font-size: 18px; line-height: 1.6; color: var(--ink); position: relative; }
.quote figcaption { display: flex; gap: 14px; align-items: center; }
.quote img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.quote b { display: block; }
.quote span { font-size: 14px; color: var(--muted); }
.quote a { font-size: 14px; font-weight: 600; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-cards { display: grid; gap: 12px; margin-top: 26px; }
.contact-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-decoration: none; color: var(--ink); }
.contact-card:hover { border-color: var(--accent); }
.contact-card i { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 17px; }
.contact-card small { display: block; color: var(--muted); font-size: 13px; }
.contact-card b { font-weight: 600; word-break: break-word; }
.form { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; transition: border-color .15s;
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form .note { font-size: 13px; color: var(--muted); margin: 0; }

.contact-card.whatsapp i, .icon-btn.wa { color: #128c4a; }
.contact-card.whatsapp i { background: #e3f7ea; }
.icon-btn.wa:hover { border-color: #25d366; color: #0b7a3e; }
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 10px 26px rgba(18,140,74,.35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.wa-float:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px rgba(18,140,74,.42); }
@media (max-width: 600px) { .wa-float { right: 14px; bottom: 14px; width: 54px; height: 54px; } }
@media print { .wa-float { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c5dd; padding: 44px 0; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 17px; }
.socials a:hover { background: var(--accent); text-decoration: none; }
.copy { width: 100%; font-size: 14px; color: #8f8aa8; border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; margin: 4px 0 0; }

/* ---------- Certificates page ---------- */
.page-hero { padding: 64px 0 40px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.page-hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 14px 0 16px; }
.page-hero .lede { color: var(--ink-2); font-size: 18.5px; max-width: 720px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stat { padding: 12px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.hero-stat b { font: 700 24px/1 var(--font-head); color: var(--accent); margin-right: 6px; }
.hero-stat span { font-size: 14.5px; color: var(--ink-2); }

.key-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.toolbar {
  position: sticky; top: var(--header-h); z-index: 20; background: rgba(250,249,254,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 30px;
}
.toolbar .wrap { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; font: inherit; font-size: 16px; padding: 11px 14px 11px 40px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.filters { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; flex: 1 1 400px; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px;
  padding: 8px 14px; font: 600 14px/1 var(--font-body); cursor: pointer; white-space: nowrap;
}
.filter .n { color: var(--muted); font-weight: 600; margin-left: 4px; }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter[aria-pressed="true"] .n { color: #c9b0ff; }

.cat-block { margin-bottom: 44px; }
.cat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cat-head .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.cat-head h2 { font-size: 22px; }
.cat-head .count { margin-left: auto; font-size: 14px; color: var(--muted); font-weight: 600; }
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0 80px; }

.cta-band { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 20px 0 90px; box-shadow: var(--shadow); }
.cta-band h2 { font-size: 26px; margin-bottom: 6px; }
.cta-band p { margin: 0; color: var(--muted); }
.cta-band .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .cert { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .programs { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(3) { border-right: 0; }
  .stat:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .xp-compact { grid-template-columns: 1fr 1fr; }
  .cred-panel { grid-template-columns: 1fr; }
  .key-strip { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery figure.wide { grid-column: span 3; grid-row: span 1; aspect-ratio: 2 / 1; }
  .gallery figure:last-child { display: none; }
}
@media (max-width: 760px) {
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 30px; }
  .tl-item::before { left: 1px; top: 4px; }
  .tl-date { text-align: left; align-items: center; flex-direction: row; padding: 0 0 8px; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery figure.wide { grid-column: span 2; aspect-ratio: 16 / 9; }
  .gallery figure:last-child { display: block; }
  .gallery figcaption { font-size: 12px; padding: 24px 10px 9px; }
  .gallery figcaption b { font-size: 13.5px; }
}
@media (max-width: 820px) {
  section { padding: 72px 0; }
  .hero { padding: 40px 0 48px; }
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { order: -1; max-width: 200px; margin: 0; width: 100%; }
  .hero-photo { margin: 0; width: calc(100% - 12px); }
  .hero-photo::before { inset: 12px -12px -12px 12px; border-radius: 22px; }
  .hero-photo img { border-radius: 22px; }
  .hero-photo figcaption { display: none; }
  .hero-grid { gap: 28px; }
  .hero-card { display: none; }
  .about-grid .about-art { max-width: 380px; margin: 0 auto; }
  .xp-grid, .quotes, .cert-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); padding: 20px 16px; }
  .stat:nth-child(2n) { border-right: 0 !important; }
  .stat:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0 !important; }
  .stat .num { font-size: 28px; }
  .pillars, .programs, .xp-compact, .key-certs, .key-strip, .facts, .form .row2 { grid-template-columns: 1fr; }
  .xp { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .xp-compact .xp { grid-template-columns: 52px 1fr; }
  .timeline .xp { grid-template-columns: 1fr; }
  .xp .loc { display: flex; margin: 4px 0 0; }
  .cert { grid-template-columns: 40px 1fr auto; gap: 12px; padding: 12px; }
  .cert-logo { width: 40px; height: 40px; }
  .cred-summary { padding: 26px; }
  .cred-summary .big { font-size: 52px; }
  .quote { padding: 24px; }
  .quote blockquote { font-size: 17px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .filters { flex-basis: 100%; }
  .search { max-width: none; flex-basis: 100%; }
  .cta-band { padding: 24px; }
}

@media print {
  .site-header, .toolbar, .lang-switch, .form, .site-footer .socials { display: none !important; }
  body { background: #fff; }
  .reveal { opacity: 1; transform: none; }
}
