/* viot theme: an Animus-style HUD in purple-team violet (red team + blue team).
   Flat colour, condensed display type, no gradients-as-decoration.
   Pure CSS: no JavaScript, no third-party requests. Every animation stops under prefers-reduced-motion. */

:root {
  --ink: #0b0716;
  --ink-2: #140d26;
  --line: #2c2048;
  --text: #eee9ff;
  --muted: #b3a8d6;      /* 9.0:1 on ink */
  --violet: #9d5cff;     /* brand; 5.1:1 on ink, ink text on it is 5.1:1 */
  --violet-hi: #c4a1ff;  /* links and small violet text, 9.4:1 */
  --signal: #f2e600;     /* the one loud accent, used sparingly */
  --cyan: #5ef2ff;       /* data: dates and readouts */
  --red: #ff3b5c;        /* glitch layer only */
  --blue: #3d6bff;       /* glitch layer only */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  /* Condensed display type from fonts the OS already has: Windows, macOS/iOS, Android, Linux.
     The last resort is a scaled-down regular sans, so a long name still fits a phone. */
  --display: "Bahnschrift", "Avenir Next Condensed", "Roboto Condensed", sans-serif-condensed, "Ubuntu Condensed",
    "DejaVu Sans Condensed", "Liberation Sans Narrow", "Arial Narrow", "Narrow Fallback", sans-serif;
  color-scheme: dark;
}

@font-face {
  font-family: "Narrow Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Roboto"), local("DejaVu Sans");
  size-adjust: 78%;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 17px/1.65 var(--sans);
  background: var(--ink);
}

/* Faint CRT scanlines over everything. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 3px);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

a {
  color: var(--violet-hi);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

::selection {
  background: var(--violet);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 16px;
  top: 12px;
  background: var(--ink-2);
  padding: 8px 12px;
  z-index: 30;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 7, 22, 0.95);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand span {
  color: var(--violet);
}

.brand::after {
  content: "_";
  color: var(--signal);
  animation: blink 1.1s steps(1) infinite;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* The underline wipes in from the left on hover. */
.site-nav a {
  padding: 4px 0;
  color: var(--muted);
  text-decoration: none;
  background: linear-gradient(var(--violet), var(--violet)) 0 100% / 0 2px no-repeat;
  transition: background-size 0.25s var(--ease-out), color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background-size: 100% 2px;
}

/* EN / ΕΛ: a flat tab that flips to violet on hover. */
.lang-switch {
  padding: 3px 9px 2px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--violet-hi);
  text-decoration: none;
  border: 1px solid var(--violet);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.lang-switch:hover {
  color: var(--ink);
  background: var(--violet);
}

.site-header .site-nav {
  margin-left: auto;
}

/* ------------------------------------------------------------------ hero */

/* The name spans the full width; the sigil sits beside the text under it. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
  padding: 84px 0 48px;
  overflow-x: clip; /* the sigil watermark hangs off the edge on phones */
}

.hero-text {
  display: contents;
}

.hero .eyebrow,
.hero h1,
.tags {
  grid-column: 1 / -1;
}

.hero .role,
.hero .lead,
.readout {
  grid-column: 1;
}

.sigil {
  grid-column: 2;
  grid-row: 3 / span 3;
  align-self: center;
}

/* HUD grid behind the hero only, fading out around the edges. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 -20px;
  z-index: -1;
  background-image:
    linear-gradient(rgba(157, 92, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 92, 255, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 72% 45%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 72% 45%, #000, transparent 70%);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--cyan);
  margin: 0 0 14px;
}

.prompt {
  color: var(--violet);
}

.hero h1 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 300;
  font-size: clamp(28px, 10.5vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.role {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--violet-hi);
  margin: 0 0 16px;
}

.lead {
  font-size: 19px;
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* Status readout, like a HUD panel: label over value. */
.readout {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  margin: 28px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--line);
}

.readout div {
  padding: 8px 16px 9px;
  border-right: 1px solid var(--line);
}

.readout div:last-child {
  border-right: 0;
}

.readout dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.readout dd {
  margin: 0;
  color: var(--text);
}

.online::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 1px;
  background: var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}

.sigil {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
}

.sigil img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sigil-ring {
  animation: spin 140s linear infinite;
}

/* The core flickers on like a projection booting. */
.sigil-core {
  animation: boot 1.1s steps(1) 0.25s both;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 36px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* Every item carries its own slash, so a wrapped line still starts like a path. */
.tags {
  gap: 2px 14px;
}

.tags li::before {
  content: "/";
  margin-right: 8px;
  color: var(--violet);
}

/* The hero text rises in, one line after another. */
.hero-text > * {
  animation: rise 0.6s var(--ease-out) both;
}

.hero-text > :nth-child(2) { animation-delay: 0.06s; }
.hero-text > :nth-child(3) { animation-delay: 0.12s; }
.hero-text > :nth-child(4) { animation-delay: 0.18s; }
.hero-text > :nth-child(5) { animation-delay: 0.24s; }

/* Glitch title: the two copies are aria-hidden spans, so screen readers read the name once.
   A red copy and a blue copy that overlap into purple. */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch .layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
}

.glitch .layer-a {
  color: var(--red);
  clip-path: inset(8% 0 58% 0);
  animation: glitch-a 6s steps(1) infinite;
}

.glitch .layer-b {
  color: var(--blue);
  clip-path: inset(52% 0 12% 0);
  animation: glitch-b 6s steps(1) infinite;
}

/* Hover the name: it desyncs out in hard steps while the handle wipes in. The alias is aria-hidden. */
.name-swap {
  position: relative;
  display: inline-block;
  cursor: crosshair;
}

.name-swap .real {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.42s steps(7);
}

.name-swap .alias {
  position: absolute;
  left: 0;
  top: 50%;
  padding: 0.02em 0.14em 0;
  white-space: nowrap;
  pointer-events: none;
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--ink);
  background: var(--signal);
  transform: translateY(-50%);
  clip-path: inset(0 100% 0 0);
  transition:
    clip-path 0.42s steps(7) 0.1s,
    letter-spacing 0.6s var(--ease-out) 0.1s;
}

.name-swap:hover .real {
  clip-path: inset(0 0 0 100%);
}

.name-swap:hover .alias {
  clip-path: inset(0 0 0 0);
  letter-spacing: 0.02em;
}

.name-swap:hover .glitch .layer {
  animation-duration: 0.45s;
}

/* ------------------------------------------------------------------ sections */

section {
  padding: 64px 0 8px;
  scroll-margin-top: 64px; /* keep anchored headings clear of the sticky header */
}

.sec-head {
  margin-bottom: 30px;
}

/* "#01 LAB NOTES ———— ΣΗΜΕΙΩΣΕΙΣ": a sequence label with a flat violet tab. */
.seq {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.seq b {
  padding: 1px 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--violet);
}

.seq::after {
  content: "";
  order: 1;
  flex: 1;
  height: 1px;
  background: var(--line);
}

.seq [lang="el"] {
  order: 2;
  letter-spacing: 0.3em;
  color: var(--violet-hi);
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 19px;
  line-height: 1.3;
  margin: 0 0 6px;
}

.project-meta,
.stack {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 14px;
  text-decoration: none;
  color: var(--violet-hi);
  border: 1px solid var(--violet);
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s var(--ease-out);
}

.button:hover {
  color: var(--ink);
  background: var(--violet);
}

.button:active {
  transform: scale(0.97);
}

.button.primary {
  font-weight: 700;
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}

.button.primary:hover {
  background: var(--text);
  border-color: var(--text);
}

.callout {
  border-left: 3px solid var(--violet);
  background: rgba(157, 92, 255, 0.09);
  padding: 12px 16px;
  margin: 20px 0;
}

/* ------------------------------------------------------------------ labs */

.labs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 44px;
}

.lab {
  position: relative;
  padding: 24px 0 30px;
  border-top: 1px solid var(--line);
}

.lab h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.08;
}

.lab p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.lab .project-meta {
  margin: 0;
}

.lab ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.lab li {
  margin: 5px 0;
}

.lab li::marker {
  color: var(--violet);
}

/* "01 ENCRYPT": the number and the verb that sum up the project. */
.lab-no {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--violet-hi);
}

.lab .lab-no {
  margin: 0 0 12px;
  color: var(--violet-hi);
}

.lab-no span {
  margin-right: 10px;
  color: var(--signal);
}

/* The featured project is a panel: cut corners, halftone, a huge outlined numeral. */
.lab-feature {
  grid-column: 1 / -1;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 40px 44px 38px;
  border: 1px solid var(--violet);
  background: var(--ink-2);
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.lab-feature::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
  height: 85%;
  pointer-events: none;
  background-image: radial-gradient(var(--violet) 1.1px, transparent 1.6px);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(315deg, #000, transparent 62%);
  mask-image: linear-gradient(315deg, #000, transparent 62%);
  opacity: 0.6;
}

.lab-feature::after {
  content: "01" / "";
  position: absolute;
  top: -18px;
  right: 30px;
  pointer-events: none;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 700;
  font-size: 230px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(157, 92, 255, 0.55);
}

.lab-feature > * {
  position: relative;
  z-index: 1;
}

.lab-feature h3 {
  font-size: clamp(32px, 4.4vw, 48px);
  max-width: 22ch;
}

.lab-feature p,
.lab-feature ul {
  max-width: 64ch;
}

/* ------------------------------------------------------------------ writing */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.post-list li {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  grid-template-areas:
    "date tags"
    "date title"
    "date text";
  column-gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.3s var(--ease-out);
}

.post-list time {
  grid-area: date;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
}

.post-list .post-tags {
  grid-area: tags;
  margin: 0 0 4px;
}

.post-list .post-title {
  grid-area: title;
  margin: 0 0 6px;
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.12;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

/* The whole row is the link target. */
.post-list .post-title::after {
  content: "";
  position: absolute;
  inset: 0;
}

.post-list p {
  grid-area: text;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 70ch;
}

/* Eagle vision: hovering one entry dims the others and marks the target. */
.post-list li::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 22px;
  bottom: 22px;
  width: 3px;
  background: var(--signal);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s var(--ease-out);
}

.post-list li:focus-within::before {
  transform: scaleY(1);
}

@media (hover: hover) and (pointer: fine) {
  .post-list:hover li:not(:hover) {
    opacity: 0.5;
  }

  .post-list li:hover::before {
    transform: scaleY(1);
  }

  .post-list li:hover .post-title {
    color: var(--violet-hi);
  }
}

.post-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-left: 10px;
  vertical-align: middle;
}

.post-tags span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--violet-hi);
}

.post-tags span::before {
  content: "#";
  color: var(--violet);
}

.feed-link {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 14px;
}

/* ------------------------------------------------------------------ about, skills, timeline */

#about > p {
  max-width: 68ch;
  color: var(--muted);
}

#about > p:first-of-type {
  font-size: 20px;
  color: var(--text);
}

/* Skills as a spec sheet rather than a grid of identical cards. */
.spec {
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec div {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.spec dt {
  font-family: var(--display);
  font-stretch: condensed;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet-hi);
}

.spec dd {
  margin: 0;
  padding-top: 2px;
  font-family: var(--mono);
  font-size: 14px;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.timeline > li {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  column-gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.timeline > li > * {
  grid-column: 2;
}

.timeline .when {
  grid-column: 1;
  grid-row: 1 / span 4;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
}

/* The current role gets a live marker. */
.timeline .now .when::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  vertical-align: 1px;
  background: var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}

.timeline h3 {
  margin: 0 0 4px;
}

.timeline .org {
  color: var(--violet-hi);
}

.timeline p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15.5px;
}

.timeline ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.timeline ul li {
  margin: 4px 0;
  font-size: 15.5px;
}

.timeline ul li::marker {
  color: var(--violet);
}

/* ------------------------------------------------------------------ article */

.article {
  max-width: 800px;
  padding: 60px 20px 24px;
}

.article header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.article h1 {
  margin: 10px 0 16px;
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 400;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1;
  letter-spacing: -0.005em;
}

.article h2 {
  margin: 48px 0 14px;
  font-weight: 400;
  font-size: clamp(30px, 4vw, 38px);
}

.article h3 {
  margin-top: 28px;
  color: var(--violet-hi);
}

.article p,
.article li {
  max-width: 70ch;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--cyan);
  background: var(--ink-2);
  padding: 1px 6px;
}

pre {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--violet);
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

figure {
  margin: 22px 0;
}

.article img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
}

figcaption {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 18px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
  text-transform: lowercase;
  background: rgba(157, 92, 255, 0.09);
}

/* ------------------------------------------------------------------ footer */

.site-footer {
  margin-top: 80px;
  padding: 44px 0 44px;
  overflow-x: clip; /* the scanner travels past the right edge */
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

/* A HUD scale across the top of the footer: base line, minor and major ticks,
   a yellow anchor on the left and a violet end cap on the right. */
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background:
    linear-gradient(var(--signal), var(--signal)) 0 0 / 40px 3px no-repeat,
    linear-gradient(var(--violet), var(--violet)) 100% 0 / 40px 3px no-repeat,
    linear-gradient(var(--violet), var(--violet)) 0 0 / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(157, 92, 255, 0.7) 0 1px, transparent 1px 80px) 0 0 / 100% 12px no-repeat,
    repeating-linear-gradient(90deg, rgba(157, 92, 255, 0.35) 0 1px, transparent 1px 10px) 0 0 / 100% 6px no-repeat;
}

/* A short cyan scanner that sweeps the scale. */
.site-footer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--cyan);
  transform: translateX(-120px);
  animation: scan 7s linear infinite;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ------------------------------------------------------------------ motion */

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}

@keyframes scan {
  to { transform: translateX(100vw); }
}

/* Scroll-driven motion, still with no JavaScript: blocks slide in as they enter the
   viewport, the big "01" drifts against the scroll, and a bar under the header tracks
   reading progress. Browsers without scroll timelines simply show everything in place. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec-head,
    .lab,
    .spec div,
    .timeline > li,
    #about > p,
    #contact .actions {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    /* Transform only, so the eagle-vision opacity on hover keeps working. */
    .post-list li {
      animation: slide-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }

    .lab-feature::after {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: cover;
    }

    .sigil {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: exit;
    }

    .site-header::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: -1px;
      height: 2px;
      background: var(--violet);
      transform-origin: 0 50%;
      animation: progress linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(28px); }
}

@keyframes slide-in {
  from { transform: translateX(-24px); }
}

@keyframes drift {
  from { transform: translateY(40px); }
  to { transform: translateY(-40px); }
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes boot {
  0% { opacity: 0; }
  12% { opacity: 0.7; }
  16% { opacity: 0.1; }
  34% { opacity: 0.9; }
  38% { opacity: 0.3; }
  60%, 100% { opacity: 1; }
}

@keyframes glitch-a {
  0%, 89%, 100% { opacity: 0; transform: none; }
  90% { opacity: 0.9; transform: translate(-4px, -1px); }
  92% { opacity: 0.9; transform: translate(3px, 1px); }
  94% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 90%, 100% { opacity: 0; transform: none; }
  91% { opacity: 0.9; transform: translate(4px, 1px); }
  93% { opacity: 0.9; transform: translate(-2px, 0); }
  95% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .glitch .layer {
    display: none;
  }
}

/* ------------------------------------------------------------------ smaller screens / print */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 56px;
  }

  .hero .role,
  .hero .lead,
  .readout {
    grid-column: 1;
  }

  /* The sigil moves behind the text as a watermark. */
  .sigil {
    position: absolute;
    grid-column: auto;
    grid-row: auto;
    top: 24px;
    right: -90px;
    z-index: -1;
    width: 260px;
    opacity: 0.28;
  }

  .labs {
    grid-template-columns: minmax(0, 1fr);
  }

  .lab-feature {
    padding: 30px 22px;
  }

  .lab-feature::after {
    font-size: 150px;
    right: 10px;
  }

  .post-list li {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "date tags"
      "title title"
      "text text";
    column-gap: 14px;
  }

  .post-list li::before {
    left: -12px;
  }

  .spec div,
  .timeline > li {
    grid-template-columns: minmax(0, 1fr);
  }

  .timeline > li > *,
  .timeline .when {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  /* The nav wraps to two lines here; a sticky header would take too much of the screen. */
  .site-header {
    position: relative;
  }

  section {
    padding-top: 48px;
    scroll-margin-top: 0;
  }

  .site-nav {
    gap: 4px 16px;
  }

  .site-header .wrap {
    padding-top: 10px;
    padding-bottom: 6px;
  }

  /* The language tab sits beside the brand; the nav takes its own row. */
  .lang-switch {
    order: 1;
    margin-left: auto;
  }

  .site-header .site-nav {
    order: 2;
    width: 100%;
    margin-left: 0;
  }

  .readout div {
    padding: 7px 12px 8px;
  }
}

@media print {
  body::after,
  .site-header,
  .site-footer,
  .actions,
  .sigil,
  .glitch .layer,
  .name-swap .alias {
    display: none;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  .lab-feature {
    clip-path: none;
    border: 1px solid #999;
    background: #fff;
  }
}
