/* =====================================================================
   Syed Muteeb Alam — muteebalam.com
   Hand-written stylesheet. No frameworks, no build step.
   ===================================================================== */

/* ── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:          #070b12;
  --bg-soft:     #0a1018;
  --surface:     #0e1620;
  --surface-2:   #121c28;
  --surface-3:   #16222f;

  --line:        rgba(148, 163, 184, 0.13);
  --line-mid:    rgba(148, 163, 184, 0.20);
  --line-strong: rgba(148, 163, 184, 0.32);

  --text:        #e9eff7;
  --text-2:      #a7b4c6;
  --text-3:      #74839a;

  --accent:      #2ee6c5;
  --accent-soft: rgba(46, 230, 197, 0.14);
  --accent-line: rgba(46, 230, 197, 0.34);
  --accent-2:    #4f8cff;
  --accent-3:    #a78bfa;

  --radius-sm:   10px;
  --radius:      16px;
  --radius-lg:   22px;
  --radius-xl:   28px;

  --wrap:        1140px;
  --gutter:      clamp(20px, 5vw, 48px);

  --font:        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono:   "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:      0 18px 40px -18px rgba(0, 0, 0, 0.85);
  --shadow-lg:   0 40px 90px -40px rgba(0, 0, 0, 0.95);

  --header-h:    72px;
}

/* ── 2. Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

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

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(46, 230, 197, 0.24);
  color: #ffffff;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: #04211c;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ── 3. Layout ─────────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: clamp(72px, 11vw, 132px);
}

.section--alt {
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(79, 140, 255, 0.055), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 62%);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 660px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-kicker span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding-inline: 6px;
  border: 1px solid var(--accent-line);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.section-kicker--center { justify-content: center; display: flex; }

.section-title {
  font-size: clamp(1.75rem, 4.1vw, 2.72rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.section-sub {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 1.02rem;
  max-width: 56ch;
}

/* ── 4. Buttons ────────────────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-mid);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.945rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease),
              background-color 0.24s, border-color 0.24s, color 0.24s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: linear-gradient(135deg, #2ee6c5, #35c8e8 55%, #4f8cff);
  --btn-fg: #04211c;
  --btn-bd: transparent;
  box-shadow: 0 12px 30px -12px rgba(46, 230, 197, 0.55);
}
.btn--primary:hover { box-shadow: 0 18px 42px -12px rgba(46, 230, 197, 0.65); }

.btn--ghost {
  --btn-bg: rgba(148, 163, 184, 0.06);
  --btn-bd: var(--line-mid);
}
.btn--ghost:hover {
  --btn-bg: rgba(148, 163, 184, 0.11);
  --btn-bd: var(--line-strong);
}

.btn--lg { padding: 15px 26px; font-size: 1rem; }

/* ── 5. Header ─────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
              backdrop-filter 0.35s var(--ease);
}
.site-header.is-stuck {
  background: rgba(7, 11, 18, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--line-mid);
  border-radius: 11px;
  background: linear-gradient(160deg, rgba(46, 230, 197, 0.13), rgba(79, 140, 255, 0.08));
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand:hover .brand-mark { border-color: var(--accent-line); transform: rotate(-6deg); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text strong {
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  white-space: nowrap;
}
.brand-text small {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 0.905rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.22s, background-color 0.22s;
}
.nav a:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.nav a.is-active { color: var(--text); }
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-cta {
  margin-left: 8px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent) !important;
  font-weight: 600;
}
.nav-cta:hover { background: rgba(46, 230, 197, 0.2) !important; }
.nav-cta.is-active::after { display: none; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 11px;
  border: 1px solid var(--line-mid);
  border-radius: 11px;
  background: rgba(148, 163, 184, 0.06);
}
.nav-toggle span {
  display: block;
  height: 1.8px;
  margin: 4.2px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.32s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── 6. Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 96px));
  padding-bottom: clamp(48px, 7vw, 88px);
  overflow: clip;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.hero-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 22%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 22%, #000 30%, transparent 78%);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.hero-glow--a {
  width: 620px; height: 620px;
  top: -260px; left: -140px;
  background: radial-gradient(circle, rgba(46, 230, 197, 0.30), transparent 66%);
}
.hero-glow--b {
  width: 560px; height: 560px;
  top: -120px; right: -160px;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.26), transparent 66%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.55);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(46, 230, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 197, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 7.4vw, 4.35rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.042em;
  margin-bottom: 22px;
}
.hero-title .line { display: block; }
.hero-title .line--accent {
  background: linear-gradient(100deg, #ffffff 8%, #2ee6c5 52%, #4f8cff 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 46ch;
  color: var(--text-2);
  font-size: clamp(1rem, 1.55vw, 1.13rem);
  line-height: 1.62;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.pill {
  padding: 6px 13px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.055);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
  transition: border-color 0.24s, color 0.24s, background-color 0.24s;
}
.pill:hover { border-color: var(--line-strong); color: var(--text); }
.pill--hot {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
  font-size: 0.865rem;
  color: var(--text-3);
}
.hero-meta svg { width: 15px; height: 15px; flex: none; }
.sep { color: var(--line-strong); }
.dotsep {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

/* portrait */
.hero-media { display: flex; justify-content: center; }

.portrait {
  position: relative;
  width: min(100%, 372px);
  padding: 9px;
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(165deg, rgba(46, 230, 197, 0.10), rgba(79, 140, 255, 0.07) 45%, transparent 75%),
    var(--surface);
  box-shadow: var(--shadow-lg);
}
.portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 28%;
  border-radius: calc(var(--radius-xl) - 8px);
  background: var(--surface-2);
}

/* stats */
.stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(44px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}
.stats li {
  padding: 22px 20px;
  background: rgba(10, 16, 24, 0.72);
  transition: background-color 0.3s;
}
.stats li:hover { background: rgba(18, 28, 40, 0.9); }
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}
.stat-plus { color: var(--accent); }
.stat-label {
  display: block;
  margin-top: 7px;
  font-size: 0.785rem;
  line-height: 1.4;
  color: var(--text-3);
}

/* ── 7. About ──────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5.5vw, 72px);
  align-items: start;
}

.about-body p { color: var(--text-2); margin-bottom: 17px; max-width: 60ch; }
.about-lead {
  font-size: clamp(1.06rem, 1.9vw, 1.26rem);
  line-height: 1.58;
  color: var(--text) !important;
  font-weight: 500;
  letter-spacing: -0.011em;
}

.about-quote {
  position: relative;
  margin-top: 30px;
  padding: 20px 24px 20px 46px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(46, 230, 197, 0.055), transparent 72%);
}
.about-quote p {
  margin: 0 !important;
  font-size: 0.99rem;
  font-style: italic;
  color: var(--text-2);
}
.quote-mark {
  position: absolute;
  top: 6px;
  left: 16px;
  font-family: Georgia, serif;
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
}

.skills {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
  overflow: hidden;
}
.skill-group { padding: 20px 22px; background: var(--surface); }
.skill-group h3 {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags li {
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.045);
  font-size: 0.795rem;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.22s, color 0.22s, background-color 0.22s, transform 0.22s var(--ease);
}
.tags li:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--text);
  transform: translateY(-1px);
}
.tags--inline { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ── 8. Cards & timeline ───────────────────────────────────────────── */
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface), rgba(10, 16, 24, 0.6));
  transition: border-color 0.34s var(--ease), transform 0.34s var(--ease),
              box-shadow 0.34s var(--ease);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(150deg, var(--accent), var(--accent-2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.34s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card:hover::after { opacity: 0.32; }

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 11px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent-line), var(--line) 40%, transparent);
}
.timeline-item { position: relative; }
.timeline-marker {
  position: absolute;
  top: 28px;
  left: -34px;
  width: 11px;
  height: 11px;
  margin-left: 6px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 4px rgba(7, 11, 18, 1), 0 0 0 5px var(--line);
}
.timeline-item:first-child .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(7, 11, 18, 1), 0 0 18px rgba(46, 230, 197, 0.6);
}

.card--role { padding: clamp(22px, 3vw, 30px); }

.role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.role-title {
  font-size: 1.16rem;
  font-weight: 700;
  letter-spacing: -0.014em;
  line-height: 1.3;
}
.role-org {
  margin-top: 3px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.07);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.badge--live {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.role-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.775rem;
  letter-spacing: 0.01em;
  color: var(--text-3);
}

.bullets {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.bullets li {
  position: relative;
  padding-left: 20px;
  font-size: 0.945rem;
  line-height: 1.6;
  color: var(--text-2);
}
.bullets li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent);
  opacity: 0.75;
  transform: rotate(45deg);
}

/* ── 9. Certifications ─────────────────────────────────────────────── */
.featured-cert {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
  padding: clamp(24px, 3.4vw, 38px);
  margin-bottom: clamp(28px, 4vw, 44px);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(46, 230, 197, 0.14), transparent 68%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.featured-cert::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.featured-cert__badge {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex: none;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: rgba(46, 230, 197, 0.1);
  color: var(--accent);
}
.featured-cert__badge svg { width: 32px; height: 32px; }

.featured-cert__kicker {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.featured-cert__body h3 {
  font-size: clamp(1.16rem, 2.4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
.abbr { color: var(--text-3); font-weight: 600; white-space: nowrap; }
.featured-cert__issuer {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.815rem;
  color: var(--text-3);
}
.featured-cert__desc {
  margin-top: 12px;
  max-width: 62ch;
  font-size: 0.95rem;
  color: var(--text-2);
}

.chip-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.chip-row li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.05);
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--text-2);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 292px), 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.cert-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
  transition: border-color 0.32s var(--ease), transform 0.32s var(--ease),
              box-shadow 0.32s var(--ease);
}
.cert-card:hover, .cert-card:focus-visible {
  border-color: var(--accent-line);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.cert-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
  overflow: hidden;
}
.cert-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(7, 11, 18, 0.55));
  opacity: 0.7;
  transition: opacity 0.32s;
}
.cert-card:hover .cert-thumb::after { opacity: 0.3; }
.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.6s var(--ease);
}
.cert-card:hover .cert-thumb img { transform: scale(1.045); }

.cert-body {
  display: block;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
}
.cert-issuer {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.cert-name {
  display: block;
  margin-top: 6px;
  font-size: 0.955rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--text);
}
.cert-meta {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.735rem;
  color: var(--text-3);
}

.cert-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-mid);
  border-radius: 10px;
  background: rgba(7, 11, 18, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.cert-zoom svg { width: 17px; height: 17px; }
.cert-card:hover .cert-zoom,
.cert-card:focus-visible .cert-zoom { opacity: 1; transform: scale(1); }

.cert-verify {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: clamp(24px, 3.4vw, 34px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--text-3);
}
.cert-verify a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.22s;
}
.cert-verify a:hover { border-bottom-color: var(--accent); }

/* ── 10. Education ─────────────────────────────────────────────────── */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 258px), 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.card--edu { padding: clamp(20px, 2.6vw, 26px); }
.edu-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border: 1px solid var(--line-mid);
  border-radius: 13px;
  background: rgba(79, 140, 255, 0.09);
  color: var(--accent-2);
}
.edu-icon svg { width: 22px; height: 22px; }
.card--edu h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.38;
  letter-spacing: -0.012em;
}
.edu-degree {
  margin-top: 7px;
  font-size: 0.885rem;
  font-weight: 500;
  color: var(--accent);
}
.edu-meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 0.755rem;
  color: var(--text-3);
}
.card--edu-extra .edu-icon {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ── 11. Contact ───────────────────────────────────────────────────── */
.section--contact {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #060a10);
  overflow: clip;
}
.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 320px at 50% 0%, rgba(46, 230, 197, 0.13), transparent 70%),
    radial-gradient(520px 260px at 82% 92%, rgba(79, 140, 255, 0.10), transparent 72%);
}
.contact-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}
.contact-title {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.1;
}
.contact-sub {
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--text-2);
  font-size: 1.01rem;
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}
.contact-actions .btn--ghost.is-copied {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--text-3);
}
.contact-links a, .contact-static {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.22s;
}
.contact-links svg { width: 16px; height: 16px; flex: none; }
.contact-links a { color: var(--text-2); font-weight: 500; }
.contact-links a:hover { color: var(--accent); }

/* ── 12. Footer ────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: #05080d;
}
.footer-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-block: 42px;
  text-align: center;
}
.footer-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.014em;
}
.footer-role {
  font-family: var(--font-mono);
  font-size: 0.755rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.85;
}
.footer-fine {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 0.775rem;
  color: var(--text-3);
}
.to-top {
  position: absolute;
  top: 34px;
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-mid);
  border-radius: 11px;
  color: var(--text-2);
  transition: border-color 0.24s, color 0.24s, transform 0.24s var(--ease);
}
.to-top svg { width: 18px; height: 18px; }
.to-top:hover { border-color: var(--accent-line); color: var(--accent); transform: translateY(-2px); }

/* ── 13. Lightbox ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
}
.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 10, 0.9);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.lightbox.is-open .lightbox-backdrop { opacity: 1; }

.lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 1060px);
  max-height: calc(100dvh - 2 * clamp(12px, 3vw, 34px));
  border: 1px solid var(--line-mid);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--surface-2), var(--bg-soft));
  box-shadow: 0 60px 120px -40px #000;
  overflow: hidden;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease);
}
.lightbox.is-open .lightbox-panel { opacity: 1; transform: none; }

.lightbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.lightbox-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.35;
}
.lightbox-issuer {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 0.735rem;
  color: var(--text-3);
}

.lightbox-body {
  flex: 1;
  min-height: 0;
  padding: 14px;
  background: #05080d;
  overflow: auto;
  display: grid;
  place-items: center;
}
.lightbox-body img {
  width: auto;
  max-width: 100%;
  max-height: min(72dvh, 900px);
  border-radius: 8px;
  box-shadow: 0 20px 50px -20px #000;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1px solid var(--line-mid);
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.06);
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--text-2);
  transition: border-color 0.22s, color 0.22s, background-color 0.22s;
}
.lightbox-btn svg { width: 17px; height: 17px; flex: none; }
.lightbox-btn:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.lightbox-close { padding: 8px; flex: none; }

.lightbox-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.755rem;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

body.is-locked { overflow: hidden; }

/* ── 14. Reveal on scroll ──────────────────────────────────────────── */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s var(--ease), transform 0.72s var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
.js .timeline-item[data-reveal] { transition-delay: var(--d, 0ms); }

/* ── 15. Responsive ────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: clamp(40px, 7vw, 56px); }
  .hero-media { order: -1; justify-content: flex-start; }
  .portrait { width: min(100%, 300px); }
  .about-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--gutter) 22px;
    background: rgba(7, 11, 18, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px -30px #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 12px 14px; font-size: 0.97rem; }
  .nav a.is-active::after { display: none; }
  .nav a.is-active { background: rgba(46, 230, 197, 0.08); color: var(--accent); }
  .nav-cta { margin: 10px 0 0; justify-content: center; display: flex; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --header-h: 64px; }

  .hero-title { letter-spacing: -0.03em; }
  .stats li { padding: 17px 15px; }
  .stat-label { font-size: 0.735rem; }

  .timeline { padding-left: 26px; }
  .timeline::before { left: 7px; }
  .timeline-marker { left: -26px; margin-left: 2px; }

  .featured-cert { grid-template-columns: 1fr; }
  .featured-cert__badge { width: 52px; height: 52px; border-radius: 15px; }
  .featured-cert__badge svg { width: 27px; height: 27px; }

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

  .contact-actions .btn { width: 100%; }
  .lightbox-foot .lightbox-btn span { display: none; }
  .lightbox-foot .lightbox-btn { padding: 10px 13px; }

  .footer-inner { padding-block: 34px 30px; }
  .to-top { position: static; margin-top: 16px; }
}

@media (max-width: 400px) {
  .eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.05em;
    padding: 6px 11px 6px 9px;
  }
  .pills { gap: 6px; }
  .pill { font-size: 10.5px; padding: 5px 10px; }
  .section-kicker { font-size: 11px; letter-spacing: 0.12em; }
}

/* ── 16. Motion & print ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .nav, .nav-toggle, .to-top, .hero-actions,
  .contact-actions, .lightbox, .hero-bg, .contact-bg, .cert-zoom { display: none !important; }
  body { background: #fff; color: #111; }
  .section { padding-block: 18px; break-inside: avoid; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .card, .cert-card, .featured-cert, .skills, .stats { border-color: #ccc; background: #fff; }
  a { color: #111; text-decoration: underline; }
}
