/* redesign/pixel: a pixel look on top of site.css, in the void purple. Flat
   colors, square edges; the logo's five tones (PixelLogo.razor, scene.js)
   set the palette. Only what differs from the void look is here; the
   buttons stay the void ones. */

:root {
  --term-bg: #09080d;
  --term-bg2: #0f0d17;
  --term-fg: #ece6f8;
  --term-dim: #8a82a3;
  --term-faint: #2b2639;
  --term-primary: #b48dff;
  --term-primary-glow: transparent;
  --term-secondary: #ece4ff;
  --term-blue: #a37df0;
  --v-soft: #b9b0cf;
  --v-panel: rgba(9, 8, 13, 0.9);
  --px-line: #2f2550;
}

body { background: var(--term-bg); }
/* a business card, not a document: nothing on it gets selected */
body { -webkit-user-select: none; user-select: none; }
/* flat pixels: nothing glows but the buttons */
*, *::before, *::after { text-shadow: none !important; }
.v-work > li.now::before, .v-overall .dot { box-shadow: none !important; }

/* A pixel frame: four 2 px shadows and no border, so the corners stay open
   like a sprite's. --px-frame sets the color. */
.v-page .tui-panel, .v-overall, .v-fetch, .v-stack .tools span {
  --px-frame: var(--px-line);
  border: 0 !important;
  box-shadow: 0 -2px 0 0 var(--px-frame), 0 2px 0 0 var(--px-frame), -2px 0 0 0 var(--px-frame), 2px 0 0 0 var(--px-frame) !important;
}
.v-card:hover .tui-panel, .v-stack .tools span:hover { --px-frame: var(--term-primary); }
.v-card { -webkit-user-drag: none; }
/* the title is a solid tab on the frame */
.v-page .tui-panel > .tui-panel-title {
  top: -11px;
  padding: 3px 9px;
  background: var(--term-primary) !important;
  color: var(--term-bg);
  letter-spacing: 1px;
}
.v-page .tui-panel > .tui-panel-badge { top: -7px; }

/* section heads: the title in the pixel font, a row of pixels, the command
   small on the right */
.v-head .px-text { flex: none; height: 1.4em; width: auto; }
.v-head .rule {
  height: 6px;
  border-top: 0;
  background: repeating-linear-gradient(90deg, var(--px-line) 0 6px, transparent 6px 12px);
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent);
  mask-image: linear-gradient(90deg, #000 40%, transparent);
}
.v-uptime .v-head .px-text { height: 1em; }

/* ─── top bar: stays on top while the page scrolls ─── */
.v-nav { position: sticky; top: 0; z-index: 20; }
/* jumps to #projects and co. land under the bar, not behind it */
html { scroll-padding-top: calc(56px + env(safe-area-inset-top, 0px)); }
/* opaque: anything see-through shows the section titles behind it, and iOS
   Safari tints its status bar from this color */
.v-nav { background: var(--term-bg); border-bottom-color: transparent; padding-top: env(safe-area-inset-top, 0px); }
.v-nav .row { gap: 8px; }
.v-nav .brand { display: flex; align-items: center; margin-right: 14px; }
.v-nav .px-mark { width: 20px; height: 20px; }
.v-nav nav a { border-left: 0; padding: 0 12px; color: var(--term-fg); }
.v-nav nav a:hover { color: var(--term-primary); }
.v-nav .icon { padding: 0 8px; color: var(--term-dim); font-weight: 700; }
.v-nav .icon:hover { color: var(--term-fg); }
/* the fx switch: on, calm, off; the label follows <html data-fx> */
.v-nav .px-fx { padding: 0 8px; border: 0; background: none; color: var(--term-dim); font: inherit; font-weight: 700; cursor: pointer; }
.v-nav .px-fx:hover { color: var(--term-fg); }
.v-nav .px-fx span { display: none; }
:root:not([data-fx]) .px-fx .on, :root[data-fx="calm"] .px-fx .calm, :root[data-fx="off"] .px-fx .off { display: inline; }
.v-nav .px-cta { margin-left: 10px; padding: 4px 16px; background: var(--term-primary); color: var(--term-bg); font-weight: 700; }
.v-nav .px-cta:hover, .v-nav .px-cta.on { background: var(--term-fg); color: var(--term-bg); }

/* ─── hero: everything centered ─── */
.px-hero .v-wrap { display: flex; flex-direction: column; align-items: center; text-align: center; }
.px-title { width: min(100%, 900px); margin: 0; font: inherit; }
.px-logo { display: block; width: 100%; height: auto; }
.px-logo.narrow { display: none; }
.px-sub { margin: clamp(28px, 5vh, 52px) 0 0; color: var(--term-fg); font-size: clamp(20px, 2.2vw, 30px); font-weight: 700; line-height: 1.3; }
.px-hero .v-typed { margin-top: 12px; color: var(--v-soft); font-size: clamp(14px, 1.1vw, 16px); }
.px-hero .v-typed .arr, .px-hero .v-typed .cursor { color: var(--term-dim); }
.px-hero .v-cta { justify-content: center; gap: 22px; margin-top: 30px; }

/* ─── bands ─── */
.v-ticker { background: #150f26; border-top: 1px solid var(--px-line); }
.v-ticker .item { color: var(--term-fg); }
.v-ticker .sep { color: var(--term-dim); }
.v-full { background: rgba(18, 13, 32, 0.92); border-top-color: var(--px-line); border-bottom-color: var(--px-line); }

/* panels: a solid border, the title sits on it */
.v-page .tui-panel { border-color: var(--px-line); }
.v-card:hover .tui-panel { border-color: var(--term-primary); }
.v-stack .f1 { --acc: #ece4ff; }
.v-stack .tools { gap: 12px; }
.v-stack .tools span { background: rgba(22, 17, 42, 0.9); padding: 5px 12px; }
.v-stack .tools span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 9px; background: var(--acc); vertical-align: 1px; }

/* lists and the timeline: dashed in squares */
.v-more li + li { border-top: 2px dashed var(--px-line); }
.v-work { border-left: 2px dashed var(--px-line); }
/* a planned degree: a hollow, dashed marker */
.v-work > li.planned::before { border-style: dashed; background: transparent; }
.v-work > li.planned .role { color: var(--v-soft); }
/* education: the field on the left, the grade on the right under the dates */
.v-edu .sub { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 8px; font-size: 13px; color: var(--v-soft); }
.v-edu .sub .field::before { content: "> "; color: var(--term-primary); font-weight: 700; }
.v-edu .sub .grade { margin-left: auto; color: var(--term-primary); }

/* system: big numbers in the pixel font, the pixel tux */
.v-big .num { display: flex; align-items: flex-end; gap: 8px; }
.v-big .num .px-text { height: clamp(34px, 4vw, 54px); width: auto; }
.v-big .num .unit { font-size: clamp(16px, 1.6vw, 22px); line-height: 1; }
.v-big .stat { border-left-width: 4px; }
.v-fetch .art { width: 84px; height: auto; margin: 4px 0 0; flex: none; }

/* links: the names in the pixel font, a row of pixels to the address */
/* flush with the head row on both sides: the arrow hangs outside the column */
.v-links a { position: relative; align-items: center; padding-left: 0; padding-right: 0; }
.v-links .go { position: absolute; right: -1.6em; }
.v-links .px-text.k { height: clamp(22px, 2.4vw, 32px); width: auto; flex: none; }
.v-links a:hover .px-text { filter: brightness(1.25); }
.v-links .dots { height: 4px; border-bottom: 0; transform: none; background: repeating-linear-gradient(90deg, var(--px-line) 0 4px, transparent 4px 10px); }

/* under construction, in the pixel font */
.v-legal .wip .px-text { display: block; width: min(100%, 460px); height: auto; margin: 0 auto; }
/* uptime: the state and the numbers in the pixel font, square beats,
   square pills and a square dot */
.v-overall .state .px-text { height: 0.95em; width: auto; max-width: 100%; }
.v-overall .nums b .px-text { display: block; height: 1em; width: auto; margin-bottom: 0.35em; }
.v-overall .dot { width: 0.4em; height: 0.4em; border-radius: 0; animation: none; }
.v-strip i { border-radius: 0; }
.v-net-row .pill { border-radius: 0; }
.v-net-row + .v-net-row { border-top: 2px dashed var(--px-line); }

/* the network's pixels are louder than the ASCII was: cover them more */
.v-uptime .tui-panel, .v-uptime .v-overall { background: rgba(9, 8, 13, 0.88); }

/* ─── phone: the sections go, mark, profiles and uptime stay ─── */
@media (max-width: 760px) {
  .v-nav .brand { display: flex; }
  .v-fetch .art { display: none; }
  .px-logo.wide { display: none; }
  .px-logo.narrow { display: block; }
  .v-links a { align-items: flex-start; }
  .v-links .go { display: none; }
  .v-edu .sub { flex-direction: column; }
  .v-edu .sub .grade { margin-left: 0; }
  /* one line: the year and the two legal links */
  .v-footer .mode, .v-footer .spacer, .v-footer .row > span:last-child { display: none; }
  .v-nav nav { display: none; }
  .px-hero .v-cta { gap: 12px; }
  /* role and years on a line each, not broken after the dot */
  .px-sub span { display: block; }
  .px-sub .sep { display: none; }
}

/* ─── home: one bar at the bottom of the screen, ticker in the hero, footer
   further down; --bar-out and then --bar-in (tui.js) run 0 to 1 with the
   scroll ─── */
.v-bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; height: 34px; overflow: hidden; }
.v-bottom .v-ticker, .v-bottom .v-footer { position: absolute; inset: 0; margin: 0; }
.v-bottom .v-footer { background: var(--term-bg); }
/* iOS 26+ Safari colors the strip behind its toolbar from the
   background-color of a fixed element at the bottom edge, and only from
   that: not from shadows, pseudo-elements or absolute children. So the bar
   box itself carries the color of whichever layer shows, and grows by the
   safe-area inset so the ticker and footer stay above the home indicator. */
.v-bottom { --bar-fill: #150f26; background-color: var(--bar-fill); transition: background-color .2s; height: calc(34px + env(safe-area-inset-bottom, 0px)); }
.v-bottom .v-ticker, .v-bottom .v-footer { bottom: auto; height: 34px; }
:root[data-bar="foot"] .v-bottom { --bar-fill: var(--term-bg); }
.v-bottom .v-ticker { display: flex; align-items: center; padding: 0; transform: translateY(calc(var(--bar-out, 0) * 100%)); opacity: calc(1 - var(--bar-out, 0)); }
.v-bottom .v-footer { display: flex; align-items: center; animation: none; transform: translateY(calc((1 - var(--bar-in, 0)) * 100%)); opacity: var(--bar-in, 0); pointer-events: none; }
.v-bottom .v-footer .row { flex-wrap: nowrap; width: 100%; padding-top: 0; padding-bottom: 0; }
:root[data-bar="foot"] .v-bottom .v-footer { pointer-events: auto; }
:root[data-bar="foot"] .v-bottom .v-ticker { pointer-events: none; }
/* the last section ends above the bar, with the same room as between
   the sections */
body:has(.v-bottom) .v-page { padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px) + clamp(48px, 6vw, 90px)); }

/* ─── Safari ─── */
/* no text zoom in landscape, no grey box on tap */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
.v-nav .px-fx { -webkit-appearance: none; appearance: none; border-radius: 0; }
/* landscape phones: keep the content out of the notch */
.v-wrap { padding-left: max(var(--v-gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--v-gutter), env(safe-area-inset-right, 0px)); }
/* the full-screen canvas also touches both edges: a solid color, so Safari
   never takes it as a see-through bar (same color as the page, no change) */
#scene-bg { background-color: var(--term-bg); }
