/* ---------- Brand colours ---------- */
:root {
  --ab-indigo: #3730a3;
  --ab-indigo-light: #4f46e5;
  --ab-teal: #0d9488;
  --ab-soft: #eef2ff;
  --ab-card-border: rgba(55, 48, 163, 0.12);
}
[data-md-color-scheme="slate"] {
  --ab-soft: #1e1b4b;
  --ab-card-border: rgba(165, 180, 252, 0.18);
}
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #3730a3;
  --md-primary-fg-color--light: #4f46e5;
  --md-primary-fg-color--dark: #312e81;
  --md-accent-fg-color: #0d9488;
}
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #312e81;
  --md-accent-fg-color: #2dd4bf;
  --md-default-bg-color: #0f1020;
  --md-typeset-a-color: #a5b4fc;
}
[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active { color: #a5b4fc; }

/* ---------- Typography ---------- */
.md-typeset h1, .md-typeset h2 { font-weight: 700; letter-spacing: -0.02em; }
.md-typeset h2 { margin-top: 2.4em; }

/* ---------- Hero ---------- */
.ab-hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 2.5rem 2rem;
  margin: 0 0 2rem;
  border-radius: 1.25rem;
  color: #fff;
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #0d9488 100%);
  box-shadow: 0 20px 40px -20px rgba(49, 46, 129, 0.6);
}
.ab-hero img {
  width: 170px; height: 170px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}
.ab-hero h1 { color: #fff !important; margin: 0 0 0.3rem; font-size: 2.3rem; }
.ab-hero .ab-motto { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; margin: 0 0 .35rem; color: #fff; }
.ab-hero .ab-motto .ab-motto__sep { opacity: .6; margin: 0 .35rem; font-weight: 400; }
/* Interactive motto words */
.ab-hero .ab-mw { all: unset; display: inline-block; position: relative; cursor: pointer; border-radius: 4px; transition: color .25s, transform .25s; }
.ab-hero .ab-mw::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: #a7f3d0; border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.ab-hero .ab-mw:hover, .ab-hero .ab-mw:focus-visible { color: #a7f3d0; transform: translateY(-1px); }
.ab-hero .ab-mw:hover::after, .ab-hero .ab-mw:focus-visible::after { transform: scaleX(1); }
.ab-hero .ab-mw:focus-visible { outline: 2px solid #a7f3d0; outline-offset: 4px; }
.ab-hero .ab-ch { display: inline-block; }
/* Clear: blurry -> sharp focus pull */
.ab-hero .ab-mw--clear.is-play { animation: ab-focus .9s ease-out both; }
@keyframes ab-focus { from { filter: blur(7px); opacity: .35; letter-spacing: .18em; } to { filter: blur(0); opacity: 1; letter-spacing: normal; } }
/* Simple: scattered letters settle into place */
.ab-hero .ab-mw--simple.is-play .ab-ch { animation: ab-settle .75s cubic-bezier(.2,.9,.25,1.2) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes ab-settle { from { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0)); opacity: .25; } to { transform: none; opacity: 1; } }
/* Visible: letters light up one by one with a glow */
.ab-hero .ab-mw--visible.is-play .ab-ch { animation: ab-reveal .9s ease both; animation-delay: calc(var(--i) * 60ms); }
@keyframes ab-reveal { 0% { opacity: .1; text-shadow: none; } 50% { opacity: 1; color: #a7f3d0; text-shadow: 0 0 12px rgba(167,243,208,.9); } 100% { opacity: 1; text-shadow: none; } }
.ab-hero .ab-tagline { font-size: 1.05rem; opacity: 0.95; margin: 0 0 0.6rem; font-weight: 600; }
.ab-hero p { margin: 0.4rem 0; }
.ab-hero .md-button { margin: 0.8rem 0.5rem 0 0; color: #fff; border-color: rgba(255,255,255,0.8); }
.ab-hero .md-button--primary { background: #fff; color: #312e81; border-color: #fff; }
.ab-hero .md-button:hover { background: #2dd4bf; border-color: #2dd4bf; color: #0f1020; }
@media (max-width: 700px) {
  .ab-hero { flex-direction: column; text-align: center; padding: 2rem 1.2rem; gap: 1.2rem; }
  .ab-hero h1 { font-size: 1.8rem; }
}

/* ---------- Stats row ---------- */
.ab-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0 0 2rem;
}
.ab-stat {
  text-align: center;
  padding: 1.2rem 0.5rem;
  border-radius: 1rem;
  background: var(--ab-soft);
  border: 1px solid var(--ab-card-border);
}
.ab-stat strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--md-accent-fg-color); }
.ab-stat span { font-size: 0.8rem; opacity: 0.85; }
@media (max-width: 700px) { .ab-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- App chips ---------- */
.ab-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 1rem 0 2rem; }
.ab-chips span {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--ab-soft);
  border: 1px solid var(--ab-card-border);
}

/* ---------- Sample cards ---------- */
.md-typeset .grid.cards > ul > li {
  border-radius: 1rem;
  border: 1px solid var(--ab-card-border);
  padding: 0;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -14px rgba(49, 46, 129, 0.45);
}
.md-typeset .grid.cards > ul > li > p,
.md-typeset .grid.cards > ul > li > hr { margin-left: 1.1rem; margin-right: 1.1rem; }
.md-typeset .grid.cards > ul > li > p:last-child { margin-bottom: 1rem; }
.md-typeset .grid.cards > ul > li > p:first-child {
  margin: 0 0 0.8rem;
  padding: 1.4rem 1.1rem 1rem;
  color: #fff;
  background: linear-gradient(135deg, #312e81, #4f46e5 60%, #0d9488);
}
.md-typeset .grid.cards > ul > li > p:first-child .twemoji,
.md-typeset .grid.cards > ul > li > p:first-child svg { width: 2.2rem; height: 2.2rem; display: block; margin-bottom: 0.5rem; fill: #fff; }
.md-typeset .grid.cards > ul > li > hr { display: none; }

/* ---------- Mermaid ---------- */
.md-typeset .mermaid { margin: 1rem 0 2rem; }

/* =====================================================================
   Interactive features (v2)
   ===================================================================== */
:root { --ab-fg-soft: var(--md-default-fg-color--light); --ab-radius: 1rem; }

/* ---------- Reading progress ---------- */
.ab-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10;
  background: linear-gradient(90deg, #4f46e5, #0d9488);
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}

/* ---------- Hero, animated ---------- */
.ab-hero { position: relative; overflow: hidden; background-size: 200% 200%; animation: ab-shift 14s ease infinite; }
.ab-hero > * { position: relative; z-index: 1; }
.ab-hero__blob { position: absolute !important; z-index: 0 !important; border-radius: 50%; filter: blur(40px); opacity: .45; pointer-events: none; }
.ab-hero__blob--1 { width: 260px; height: 260px; background: #2dd4bf; top: -80px; right: -60px; animation: ab-float 9s ease-in-out infinite; }
.ab-hero__blob--2 { width: 200px; height: 200px; background: #818cf8; bottom: -90px; left: 30%; animation: ab-float 11s ease-in-out infinite reverse; }
.ab-hero .ab-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700; opacity: .8; margin: 0 0 .3rem; }
.ab-typed { color: #a7f3d0; border-right: 2px solid currentColor; padding-right: 2px; animation: ab-caret 1s steps(1) infinite; }
.ab-hero img { transition: transform .4s ease; }
.ab-hero img:hover { transform: rotate(-4deg) scale(1.04); }
@keyframes ab-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ab-float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px, 20px); } }
@keyframes ab-caret { 50% { border-color: transparent; } }

.ab-hint { font-size: .78rem; color: var(--ab-fg-soft); margin-top: -.4rem; }

/* ---------- Clickable app chips ---------- */
.ab-chips--link button {
  padding: .35rem .9rem; border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  color: var(--md-default-fg-color); background: var(--ab-soft); border: 1px solid var(--ab-card-border);
  transition: background .15s, color .15s, transform .15s;
}
.ab-chips--link button:hover, .ab-chips--link button:focus-visible { background: var(--md-accent-fg-color); color: #fff; transform: translateY(-2px); }

/* ---------- Process map ---------- */
.ab-map { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0 2rem; }
.ab-lane { padding: 1rem 1.1rem 1.2rem; border-radius: var(--ab-radius); background: var(--ab-soft); border: 1px solid var(--ab-card-border); }
.ab-lane:first-child { grid-column: 1 / -1; }
.md-typeset .ab-lane h3 { margin: 0 0 .8rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ab-fg-soft); }
.ab-lane__nodes { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.md-typeset .ab-node {
  display: inline-block; padding: .6rem 1rem; border-radius: .7rem; font-weight: 600; font-size: .82rem;
  color: var(--md-default-fg-color); background: var(--md-default-bg-color); border: 1.5px solid var(--md-primary-fg-color--light, #4f46e5);
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.md-typeset .ab-node--muted { border-style: dashed; }
.md-typeset .ab-node:hover, .md-typeset .ab-node:focus-visible, .md-typeset .ab-node.is-active {
  color: #fff; background: linear-gradient(135deg, #4f46e5, #0d9488); border-color: transparent;
  transform: translateY(-3px); box-shadow: 0 10px 20px -10px rgba(49,46,129,.6);
}
.ab-arrow { width: 22px; height: 2px; background: var(--ab-fg-soft); position: relative; }
.ab-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--ab-fg-soft); }
.ab-map__preview {
  grid-column: 1 / -1; padding: 1rem 1.2rem; border-radius: var(--ab-radius); min-height: 5.5rem;
  border: 1px dashed var(--ab-card-border); background: var(--md-default-bg-color);
}
.ab-map__preview strong { font-size: 1rem; }
.ab-map__preview p { margin: .3rem 0; }
.ab-map__sys { display: block; font-size: .75rem; color: var(--md-accent-fg-color); font-weight: 600; margin-bottom: .6rem; }
.md-typeset .ab-map__preview .md-button { margin: 0; font-size: .75rem; }
@media (max-width: 760px) { .ab-map { grid-template-columns: 1fr; } }

/* ---------- Work library ---------- */
.ab-lib__bar { display: grid; gap: .7rem; margin-bottom: .6rem; }
.ab-lib__search {
  width: 100%; padding: .8rem 1rem; border-radius: .8rem; font: inherit; font-size: .85rem;
  color: var(--md-default-fg-color); background: var(--md-default-bg-color);
  border: 1.5px solid var(--ab-card-border); outline: none; transition: border-color .15s, box-shadow .15s;
}
.ab-lib__search:focus { border-color: var(--md-accent-fg-color); box-shadow: 0 0 0 4px rgba(13,148,136,.15); }
.ab-lib__filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.ab-lib__filters button, .ab-lib__reset {
  padding: .3rem .8rem; border-radius: 999px; font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
  color: var(--md-default-fg-color); background: transparent; border: 1px solid var(--ab-card-border); transition: all .15s;
}
.ab-lib__filters--sys button { font-size: .7rem; }
.ab-lib__filters button:hover { border-color: var(--md-accent-fg-color); }
.ab-lib__filters button.is-active { color: #fff; background: var(--md-primary-fg-color); border-color: var(--md-primary-fg-color); }
.ab-lib__count { font-size: .75rem; color: var(--ab-fg-soft); margin: .2rem 0 .8rem; }
.ab-lib__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.md-typeset .ab-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.1rem 1rem; border-radius: var(--ab-radius);
  color: var(--md-default-fg-color); background: var(--md-default-bg-color); border: 1px solid var(--ab-card-border);
  position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.md-typeset .ab-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #4f46e5, #0d9488); }
.md-typeset .ab-card:hover, .md-typeset .ab-card:focus-visible { transform: translateY(-5px); border-color: transparent; box-shadow: 0 18px 30px -16px rgba(49,46,129,.55); }
.md-typeset .ab-card h3 { margin: 0; font-size: .95rem; line-height: 1.3; }
.md-typeset .ab-card p { margin: 0; font-size: .78rem; color: var(--ab-fg-soft); flex: 1; }
.ab-card__type { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--md-accent-fg-color); }
.ab-card__tags { font-size: .7rem; font-weight: 600; opacity: .8; }
.ab-card[hidden] { display: none !important; }
.ab-lib__empty { text-align: center; padding: 1.5rem; }

/* ---------- Timeline ---------- */
.md-typeset ol.ab-timeline { list-style: none; margin: 1rem 0 2rem; padding: 0 0 0 1.6rem; border-left: 2px solid var(--ab-card-border); }
.md-typeset ol.ab-timeline > li { position: relative; margin: 0 0 1.4rem; padding-left: .4rem; }
.md-typeset ol.ab-timeline > li::before {
  content: ""; position: absolute; left: -2.15rem; top: .25rem; width: .9rem; height: .9rem; border-radius: 50%;
  background: var(--md-default-bg-color); border: 3px solid var(--md-primary-fg-color--light, #4f46e5);
}
.md-typeset ol.ab-timeline > li.is-current::before { background: var(--md-accent-fg-color); border-color: var(--md-accent-fg-color); box-shadow: 0 0 0 5px rgba(13,148,136,.2); animation: ab-pulse 2s infinite; }
.md-typeset .ab-timeline h3 { margin: .1rem 0 .2rem; font-size: .9rem; }
.md-typeset .ab-timeline p { margin: 0; font-size: .8rem; color: var(--ab-fg-soft); }
.ab-timeline__date { font-size: .7rem; font-weight: 700; color: var(--md-accent-fg-color); text-transform: uppercase; letter-spacing: .06em; }
@keyframes ab-pulse { 50% { box-shadow: 0 0 0 9px rgba(13,148,136,0); } }

/* ---------- Stage explorer ---------- */
.ab-stages { margin: 1.5rem 0 2rem; padding: 1.1rem 1.2rem 1.2rem; border-radius: var(--ab-radius); background: var(--ab-soft); border: 1px solid var(--ab-card-border); }
.md-typeset .ab-stages__title { margin: 0 0 .9rem; font-weight: 700; }
.ab-stages__title span { font-weight: 400; font-size: .75rem; color: var(--ab-fg-soft); }
.md-typeset ol.ab-stages__track { list-style: none; display: flex; margin: 0 0 1rem; padding: 0; gap: 0; overflow-x: auto; }
.md-typeset ol.ab-stages__track > li { flex: 1; min-width: 110px; margin: 0; position: relative; }
.md-typeset ol.ab-stages__track > li:not(:last-child)::after { content: ""; position: absolute; top: 1.05rem; left: calc(50% + 1.2rem); right: calc(-50% + 1.2rem); height: 2px; background: var(--ab-card-border); }
.ab-stages__track button { width: 100%; display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 0 .3rem; background: none; border: 0; cursor: pointer; font: inherit; color: var(--md-default-fg-color); }
.ab-stages__num {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem;
  background: var(--md-default-bg-color); border: 2px solid var(--md-primary-fg-color--light, #4f46e5); transition: all .2s;
}
.ab-stages__label { font-size: .7rem; font-weight: 600; text-align: center; line-height: 1.25; }
.ab-stages__track button.is-done .ab-stages__num { background: var(--ab-soft); border-color: var(--md-accent-fg-color); color: var(--md-accent-fg-color); }
.ab-stages__track button.is-active .ab-stages__num { color: #fff; border-color: transparent; background: linear-gradient(135deg, #4f46e5, #0d9488); transform: scale(1.12); box-shadow: 0 8px 16px -8px rgba(49,46,129,.7); }
.ab-stages__track button.is-reading .ab-stages__label { text-decoration: underline; text-decoration-color: var(--md-accent-fg-color); text-underline-offset: 3px; }
.ab-stages__panel { padding: 1rem 1.1rem; border-radius: .8rem; background: var(--md-default-bg-color); border: 1px solid var(--ab-card-border); animation: ab-fade .25s ease; }
.md-typeset .ab-stages__panel h4 { margin-top: 0; }
.ab-stages__nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.md-typeset .ab-stages__nav .md-button { margin: 0; font-size: .72rem; padding: .4em 1em; }
.ab-stages__jump { font-size: .75rem; }
@keyframes ab-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- GitHub page ---------- */
.ab-gh__profile { display: flex; align-items: center; gap: 1.5rem; padding: 1.4rem; border-radius: var(--ab-radius); background: var(--ab-soft); border: 1px solid var(--ab-card-border); margin-bottom: 1.2rem; }
.ab-gh__avatar { width: 110px; height: 110px; border-radius: 50%; border: 3px solid var(--md-accent-fg-color); flex-shrink: 0; }
.md-typeset .ab-gh__name { margin: 0; }
.md-typeset .ab-gh__profile p { margin: .2rem 0; }
.ab-gh__login { font-weight: 600; }
.ab-gh__meta { font-size: .78rem; color: var(--ab-fg-soft); }
.ab-gh__error { padding: 1rem; border-radius: .8rem; border: 1px dashed var(--ab-card-border); }
@media (max-width: 600px) { .ab-gh__profile { flex-direction: column; text-align: center; } }

/* ---------- Reveal on scroll ---------- */
.ab-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.ab-reveal.is-visible { opacity: 1; transform: none; }
.md-typeset .ab-card.ab-reveal.is-visible:hover { transform: translateY(-5px); }

@media (prefers-reduced-motion: reduce) {
  .ab-hero, .ab-hero__blob, .ab-typed, .ab-mw, .ab-ch, .ab-timeline li::before { animation: none !important; }
  .ab-reveal { opacity: 1; transform: none; }
}

/* =====================================================================
   Recruiter-focused additions (v3)
   ===================================================================== */
.ab-avail { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 600; margin: .6rem 0 0; }
.ab-avail__dot { width: .55rem; height: .55rem; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.25); flex-shrink: 0; }
.ab-hero .ab-avail--hero { margin-top: 1rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.14); }

.ab-why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1rem 0 1.5rem; }
.ab-why > div { padding: 1.1rem 1.2rem; border-radius: var(--ab-radius); background: var(--ab-soft); border: 1px solid var(--ab-card-border); border-top: 4px solid var(--md-accent-fg-color); }
.ab-why strong { display: block; font-size: .95rem; margin-bottom: .35rem; color: var(--md-default-fg-color); }
.ab-why span { font-size: .8rem; color: var(--ab-fg-soft); }
.ab-why--num strong { font-size: 1.8rem; color: var(--md-accent-fg-color); }
@media (max-width: 760px) { .ab-why { grid-template-columns: 1fr; } }

.ab-featured { margin-bottom: 1rem; }
.ab-featured .ab-card__tags { color: var(--md-accent-fg-color); }

.ab-recruit { padding: 1.4rem; border-radius: var(--ab-radius); color: #fff; background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #0d9488 100%); margin-bottom: 1.5rem; }
.ab-recruit__head { display: flex; align-items: center; gap: 1.2rem; }
.ab-recruit__head img { width: 96px; height: 96px; border-radius: 50%; border: 3px solid rgba(255,255,255,.85); flex-shrink: 0; }
.md-typeset .ab-recruit h2 { color: #fff; margin: 0; }
.md-typeset .ab-recruit p { margin: .2rem 0; }
.ab-recruit__role { font-weight: 600; opacity: .95; }
.ab-recruit__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }
.md-typeset .ab-recruit .md-button { margin: 0; color: #fff; border-color: rgba(255,255,255,.8); font-size: .75rem; }
.md-typeset .ab-recruit .md-button--primary { background: #fff; color: #312e81; border-color: #fff; }
.md-typeset .ab-recruit .md-button:hover { background: #2dd4bf; border-color: #2dd4bf; color: #0f1020; }
@media (max-width: 600px) { .ab-recruit__head { flex-direction: column; text-align: center; } .ab-recruit__actions { justify-content: center; } }

.ab-updated { text-align: center; font-size: .72rem; color: var(--ab-fg-soft); margin-top: 2rem; }


/* Header search as an icon on desktop: click the magnifier to open search */
@media screen and (min-width: 60em) { .md-header__button[for="__search"] { display: inline-block; } [data-md-toggle="search"]:not(:checked) ~ .md-header .md-search { display: none; } [data-md-toggle="search"]:checked ~ .md-header .md-header__button[for="__search"] { display: none; } }
