/* ============ Mostafa Faried — Personal Brand ============ */

:root {
  --bg-0: #07090f;
  --bg-1: #0b0f1a;
  --bg-2: #0f1626;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --surface-solid: #0f1626;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --fg: #f4f6fb;
  --fg-muted: #a4adc2;
  --fg-dim: #6b7488;
  --grid-line: rgba(255, 255, 255, 0.025);
  --nav-bg: rgba(7, 9, 15, 0.72);
  --mobile-menu-bg: rgba(7, 9, 15, 0.96);
  --logo-card-light-bg: #ffffff;
  --logo-card-dark-bg: rgba(255, 255, 255, 0.03);
  --logo-card-dark-bg-hover: rgba(255, 255, 255, 0.05);
  --logo-img-dark-filter: grayscale(100%) brightness(0) invert(1);
  --pill-bg: rgba(255, 255, 255, 0.04);
  --pill-bg-hover: rgba(255, 255, 255, 0.07);
  --contact-item-bg: rgba(7, 9, 15, 0.5);
  --contact-item-bg-hover: rgba(7, 9, 15, 0.7);
  --dash-card-bg: rgba(15, 22, 38, 0.78);
  --badge-bg: rgba(15, 22, 38, 0.85);
  --gradient-text-fallback: #f4f6fb;
  --orb-blue-opacity: 0.5;
  --orb-cyan-opacity: 0.35;
  --orb-orange-opacity: 0.3;
  --ambient-blue: rgba(59, 130, 246, 0.18);
  --ambient-cyan: rgba(34, 211, 238, 0.10);
  --ambient-orange: rgba(249, 115, 22, 0.10);
  --btn-primary-fg: #04111f;
  --blue: #3b82f6;
  --blue-bright: #60a5fa;
  --cyan: #22d3ee;
  --orange: #f97316;
  --orange-soft: #fb923c;
  --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #22d3ee 50%, #f97316 100%);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #22d3ee);
  --gradient-warm: linear-gradient(135deg, #f97316, #fb923c);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --shadow-glow-blue: 0 30px 80px -20px rgba(59, 130, 246, 0.45);
  --shadow-glow-orange: 0 30px 80px -20px rgba(249, 115, 22, 0.35);
  --container: 1240px;
}

/* ============ Light theme overrides ============ */
:root[data-theme="light"] {
  --bg-0: #f5f7fb;
  --bg-1: #eef1f7;
  --bg-2: #e6eaf2;
  --surface: rgba(15, 22, 38, 0.04);
  --surface-strong: rgba(15, 22, 38, 0.06);
  --surface-solid: #ffffff;
  --border: rgba(15, 22, 38, 0.08);
  --border-strong: rgba(15, 22, 38, 0.16);
  --fg: #0b1426;
  --fg-muted: #4a5468;
  --fg-dim: #7a8398;
  --grid-line: rgba(15, 22, 38, 0.04);
  --nav-bg: rgba(245, 247, 251, 0.78);
  --mobile-menu-bg: rgba(245, 247, 251, 0.97);
  --logo-card-light-bg: #ffffff;
  --logo-card-dark-bg: #ffffff;
  --logo-card-dark-bg-hover: #ffffff;
  --logo-img-dark-filter: grayscale(100%);
  --pill-bg: #ffffff;
  --pill-bg-hover: #f0f3f9;
  --contact-item-bg: rgba(255, 255, 255, 0.8);
  --contact-item-bg-hover: rgba(255, 255, 255, 1);
  --dash-card-bg: rgba(255, 255, 255, 0.95);
  --badge-bg: rgba(255, 255, 255, 0.95);
  --gradient-text-fallback: #0b1426;
  --orb-blue-opacity: 0.18;
  --orb-cyan-opacity: 0.14;
  --orb-orange-opacity: 0.14;
  --ambient-blue: rgba(59, 130, 246, 0.10);
  --ambient-cyan: rgba(34, 211, 238, 0.07);
  --ambient-orange: rgba(249, 115, 22, 0.06);
  --btn-primary-fg: #04111f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-0);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ambient page background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, var(--ambient-blue), transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 25%, var(--ambient-cyan), transparent 60%),
    radial-gradient(ellipse 40% 30% at 70% 90%, var(--ambient-orange), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

/* ============ Typography ============ */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--fg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.section-title {
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 14px;
}

.section-subtitle {
  margin-top: 18px;
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 680px;
  text-wrap: pretty;
}

.section-head {
  margin-bottom: 56px;
}
.section-head.center {
  text-align: center;
}
.section-head.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}
.section-head.center .eyebrow::before {
  display: none;
}

section {
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-blue);
  color: var(--btn-primary-fg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 14px 30px -10px rgba(34, 211, 238, 0.55);
  font-weight: 600;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 22px 44px -10px rgba(34, 211, 238, 0.65);
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--fg);
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--cyan); }

.btn .arrow {
  transition: transform 0.25s ease;
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* ============ Navbar ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 0.3s ease;
}
.nav.scrolled {
  padding: 12px 0;
  background: var(--nav-bg);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-blue);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #04111f;
  font-size: 16px;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 22px -10px rgba(34, 211, 238, 0.6);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
}
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--fg-muted);
  border-radius: 999px;
  transition: all 0.2s ease;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--fg);
  background: var(--surface-strong);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.menu-btn span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--fg);
  position: relative;
}
.menu-btn span::before, .menu-btn span::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: var(--fg);
  left: 0;
}
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--mobile-menu-bg);
  backdrop-filter: blur(20px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu a {
  font-size: 22px;
  font-weight: 500;
  color: var(--fg);
}
.mobile-menu .btn-primary {
  margin-top: 16px;
}

/* ============ Hero ============ */
.hero {
  padding-top: 160px;
  padding-bottom: 120px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 13px;
  color: var(--cyan);
  font-weight: 500;
}
.hero-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.98;
}
.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin-top: 20px;
  font-size: 22px;
  color: var(--fg);
  font-weight: 500;
}

.hero-roles {
  margin-top: 14px;
  font-size: 15px;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}
.hero-roles span {
  position: relative;
}
.hero-roles span:not(:last-child)::after {
  content: '|';
  margin-left: 14px;
  color: var(--fg-dim);
}

.hero-desc {
  margin-top: 26px;
  font-size: 17px;
  color: var(--fg-muted);
  max-width: 560px;
  line-height: 1.65;
  text-wrap: pretty;
}

.hero-ctas {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-trust {
  margin-top: 36px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  flex-direction: column;
}
.trust-item .num {
  font-size: 22px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.trust-item .label {
  font-size: 12px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* Hero visual side */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
}

.photo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  transform: scale(1.18) translateY(-45px);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 40px rgba(34, 211, 238, 0.15));
  position: relative;
  z-index: 1;
}

.photo-placeholder {
  position: absolute;
  inset: 8% 8% 8% 8%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #1a2438, #0f1626);
  color: var(--fg-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 24px;
  border: 1px solid var(--border-strong);
  z-index: 1;
}
/* Hide placeholder when a photo image is loaded next to it */
.photo-wrap:has(img:not([src=""])) .photo-placeholder { display: none; }
.photo-placeholder svg { width: 40%; height: auto; opacity: 0.4; margin-bottom: 16px; }

/* Glow orbs around photo */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  pointer-events: none;
}
.glow-orb.blue { width: 280px; height: 280px; background: var(--blue); top: 0%; left: -8%; opacity: var(--orb-blue-opacity); }
.glow-orb.cyan { width: 220px; height: 220px; background: var(--cyan); bottom: 0%; right: -8%; opacity: var(--orb-cyan-opacity); }
.glow-orb.orange { width: 180px; height: 180px; background: var(--orange); bottom: 20%; left: 0%; opacity: var(--orb-orange-opacity); }

/* Floating badges */
.badge {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--badge-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite;
}
.badge .ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.badge .ico.blue { background: rgba(59, 130, 246, 0.18); color: var(--blue-bright); }
.badge .ico.cyan { background: rgba(34, 211, 238, 0.18); color: var(--cyan); }
.badge .ico.orange { background: rgba(249, 115, 22, 0.18); color: var(--orange-soft); }
.badge .meta { display: flex; flex-direction: column; line-height: 1.2; }
.badge .meta .v { font-size: 14px; font-weight: 600; }
.badge .meta .k { font-size: 11px; color: var(--fg-dim); letter-spacing: 0.04em; }

.badge-1 { top: 4%; left: -4%; animation-delay: 0s; }
.badge-2 { top: 30%; right: -2%; animation-delay: 1.5s; }
.badge-3 { bottom: 24%; left: -6%; animation-delay: 3s; }
.badge-4 { bottom: 4%; right: -2%; animation-delay: 4.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Mini chart card behind */
.dash-card {
  position: absolute;
  z-index: 5;
  background: var(--dash-card-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 14px 16px;
  width: 200px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
  animation: float 7s ease-in-out infinite;
}
.dash-card.top { top: 8%; right: 2%; animation-delay: 1s; }
.dash-card.bot { bottom: 8%; left: 2%; animation-delay: 2.5s; }
.dash-card .head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 8px;
}
.dash-card .val {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.dash-card .delta {
  font-size: 11px; color: #4ade80; font-weight: 500; margin-left: 6px;
}
.dash-card .spark { margin-top: 6px; }

/* ============ Stats ============ */
.stats {
  padding-top: 40px;
}

.stats-head {
  text-align: center;
  margin-bottom: 56px;
}
.stats-head .lead {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 640px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.3);
  background: var(--surface-strong);
}
.stat-card:hover::before { opacity: 1; }

.stat-card .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: grid; place-items: center;
  color: var(--blue-bright);
  margin-bottom: 22px;
}
.stat-card:nth-child(2) .ico { background: rgba(34, 211, 238, 0.12); border-color: rgba(34, 211, 238, 0.25); color: var(--cyan); }
.stat-card:nth-child(3) .ico { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.25); color: var(--orange-soft); }
.stat-card:nth-child(4) .ico { background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.25); color: var(--blue-bright); }

.stat-num {
  font-size: 52px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #fff, #a4adc2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  margin-top: 10px;
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* ============ About ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  text-wrap: pretty;
}
.about-text strong {
  color: var(--fg);
  font-weight: 500;
}

.geo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.geo-pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-muted);
}

.focus-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(15, 22, 38, 0.6));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.focus-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,0.4), transparent 40%, rgba(34,211,238,0.3) 90%);
  -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;
  pointer-events: none;
}
.focus-card .label {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}
.focus-card h3 {
  margin-top: 8px;
  font-size: 24px;
}
.focus-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.focus-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  color: var(--fg);
  font-weight: 500;
}
.focus-list li:last-child { border-bottom: none; }
.focus-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gradient-blue);
  flex-shrink: 0;
}

/* ============ Expertise ============ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.x-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 30px;
  transition: all 0.3s ease;
  overflow: hidden;
}
.x-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(59,130,246,0.12), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.x-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-strong);
}
.x-card:hover::after { opacity: 1; }

.x-ico {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(34,211,238,0.12));
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: grid; place-items: center;
  color: var(--blue-bright);
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}
.x-card:nth-child(2) .x-ico, .x-card:nth-child(5) .x-ico {
  background: linear-gradient(135deg, rgba(34,211,238,0.18), rgba(59,130,246,0.12));
  border-color: rgba(34, 211, 238, 0.3);
  color: var(--cyan);
}
.x-card:nth-child(3) .x-ico, .x-card:nth-child(6) .x-ico {
  background: linear-gradient(135deg, rgba(249,115,22,0.16), rgba(251,146,60,0.12));
  border-color: rgba(249, 115, 22, 0.3);
  color: var(--orange-soft);
}

.x-card h3 {
  font-size: 20px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.x-card p {
  margin-top: 12px;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

/* ============ Experience timeline ============ */
.exp-wrap {
  position: relative;
  padding-left: 32px;
}
.exp-wrap::before {
  content: '';
  position: absolute;
  left: 8px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan), var(--blue), rgba(59, 130, 246, 0.1));
}

.exp-item {
  position: relative;
  padding: 0 0 40px 36px;
}
.exp-item:last-child { padding-bottom: 0; }
.exp-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-0);
  border: 2px solid var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.15);
}
.exp-item.highlight::before {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.25), 0 0 18px var(--cyan);
}

.exp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: all 0.25s ease;
}
.exp-item.highlight .exp-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(15,22,38,0.6));
  border-color: rgba(34, 211, 238, 0.3);
}
.exp-card:hover {
  border-color: var(--border-strong);
  transform: translateX(4px);
}

.exp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.exp-role {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.exp-role .at {
  color: var(--cyan);
  font-weight: 500;
}
.exp-item.highlight .exp-role .at {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.exp-date {
  font-size: 13px;
  color: var(--fg-dim);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
}
.exp-card p {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
}

.exp-tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  color: var(--orange-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.prev-roles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.prev-roles li {
  list-style: none;
  font-size: 14px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.prev-roles li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--fg-dim);
}

/* ============ Collaborations ============ */
.collab-block { margin-bottom: 72px; }
.collab-block:last-child { margin-bottom: 0; }

.collab-head {
  margin-bottom: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.collab-head h3 {
  font-size: 26px;
  letter-spacing: -0.02em;
}
.collab-head p {
  color: var(--fg-muted);
  font-size: 15px;
  max-width: 560px;
}
.collab-head .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.18em;
}

.logo-grid {
  display: grid;
  gap: 16px;
}
.logo-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(220px, 360px));
  justify-content: center;
  max-width: 760px;
  margin: 0 auto;
  gap: 14px;
}
.logo-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

.logo-card {
  aspect-ratio: 12 / 6;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 0px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.logo-card.dark {
  background: var(--logo-card-dark-bg);
  border: 1px solid var(--border);
}
.logo-card.light {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,0.1);
}

.logo-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}
.logo-card.dark:hover {
  background: var(--logo-card-dark-bg-hover);
  box-shadow: 0 20px 40px -20px rgba(34, 211, 238, 0.2);
}
.logo-card.light:hover {
  box-shadow: 0 20px 40px -20px rgba(59, 130, 246, 0.4);
}

.logo-card img {
  max-width: 34%;
  max-height: 34%;
  width: auto;
  object-fit: contain;
}
.logo-card.light img {
  filter: grayscale(100%);
  opacity: 0.7;
}
.logo-card:hover img {
  filter: none;
  opacity: 1;
}

/* Placeholder text shown when logo file missing */
.logo-placeholder {
  text-align: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
.logo-card.dark .logo-placeholder {
  color: var(--fg-muted);
}
.logo-card.dark .logo-placeholder .name {
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  font-family: 'Inter', sans-serif;
}
.logo-card.dark .logo-placeholder .ph {
  font-size: 10px;
  color: var(--fg-dim);
}
.logo-card.light .logo-placeholder {
  color: #5a6478;
}
.logo-card.light .logo-placeholder .name {
  color: #0b1426;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  font-family: 'Inter', sans-serif;
}

/* ============ Training ============ */
.training-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.t-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.t-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.25);
  background: linear-gradient(180deg, rgba(249,115,22,0.05), var(--surface));
}
.t-num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  color: var(--orange-soft);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.t-card h3 {
  font-size: 18px;
  font-weight: 600;
}
.t-card p {
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.6;
}

.training-cta {
  margin-top: 48px;
  text-align: center;
  display: flex;
  justify-content: center;
}

/* ============ Tools ============ */
.tools-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.tool-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.tool-group h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-group h4::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}
.tool-group:nth-child(2) h4 { color: var(--blue-bright); }
.tool-group:nth-child(2) h4::before { background: var(--blue-bright); }
.tool-group:nth-child(3) h4 { color: var(--orange-soft); }
.tool-group:nth-child(3) h4::before { background: var(--orange-soft); }
.tool-group:nth-child(4) h4 { color: #a78bfa; }
.tool-group:nth-child(4) h4::before { background: #a78bfa; }

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--fg);
  transition: all 0.2s ease;
}
.pill:hover {
  background: var(--pill-bg-hover);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

/* ============ Education ============ */
.edu-card {
  background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(15,22,38,0.4));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.edu-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(34,211,238,0.4), transparent 50%, rgba(59,130,246,0.3));
  -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;
  pointer-events: none;
}
.edu-ico {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  display: grid; place-items: center;
  color: var(--cyan);
}
.edu-degree {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.edu-school {
  margin-top: 6px;
  color: var(--fg-muted);
  font-size: 15px;
}
.edu-note {
  margin-top: 14px;
  color: var(--fg-muted);
  font-size: 14px;
  max-width: 540px;
  line-height: 1.65;
}
.edu-years {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  color: var(--cyan);
  padding: 10px 16px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  white-space: nowrap;
}

/* ============ Contact ============ */
.contact {
  position: relative;
}
.contact-inner {
  background: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(15,22,38,0.4) 60%, rgba(249,115,22,0.06));
  border: 1px solid var(--border-strong);
  border-radius: 32px;
  padding: 80px 60px;
  position: relative;
  overflow: hidden;
}
.contact-inner::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(34,211,238,0.25), transparent 60%);
  pointer-events: none;
}
.contact-inner::after {
  content: '';
  position: absolute;
  bottom: -200px; left: -200px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(249,115,22,0.18), transparent 60%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  position: relative;
  z-index: 1;
  align-items: start;
}

.contact h2 {
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.contact-text p {
  margin-top: 22px;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  text-wrap: pretty;
}
.contact-buttons {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--contact-item-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.25s ease;
}
.contact-item:hover {
  border-color: var(--border-strong);
  background: var(--contact-item-bg-hover);
  transform: translateX(4px);
}
.contact-item .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
  display: grid; place-items: center;
  color: var(--cyan);
  flex-shrink: 0;
}
.contact-item:nth-child(2) .ico { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); color: var(--blue-bright); }
.contact-item:nth-child(3) .ico { background: rgba(96, 165, 250, 0.12); border-color: rgba(96, 165, 250, 0.25); color: var(--blue-bright); }
.contact-item:nth-child(4) .ico { background: rgba(249, 115, 22, 0.12); border-color: rgba(249, 115, 22, 0.25); color: var(--orange-soft); }

.contact-item .ck { font-size: 12px; color: var(--fg-dim); letter-spacing: 0.06em; text-transform: uppercase; }
.contact-item .cv { font-size: 15px; color: var(--fg); margin-top: 2px; font-weight: 500; }

/* ============ Footer ============ */
.footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-brand .name { font-size: 18px; font-weight: 600; }
.footer-brand .role { color: var(--fg-muted); margin-top: 6px; font-size: 14px; }
.footer-brand .pipe { color: var(--fg-dim); font-size: 13px; margin-top: 14px; letter-spacing: 0.04em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: flex-end; }
.footer-links a { font-size: 14px; color: var(--fg-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--fg-dim);
  flex-wrap: wrap;
  gap: 14px;
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  section { padding: 80px 0; }
  .hero { padding-top: 130px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .training-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-groups { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .nav-cta .btn-primary { display: none; }
  .logo-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-inner { padding: 56px 32px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .edu-card { grid-template-columns: 1fr; text-align: left; gap: 20px; }
  .edu-years { justify-self: start; }
  .prev-roles { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .stats-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .training-grid { grid-template-columns: 1fr; }
  .logo-grid.cols-2 { grid-template-columns: 1fr; }
  .logo-grid.cols-6 { grid-template-columns: repeat(2, 1fr); }
  .badge-1, .badge-2, .badge-3, .badge-4 { display: none; }
  .dash-card { display: none; }
  .hero-trust { gap: 20px; }
  .contact-inner { padding: 40px 24px; }
  .contact h2 { font-size: 32px; }
}


/* ============ Light theme tweaks ============ */
:root[data-theme="light"] .stat-num {
  background: linear-gradient(180deg, #0b1426, #4a5468);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme="light"] .photo-wrap img {
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.18)) drop-shadow(0 0 40px rgba(59, 130, 246, 0.10));
}
:root[data-theme="light"] body::after {
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}
:root[data-theme="light"] .focus-card {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(255, 255, 255, 0.6));
}
:root[data-theme="light"] .contact-inner {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.6) 60%, rgba(249, 115, 22, 0.06));
}
:root[data-theme="light"] .edu-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(255, 255, 255, 0.7));
}
:root[data-theme="light"] .exp-item.highlight .exp-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.7));
}
:root[data-theme="light"] .exp-item::before {
  background: var(--bg-0);
}
:root[data-theme="light"] .photo-placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(15,22,38,0.04) 0 12px, transparent 12px 24px),
    linear-gradient(135deg, #e8ecf3, #f5f7fb);
  color: var(--fg-dim);
}

/* Theme toggle button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--surface-strong);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.theme-toggle svg { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
