/* =============================================================
   Jaber Mahmoud — Data Engineer Portfolio
   Bespoke design system. Light theme, token-driven, zero-build.
   ============================================================= */

/* -------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------- */
:root {
  /* Color — surfaces */
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --bg-alt: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;

  /* Color — lines */
  --border: #e5e8ec;
  --border-strong: #d6dbe2;

  /* Color — text */
  --text: #0f172a;
  --text-muted: #5b6573;
  --text-faint: #667085; /* AA: ~5:1 on white */

  /* Color — accent (single, used consistently) */
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-ink: #1e40af;
  --accent-soft: #eef4ff;
  --accent-softer: #f6f9ff;
  --accent-line: #cfe0ff;
  --on-accent: #ffffff;

  /* Supporting */
  --teal: #0f766e; /* AA: ~5:1 on the light teal badge */

  /* Typography */
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;

  /* Fluid type scale */
  --fs-eyebrow: 0.72rem;
  --fs-small: 0.8125rem;
  --fs-body: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  --fs-lead: clamp(1.08rem, 1rem + 0.55vw, 1.3rem);
  --fs-h3: clamp(1.2rem, 1.08rem + 0.5vw, 1.45rem);
  --fs-h2: clamp(1.9rem, 1.5rem + 1.7vw, 2.7rem);
  --fs-h1: clamp(2.6rem, 1.9rem + 2.6vw, 3.9rem);
  --fs-display: clamp(2.6rem, 1.3rem + 5vw, 5rem);

  /* Spacing (8px base) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  /* Radii */
  --r-xs: 6px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.14);
  --shadow-lg: 0 24px 56px -22px rgba(15, 23, 42, 0.22);
  --shadow-accent: 0 14px 30px -12px rgba(37, 99, 235, 0.42);

  /* Layout */
  --container: 1180px;
  --measure: 66ch;
  --nav-h: 68px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.45s;

  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

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

* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

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

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

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-xs);
}

::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
* { scrollbar-color: var(--border-strong) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #aab2bd; }

/* -------------------------------------------------------------
   3. Layout primitives
   ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.section { padding-block: clamp(52px, 6vw, 88px); position: relative; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: var(--fs-small);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 14px; }

/* Section heading block */
.section-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 44px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.65;
}
.section-head--center .eyebrow::before { display: none; }

.section-title { font-size: var(--fs-h2); }
.section-intro {
  margin-top: var(--s-4);
  color: var(--text-muted);
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: var(--measure);
}
.section-head--center .section-intro { margin-inline: auto; }

/* -------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
              background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }

.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-accent); }
.btn--primary:hover { background: var(--accent-strong); transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(37, 99, 235, 0.5); }

.btn--secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

.btn--ghost { background: transparent; color: var(--text-muted); }
.btn--ghost:hover { color: var(--accent); background: var(--accent-soft); }

.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.875rem; }

/* -------------------------------------------------------------
   5. Header / navigation
   ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand__role {
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding-left: 11px;
  border-left: 1px solid var(--border-strong);
}
@media (max-width: 430px) { .brand__role { display: none; } }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link.active { color: var(--accent); }
.nav__link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__cta { display: none; }

/* Hamburger */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.nav__toggle:hover { border-color: var(--border-strong); }
.nav__toggle svg { width: 22px; height: 22px; }
.nav__toggle .icon-close { display: none; }

@media (min-width: 880px) {
  .nav__toggle { display: none; }
  .nav__cta { display: inline-flex; }
}
@media (max-width: 879px) {
  .nav__links--desktop { display: none; }
}

/* Mobile drawer */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}
.mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 360px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  overflow-y: auto;
}
.mobile-menu.open { visibility: visible; pointer-events: auto; }
.mobile-menu.open .mobile-menu__overlay { opacity: 1; }
.mobile-menu.open .mobile-menu__panel { transform: translateX(0); }
.mobile-menu__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.mobile-menu__link {
  padding: 14px 16px;
  border-radius: var(--r-sm);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid transparent;
}
.mobile-menu__link:hover { background: var(--accent-soft); color: var(--accent); }
.mobile-menu__cta { margin-top: 14px; }

/* -------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(20px, 3vw, 40px);
  padding-bottom: clamp(44px, 6vw, 80px);
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(37, 99, 235, 0.10), transparent 70%),
    radial-gradient(45% 45% at 8% 92%, rgba(13, 148, 136, 0.06), transparent 70%);
  pointer-events: none;
}
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.06) 1px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 30%, #000 0%, transparent 78%);
          mask-image: radial-gradient(75% 65% at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 980px) {
  .hero__inner { grid-template-columns: 1.05fr 0.95fr; }
}

.hero__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}
.hero__status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.16);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.hero h1 { font-size: var(--fs-h1); margin-bottom: var(--s-3); }
.hero__tagline {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 19ch;
  margin-bottom: var(--s-5);
}
.hero__tagline .accent {
  background: linear-gradient(100deg, var(--accent), #4f7cf0);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.hero__lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 42ch;
  margin-bottom: var(--s-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--s-6); }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero__meta svg { width: 15px; height: 15px; color: var(--accent); }

/* Hero pipeline visual */
.pipeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(18px, 2.4vw, 26px);
  position: relative;
}
.pipeline__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.pipeline__head-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.pipeline__head-icon svg { width: 20px; height: 20px; }
.pipeline__title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.pipeline__subtitle { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.pipeline__stages { display: flex; flex-direction: column; gap: 0; }
.pstage {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  position: relative;
}
.pstage + .pstage { border-top: 1px dashed var(--border); }
.pstage__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}
.pstage__icon svg { width: 19px; height: 19px; }
.pstage__title { font-weight: 600; font-size: 0.92rem; letter-spacing: -0.01em; }
.pstage__sub { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); }
.pstage__badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-softer);
  border: 1px solid var(--accent-line);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.pipeline__flow { display: none; }

/* -------------------------------------------------------------
   7. Stat chips
   ------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.stat__num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.3rem);
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.stat__label { margin-top: 10px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }

/* -------------------------------------------------------------
   8. About
   ------------------------------------------------------------- */
.about__grid { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
@media (min-width: 920px) { .about__grid { grid-template-columns: 1.2fr 1fr; } }
.about__body p { color: var(--text-muted); max-width: var(--measure); }
.about__body p + p { margin-top: var(--s-4); }
.about__body strong { color: var(--text); font-weight: 600; }
.about__aside { display: flex; flex-direction: column; gap: var(--s-5); }
.about__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
}
.about__card h3 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-list { display: flex; flex-direction: column; gap: 12px; }
.focus-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.92rem; color: var(--text); }
.focus-list svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.lang-row { display: flex; flex-direction: column; gap: 12px; }
.lang { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 0.9rem; }
.lang__level { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); }
.lang__bar { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: var(--bg-alt); overflow: hidden; }
.lang__bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* Chip / tag */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--r-xs);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.chip--accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }

/* -------------------------------------------------------------
   9. Skills
   ------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .skills-grid { grid-template-columns: repeat(3, 1fr); } }

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.skill-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.skill-card__icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
  flex-shrink: 0;
}
.skill-card__icon svg { width: 20px; height: 20px; }
.skill-card__title { font-family: var(--font-head); font-size: 1.02rem; font-weight: 600; }
.skill-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }

/* Featured (Data Engineering) skill card */
.skill-card--featured {
  grid-column: 1 / -1;
  background: linear-gradient(160deg, #0f1f3d 0%, #0f172a 60%, #122046 100%);
  border-color: #1e2b4d;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.skill-card--featured::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 80% at 90% 0%, rgba(37, 99, 235, 0.4), transparent 70%);
  pointer-events: none;
}
@media (min-width: 1024px) { .skill-card--featured { grid-column: span 3; } }
.skill-card--featured .skill-card__title { color: #fff; font-size: 1.15rem; }
.skill-card--featured .skill-card__icon { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); color: #fff; }
.skill-card--featured .skill-card__lead { color: rgba(255, 255, 255, 0.66); font-size: 0.9rem; margin-bottom: 18px; max-width: 60ch; position: relative; }
.skill-card--featured .skill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bcd2ff;
  margin-bottom: 14px;
}
.skill-card--featured .chip {
  color: #dfeaff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
  position: relative;
}

/* -------------------------------------------------------------
   10. Projects
   ------------------------------------------------------------- */
.projects-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 860px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }

.project {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.project__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.project__cat {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.project__title { font-size: var(--fs-h3); margin-bottom: 10px; }
.project__desc { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.project__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.metric {
  flex: 1 1 120px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.metric__num { font-family: var(--font-mono); font-weight: 600; font-size: 1.1rem; color: var(--text); letter-spacing: -0.02em; }
.metric__label { font-size: 0.72rem; color: var(--text-faint); margin-top: 3px; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.project__foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); }
.project__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.project__link:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.project__link svg { width: 16px; height: 16px; }
.project__link--todo { color: var(--text-faint); border-style: dashed; cursor: default; }
.project__link--todo:hover { color: var(--text-faint); border-color: var(--border); background: transparent; }

/* Featured case-study project */
.project--featured {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 980px) { .project--featured { grid-template-columns: 1.15fr 0.85fr; } }
.project--featured .case__body { padding: clamp(26px, 3vw, 40px); display: flex; flex-direction: column; }
.case__flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}
.case__flag svg { width: 14px; height: 14px; }
.project--featured .project__title { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
.case__co { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 16px; }
.case__visual {
  position: relative;
  background: linear-gradient(160deg, #0f172a 0%, #13233f 100%);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(22px, 3vw, 36px);
  min-height: 280px;
}
.case__visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
}

/* Map-grid motif inside featured visual */
.geo {
  position: relative;
  width: 100%;
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.geo__caption { font-family: var(--font-mono); font-size: 0.7rem; color: rgba(255, 255, 255, 0.55); text-align: center; }
.geo__sources { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.geo__src {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #cfe0ff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 9px;
  border-radius: var(--r-pill);
}

/* Additional projects */
.more-projects {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) { .more-projects { grid-template-columns: repeat(2, 1fr); } }
.more-project {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.more-project--link { cursor: pointer; }
a.more-project--link:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
a.more-project--link:hover .more-project__arrow { color: var(--accent); transform: translate(1px, -1px); }
.more-project__icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); flex-shrink: 0; }
.more-project__icon svg { width: 18px; height: 18px; }
.more-project__text { display: flex; flex-direction: column; gap: 3px; }
.more-project__title { display: block; font-weight: 600; font-size: 0.92rem; line-height: 1.3; }
.more-project__sub { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-faint); }
.more-project__arrow { width: 16px; height: 16px; margin-left: auto; flex-shrink: 0; color: var(--text-faint); transition: color 0.2s var(--ease), transform 0.2s var(--ease); }

/* -------------------------------------------------------------
   11. Certifications
   ------------------------------------------------------------- */
.cert-feature { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px; }
@media (min-width: 720px) { .cert-feature { grid-template-columns: repeat(2, 1fr); } }
.cert-hero {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow: hidden;
}
.cert-hero:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.cert-hero__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
  margin-bottom: 18px;
}
.cert-hero__icon svg { width: 24px; height: 24px; }
.cert-hero__issuer { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.cert-hero__title { font-size: 1.18rem; margin-bottom: 12px; }
.badge-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  padding: 4px 10px; border-radius: var(--r-pill);
}
.badge-status--progress { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.badge-status--done { color: var(--teal); background: #ecfdf9; border: 1px solid #b7e6dd; }
.badge-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.cert-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .cert-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cert-list { grid-template-columns: repeat(3, 1fr); } }
.cert-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.cert-item:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.cert-item svg { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }
.cert-item__name { font-size: 0.88rem; font-weight: 500; }
.cert-item__issuer { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-faint); }

/* -------------------------------------------------------------
   12. Education
   ------------------------------------------------------------- */
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-xs);
}
.edu-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.edu-card__inst { display: flex; align-items: center; gap: 16px; }
.edu-card__logo {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.edu-card__logo svg { width: 26px; height: 26px; }
.edu-card__degree { font-size: 1.2rem; }
.edu-card__inst-name { font-size: 0.9rem; color: var(--text-muted); margin-top: 3px; }
.edu-card__date { font-family: var(--font-mono); font-size: 0.76rem; color: var(--text-faint); white-space: nowrap; }
.edu-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.edu-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 18px; }
.edu-stat__num { font-family: var(--font-mono); font-weight: 600; font-size: 1.35rem; color: var(--accent); letter-spacing: -0.02em; }
.edu-stat__label { font-size: 0.74rem; color: var(--text-muted); margin-top: 4px; }
.edu-card__cw-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.edu-cw { display: flex; flex-wrap: wrap; gap: 8px; }

/* -------------------------------------------------------------
   13. Leadership timeline
   ------------------------------------------------------------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 19px; top: 14px; bottom: 14px;
  width: 2px;
  background: linear-gradient(var(--border-strong), var(--border));
}
.tl-item { position: relative; padding-left: 56px; padding-block: 16px; }
.tl-item__dot {
  position: absolute;
  left: 11px; top: 22px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: grid; place-items: center;
  z-index: 1;
}
.tl-item__dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tl-item__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 6px; }
.tl-item__role { font-family: var(--font-head); font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.tl-item__org { color: var(--accent); font-weight: 600; }
.tl-item__date { font-family: var(--font-mono); font-size: 0.74rem; color: var(--text-faint); white-space: nowrap; }
.tl-item__desc { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; max-width: var(--measure); }

/* -------------------------------------------------------------
   14. Contact
   ------------------------------------------------------------- */
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) { .contact__grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.contact-card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent-line);
}
.contact-card__icon svg { width: 22px; height: 22px; }
.contact-card__label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); }
.contact-card__value { font-weight: 600; font-size: 1rem; word-break: break-word; }
.contact-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.copied { color: var(--teal); border-color: #b7e6dd; background: #ecfdf9; }

.contact-banner {
  text-align: center;
  background: linear-gradient(160deg, #0f172a, #13233f);
  border-radius: var(--r-xl);
  padding: clamp(36px, 5vw, 60px);
  color: #fff;
  margin-top: 28px;
  position: relative;
  overflow: hidden;
}
.contact-banner::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(50% 100% at 50% 0%, rgba(37, 99, 235, 0.4), transparent 70%);
}
.contact-banner > * { position: relative; }
.contact-banner h3 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 12px; }
.contact-banner p { color: rgba(255, 255, 255, 0.7); max-width: 50ch; margin: 0 auto 24px; }

/* -------------------------------------------------------------
   15. Footer
   ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); }
.footer { display: grid; grid-template-columns: 1fr; gap: 32px; padding-block: clamp(40px, 5vw, 64px); }
@media (min-width: 760px) { .footer { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 34ch; }
.footer__tagline { color: var(--text-muted); font-size: 0.9rem; }
.footer__col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--accent); }
.footer__socials { display: flex; gap: 10px; }
.footer__social {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer__social:hover { color: var(--accent); border-color: var(--accent-line); transform: translateY(-2px); }
.footer__social svg { width: 19px; height: 19px; }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-block: 22px;
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center;
  text-align: center;
}
.footer__bottom p { font-size: 0.82rem; color: var(--text-faint); }

/* -------------------------------------------------------------
   16. Scroll reveal & motion
   ------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
.hero__anim { animation: fade-up 0.8s var(--ease-out) both; }
.hero__anim--1 { animation-delay: 0.05s; }
.hero__anim--2 { animation-delay: 0.13s; }
.hero__anim--3 { animation-delay: 0.21s; }
.hero__anim--4 { animation-delay: 0.29s; }
.hero__anim--5 { animation-delay: 0.37s; }

.flow-line { stroke-dasharray: 6 7; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -26; } }

/* Reduced motion */
@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
