:root {
  color-scheme: dark;
  --bg: #07080c;
  --fg: #eceef6;
  --bright: #f4f5fa;
  --muted: #8b91a7;
  --dim: #767c95;
  --faint: #474d63;
  --rule: #1b1f2c;
  --edge: #575d77;
  --net: #7b86ff;
  --sans: Geist, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --band: linear-gradient(90deg, hsl(158 100% 62%), hsl(200 100% 64%), hsl(268 100% 70%));
}

[style*="--h"], dialog {
  --c: hsl(var(--h, 215) 100% 66%);
  --glow: hsl(var(--h, 215) 100% 58% / .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.veil {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 560px 300px at 0 0, var(--bg) 35%, transparent 100%),
    radial-gradient(ellipse 680px 560px at 100% 100%, var(--bg) 45%, transparent 100%);
}

main {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px;
  padding: clamp(28px, 6vw, 72px);
}

.id { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px); margin: 0 0 24px; }

h1 {
  margin: 0;
  font: 400 clamp(26px, 2.9vw, 40px)/1 var(--mono);
  letter-spacing: -0.03em;
  color: var(--bright);
}
h1 .slash {
  background: var(--band); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px hsl(200 100% 60% / .45));
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.avatar {
  flex: none; display: block; overflow: hidden;
  width: clamp(52px, 4.8vw, 68px); aspect-ratio: 1;
  background: #0b0d14;
  border: 1px solid var(--edge); border-radius: 12px;
  transition: border-color .25s, box-shadow .25s;
}
.avatar svg { display: block; width: 100%; height: 100%; transition: filter .25s; }
.avatar .t0 { fill: #171c48; }
.avatar .t1 { fill: #24318a; }
.avatar .t2 { fill: #3550ff; }
.avatar .t3 { fill: #3fc8ff; }
.avatar .t4 { fill: #c9f7ff; }
.avatar:hover { border-color: hsl(var(--h) 100% 62% / .8); box-shadow: 0 0 22px var(--glow); }
.avatar:hover svg { filter: brightness(1.12) saturate(1.1); }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 11px 7px 10px;
  font: 400 12px/1 var(--mono); letter-spacing: 0.02em;
  color: #b4b9cc; text-decoration: none;
  background: rgb(255 255 255 / .03);
  border: 1px solid var(--edge); border-radius: 6px;
  transition: color .15s, border-color .15s, box-shadow .15s, background .15s;
}
.links svg { flex: none; width: 13px; height: 13px; fill: currentColor; }
.links a:hover, .links a:focus-visible {
  outline: none;
  color: var(--c);
  border-color: hsl(var(--h) 100% 62% / .8);
  background: hsl(var(--h) 100% 60% / .08);
  box-shadow: 0 0 18px hsl(var(--h) 100% 55% / .25), inset 0 0 12px hsl(var(--h) 100% 55% / .08);
}

.work {
  align-self: end; justify-self: end;
  width: min(440px, 100%);
  font: 400 14px/1 var(--mono);
}

.tabs { display: flex; gap: 20px; margin: 0 0 20px; }
.tabs button {
  padding: 0 0 7px;
  font: inherit; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); background: none; border: 0; cursor: pointer;
}
.tabs button:hover { color: var(--muted); }
.tabs button[aria-selected="true"] { color: var(--fg); background: var(--band) bottom / 100% 1px no-repeat; }

.panels { display: grid; }
.panel { grid-area: 1 / 1; align-self: start; }
.panel[hidden] { display: block; visibility: hidden; }

.tree { margin: 0; padding: 0; list-style: none; }
.tree li + .root { margin-top: 16px; }
.tree button {
  display: flex; align-items: baseline; width: 100%;
  padding: 6px 0;
  font: inherit; text-align: left;
  color: var(--muted); background: none; border: 0; cursor: pointer;
  transition: color .15s, text-shadow .15s;
}
.tree .root > button { color: var(--fg); font-weight: 500; }
.tree .branch { color: var(--faint); white-space: pre; }
.tree .slash { color: var(--c); opacity: .7; }

.tree .lead {
  flex: 1; align-self: center; min-width: 16px; height: 1px; margin: 0 12px;
  background: linear-gradient(90deg, var(--c), transparent 90%);
  opacity: 0; transition: opacity .15s;
}
.tree .tag { font-size: 11px; letter-spacing: 0.04em; color: var(--dim); transition: color .15s; }

.tree button:hover, .tree button:focus-visible { outline: none; color: var(--c); text-shadow: 0 0 12px var(--glow); }
.tree button:hover .branch, .tree button:focus-visible .branch { color: var(--c); opacity: .6; text-shadow: none; }
.tree button:hover .lead, .tree button:focus-visible .lead { opacity: .55; }
.tree button:hover .tag, .tree button:focus-visible .tag { color: var(--muted); text-shadow: none; }

dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  color: var(--fg);
  background: rgb(11 13 20 / .94);
  border: 1px solid hsl(var(--h, 215) 100% 62% / .35); border-radius: 12px;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / .6),
    0 0 48px hsl(var(--h, 215) 100% 55% / .18),
    0 30px 80px rgb(0 0 0 / .6);
}
dialog::backdrop { background: rgb(4 5 8 / .55); backdrop-filter: blur(4px); }

.card { padding: 30px 30px 26px; }
.card .path {
  margin: 0 0 10px;
  font: 500 12px/1.4 var(--mono);
  color: var(--c); text-shadow: 0 0 10px var(--glow);
}
.card h2 {
  margin: 0 0 12px;
  font: 300 30px/1.1 var(--mono); letter-spacing: -0.04em;
  color: var(--bright);
}
.card .role {
  margin: 0 0 22px; padding-bottom: 18px;
  font: 400 11px/1.5 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
.card p { max-width: 44ch; margin: 0 0 12px; font-size: 15.5px; line-height: 1.65; color: #c3c8d8; }
.card .out { margin-top: 20px; font: 400 13px/1.6 var(--mono); }
.card .out a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--c); }
.card .out a:hover, .card .out a:focus-visible { outline: none; color: var(--c); text-shadow: 0 0 10px var(--glow); }
.card .private { color: var(--muted); }

.close {
  position: absolute; top: 14px; right: 14px;
  padding: 6px 8px;
  font: 400 18px/1 var(--mono);
  color: var(--muted); background: none; border: 0; cursor: pointer;
}
.close:hover, .close:focus-visible { color: var(--c); }

@media (max-width: 720px) {
  main { grid-template-rows: auto auto; align-content: start; gap: 48px; }
  .work { align-self: start; justify-self: stretch; }
  .veil {
    background: linear-gradient(to bottom,
      var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 55%, transparent 90%);
  }
}
