/* ============================================================
   Chehin Chaaben — portfolio
   Original design, built from scratch
   ============================================================ */

:root {
  /* palette — datacamp-flavored deep navy */
  --bg: #05192D;
  --bg-2: #03111f;
  --surface: #0d2340;
  --surface-2: #152e52;
  --line: #1c3a60;
  --line-2: #294a76;
  --text: #ffffff;
  --text-dim: #b5c2d4;
  --text-mute: #7589a1;
  --accent: #03EF62;
  --accent-ink: #05192D;
  --accent-glow: rgba(3, 239, 98, 0.35);
  --warn: #ff6b4a;
  --red: #ff5f57;
  --amber: #febc2e;
  --green: #28c840;

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", "Georgia", serif;

  /* layout */
  --maxw: 1240px;
  --pad-x: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --radius-lg: 22px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

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

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }

.mono { font-family: var(--mono); font-weight: 500; letter-spacing: -0.01em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; }

em { font-style: italic; color: var(--text); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 2;
}

/* ---------- Background layers ---------- */
.bg-layer {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}
.bg-noise {
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}
.bg-glow {
  background:
    radial-gradient(50% 50% at 85% 10%, rgba(3,239,98,0.08), transparent 60%),
    radial-gradient(60% 60% at 10% 90%, rgba(120,160,255,0.06), transparent 60%);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--pad-x);
  background: rgba(3,17,31,0.6);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled {
  border-color: var(--line);
  background: rgba(3,17,31,0.82);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-weight: 600; font-size: 14px;
  letter-spacing: -0.01em;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 14px var(--accent-glow);
}
.brand-ext { color: var(--accent); font-weight: 700; font-style: normal; }
.nav-links {
  display: flex; gap: 4px;
  margin-left: 18px;
}
.nav-links a {
  padding: 8px 12px;
  font-size: 13.5px;
  color: var(--text-dim);
  border-radius: 8px;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }

.nav-cta {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 16px;
  font-size: 13px; font-weight: 500;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px var(--accent-glow);
}

.nav-burger {
  display: none; width: 36px; height: 36px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer;
}
.nav-burger span { width: 16px; height: 1.5px; background: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  font-size: 14px; font-weight: 500;
  border-radius: 999px;
  transition: all .2s ease;
  cursor: pointer; border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px var(--accent-glow);
}
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-mute); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(60px, 10vh, 120px) 0 60px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px;
  font-family: var(--mono); font-size: 12px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 28px;
}

.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s ease-out infinite;
}
.pulse-green { background: #35d072; box-shadow: 0 0 0 0 rgba(53,208,114,.45); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 12px rgba(3,239,98,0); }
  100% { box-shadow: 0 0 0 0 rgba(3,239,98,0); }
}

.hero-title {
  font-size: clamp(56px, 11vw, 148px);
  line-height: 0.88;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin-bottom: 24px;
}
.hero-title .line {
  display: block;
  background: linear-gradient(180deg, #fff 0%, #c9c9d2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title .punct { color: var(--accent); -webkit-text-fill-color: var(--accent); }

.hero-sub {
  max-width: 540px;
  font-size: clamp(16px, 1.3vw, 18.5px);
  color: var(--text-dim);
  margin-bottom: 32px;
}
.hero-sub .mono { color: var(--accent); margin-right: 4px; }
.hero-sub em { color: var(--text); font-style: italic; }

.hero-ctas {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-chips {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.hero-chips li {
  padding: 6px 12px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .2s ease;
}
.hero-chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero card ---------- */
.hero-card {
  position: relative;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.03) inset,
    0 60px 100px -40px rgba(0,0,0,0.6);
}
.card-corners i {
  position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--accent); opacity: 0.6;
}
.card-corners i:nth-child(1) { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card-corners i:nth-child(2) { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.card-corners i:nth-child(3) { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.card-corners i:nth-child(4) { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }

.card-top {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
}
.card-top .dot { width: 11px; height: 11px; border-radius: 50%; }
.card-top .dot.red { background: var(--red); }
.card-top .dot.amber { background: var(--amber); }
.card-top .dot.green { background: var(--green); }
.card-path {
  margin-left: 10px;
  font-family: var(--mono); font-size: 12px;
  color: var(--text-mute);
}

.card-body {
  padding: 28px 24px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.avatar-wrap {
  position: relative;
  width: 160px; height: 160px;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  border: 2px solid var(--bg);
  position: relative; z-index: 1;
}
.avatar.fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 600; font-size: 44px;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.avatar-ring {
  position: absolute; inset: -8px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), transparent 40%, transparent 60%, var(--accent));
  animation: spin 10s linear infinite;
  z-index: 0;
  opacity: 0.5;
  filter: blur(0.5px);
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-badge {
  position: absolute; bottom: 6px; right: 6px;
  z-index: 2;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg);
  display: grid; place-items: center;
}

.profile-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}
.profile-grid > div { display: flex; flex-direction: column; gap: 2px; }
.profile-grid dt {
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-mute);
}
.profile-grid dd { font-size: 13px; color: var(--text); }

.profile-links {
  width: 100%;
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.profile-links a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  font-size: 13px; color: var(--text-dim);
  border-radius: 8px;
  transition: all .18s ease;
}
.profile-links a:hover { background: var(--surface-2); color: var(--text); }
.profile-links svg { color: var(--text-mute); flex-shrink: 0; }

.card-foot {
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-mute);
}
.card-foot .status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-dim); }

/* ---------- Marquee ---------- */
.marquee {
  margin-top: 72px;
  overflow: hidden;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--bg) 0%, transparent 10%, transparent 90%, var(--bg) 100%);
  position: relative;
}
.marquee-track {
  display: flex; gap: 32px;
  white-space: nowrap;
  animation: scroll 40s linear infinite;
  font-family: var(--mono); font-size: 13px;
  color: var(--text-mute);
}
.marquee-track span { flex-shrink: 0; }
.marquee-track span:nth-child(even) { color: var(--text); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Section header ---------- */
.section {
  padding: clamp(80px, 14vh, 160px) 0;
  position: relative;
}
.section-tight { padding: clamp(60px, 10vh, 110px) 0; }

.section-head { margin-bottom: 56px; max-width: 760px; }
.section-tag {
  display: inline-block;
  padding: 5px 10px;
  font-size: 11.5px;
  color: var(--accent);
  background: rgba(3,239,98,0.06);
  border: 1px solid rgba(3,239,98,0.2);
  border-radius: 6px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 18px;
}
.section-lede {
  font-size: clamp(15.5px, 1.3vw, 18px);
  color: var(--text-dim);
  max-width: 620px;
}

/* ---------- Work ---------- */
.work { display: flex; flex-direction: column; gap: 32px; }
.work-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr 220px;
  gap: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: all .25s ease;
  overflow: hidden;
}
.work-item::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(400px 180px at var(--mx, 50%) var(--my, 50%), rgba(3,239,98,0.08), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.work-item:hover::before { opacity: 1; }
.work-item:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.work-meta {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 6px;
}
.work-num {
  font-size: 44px; line-height: 1;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.04em;
}
.work-when {
  font-size: 11.5px;
  color: var(--text-mute);
  text-transform: lowercase;
}

.work-main h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.15;
}
.work-lede {
  color: var(--text-dim);
  margin-bottom: 18px;
  max-width: 55ch;
}
.work-points {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 20px;
}
.work-points li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.work-points li::before {
  content: '→';
  position: absolute; left: 0; top: 0;
  color: var(--accent);
  font-family: var(--mono);
}
.work-points b { color: var(--text); font-weight: 600; }

.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags li {
  padding: 4px 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.work-art {
  display: grid; place-items: center;
  color: var(--text-mute);
  min-height: 180px;
}
.work-art svg {
  width: 100%; max-width: 220px; height: auto;
}
.work-item.reverse .work-art {
  grid-row: 1;
  grid-column: 3;
}

/* ---------- Services ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.svc {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s ease;
  display: flex; flex-direction: column; gap: 14px;
}
.svc:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px -24px rgba(3,239,98,0.14);
}
.svc-ico {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--accent);
  background: rgba(3,239,98,0.08);
  border: 1px solid rgba(3,239,98,0.2);
  border-radius: 12px;
}
.svc h3 {
  font-size: 18px; font-weight: 600;
  letter-spacing: -0.015em;
}
.svc p {
  font-size: 14px;
  color: var(--text-dim);
  flex: 1;
}
.svc-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.svc-tags li {
  padding: 3px 8px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--text-mute);
  background: var(--bg-2);
  border-radius: 5px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-copy .lede {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.about-copy p + p { margin-top: 14px; color: var(--text-dim); }
.about-copy p { max-width: 60ch; }
.about-copy p em { color: var(--accent); font-style: italic; }
.about-copy p b { color: var(--text); font-weight: 600; }

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.about-stats > div {
  padding: 20px 20px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 4px;
}
.about-stats b {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}
.about-stats span {
  font-size: 12.5px;
  color: var(--text-dim);
}

.about-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.side-card .section-tag { margin-bottom: 14px; }

.awards { display: flex; flex-direction: column; gap: 14px; }
.awards li { display: flex; align-items: center; gap: 14px; }
.awards .place {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.awards .place.gold { color: #ffd36a; background: rgba(255,211,106,0.08); border-color: rgba(255,211,106,0.3); }
.awards .place.silver { color: #c9c9d2; background: rgba(201,201,210,0.08); border-color: rgba(201,201,210,0.3); }
.awards .place.bronze { color: #d79166; background: rgba(215,145,102,0.08); border-color: rgba(215,145,102,0.3); }
.awards div { display: flex; flex-direction: column; }
.awards b { font-size: 14px; }
.awards em { font-size: 12px; color: var(--text-mute); font-style: normal; }

.langs { display: flex; flex-direction: column; gap: 10px; }
.langs li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.langs li:last-child { border: 0; padding-bottom: 0; }
.langs span { font-family: var(--mono); font-size: 12px; color: var(--text-mute); }

/* ---------- Experience ---------- */
.xp {
  position: relative;
  padding-left: 4px;
}
.xp-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  position: relative;
}
.xp-item:first-child { border-top: 0; padding-top: 0; }

.xp-when {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 6px;
}
.xp-year {
  font-size: 36px; line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.xp-period {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: lowercase;
}

.xp-body header {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.xp-body h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.015em;
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.xp-logo {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 56px; height: 56px;
  margin-right: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4f4f6, #d9d9df);
  padding: 8px;
  flex-shrink: 0;
  box-shadow:
    0 4px 14px -2px rgba(0,0,0,0.5),
    0 0 0 1px var(--line),
    inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease;
}
/* for banks/orgs with white-on-transparent logos — opt-in via .dark modifier */
.xp-logo.dark {
  background: linear-gradient(180deg, #152e52, #0d2340);
  box-shadow:
    0 4px 14px -2px rgba(0,0,0,0.5),
    0 0 0 1px var(--line-2),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.xp-item:hover .xp-logo {
  transform: scale(1.05) rotate(-1deg);
  box-shadow:
    0 10px 28px -8px rgba(3,239,98,0.35),
    0 0 0 1px rgba(3,239,98,0.5),
    inset 0 1px 0 rgba(255,255,255,0.6);
}
.xp-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 540px) {
  .xp-logo { width: 44px; height: 44px; padding: 6px; margin-right: 12px; }
}
.xp-role {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 0.72em;
}
.xp-place {
  font-family: var(--mono); font-size: 12px;
  color: var(--text-mute);
}
.xp-body > p { color: var(--text-dim); margin-bottom: 14px; max-width: 68ch; }
.xp-body > ul {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.xp-body > ul li {
  position: relative;
  padding-left: 18px;
  font-size: 14.5px;
  color: var(--text-dim);
}
.xp-body > ul li::before {
  content: '·';
  position: absolute; left: 4px; top: -2px;
  color: var(--accent);
  font-size: 20px;
}
.xp-body > ul li b { color: var(--text); font-weight: 600; }

.xp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.xp-tags li {
  padding: 4px 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.xp-tags li::before { display: none; }

/* ---------- Stack ---------- */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 900px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stack-grid { grid-template-columns: 1fr; } }
.stack-col {
  padding: 28px;
  background: var(--surface);
}
.stack-col h4 {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 16px;
  font-weight: 500;
}
.stack-col ul { display: flex; flex-direction: column; gap: 2px; }
.stack-col li {
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-dim);
  border-radius: 6px;
  transition: all .15s ease;
  cursor: default;
}
.stack-col li:hover {
  background: var(--bg-2);
  color: var(--accent);
  transform: translateX(4px);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.contact-title {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 18px 0 24px;
}
.contact-title .serif {
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.contact-lede {
  color: var(--text-dim);
  max-width: 55ch;
  margin-bottom: 28px;
  font-size: 16px;
}
.contact-lede b { color: var(--text); }
.contact-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.contact-term {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 60px 100px -40px rgba(0,0,0,0.6);
}
.term {
  padding: 20px 22px;
  font-family: var(--mono); font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-x: auto;
}
.term .prompt { color: var(--accent); user-select: none; }
.term .cmd { color: var(--text); }
.term .out { color: var(--text-dim); }
.term .cursor {
  color: var(--accent);
  animation: blink 1s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Footer ---------- */
.foot {
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
}
.foot-grid {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
  color: var(--text-mute);
  flex-wrap: wrap; gap: 10px;
}

/* ---------- Scroll progress ---------- */
.scroll-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), #e8ff8a);
  transform: scaleX(0);
  transform-origin: 0 0;
  z-index: 100;
  box-shadow: 0 0 12px var(--accent-glow);
  transition: transform .08s linear;
  will-change: transform;
}

/* ---------- Orbital background glow ---------- */
.bg-orb {
  background:
    radial-gradient(400px 400px at 85% 20%, rgba(3,239,98,0.10), transparent 60%),
    radial-gradient(500px 500px at 15% 80%, rgba(100,160,255,0.06), transparent 60%);
  animation: orb 24s ease-in-out infinite alternate;
}
@keyframes orb {
  from { transform: translate(-2%, -2%) scale(1); }
  to   { transform: translate(2%, 2%) scale(1.08); }
}

/* ---------- Tech icons ---------- */
.tech-ico {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 14px; height: 14px;
  margin-right: 8px;
  flex-shrink: 0;
}
.tech-ico img {
  width: 100%; height: 100%;
  display: block;
  opacity: 0.55;
  transition: opacity .18s ease, filter .18s ease;
  filter: grayscale(0.1);
}
.hero-chips li:hover .tech-ico img,
.stack-col li:hover .tech-ico img,
.work-tags li:hover .tech-ico img,
.xp-tags li:hover .tech-ico img,
.svc-tags li:hover .tech-ico img { opacity: 1; }

.tech-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 11px;
  margin-left: 2px;
  vertical-align: middle;
  opacity: 0.75;
  box-shadow: 0 0 6px var(--accent-glow);
  flex-shrink: 0;
}

/* keep pill-style tags one-line with icon */
.hero-chips li,
.work-tags li,
.xp-tags li,
.svc-tags li {
  display: inline-flex;
  align-items: center;
}
.stack-col li {
  display: flex;
  align-items: center;
}
.stack-col li .tech-ico { margin-right: 10px; }

/* smaller icon inside tiny pill tags */
.work-tags .tech-ico,
.xp-tags .tech-ico,
.svc-tags .tech-ico { width: 11px; height: 11px; margin-right: 6px; }
.work-tags .tech-dot,
.xp-tags .tech-dot,
.svc-tags .tech-dot { width: 4px; height: 4px; margin-right: 8px; }

/* ---------- Floating hero chips ---------- */
.hero-card { overflow: visible; }
.float-code {
  position: absolute;
  background: linear-gradient(180deg, #152e52, #0a1e38);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.65), 0 0 0 1px rgba(255,255,255,0.02) inset;
  backdrop-filter: blur(6px);
  z-index: 3;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.float-code {
  left: -56px; bottom: 48px;
  width: 240px;
  animation-delay: -2s;
}
.float-code-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.float-code-head .mono {
  font-size: 10.5px;
  color: var(--text-mute);
}
.float-code-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}
.float-code-body {
  padding: 10px 12px 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--text-dim);
  white-space: pre;
  overflow: hidden;
}
.float-code-body .k { color: #c084fc; }
.float-code-body .f { color: #7dd3fc; }
.float-code-body .n { color: #fbbf24; }
.float-code-body .s { color: var(--accent); }

@media (max-width: 980px) {
  .float-code { left: -16px; bottom: -20px; width: 200px; }
}
@media (max-width: 540px) {
  .float-code { display: none; }
}

/* ---------- About stat icons ---------- */
.about-stats > div { position: relative; }
.stat-ico {
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 6px;
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 440px; margin: 0 auto; width: 100%; }
  .work-item { grid-template-columns: 100px 1fr; }
  .work-art { grid-column: 1 / -1; grid-row: auto; }
  .work-item.reverse .work-art { grid-column: 1 / -1; grid-row: auto; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .xp-item { grid-template-columns: 120px 1fr; gap: 20px; }
  .xp-year { font-size: 28px; }
}

@media (max-width: 680px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; margin-left: auto; }
  .nav-cta { display: none; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    padding: 16px var(--pad-x);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    gap: 2px;
  }
  .work-item { padding: 24px; grid-template-columns: 1fr; gap: 20px; }
  .work-meta { flex-direction: row; justify-content: space-between; align-items: center; }
  .work-num { font-size: 32px; }
  .xp-item { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
  .xp-when { flex-direction: row; align-items: baseline; gap: 10px; }
  .xp-year { font-size: 22px; }
  .about-stats { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 36px; }
  .foot-grid { flex-direction: column; align-items: flex-start; }
}
