/* =========================================================
   Mohamed Tarek — Portfolio
   Design tokens
   ========================================================= */
:root {
  --navy: #111B3C;
  --navy-2: #1B2750;
  --purple: #7847E8;
  --blue: #4785ED;
  --lavender: #F4F2FF;
  --lavender-2: #EAE5FF;
  --white: #FFFFFF;
  --text: #414866;
  --muted: #6E7491;
  --border: rgba(17, 27, 60, 0.08);
  --border-strong: rgba(17, 27, 60, 0.14);
  --grad: linear-gradient(120deg, var(--purple), var(--blue));
  --grad-soft: linear-gradient(135deg, #F7F5FF, #EEF2FF);
  --shadow-xs: 0 1px 2px rgba(17, 27, 60, 0.06);
  --shadow-sm: 0 6px 18px -8px rgba(17, 27, 60, 0.18);
  --shadow: 0 24px 50px -28px rgba(17, 27, 60, 0.32);
  --shadow-lg: 0 40px 80px -40px rgba(17, 27, 60, 0.4);
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 36px;
  --pad: clamp(18px, 5vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --font-head: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(0.975rem, 0.35vw + 0.9rem, 1.0625rem);
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7.2vw, 4.4rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.05rem, 1.2vw, 1.2rem); font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(120, 71, 232, 0.18); color: var(--navy); }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 14px 14px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; text-decoration: none; }

/* =========================================================
   Shared bits
   ========================================================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  margin: 0 0 14px;
}
.eyebrow-line {
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sparkle {
  display: inline-block;
  font-size: 0.62em;
  color: var(--purple);
  transform: translateY(-0.35em);
}

.btn {
  --btn-bg: var(--grad);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease), color 0.22s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--btn-bg);
  color: #fff;
  box-shadow: 0 14px 28px -14px rgba(120, 71, 232, 0.75);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -16px rgba(120, 71, 232, 0.85);
}
.btn-primary .icon { transition: transform 0.22s var(--ease); }
.btn-primary:hover .icon { transform: translateX(3px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.72);
  color: var(--navy);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 71, 232, 0.4);
  color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.btn-sm { padding: 11px 18px; font-size: 0.86rem; }

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -24px rgba(17, 27, 60, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 20px -12px rgba(120, 71, 232, 0.9);
}
.brand-text { font-size: 1.02rem; white-space: nowrap; }
.brand-text span { margin-left: 0.3em; }
.brand-text span { color: var(--purple); }
.brand--light { color: #fff; }
.brand--light .brand-text span { color: #B7A6FF; }

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
}
.primary-nav a:not(.btn) {
  position: relative;
  color: var(--navy);
  font-size: 0.93rem;
  font-weight: 600;
  padding: 6px 0;
  text-decoration: none;
  opacity: 0.82;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}
.primary-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--grad);
  transition: width 0.25s var(--ease);
}
.primary-nav a:not(.btn):hover,
.primary-nav a:not(.btn).is-active { opacity: 1; color: var(--purple); }
.primary-nav a:not(.btn):hover::after,
.primary-nav a:not(.btn).is-active::after { width: 100%; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: clip;
  padding-block: clamp(36px, 6vw, 72px) clamp(48px, 7vw, 88px);
  background:
    radial-gradient(1100px 520px at 78% -10%, #EFEBFF 0%, rgba(244, 242, 255, 0) 62%),
    linear-gradient(180deg, #FBFAFF 0%, #FFFFFF 72%);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.55;
}
.orb-1 {
  width: 320px; height: 320px;
  right: -90px; top: -80px;
  background: radial-gradient(circle at 35% 35%, rgba(120, 71, 232, 0.28), rgba(120, 71, 232, 0) 68%);
}
.orb-2 {
  width: 380px; height: 380px;
  left: -140px; bottom: -160px;
  background: radial-gradient(circle at 60% 40%, rgba(71, 133, 237, 0.22), rgba(71, 133, 237, 0) 70%);
}
.grid-dots {
  position: absolute;
  right: 6%;
  bottom: 8%;
  width: 190px;
  height: 130px;
  background-image: radial-gradient(rgba(120, 71, 232, 0.28) 1.4px, transparent 1.4px);
  background-size: 16px 16px;
  opacity: 0.5;
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.hero-copy h1 { margin-bottom: 14px; }

.hero-role {
  font-family: var(--font-head);
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  position: relative;
  padding-left: 16px;
}
.hero-role::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 3px;
  border-radius: 3px;
  background: var(--grad);
}

.hero-lead {
  max-width: 46ch;
  color: var(--text);
  font-size: clamp(0.98rem, 0.6vw + 0.9rem, 1.08rem);
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.86rem;
  color: var(--muted);
}
.hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.hero-meta a { color: var(--muted); }
.hero-meta a:hover { color: var(--purple); }
.hero-meta .icon { color: var(--purple); }
.hero-meta li > span,
.hero-meta li > a { overflow-wrap: anywhere; }

/* Hero visual */
.hero-visual {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 520px);
  padding: 10px;
}
.hero-blob {
  position: absolute;
  inset: 8% 1% 10% 1%;
  border-radius: 46% 54% 52% 48% / 48% 44% 56% 52%;
  background: linear-gradient(150deg, #EFEAFF 0%, #E7EDFF 55%, #F6F1FF 100%);
  z-index: 0;
}
.hero-portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 26px 44px rgba(17, 27, 60, 0.16));
}

.float-card {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px -22px rgba(17, 27, 60, 0.45);
  animation: floaty 7s var(--ease) infinite;
}
.float-card-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.float-card-value {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.1;
}
.float-card-sub { font-size: 0.68rem; color: var(--muted); }

.float-card--score { top: 1%; right: -10px; }
.float-card--portfolios {
  bottom: 9%;
  left: -6px;
  animation-delay: -2.4s;
}
.float-card--portfolios .float-card-value { color: var(--purple); }

.avail-badge {
  position: absolute;
  z-index: 3;
  bottom: 34%;
  right: -8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 172px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 32px -18px rgba(17, 27, 60, 0.8);
}
.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.18);
  flex: 0 0 auto;
}

.spark {
  position: absolute;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--grad);
  opacity: 0.85;
}
.spark-1 { top: 16%; left: 2%; transform: rotate(18deg); }
.spark-2 { bottom: 22%; right: 12%; width: 9px; height: 9px; opacity: 0.6; transform: rotate(-12deg); }

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

/* =========================================================
   Sections
   ========================================================= */
.section { padding-block: var(--section-y); }
.section-tight { padding-block: clamp(28px, 5vw, 56px); }
.section-tint {
  background:
    radial-gradient(900px 380px at 12% 0%, #F7F5FF 0%, rgba(247, 245, 255, 0) 60%),
    var(--lavender);
}

.section-head {
  max-width: 640px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.section-head h2 { margin-bottom: 14px; }
.section-lede {
  color: var(--muted);
  font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.03rem);
  margin: 0;
}
.section-lede strong { color: var(--navy); font-weight: 600; }

/* =========================================================
   Projects
   ========================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(22px, 3vw, 32px);
}
.filter {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.25s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.filter:hover {
  border-color: rgba(120, 71, 232, 0.45);
  color: var(--purple);
  transform: translateY(-1px);
}
.filter.is-active {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(120, 71, 232, 0.8);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2vw, 22px);
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px;
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(120, 71, 232, 0.18);
}
.project-card[hidden] { display: none; }

.project-thumb {
  position: relative;
  border-radius: 20px;
  padding: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.project-thumb svg {
  width: 100%;
  height: auto;
  stroke: none;
  border-radius: 12px;
}
.thumb-purple { background: linear-gradient(150deg, #F1ECFF, #E6E9FF); }
.thumb-blue   { background: linear-gradient(150deg, #E8F0FF, #EFE9FF); }
.thumb-indigo { background: linear-gradient(150deg, #ECE9FF, #E4EEFF); }
.thumb-violet { background: linear-gradient(150deg, #F5EDFF, #E9EFFF); }

.thumb-tag {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1;
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 4px 10px;
}

.project-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 10px 8px;
  flex: 1;
}
.project-cat {
  font-family: var(--font-head);
  font-size: 0.655rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}
.project-body h3 { font-size: 1rem; }
.project-desc {
  color: var(--muted);
  font-size: 0.865rem;
  line-height: 1.62;
  margin: 0;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 0 4px;
  border: 0;
  background: none;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.project-link .icon { transition: transform 0.25s var(--ease); }
.project-link:hover { color: var(--purple); gap: 11px; }
.project-link:hover .icon { transform: translate(2px, -2px); }

.work-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: clamp(24px, 3vw, 34px) 0 0;
  padding: 16px 18px;
  border-radius: var(--r-md);
  background: var(--lavender);
  border: 1px solid rgba(120, 71, 232, 0.12);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}
.work-note .icon { color: var(--purple); margin-top: 3px; width: 18px; height: 18px; }

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.about-visual {
  position: relative;
  margin: 0;
  justify-self: center;
  width: min(100%, 350px);
}
.about-blob {
  position: absolute;
  inset: 10% -2% 4% -2%;
  border-radius: 52% 48% 44% 56% / 46% 52% 48% 54%;
  background: linear-gradient(160deg, #EDE7FF, #E4ECFF);
}
.about-portrait {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 42px rgba(17, 27, 60, 0.16));
}
.about-copy h2 { margin-bottom: 18px; }
.about-copy > p { color: var(--text); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 26px;
}
.about-highlights li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}
.about-highlights strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  color: var(--navy);
  margin-bottom: 2px;
}
.hl-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--lavender);
  color: var(--purple);
}
.hl-icon svg { width: 18px; height: 18px; }

/* =========================================================
   Services
   ========================================================= */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2vw, 20px);
}
.service-card {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(120, 71, 232, 0.2);
}
.service-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 18px;
  color: #fff;
}
.service-icon svg { width: 24px; height: 24px; stroke-width: 1.8; }
.icon-purple { background: linear-gradient(140deg, #8B5CF6, #6D3DE0); box-shadow: 0 14px 26px -14px rgba(120, 71, 232, 0.85); }
.icon-blue   { background: linear-gradient(140deg, #5B9BF5, #3B74E0); box-shadow: 0 14px 26px -14px rgba(71, 133, 237, 0.85); }
.icon-indigo { background: linear-gradient(140deg, #6366F1, #4338CA); box-shadow: 0 14px 26px -14px rgba(99, 102, 241, 0.85); }
.icon-violet { background: linear-gradient(140deg, #A78BFA, #7C5CE6); box-shadow: 0 14px 26px -14px rgba(167, 139, 250, 0.85); }

.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin: 0; }

/* =========================================================
   Timeline
   ========================================================= */
.timeline {
  position: relative;
  display: grid;
  gap: clamp(16px, 2.4vw, 24px);
  padding-left: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(120, 71, 232, 0.55), rgba(71, 133, 237, 0.12));
}
.timeline-item { position: relative; }
.timeline-dot {
  position: absolute;
  left: -26px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--purple);
  box-shadow: 0 0 0 4px rgba(120, 71, 232, 0.12);
}
.timeline-item--edu .timeline-dot { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(71, 133, 237, 0.14); }

.timeline-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.timeline-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }

.timeline-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 4px;
}
.timeline-date {
  font-family: var(--font-head);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(120, 71, 232, 0.08);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.timeline-org {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 12px;
}
.timeline-card ul { display: grid; gap: 8px; }
.timeline-card li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.timeline-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0.75;
}

/* =========================================================
   Skills
   ========================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(14px, 2vw, 20px);
}
.skill-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.6vw, 28px);
  box-shadow: var(--shadow-xs);
}
.skill-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 1rem;
}
.skill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.dot-purple { background: var(--purple); box-shadow: 0 0 0 4px rgba(120, 71, 232, 0.14); }
.dot-blue   { background: var(--blue); box-shadow: 0 0 0 4px rgba(71, 133, 237, 0.14); }
.dot-indigo { background: #6366F1; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
  background: var(--lavender);
  border: 1px solid rgba(120, 71, 232, 0.1);
  border-radius: 999px;
  padding: 7px 13px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.chips li:hover {
  background: #fff;
  color: var(--purple);
  transform: translateY(-1px);
}

/* =========================================================
   Highlights
   ========================================================= */
.stats-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 3vw, 40px);
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(700px 300px at 100% 0%, #FFFFFF 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, #EFEAFF 0%, #E7EDFF 100%);
  border: 1px solid rgba(120, 71, 232, 0.12);
  box-shadow: var(--shadow);
}

.stats-quote { position: relative; }
.quote-mark {
  display: block;
  font-family: var(--font-head);
  font-size: 3rem;
  line-height: 0.6;
  color: var(--purple);
  opacity: 0.5;
  margin-bottom: 8px;
}
.stats-quote p {
  font-family: var(--font-head);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 18px;
}
.quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.quote-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.quote-author strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  color: var(--navy);
  line-height: 1.3;
}
.quote-author small { font-size: 0.78rem; color: var(--muted); }

.stats-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
  align-content: center;
}
.stats-list li {
  padding-left: 14px;
  border-left: 1px solid rgba(17, 27, 60, 0.12);
}
.stat-value {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  display: block;
  font-size: 0.79rem;
  line-height: 1.45;
  color: var(--text);
  margin-top: 6px;
}
.stat-label small { color: var(--muted); font-size: 0.72rem; }

/* =========================================================
   Contact
   ========================================================= */
.contact-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(26px, 4.5vw, 56px);
  border-radius: var(--r-xl);
  background: linear-gradient(140deg, #141F42 0%, #111B3C 55%, #1A2450 100%);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-lg);
}
.contact-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 71, 232, 0.55), rgba(120, 71, 232, 0) 65%);
  pointer-events: none;
}
.contact-copy { position: relative; }
.contact-copy .eyebrow { color: #B7A6FF; }
.contact-copy .eyebrow-line { background: linear-gradient(90deg, #B7A6FF, #7FB0FF); }
.contact-copy h2 { color: #fff; margin-bottom: 14px; }
.contact-copy p { max-width: 44ch; color: rgba(255, 255, 255, 0.74); }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.contact-card .btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.contact-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.contact-list {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: center;
}
.contact-list li {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.contact-list li:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.contact-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(120, 71, 232, 0.22);
  color: #C9B9FF;
}
.contact-icon svg { width: 19px; height: 19px; }
.contact-label {
  grid-area: label;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}
.contact-list a,
.contact-list span:last-child {
  grid-area: value;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.contact-list a:hover { color: #C9B9FF; text-decoration: none; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.66);
  padding-block: clamp(40px, 6vw, 64px) 26px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand p {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.6);
}
.footer-col h3 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { display: grid; gap: 9px; }
.footer-col a,
.footer-col li {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 22px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-bottom p { margin: 0; }

/* =========================================================
   Project dialog
   ========================================================= */
.project-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: min(86vh, 780px);
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
.project-dialog::backdrop {
  background: rgba(17, 27, 60, 0.5);
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.dialog-cat {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}
.dialog-close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.dialog-close svg { width: 18px; height: 18px; }
.dialog-close:hover { background: var(--lavender); color: var(--purple); }

.project-dialog h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-bottom: 12px; }
.dialog-desc { color: var(--muted); font-size: 0.94rem; }
.dialog-block { margin-top: 22px; }
.dialog-block h3 {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
}
.dialog-block ul:not(.chips) { display: grid; gap: 8px; }
.dialog-block ul:not(.chips) li {
  position: relative;
  padding-left: 20px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}
.dialog-block ul:not(.chips) li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grad);
}
.dialog-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  background: var(--lavender);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}
.dialog-note .icon { color: var(--purple); margin-top: 2px; width: 17px; height: 17px; }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 899px) {
  .nav-toggle { display: grid; }

  .primary-nav {
    position: absolute;
    left: var(--pad);
    right: var(--pad);
    top: calc(100% + 8px);
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
    border-radius: var(--r-md);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .primary-nav a:not(.btn) {
    display: block;
    padding: 11px 6px;
    border-radius: 10px;
    font-size: 0.98rem;
  }
  .primary-nav a:not(.btn)::after { display: none; }
  .primary-nav a:not(.btn):hover,
  .primary-nav a:not(.btn).is-active { background: var(--lavender); padding-left: 12px; }
  .nav-cv { justify-content: center; }
}

@media (min-width: 640px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-highlights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
  .stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.04fr 0.96fr; gap: clamp(28px, 4vw, 56px); }
  .hero-visual { width: min(100%, 540px); }
  .hero-copy { padding-block: 8px; }
  .about-grid { grid-template-columns: 0.85fr 1.15fr; }
  .contact-card { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .stats-panel { grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .stats-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .stats-list li { padding-left: 18px; }
}

@media (min-width: 1080px) {
  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Small phones */
@media (max-width: 639px) {
  .hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
    align-items: stretch;
  }
  .hero-blob { inset: 6% 2% 34% 2%; }
  .hero-portrait { grid-column: 1 / -1; grid-row: 1; }
  .float-card {
    position: static;
    animation: none;
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
    background: #fff;
  }
  .float-card--portfolios { display: grid; }
  .avail-badge {
    position: absolute;
    top: 10px;
    right: 4px;
    bottom: auto;
    height: max-content;
    align-self: start;
    max-width: 150px;
    font-size: 0.64rem;
    padding: 9px 12px;
  }
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-inline: calc(var(--pad) * -1);
    padding-inline: var(--pad);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: 0 0 auto; }
  .spark { display: none; }
}

@media (max-width: 420px) {
  .float-card--score { padding: 10px 13px; }
  .float-card-value { font-size: 1.25rem; }
  .avail-badge { max-width: 148px; font-size: 0.65rem; padding: 9px 12px; bottom: 26%; }
  .hero-meta { font-size: 0.82rem; }
  .timeline { padding-left: 22px; }
  .timeline-dot { left: -22px; width: 14px; height: 14px; top: 24px; }
  .btn { padding: 14px 22px; }
}

/* 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;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Print */
@media print {
  .site-header, .hero-bg, .contact-glow, .float-card, .avail-badge { display: none; }
  body { color: #000; }
}
