/* ============================================================
   Theme tokens
   Change --accent and the two glow colors to reskin the site.
   ============================================================ */
:root {
  --bg:            #0B0714;
  --bg-2:          #120B1F;
  --surface:       rgba(255, 255, 255, 0.028);
  --surface-hi:    rgba(196, 165, 255, 0.07);
  --border:        rgba(196, 165, 255, 0.14);
  --border-hi:     rgba(196, 165, 255, 0.34);

  --text:          #EDE9F7;
  --text-dim:      #C3BBD9;
  --muted:         #9A92B4;

  --accent:        #C4A5FF;   /* light purple — primary accent */
  --accent-soft:   #D9C6FF;
  --accent-deep:   #8B5CF6;
  --accent-ink:    #1A0B2E;   /* text on accent fills */
  --cyan:          #67E8F9;   /* used sparingly, for contrast */

  --glow:          rgba(139, 92, 246, 0.40);
  --glow-2:        rgba(103, 232, 249, 0.16);

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --shell: 1140px;
  --pad:   clamp(1.15rem, 4vw, 2.5rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }

a { color: var(--accent); text-decoration-color: rgba(196, 165, 255, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

.mono { font-family: var(--font-mono); font-size: 0.8125rem; letter-spacing: 0.02em; }

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

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 50%; top: 0; translate: -50% -110%;
  z-index: 100; background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1.1rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 500; text-decoration: none; transition: translate .18s var(--ease);
}
.skip-link:focus-visible { translate: -50% 0; }

/* ============================================================
   Background layers
   ============================================================ */
.bg-layers { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(to right,  rgba(196, 165, 255, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(196, 165, 255, .055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 20%, transparent 78%);
}

.bg-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.bg-glow--1 {
  width: 46rem; height: 46rem; top: -20rem; left: -12rem;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
}
.bg-glow--2 {
  width: 38rem; height: 38rem; top: 22rem; right: -16rem;
  background: radial-gradient(circle, var(--glow-2) 0%, transparent 70%);
}

/* faint moving scanline — subtle by design */
.bg-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom, rgba(196, 165, 255, .022) 0 1px, transparent 1px 4px
  );
  animation: scan 9s linear infinite;
}
@keyframes scan { to { transform: translateY(4px); } }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.nav.is-stuck {
  background: rgba(11, 7, 20, .82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--accent); text-decoration: none; font-weight: 700;
  letter-spacing: -0.01em; margin-right: auto;
}
.brand__mark { display: grid; place-items: center; }
.brand__text { color: var(--text); font-size: 1.0625rem; }

.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.nav__menu > ul { display: flex; gap: clamp(1rem, 2vw, 1.9rem); }
.nav__menu a:not(.btn) {
  position: relative; color: var(--text-dim); text-decoration: none;
  font-size: .9375rem; padding-block: .35rem; transition: color .2s var(--ease);
}
.nav__menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 0;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  transition: width .25s var(--ease);
}
.nav__menu a:not(.btn):hover,
.nav__menu a.is-current { color: var(--text); }
.nav__menu a:not(.btn):hover::after,
.nav__menu a.is-current::after { width: 100%; }

.nav__toggle {
  display: none; width: 2.75rem; height: 2.75rem; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--accent);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.35rem; border-radius: var(--r-sm);
  font-weight: 500; font-size: .9375rem; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease),
              background .2s var(--ease), border-color .2s var(--ease);
}
.btn--sm { padding: .55rem 1rem; font-size: .875rem; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-deep));
  color: var(--accent-ink); box-shadow: 0 6px 26px -10px var(--glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px -10px var(--glow); }

.btn--ghost {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
.btn--ghost:hover { border-color: var(--border-hi); background: var(--surface-hi); transform: translateY(-2px); }

.link {
  color: var(--accent); font-size: .9375rem; text-decoration: none;
  border-bottom: 1px solid rgba(196, 165, 255, .3); padding-bottom: 1px;
  transition: border-color .2s var(--ease);
}
.link:hover { border-bottom-color: var(--accent); }

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 7rem); }
.hero__inner {
  display: grid; gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
}

/* min-width:0 keeps long words from blowing out the grid column */
.hero__content { min-width: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .78125rem;
  color: var(--accent); text-transform: uppercase; letter-spacing: .12em;
  background: var(--surface-hi); border: 1px solid var(--border);
  padding: .4rem .8rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(103, 232, 249, .18); animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(103, 232, 249, 0); } }

.hero__title {
  font-size: clamp(2.6rem, 7.2vw, 4.4rem);
  background: linear-gradient(180deg, #FFF 25%, var(--accent) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__role {
  margin-top: .5rem; font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  font-weight: 500; color: var(--accent-soft);
}
.hero__typed {
  margin-top: 1.1rem; color: var(--muted);
  min-height: 1.6em; display: flex; align-items: center; gap: .4rem;
}
.hero__prompt { color: var(--cyan); }
.caret {
  display: inline-block; width: 8px; height: 1.05em; background: var(--accent);
  animation: blink 1.1s steps(1) infinite; translate: 0 2px;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__pitch { margin-top: 1.5rem; max-width: 34rem; color: var(--text-dim); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin-top: 2.75rem;
  border-top: 1px solid var(--border); padding-top: 1.6rem;
}
.stat dt { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); line-height: 1.45; }
.stat__num {
  margin: .25rem 0 0; font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700; color: var(--accent); letter-spacing: -0.02em;
}
.stat__num::after { content: "+"; color: var(--accent-deep); }

/* terminal panel */
.panel {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(18, 11, 31, .95), rgba(11, 7, 20, .9));
  box-shadow: 0 24px 60px -30px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
}
.panel__bar {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(196, 165, 255, .04);
}
.panel__dots { display: flex; gap: .35rem; }
.panel__dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-hi);
}
.panel__dots i:first-child { background: var(--accent); }
.panel__file { color: var(--muted); }
.panel__code {
  margin: 0; padding: 1.15rem 1.25rem 1.4rem;
  font-size: .8125rem; line-height: 1.85; color: var(--text-dim);
  overflow-x: auto; tab-size: 2;
}
.c-key { color: var(--accent); }
.c-str { color: var(--cyan); }
.c-com { color: var(--muted); opacity: .75; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__index { color: var(--accent-deep); letter-spacing: .18em; }
.section__title {
  font-size: clamp(1.75rem, 4.4vw, 2.5rem); margin-top: .35rem;
  display: flex; align-items: center; gap: 1rem;
}
.section__title::after {
  content: ""; flex: 1; height: 1px; min-width: 2rem;
  background: linear-gradient(to right, var(--border-hi), transparent);
}
.section__sub { margin-top: .8rem; color: var(--muted); }

/* ---- About ---- */
.about {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr);
  align-items: start;
}
.about__body { display: grid; gap: 1.1rem; color: var(--text-dim); }

.about__facts {
  display: grid; gap: 0;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
}
.about__facts li {
  display: flex; flex-wrap: wrap; gap: .35rem 1rem; justify-content: space-between;
  padding: .85rem 1.1rem; border-bottom: 1px solid var(--border);
}
.about__facts li:last-child { border-bottom: 0; }
.about__k { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .6875rem; padding-top: .2rem; }
.about__v { font-size: .9375rem; color: var(--text); text-align: right; }

/* ---- Cards ---- */
.cards { display: grid; gap: 1.15rem; }
.cards--skills   { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.cards--projects { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

.card {
  position: relative; padding: 1.4rem 1.5rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .3s var(--ease);
}
/* top edge light that brightens on hover */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover {
  transform: translateY(-4px); border-color: var(--border-hi);
  box-shadow: 0 20px 44px -26px var(--glow);
}
.card:hover::before { opacity: .8; }

.card__title { font-size: 1.0625rem; display: flex; align-items: center; gap: .6rem; }
.card__icon { color: var(--accent); font-size: .9rem; }

.card--project { display: flex; flex-direction: column; gap: .85rem; }
.card__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card__tagline { color: var(--accent-deep); text-transform: uppercase; letter-spacing: .1em; font-size: .6875rem; }
.card__status {
  font-family: var(--font-mono); font-size: .6875rem; color: var(--cyan);
  border: 1px solid rgba(103, 232, 249, .28); border-radius: 999px;
  padding: .2rem .6rem; white-space: nowrap;
}
.card__desc { color: var(--muted); font-size: .9375rem; }
.card__links { display: flex; gap: 1.1rem; margin-top: auto; padding-top: .3rem; }
.card.is-hidden { display: none; }

/* ---- Tags ---- */
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tags li {
  font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim);
  background: var(--surface-hi); border: 1px solid var(--border);
  padding: .3rem .65rem; border-radius: var(--r-sm);
}
.tags--sm li { font-size: .6875rem; padding: .22rem .55rem; }

/* ---- Filters ---- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  font-family: var(--font-mono); font-size: .8125rem; color: var(--muted);
  background: transparent; border: 1px solid var(--border);
  padding: .45rem .9rem; border-radius: 999px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-hi); }
.chip.is-active {
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
  box-shadow: 0 4px 18px -8px var(--glow);
}
.empty { color: var(--muted); text-align: center; padding: 2rem 0; }

/* ---- Timeline ---- */
.timeline { display: grid; gap: 0; position: relative; }
.tl { position: relative; padding-left: 2.5rem; padding-bottom: 2.5rem; }
.tl:last-child { padding-bottom: 0; }
.tl::before {   /* vertical rail */
  content: ""; position: absolute; left: 6px; top: 1.5rem; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, var(--border-hi), var(--border), transparent);
}
.tl:last-child::before { display: none; }
.tl__marker {
  position: absolute; left: 0; top: .95rem;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .14);
}
.tl__period { color: var(--accent-deep); letter-spacing: .08em; }
.tl__role { font-size: 1.1875rem; margin-top: .3rem; }
.tl__org { color: var(--text-dim); font-size: .9375rem; margin-top: .2rem; }
.tl__sep { color: var(--accent-deep); padding-inline: .25rem; }

.bullets { display: grid; gap: .55rem; margin-top: 1rem; }
.bullets li { position: relative; padding-left: 1.25rem; color: var(--muted); font-size: .9375rem; }
.bullets li::before {
  content: "▸"; position: absolute; left: 0; top: -1px; color: var(--accent); font-size: .8rem;
}
.bullets em { color: var(--text-dim); font-style: normal; border-bottom: 1px dotted var(--border-hi); }

/* ---- Badges ---- */
.badges { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }

.badge {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .9rem; padding: 1.6rem 1.2rem 1.4rem;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); text-decoration: none; color: inherit;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .3s var(--ease);
}
.badge:hover { border-color: var(--border-hi); transform: translateY(-3px); box-shadow: 0 18px 40px -26px var(--glow); }

/* media slot holds either a badge <img> or the mono abbreviation tile */
.badge__media {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 6.5rem; height: 6.5rem; border-radius: 50%;
  /* soft wash lifts dark-inked vendor badges off the near-black background */
  background: radial-gradient(circle, rgba(255, 255, 255, .085) 0%, rgba(255, 255, 255, .02) 55%, transparent 72%);
  transition: transform .3s var(--ease);
}
.badge:hover .badge__media { transform: scale(1.05); }

.badge__img {
  width: 100%; height: 100%; object-fit: contain;
  /* most issuer badges are flat vector-ish PNGs; a faint glow keeps them from looking pasted on */
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .45));
}
/* add this class alongside .badge__img if an issuer's badge uses dark ink and
   disappears against the background — gives it a real light disc to sit on */
.badge__img--plate {
  background: rgba(255, 255, 255, .92); border-radius: 50%; padding: .55rem;
}

.badge__abbr {
  display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 50%;
  background: linear-gradient(135deg, rgba(196, 165, 255, .18), rgba(139, 92, 246, .1));
  border: 1px solid var(--border-hi); color: var(--accent);
  font-size: .6875rem; letter-spacing: .06em;
}

.badge__body { display: block; }
.badge__name { display: block; font-weight: 500; font-size: .9375rem; line-height: 1.35; }
.badge__meta { display: block; color: var(--muted); margin-top: .3rem; }
.badge__verify {
  margin-top: .55rem; font-family: var(--font-mono); font-size: .6875rem;
  color: var(--accent); letter-spacing: .04em;
  display: inline-flex; align-items: center; gap: .3rem;
  opacity: .75; transition: opacity .2s var(--ease);
}
.badge:hover .badge__verify { opacity: 1; }

/* "in progress" credentials read as pending, not earned */
.badge--pending .badge__media { opacity: .82; }
.badge--pending .badge__abbr { border-style: dashed; }

/* ---- Contact ---- */
.section--contact { padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact {
  text-align: center; max-width: 42rem; margin-inline: auto;
  padding: clamp(2.25rem, 5vw, 3.5rem) var(--pad);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(139, 92, 246, .13), transparent 70%),
    var(--surface);
}
.contact__title { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-top: .4rem; }
.contact__sub { margin-top: 1rem; color: var(--muted); }
.contact__actions {
  display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; margin-top: 2rem;
}
.social { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; margin-top: 2rem; }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--border); padding-block: 2rem; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  align-items: center; justify-content: space-between; color: var(--muted);
}

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .hero__inner, .about { grid-template-columns: minmax(0, 1fr); }
  .hero__panel { order: 2; }
}

@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav { background: rgba(11, 7, 20, .82); backdrop-filter: blur(14px); border-bottom-color: var(--border); }
  .nav__menu {
    position: absolute; inset: 100% 0 auto; display: none;
    flex-direction: column; align-items: stretch; gap: .35rem;
    padding: 1rem var(--pad) 1.4rem;
    background: rgba(11, 7, 20, .97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu > ul { flex-direction: column; gap: .1rem; }
  .nav__menu a:not(.btn) { display: block; padding: .7rem .25rem; font-size: 1rem; }
  .nav__menu .btn { justify-content: center; margin-top: .6rem; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
  .stat__num { margin: 0; }
  .about__facts li { flex-direction: column; }
  .about__v { text-align: left; }
  .section__title::after { display: none; }
}

/* ============================================================
   Motion / print
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .caret { display: none; }
}

@media print {
  .bg-layers, .nav, .filters, .hero__typed, .contact__actions { display: none; }
  body { background: #fff; color: #000; }
  .card, .badge, .contact { border-color: #ccc; background: none; }
  .badge__media { background: none; width: 4.5rem; height: 4.5rem; }
  .badge__img { filter: none; }
  .badge__verify { display: none; }
  .hero__title { color: #000; -webkit-text-fill-color: #000; }
  a { color: #000; }
}
