:root {
  --bg: #0e1014;
  --bg2: #12161d;
  --card: #171b22;
  --card2: #1d232d;
  --text: #e8eaf0;
  --muted: #9aa3b2;
  --accent: #6c8cff;
  --accent-dim: rgba(108, 140, 255, .14);
  --green: #3ecf8e;
  --border: #262c38;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }

#neural {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .55;
  pointer-events: none;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(14, 16, 20, .78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.monogram {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  font-weight: 800; font-size: 14px;
  border-radius: 10px;
}
.brand-name { font-weight: 700; font-size: 15px; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 20px 70px;
}
.hero-grid {
  width: min(1140px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-intro { text-align: left; }
.hero-intro h1 { font-size: clamp(40px, 4.6vw, 62px); }
.hero-intro .tagline { margin: 0 0 34px; }
.hero-intro .hero-ctas { justify-content: flex-start; margin: 0; }
.headshot {
  width: 128px; height: 128px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  margin-bottom: 20px;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-intro { text-align: center; }
  .hero-intro .tagline { margin: 0 auto 34px; }
  .hero-intro .hero-ctas { justify-content: center; }
  .hero-intro .headshot { margin-left: auto; margin-right: auto; }
}
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #fff 30%, #b9c4d8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 21px);
  max-width: 640px;
  margin: 0 auto 40px;
}
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 22px;
  text-decoration: none;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Ask Mustufa chat ---------- */
.ask-card {
  background: rgba(23, 27, 34, .92);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .5), 0 0 0 1px rgba(108, 140, 255, .06);
  backdrop-filter: blur(6px);
}
.ask-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.ask-sub { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-left: 2px; }
.pulse {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(62, 207, 142, .5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, .45); }
  70% { box-shadow: 0 0 0 9px rgba(62, 207, 142, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); }
}
.ask-msgs {
  height: 300px;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.ask-msgs::-webkit-scrollbar { width: 8px; }
.ask-msgs::-webkit-scrollbar-track { background: transparent; }
.ask-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }
.ask-msgs::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; }
.msg.bot { background: var(--card2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.bot a { color: var(--accent); }
.msg .cursor::after { content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent); }
@keyframes blink { 50% { opacity: 0; } }
.ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}
.chip {
  background: var(--accent-dim);
  border: 1px solid rgba(108, 140, 255, .35);
  color: #c9d6ff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s;
}
.chip:hover { background: rgba(108, 140, 255, .28); }
.ask-form { display: flex; gap: 10px; padding: 0 18px 18px; }
.ask-form input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
}
.ask-form input:focus { border-color: var(--accent); }
.ask-form button {
  background: var(--accent);
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 12px;
  padding: 0 22px;
  cursor: pointer;
}
.ask-form button:hover { filter: brightness(1.1); }

/* ---------- sections ---------- */
main { position: relative; z-index: 1; }
.section { width: min(880px, 100%); margin: 0 auto; padding: 72px 20px; }
.section h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section h2::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.prose p { color: var(--muted); font-size: 16.5px; margin-bottom: 18px; max-width: 720px; }
.prose strong { color: var(--text); }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 8px; }
.tl-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:last-child { border-bottom: none; }
.tl-date { color: var(--accent); font-weight: 700; font-size: 14px; padding-top: 4px; white-space: nowrap; }
.tl-body h3 { font-size: 19px; margin-bottom: 12px; }
.tl-body h3 .loc { color: var(--muted); font-weight: 400; font-size: 14px; margin-left: 8px; }
.tl-body ul { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.tl-body li { color: var(--muted); font-size: 15px; padding-left: 20px; position: relative; }
.tl-body li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }

/* ---------- tags / skills ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span {
  font-size: 12.5px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 8px;
  padding: 4px 11px;
}
.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.skill-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s, border-color .2s;
}
.skill-group:hover { transform: translateY(-3px); border-color: rgba(108, 140, 255, .4); }
.skill-group h3 { font-size: 15px; margin-bottom: 14px; color: var(--accent); }

/* ---------- contact / footer ---------- */
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 26px 0 8px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px 20px 50px;
  color: var(--muted);
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); text-decoration: none; }
.foot-sub { margin-top: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .nav-links a { display: none; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; }
  .ask-msgs { height: 260px; }
  .ask-sub { display: none; }
  .section { padding: 52px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
