/* ============================================================
   YOUSEF AMMAR — PORTFOLIO
   "Engineered like the systems he builds."
   Warm-dark design system. Inverts the brand cream→dark,
   keeps the #f54e00 orange + warm near-black DNA.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* deep indigo / violet surfaces */
  --bg:        #09081400;
  --bg-solid:  #090814;
  --bg-2:      #0c0b18;
  --surface:   #141327;
  --surface-2: #1b1934;
  --surface-3: #242141;

  /* hairlines (cool light at low alpha) */
  --line:        rgba(196, 198, 245, 0.10);
  --line-2:      rgba(196, 198, 245, 0.17);
  --line-strong: rgba(196, 198, 245, 0.28);

  /* text (cool off-white) */
  --text:   #ecebf7;
  --text-2: rgba(236, 235, 247, 0.62);
  --text-3: rgba(236, 235, 247, 0.42);
  --text-4: rgba(236, 235, 247, 0.26);

  /* brand — violet + electric blue */
  --accent:     #8b66f0;
  --accent-2:   #a98bff;
  --accent-dim: rgba(139, 102, 240, 0.16);
  --accent-blue: #5b8cff;
  --gold:       #e0b65c;

  /* domain / category accents (glow on dark) */
  --c-nlp:    #b89bf5;   /* violet  — Arabic NLP   */
  --c-vision: #7fd4c2;   /* teal    — vision/OCR   */
  --c-xai:    #c0a8dd;   /* lavender— XAI          */
  --c-data:   #7fa8ff;   /* blue    — data/infra   */
  --c-agent:  #f08fc0;   /* magenta — agents/LLM   */
  --success:  #51c79a;

  /* type */
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 80px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg-solid); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-display);
  background: transparent;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Neural / grid background (barely seen) ---------- */
.bg-neural {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 78% 4%, rgba(139,102,240,0.16), transparent 60%),
    radial-gradient(ellipse 60% 50% at 8% 22%, rgba(91,140,255,0.10), transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(139,102,240,0.10), transparent 60%);
}
.bg-neural::before {
  content: "";
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(196,198,245,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196,198,245,0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 30%, transparent 85%);
}
#neuralCanvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
section { position: relative; }
.section-pad { padding-block: clamp(64px, 11vw, 150px); }

/* eyebrow / section index */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow .idx { color: var(--accent); }
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--line-strong);
  display: inline-block;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(36px, 6vw, 68px);
}
.section-head h2 {
  font-weight: 500;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 18px;
  max-width: 16ch;
}
.section-head .note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
  max-width: 30ch;
  line-height: 1.65;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 13px 20px;
  border-radius: 10px;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--line-strong); background: rgba(243,241,236,0.03); }

/* ---------- Badges / chips ---------- */
.badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px 3px;
  border-radius: 100px;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-production { color: var(--success); }
.badge-finalist  { color: var(--gold); }
.badge-research  { color: var(--c-xai); }
.badge-live      { color: var(--c-vision); }
.badge-active    { color: var(--accent-2); }

.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  padding: 5px 11px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(243,241,236,0.02);
  white-space: nowrap;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(9, 8, 20, 0.78);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}
.brand .mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .16s ease, background .16s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(243,241,236,0.04); }
.nav-links a.cta { color: var(--text); border: 1px solid var(--line-2); margin-left: 8px; }
.nav-links a.cta:hover { border-color: var(--accent); color: var(--accent-2); }
.nav-toggle { display: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding-top: 150px; padding-bottom: 0; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 75%);
  pointer-events: none;
  opacity: .7;
}
.hero-glow {
  position: absolute;
  top: -180px; right: -120px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, rgba(139,102,240,0.18) 0%, transparent 62%);
  pointer-events: none;
  filter: blur(8px);
}
.hero-inner { position: relative; z-index: 2; }
.hero-text { min-width: 0; }

/* circular avatar (profile picture) */
.hero-avatar {
  position: relative;
  width: 96px; height: 96px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(150deg, var(--accent) 0%, var(--accent-blue) 70%, rgba(196,198,245,0.3) 100%);
  margin-bottom: 30px;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,0.6), 0 0 42px rgba(139,102,240,0.20);
}
.hero-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  display: block;
}
.hero-avatar .av-dot {
  position: absolute;
  right: 4px; bottom: 4px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--success);
  border: 3px solid var(--bg-solid);
  box-shadow: 0 0 8px rgba(81,199,154,0.8);
}
.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--text-2);
  padding: 7px 14px 6px;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  margin-bottom: 34px;
}
.hero-status .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(89,184,148,0.6);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(89,184,148,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(89,184,148,0); }
  100% { box-shadow: 0 0 0 0 rgba(89,184,148,0); }
}
.hero h1 {
  font-weight: 500;
  font-size: clamp(44px, 8vw, 110px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.hero-sub {
  margin-top: 30px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 46ch;
}
.hero-sub .type-line { color: var(--text); }
.hero-sub .cursor {
  display: inline-block;
  width: 9px; height: 1.05em;
  background: var(--accent);
  margin-left: 2px;
  transform: translateY(2px);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 14px; height: 14px; opacity: .7; }

/* stat band */
.stat-band {
  position: relative; z-index: 2;
  margin-top: clamp(56px, 8vw, 96px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.stat {
  padding: 30px 0;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.stat:first-child { border-left: none; padding-left: 0; }
.stat .num {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat .num .unit { color: var(--accent); font-size: 0.62em; }
.stat .lbl {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  line-height: 1.5;
}

/* ============================================================
   FEATURED PROJECTS
   ============================================================ */
.featured-list { display: flex; flex-direction: column; gap: 24px; }
.fcard {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  overflow: hidden;
  transition: border-color .3s ease, transform .3s ease;
}
.fcard:hover { border-color: var(--line-2); }
.fcard-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 380px;
}
.fcard-body { padding: clamp(28px, 3.5vw, 46px); display: flex; flex-direction: column; }
.fcard-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
.fcard-no { font-family: var(--font-mono); font-size: 12px; color: var(--text-4); letter-spacing: 0.1em; }
.fcard h3 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}
.fcard .domain {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 12px;
}
.fcard p {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.62;
  max-width: 42ch;
}
.fcard .quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text);
  margin-top: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  line-height: 1.45;
}
.fcard-spacer { flex: 1; min-height: 22px; }
.fcard-metrics {
  display: flex; flex-wrap: wrap; gap: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.metric .mv { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.metric .mv.pos { color: var(--success); }
.metric .mv.neg { color: var(--c-agent); }
.metric .ml { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; margin-top: 4px; }
.fcard-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }

/* visual panel */
.fcard-visual {
  position: relative;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 0%, rgba(139,102,240,0.06), transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 31px, var(--line) 31px, var(--line) 32px),
    repeating-linear-gradient(90deg, transparent, transparent 31px, var(--line) 31px, var(--line) 32px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

/* ---- Pipeline diagram (complaint API) ---- */
.pipeline { width: 100%; max-width: 360px; }
.pl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.pl-node {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  opacity: 0;
  transform: translateY(6px);
}
.pl-node.in { animation: plIn .5s ease forwards; }
@keyframes plIn { to { opacity: 1; transform: translateY(0); } }
.pl-node .tag { font-size: 9.5px; color: var(--text-4); }
.pl-node.cls { border-color: rgba(184,155,245,0.4); color: var(--c-nlp); }
.pl-node.rule { border-color: rgba(139,102,240,0.55); color: var(--accent-2); background: var(--accent-dim); }
.pl-node.action { border-color: rgba(89,184,148,0.4); color: var(--success); }
.pl-node.llm {
  border-style: dashed;
  border-color: var(--line-2);
  color: var(--text-3);
}
.pl-3 { display: flex; gap: 7px; margin-bottom: 9px; }
.pl-3 .pl-node { font-size: 10px; padding: 8px 9px; text-align: center; justify-content: center; }
.pl-arrow { text-align: center; color: var(--text-4); font-size: 12px; line-height: 1; margin: 2px 0 9px; }
.pl-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-4);
  text-transform: uppercase;
  text-align: center;
  margin-top: 14px;
}

/* ---- Embedding / similarity visual (family system) ---- */
.embed-visual { width: 100%; max-width: 340px; }
.embed-bars { display: flex; flex-direction: column; gap: 13px; }
.embed-bar-row { display: flex; align-items: center; gap: 12px; }
.embed-bar-row .lab { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); width: 54px; }
.embed-track { flex: 1; height: 7px; border-radius: 100px; background: rgba(243,241,236,0.07); overflow: hidden; }
.embed-fill { height: 100%; border-radius: 100px; width: 0; transition: width 1.1s cubic-bezier(.2,.7,.2,1); }
.embed-bar-row .pct { font-family: var(--font-mono); font-size: 11px; color: var(--text); width: 34px; text-align: right; }
.embed-note { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 18px; text-align: center; }

/* ---- RAG visual (legal) ---- */
.rag-visual { width: 100%; max-width: 330px; font-family: var(--font-mono); }
.rag-q { font-size: 12px; color: var(--text); padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface-2); margin-bottom: 8px; direction: rtl; text-align: right; }
.rag-chunks { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.rag-chunk { font-size: 10px; color: var(--text-3); padding: 7px 11px; border-radius: 7px; border: 1px solid var(--line); display: flex; justify-content: space-between; }
.rag-chunk .score { color: var(--c-vision); }
.rag-answer { font-size: 11px; color: var(--text-2); padding: 11px 13px; border-radius: 9px; border: 1px solid rgba(89,184,148,0.3); background: rgba(89,184,148,0.05); line-height: 1.5; }
.rag-cite { color: var(--accent-2); }

/* ---- Cardiology interactive ---- */
.cardio-visual { width: 100%; max-width: 350px; }
.cardio-toggle {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  padding: 3px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.cardio-toggle button {
  padding: 6px 14px; border-radius: 100px; color: var(--text-3);
  transition: background .2s, color .2s;
}
.cardio-toggle button.on { background: var(--accent); color: #fff; }
.cardio-models { display: flex; flex-direction: column; gap: 16px; }
.cardio-model .cm-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cardio-model .cm-name { font-family: var(--font-mono); font-size: 12px; color: var(--text); }
.cardio-model .cm-val { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; transition: color .3s; }
.cardio-track { height: 9px; border-radius: 100px; background: rgba(243,241,236,0.07); overflow: hidden; }
.cardio-fill { height: 100%; border-radius: 100px; width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1), background .3s; }
.cardio-verdict {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
  text-align: center;
}
.cardio-verdict b { color: var(--text); font-style: normal; font-family: var(--font-display); }

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  min-height: 232px;
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.pcard:hover { border-color: var(--line-2); transform: translateY(-3px); background: var(--surface-2); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.pcard-icn {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line-2);
  display: grid; place-items: center;
  color: var(--text-2);
}
.pcard-icn svg { width: 17px; height: 17px; }
.pcard h4 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.pcard .pdesc { margin-top: 10px; font-size: 13.5px; line-height: 1.55; color: var(--text-2); flex: 1; }
.pcard .pstack { margin-top: 16px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); letter-spacing: 0.02em; }
.pcard .arrow-link { margin-top: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; transition: color .2s, gap .2s; }
.pcard:hover .arrow-link { color: var(--accent-2); gap: 11px; }

/* ============================================================
   EXPERIENCE
   ============================================================ */
.xp-list { display: flex; flex-direction: column; gap: 16px; }
.xp {
  position: relative;
  display: grid;
  grid-template-columns: 0.40fr 1.60fr;
  gap: 40px;
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(12,11,24,0.6) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.xp::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-blue));
  opacity: 0.7;
}
.xp:hover { border-color: var(--line-2); transform: translateY(-2px); }
.xp-current {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent-2);
  padding: 4px 10px 3px; border: 1px solid rgba(139,102,240,0.35);
  border-radius: 100px; background: var(--accent-dim);
}
.xp-when { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-2); letter-spacing: 0.02em; }
.xp-loc { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 8px; }
.xp-role { font-size: clamp(20px, 2.4vw, 27px); font-weight: 500; letter-spacing: -0.02em; }
.xp-co { font-size: 15px; color: var(--text-2); margin-top: 5px; }
.xp-points { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.xp-point { display: flex; gap: 13px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.xp-point::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); margin-top: 8px; transform: rotate(45deg); }

/* ============================================================
   RESEARCH FEATURE
   ============================================================ */
.research {
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 85% 10%, rgba(182,168,221,0.10), transparent 55%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  padding: clamp(34px, 5vw, 64px);
  position: relative;
  overflow: hidden;
}
.research-head { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin-bottom: 30px; }
.research h3 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 20ch;
  margin-bottom: 26px;
}
.research h3 em { font-family: var(--font-serif); font-style: italic; color: var(--c-xai); }
.research-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.research-col { border-top: 1px solid var(--line-2); padding-top: 18px; }
.research-col .rc-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.research-col .rc-v { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.research-col .rc-big { font-size: 32px; font-weight: 500; letter-spacing: -0.03em; color: var(--text); }
.research-col .rc-big .unit { color: var(--c-xai); font-size: 0.55em; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 24px;
}
.skill-group .sg-head { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
.skill-group .sg-dot { width: 9px; height: 9px; border-radius: 50%; }
.skill-group .sg-title { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.skill-tags { display: flex; flex-wrap: wrap; gap: 7px; }

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cert {
  display: flex; align-items: flex-start; gap: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  background: var(--surface);
  transition: border-color .2s;
}
.cert:hover { border-color: var(--line-2); }
.cert .ci { font-family: var(--font-mono); font-size: 11px; color: var(--accent-2); flex: none; padding-top: 2px; }
.cert .cn { font-size: 14.5px; line-height: 1.4; }
.cert .co { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); margin-top: 5px; }

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact { border-top: 1px solid var(--line); }
.contact-inner { padding-block: clamp(64px, 10vw, 130px); }
.contact h2 {
  font-size: clamp(40px, 8vw, 96px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.95;
  max-width: 14ch;
}
.contact h2 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.contact-sub { margin-top: 26px; font-size: 17px; color: var(--text-2); max-width: 44ch; line-height: 1.6; }
.contact-links { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 12px; }
.clink {
  display: flex; align-items: center; justify-content: space-between;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 18px 22px;
  transition: border-color .2s, background .2s, transform .2s;
}
.clink:hover { border-color: var(--accent); background: rgba(139,102,240,0.06); transform: translateY(-2px); }
.clink .cl-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.clink .cl-v { font-size: 16px; margin-top: 6px; }
.clink .cl-arr { color: var(--text-3); transition: color .2s, transform .2s; }
.clink:hover .cl-arr { color: var(--accent-2); transform: translate(2px, -2px); }

footer.foot {
  border-top: 1px solid var(--line);
  padding-block: 30px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
footer.foot .built { color: var(--text-4); }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.show { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .fcard-grid { grid-template-columns: 1fr; }
  .fcard-visual { border-left: none; border-top: 1px solid var(--line); min-height: 300px; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .skills-grid { grid-template-columns: 1fr; }
  .research-cols { grid-template-columns: 1fr; }
  .xp { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 760px) {
  .hero-avatar { width: 78px; height: 78px; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 14px var(--pad) 22px;
    gap: 4px;
  }
  .nav-links.open a { padding: 12px; }
  .nav-links.open a.cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 9px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding-left: 18px; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); padding-left: 18px; }
  .pgrid { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }
  .fcard-metrics { gap: 18px; }
}
