:root {
  color-scheme: dark;
  --ink: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.62);
  --violet: #7c5cff;
  --neon: #00f5d4;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: #000;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body { padding: 10px; }

/* Rounded frame, barely lighter than the black page; the top glow lets the black notch stand out. */
#frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 20px);
  min-height: calc(100dvh - 20px);
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(60rem 30rem at 50% 0%, rgba(0, 245, 212, 0.09), transparent 70%),
    radial-gradient(40rem 24rem at 50% 100%, rgba(0, 245, 212, 0.08), transparent 70%),
    radial-gradient(120% 90% at 50% 40%, #040808 0%, #020404 50%, #010202 100%);
}
/* Fine grid behind everything, faded out towards the edges. Turquoise at very low alpha. */
#frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 245, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 80%);
}

/* ---------- notch: compact tab that widens into a bar (from slaxmtk) ---------- */
/* The bar itself is a full-width grid that never moves, so the chevron and the links stay put;
   only the black .shape behind them changes width. */
.notch {
  --w: 6rem;                                   /* collapsed width */
  --h: 46px;                                   /* whole pixels, so the flat bottom and the curves end on the same row */
  --sh: 3.6rem;                                /* width of each S-curve shoulder */
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  height: var(--h);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  pointer-events: none;                        /* only the shape and its contents react, not the empty strip */
}
.notch .shape {
  position: absolute;
  top: 0;
  left: 50%;
  translate: -50% 0;
  width: var(--w);
  height: var(--h);
  background: #000;
  pointer-events: auto;
  transition: width 0.65s cubic-bezier(0.22, 0.9, 0.24, 1);
}
/* smooth S-curve shoulders, mirrored on the right */
.notch .shape::before,
.notch .shape::after {
  content: "";
  position: absolute;
  top: 0;
  width: var(--sh);
  height: var(--h);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 46' preserveAspectRatio='none'%3E%3Cpath d='M0 0C30 0 30 46 60 46V0Z' fill='%23000'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
/* overlap the middle by 1px: no hairline gap where the background could show through */
.notch .shape::before { right: calc(100% - 1px); }
.notch .shape::after  { left: calc(100% - 1px); transform: scaleX(-1); }

.notch button {
  position: relative;
  grid-column: 2;
  align-self: stretch;
  width: 3rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}
.notch button:focus-visible { outline: 2px solid var(--neon); outline-offset: -4px; border-radius: 10px; }
/* the notch's only mark: a chevron that says "opens", turning in place while open */
.notch .chev {
  display: block;
  width: 0.8rem;
  height: auto;
  overflow: visible;
  fill: none;
  stroke: var(--neon);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 0.25rem rgba(0, 245, 212, 0.6));
  transition: rotate 0.45s cubic-bezier(0.22, 0.9, 0.24, 1);
}
.notch.open .chev,
.notch:has(:focus-visible) .chev { rotate: 180deg; }
@media (hover: hover) {
  .notch:hover .chev { rotate: 180deg; }
}

.notch .side {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font: 450 0.8rem/1 var(--sans);
  letter-spacing: 0.01em;
  color: rgba(244, 246, 251, 0.78);
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 0.2s, visibility 0s 0.2s;
}
.notch .side { gap: 1.4rem; }
@media (max-width: 520px) {
  .notch { --sh: 2.2rem; }
  .notch .side { gap: 1rem; font-size: 0.76rem; }
}
.notch .left  { grid-column: 1; grid-row: 1; justify-self: end;   padding-right: 1.6rem; }
.notch .right { grid-column: 3; grid-row: 1; justify-self: start; padding-left: 1.6rem; }
.notch .side a { color: inherit; text-decoration: none; transition: color 0.2s; }
.notch .side a:hover,
.notch .side a:focus-visible { color: #fff; }
.notch .side a[aria-current="page"] { color: var(--neon); }

/* expanded: hover (mouse), keyboard focus, or tapped open (touch) */
.notch.open,
.notch:has(:focus-visible) { --w: min(23rem, calc(100vw - 20px - 2 * var(--sh))); }
@media (hover: hover) {
  .notch:hover { --w: min(23rem, calc(100vw - 20px - 2 * var(--sh))); }
}
.notch.open .side,
.notch:has(:focus-visible) .side { opacity: 1; visibility: visible; transition: opacity 0.35s 0.25s, visibility 0s; }
@media (hover: hover) {
  .notch:hover .side { opacity: 1; visibility: visible; transition: opacity 0.35s 0.25s, visibility 0s; }
}

/* ---------- content ---------- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 5rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  text-align: center;
}
h1 { margin: 0; }
.brand {
  font-size: clamp(2.5rem, 12vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.code { font-size: clamp(2.5rem, 10vw, 5rem); font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; color: var(--muted); }
a { color: var(--ink); text-decoration-color: var(--violet); text-underline-offset: 0.25em; }
.ai { color: var(--neon); text-shadow: 0 0 0.35em rgba(0, 245, 212, 0.55), 0 0 1em rgba(0, 245, 212, 0.25); }

.services {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 2.6vw, 1.05rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.services li + li::before {
  content: "·";
  margin: 0 0.9em;
  color: var(--violet);
}
.note {
  margin-top: -0.25rem;
  font-size: clamp(0.8rem, 2.4vw, 0.9rem);
  letter-spacing: 0.02em;
}
.claim {
  margin-top: 1.5rem;
  color: var(--ink);
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ---------- about: portrait beside a left-aligned text column ---------- */
main.about {
  display: grid;
  grid-template-columns: minmax(12rem, 17rem) minmax(0, 34rem);
  justify-content: center;
  align-content: center;
  align-items: center;
  column-gap: clamp(2.5rem, 6vw, 4.5rem);
  text-align: left;
}
.portrait { position: relative; }
/* dark halo behind the photo: hides the grid where the edges fade out */
.portrait::before {
  content: "";
  position: absolute;
  inset: -18%;
  background: radial-gradient(closest-side, #030606 70%, transparent);
}
.me {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  /* toned down so the magenta wall behind doesn't compete with the turquoise */
  filter: brightness(0.9) saturate(0.7);
  /* a blurred rounded rectangle: the edge fades evenly, corners included */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='8'/%3E%3C/filter%3E%3Crect x='14' y='14' width='372' height='472' rx='44' fill='%23000' filter='url(%23b)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500' preserveAspectRatio='none'%3E%3Cfilter id='b'%3E%3CfeGaussianBlur stdDeviation='8'/%3E%3C/filter%3E%3Crect x='14' y='14' width='372' height='472' rx='44' fill='%23000' filter='url(%23b)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.name {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.role {
  margin-top: 0.7rem;
  font-size: 1.05rem;
}
.bio {
  margin-top: 1.9rem;
  display: grid;
  gap: 1rem;
  font-size: 1.05rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.bio p:first-child {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.5;
}

/* ---------- topics: one narrow, left-aligned column ---------- */
main.topics, main.doc { width: 100%; max-width: 30rem; margin: 0 auto; align-items: flex-start; text-align: left; gap: 2rem; }
.topics .lede, .doc .lede { color: var(--ink); font-size: 1.2rem; font-weight: 400; line-height: 1.5; text-wrap: balance; }
.topics section, .doc section { display: grid; gap: 0.3rem; }
.topics h2, .doc h2 { margin: 0; font-size: 0.95rem; font-weight: 600; color: var(--neon); }
.topics section p, .doc section p { font-size: 1.05rem; line-height: 1.65; text-wrap: pretty; }

/* ---------- footer: two quiet links ---------- */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  padding: 0 1.25rem 1.6rem;
  font-size: 0.8rem;
}
footer a { color: var(--muted); text-decoration: none; padding: 0.4rem 0; }
footer a:hover,
footer a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 0.25em; }
.doc section p a { color: var(--ink); text-decoration-color: rgba(0, 245, 212, 0.6); }

/* Narrow screens: one item per line instead of a wrapped row with stray separators. */
@media (max-width: 560px) {
  .services { flex-direction: column; }
  .services li + li::before { content: none; }
}
/* Narrow screens: the about page stacks, portrait on top, still left-aligned. */
@media (max-width: 720px) {
  main.about {
    grid-template-columns: minmax(0, 34rem);
    row-gap: 1.75rem;
  }
  .portrait { width: 9.5rem; }
  .bio { margin-top: 1.4rem; }
}

/* ---------- motion: the page is static; only the notch moves, and only when someone uses it ---------- */
@media (prefers-reduced-motion: reduce) {
  .notch .shape, .notch .side, .notch .chev { transition: none; }
}
