/* ============================================================
   doxy.dev, hand-written. No framework, no external requests.
   ============================================================ */

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  --bg: #0d0b18;
  --bg-alt: #110e21;
  --surface: #171331;
  --surface-hi: #1d1840;
  --line: #2b2450;
  --line-hi: #3d3470;

  --text: #eceaf7;
  --muted: #9c95c2;
  /* --faint carries small uppercase labels and the footer, so it has to clear
     4.5:1 on --surface-hi, the lightest background it sits on. #6f6795 did not. */
  --faint: #8b83b0;

  --accent: #f2b53d;
  --accent-soft: #ffd484;
  --violet: #8b7cf6;
  --cyan: #56d3d0;

  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1080px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

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

/* ── Reset ────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0;
  letter-spacing: -.021em;
  font-weight: 650;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--surface-hi);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .12em .42em;
  word-break: break-all;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

/* ── Layout helpers ───────────────────────────────────────── */
.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #1a1400;
  padding: .7rem 1.1rem;
  border-radius: 0 0 10px 0;
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

:where(a, button, summary, details):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1.25rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.topbar.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 650;
  letter-spacing: -.015em;
  text-decoration: none;
  font-size: 1.02rem;
}

.topbar__brand .mark {
  width: 26px;
  height: 26px;
  color: var(--accent);
  flex: none;
}

.dim {
  color: var(--faint);
}

.topbar__nav {
  display: flex;
  gap: .3rem;
  font-size: .93rem;
}

.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  padding: .4rem .7rem;
  border-radius: 8px;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.topbar__nav a:hover {
  color: var(--text);
  background: var(--surface);
}

@media (max-width: 640px) {
  .topbar__nav {
    display: none;
  }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
  isolation: isolate;
}

.hero__aurora {
  position: absolute;
  inset: -35% -20% auto -20%;
  height: 130%;
  z-index: -1;
  background:
    radial-gradient(42% 46% at 22% 30%, color-mix(in srgb, var(--violet) 34%, transparent), transparent 68%),
    radial-gradient(38% 42% at 78% 22%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 66%),
    radial-gradient(46% 50% at 58% 72%, color-mix(in srgb, var(--cyan) 15%, transparent), transparent 70%);
  filter: blur(22px);
  opacity: .62;
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }

  to {
    transform: translate3d(3%, 2%, 0) scale(1.09);
  }
}

.hero::after {
  /* faint grid, keeps the gradient from looking like a smear */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(70% 62% at 50% 40%, #000 15%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 62% at 50% 40%, #000 15%, transparent 78%);
  opacity: .5;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero__text {
  max-width: 40rem;
}

/* ── Portrait ─────────────────────────────────────────────── */
.portrait {
  margin: 0;
  flex: none;
  position: relative;
  width: clamp(150px, 19vw, 230px);
  aspect-ratio: 1;
  border-radius: 26px;
  padding: 3px;
  background: linear-gradient(150deg, var(--accent-soft), var(--violet) 55%, var(--cyan));
  box-shadow: 0 22px 55px -18px rgba(0, 0, 0, .8);
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 23px;
  background: var(--surface);
}

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .portrait {
    order: -1;
    width: clamp(112px, 30vw, 150px);
    border-radius: 20px;
    margin-bottom: .35rem;
  }

  .portrait img {
    border-radius: 17px;
  }
}

.eyebrow {
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 1.3rem + 4.4vw, 4rem);
  font-weight: 700;
  letter-spacing: -.033em;
}

.grad {
  background: linear-gradient(103deg, var(--accent-soft) 8%, var(--accent) 42%, var(--violet) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem);
  color: var(--muted);
  max-width: 38rem;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .72rem 1.35rem;
  border-radius: 10px;
  border: 1px solid var(--line-hi);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text);
  font-weight: 600;
  font-size: .96rem;
  text-decoration: none;
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}

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

.btn--primary {
  background: linear-gradient(140deg, var(--accent-soft), var(--accent));
  border-color: transparent;
  color: #1c1503;
}

.btn--primary:hover {
  background: linear-gradient(140deg, #ffe0a3, var(--accent-soft));
  border-color: transparent;
}

/* ── Bands & headings ─────────────────────────────────────── */
.band {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
}

.band--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-title {
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.1rem);
  display: flex;
  align-items: baseline;
  gap: .8rem;
  margin-bottom: .9rem;
}

.num {
  font-family: var(--mono);
  font-size: .72em;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0;
}

.section-lead {
  color: var(--muted);
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-title+.grid,
.section-title+.stack {
  margin-top: 2.5rem;
}

/* ── Grids ────────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: 1.15rem;
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
}


/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: linear-gradient(168deg, var(--surface), color-mix(in srgb, var(--surface) 55%, var(--bg)));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-hi);
}

.card__icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}

.card h3 {
  font-size: 1.16rem;
  margin-bottom: .6rem;
}

.card p {
  color: var(--muted);
  font-size: .96rem;
}

.card a {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

.card a:hover {
  text-decoration-color: var(--accent);
}

/* ── Projects ─────────────────────────────────────────────── */
.project {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.6rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}

.project::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--violet), transparent);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.project:hover {
  transform: translateY(-3px);
  border-color: var(--line-hi);
}

.project:hover::before {
  opacity: .9;
}

.project__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.project h3 {
  font-size: 1.3rem;
}

.project p {
  color: var(--muted);
  font-size: .96rem;
  flex: 1;
}

.tag {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--line-hi);
  border-radius: 999px;
  padding: .22rem .65rem;
  white-space: nowrap;
}

.tag--live {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  padding-top: .35rem;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: var(--accent);
  font-weight: 600;
  font-size: .91rem;
  text-decoration: none;
}

.link .arw {
  width: 13px;
  height: 13px;
  transition: transform .2s var(--ease);
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link:hover .arw {
  transform: translate(2px, -2px);
}

.odds {
  margin-top: 1.15rem;
  border: 1px dashed var(--line-hi);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  background: color-mix(in srgb, var(--surface) 42%, transparent);
}

.odds h3 {
  font-size: 1rem;
  margin-bottom: .45rem;
}

.odds p {
  color: var(--muted);
  font-size: .94rem;
}

.odds a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ── Stack ────────────────────────────────────────────────── */
.stack {
  display: grid;
  gap: 1.9rem;
}

.stack__group h3 {
  font-size: .82rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: .9rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.chips li {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: .38rem .9rem;
  font-size: .89rem;
  color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}

.chips li:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* ── Link cards ───────────────────────────────────────────── */
.links {
  display: grid;
  /* 190px lets all five social cards share one row on a wide screen instead of
     leaving the last one stranded. */
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .85rem;
}

.linkcard {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .85rem;
  row-gap: .1rem;
  align-items: center;
  padding: 1.05rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.linkcard--wide {
  grid-column: 1 / -1;
}

.linkcard:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface-hi);
}

.linkcard__icon {
  grid-row: 1 / 3;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.linkcard__label {
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
}

.linkcard__value {
  font-weight: 600;
  font-size: .98rem;
  overflow-wrap: anywhere;
}

/* ── Verify ───────────────────────────────────────────────── */
.verify {
  margin-top: 2.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  padding: .5rem 1.25rem;
}

.verify summary {
  cursor: pointer;
  padding: .7rem 0;
  font-weight: 600;
  font-size: .95rem;
  color: var(--muted);
  transition: color .2s var(--ease);
}

.verify summary:hover {
  color: var(--text);
}

.verify summary::marker {
  color: var(--accent);
}

.verify p {
  color: var(--muted);
  font-size: .92rem;
  padding-bottom: 1rem;
  max-width: 46rem;
}

.verify a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ── Legal pages ──────────────────────────────────────────── */
.legal {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}

.legal .wrap {
  max-width: 44rem;
}

.legal h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.6rem);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.08rem;
  margin: 2.25rem 0 .6rem;
  color: var(--accent);
}

.legal p {
  color: var(--muted);
  font-size: .97rem;
}

.legal p+p {
  margin-top: .9rem;
}

.legal a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.address {
  line-height: 1.85;
}

.legal__back {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* ── Footer ───────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  padding: 2.25rem 0;
  color: var(--faint);
  font-size: .88rem;
}

.foot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.foot a {
  color: var(--muted);
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--accent);
}

/* ── Reveal on scroll ─────────────────────────────────────── */
/* Scoped to .js so content is never hidden when scripting is off. */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__aurora {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #d3cee9;
    --faint: #bcb5d8;
    --line: #4d4384;
    --line-hi: #695ca8;
  }
}
