/* Latin subsets of Fira Code, Fira Sans, IBM Plex Mono and VT323 (SIL OFL 1.1; see fonts/LICENSE.txt). */
@font-face { font-family: "Fira Code"; font-weight: 500; font-display: swap; src: url("../fonts/fira-code-500.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 400; font-display: swap; src: url("../fonts/fira-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Fira Sans"; font-weight: 500; font-display: swap; src: url("../fonts/fira-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "VT323"; font-weight: 400; font-display: swap; src: url("../fonts/vt323-400.woff2") format("woff2"); }

:root {
  --bg: #0a0a0f;
  --fg: #d8d8d8;
  --accent: #33ff33;
  --accent-bright: #6bff6b;
  --term-green: #33ff33;
  --term-bright: #b8ffb8;
  --glow: 0 0 14px rgba(51, 255, 51, 0.7);
  --font-mono: "Fira Code", ui-monospace, monospace;
  --font-heading: "IBM Plex Mono", ui-monospace, monospace;
  --font-body: "Fira Sans", system-ui, sans-serif;
  --nav-h: 5rem;
  --pad-x: clamp(1.25rem, 6vw, 6rem);
}

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

html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
}

body.intro-active { overflow: hidden; }
.scramble-pending { visibility: hidden; }

/* Bonfire glow in the bottom-right corner. #glow rises in once the intro is gone; initFire() in main.ts drives the flicker and crackle layers. */
#glow { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body:not(.intro-active) #glow { animation: glow-rise 2.5s ease-out both; }
.glow-base, .glow-flicker, .glow-crackle { position: absolute; inset: 0; transform-origin: 100% 100%; will-change: opacity, transform; }
.glow-base {
  background: radial-gradient(circle at 100% 100%, rgba(255, 110, 30, 0.2), rgba(255, 90, 20, 0.08) 35%, transparent 60%);
  animation: ember-sway 7s ease-in-out infinite;
}
.glow-flicker {
  background: radial-gradient(circle at 100% 100%, rgba(255, 170, 60, 0.28), rgba(255, 100, 20, 0.1) 22%, transparent 42%);
}
.glow-crackle {
  opacity: 0;
  background: radial-gradient(circle at 100% 100%, rgba(255, 190, 100, 0.3), rgba(255, 120, 30, 0.1) 20%, transparent 45%);
}
@keyframes glow-rise { from { opacity: 0; transform: translate(15%, 25%); } }
@keyframes ember-sway { 0%, 100% { opacity: 0.85; } 40% { opacity: 1; } 70% { opacity: 0.8; } }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* Intro */
#intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  padding: 2rem var(--pad-x);
  font-family: "VT323", var(--font-mono);
  font-size: 1.6rem;
  color: var(--term-green);
}
#intro { transition: opacity 0.5s ease; } /* keep in sync with LEAVE_MS in main.ts */
#intro.leaving { opacity: 0; }
#intro.done { display: none; }
.intro-seen #intro { display: none; } /* set by the inline script in index.html */
#intro-term div { margin-bottom: 0.4rem; white-space: pre-wrap; }
.prompt { color: var(--term-bright); }
.ok { color: var(--term-bright); }
.bar { color: var(--term-green); }
.cursor::after { content: "_"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
#intro-skip {
  position: absolute;
  right: var(--pad-x);
  bottom: 2rem;
  background: none;
  border: 1px solid var(--term-green);
  color: var(--term-green);
  font: inherit;
  padding: 0.4rem 1rem;
  cursor: pointer;
}

/* Nav */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: linear-gradient(var(--bg) 60%, transparent);
  font-size: 1rem;
}
#nav nav { display: flex; flex-wrap: wrap; font-family: var(--font-mono); }
#nav nav a {
  text-decoration: none;
  padding: 0 1.25rem;
  border-left: 1px solid var(--fg);
}
#nav nav a:first-child { border-left: 0; }
#nav nav a:hover, #nav nav a.active { color: var(--accent-bright); }
.nav-index { color: var(--accent); }
/* Terminal prompt: "$" on every entry, ">" on the current one. */
.nav-index::before { content: "$"; content: "$" / ""; }
#nav nav a.active .nav-index::before { content: ">"; content: ">" / ""; }
#nav nav a:hover .nav-label { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.35em; }
@media (min-width: 701px) {
  /* The cursor's width is always reserved so entries never shift when it appears. */
  .nav-label::after { content: "_"; visibility: hidden; }
  #nav nav a.active .nav-label::after, #nav nav a:hover .nav-label::after { visibility: visible; animation: blink 1s steps(1) infinite; }
}
#nav nav a.active .nav-index { color: var(--accent-bright); text-shadow: var(--glow); }

/* Letters-and-digits subset of Daedra by Pixel Sagas, whose licence allows web embedding but only personal, non-commercial use. */
@font-face {
  font-family: "Daedra";
  src: url("../fonts/daedra.woff") format("woff");
  font-display: block;
}
#nav .home {
  margin: 0 auto 0 -0.5rem;
  padding: 0.25rem 0.5rem;
  font-family: "Daedra", serif;
  font-size: 4rem;
  line-height: 1;
  text-decoration: none;
  color: var(--accent-bright);
  text-shadow: 0 0 6px rgba(51, 255, 51, 0.9), 0 0 18px rgba(51, 255, 51, 0.6), 0 0 40px rgba(20, 180, 20, 0.5);
  animation: ominous-glow 5s ease-in-out infinite;
}
#nav .home:hover { color: #b8ffb8; }
/* initGlitch() in main.ts swaps each letter into a fixed-width cell while text is glitching. */
.nav-label, .glitch-word { white-space: nowrap; }
.glitch-cell { display: inline-block; text-align: center; line-height: 0; }
.glitch-cell.rune { font-family: "Daedra", serif; color: var(--accent-bright); text-shadow: var(--glow); }
@keyframes ominous-glow {
  50% { opacity: 0.75; text-shadow: 0 0 4px rgba(51, 255, 51, 0.7), 0 0 12px rgba(51, 255, 51, 0.4), 0 0 28px rgba(20, 180, 20, 0.3); }
}

/* Dots */
#dots {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
#dots button {
  width: 1.75rem; height: 1.75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
  font: 500 1.2rem/1 var(--font-mono);
  cursor: pointer;
}
#dots button:hover { color: var(--accent-bright); }
#dots button.active { color: var(--accent-bright); text-shadow: var(--glow); }

/* Sections */
.screen {
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: calc(var(--nav-h) + 1.5rem) calc(var(--pad-x) + 3rem) 2rem var(--pad-x);
  display: flex;
  flex-direction: column;
}
.block-body { flex: 1; padding-left: 2rem; }
.block-title {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--accent-bright);
}
.brace { color: var(--accent); font-family: var(--font-heading); font-size: clamp(2.2rem, 5vw, 3.5rem); }
.brace-close { line-height: 1; }
.section-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem; margin-top: 0.5rem; }
.section-foot .quote { flex: 1 1 20rem; }

.hero { margin: auto 0; --hero-size: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { font-family: var(--font-heading); font-weight: 500; font-size: var(--hero-size); color: var(--accent-bright); text-shadow: var(--glow); margin: 0; }
/* --hero-ems is the heading's width in em, set by lockHeroWidth() in main.ts. */
.hero p { font-size: 1.5rem; margin: 1rem 0 0; max-width: min(100%, calc(var(--hero-size) * var(--hero-ems, 1000))); }
.hero p em { font-style: normal; color: var(--accent-bright); }
.hero-tags { list-style: none; margin: 1.5rem 0 0; padding: 0; font-family: var(--font-mono); font-size: 1.1rem; max-width: min(100%, calc(var(--hero-size) * var(--hero-ems, 1000))); }
.hero-tags li { padding: 0.15rem 0; }
.hero-ps { margin-right: 0.6em; color: var(--accent); }
.hero-tags .role { color: var(--accent-bright); }
.hero-cta { list-style: none; display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin: 1.75rem 0 0; padding: 0; }
.hero-cta a, .notfound a { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--accent); font-family: var(--font-mono); font-size: 1.05rem; text-decoration: none; color: var(--accent-bright); }
.hero-cta a:hover, .hero-cta a:focus-visible, .notfound a:hover, .notfound a:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); box-shadow: var(--glow); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: 0.5rem 1rem; background: var(--bg); border: 1px solid var(--accent); }
.skip-link:focus { top: 1rem; }

.lead { max-width: 70ch; }

.group { font-family: var(--font-heading); font-weight: 500; color: var(--accent); margin: 1.5rem 0 0.5rem; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tags li { border: 1px solid var(--accent); padding: 0.2rem 0.9rem; }

/* The photo is sized so it fits beside the text without making the screen taller than the window. */
.about-body { display: grid; grid-template-columns: minmax(0, 42rem) minmax(0, 1fr); gap: 4rem; align-items: start; }
.about-text .lead { margin: 0; line-height: 1.5; }
.about-text em { font-style: normal; color: var(--accent-bright); }
.about-label { margin: 1rem 0 0.1rem; font-family: var(--font-mono); font-size: 0.95rem; font-weight: 500; color: var(--accent); }
.about-label::before { content: "// "; content: "// " / ""; }
.about-text .about-label:first-child { margin-top: 0; }
.about-photo-frame { position: relative; justify-self: center; width: clamp(12rem, calc(100dvh - 23rem), 26rem); max-width: 100%; }
.about-photo { display: block; width: 100%; height: auto; border: 1px solid var(--accent); box-shadow: var(--glow); }
/* Corner brackets on the top-left and bottom-right of a framed image or video. */
.bracket-frame { position: relative; }
.bracket-frame::before, .bracket-frame::after { content: ""; position: absolute; width: 1.75rem; height: 1.75rem; border: 0 solid var(--accent-bright); pointer-events: none; }
.bracket-frame::before { top: -0.6rem; left: -0.6rem; border-top-width: 2px; border-left-width: 2px; }
.bracket-frame::after { bottom: -0.6rem; right: -0.6rem; border-bottom-width: 2px; border-right-width: 2px; }

.skills-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; }
.quote { --quote-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin: 0; padding-left: 1.25rem; border-left: 2px solid var(--accent); font-size: var(--quote-size); }
.quote p { margin: 0; font-style: italic; }
.quote footer { font-family: var(--font-mono); font-size: 0.826em; color: var(--accent-bright); }
/* From this width the quotes stay on one line, shrinking with the window so the longest one (about 122 characters) still fits beside its credit. */
@media (min-width: 1290px) {
  .quote { --quote-size: clamp(0.9rem, calc((100vw - 22.5rem) / 65.3), 1.15rem); flex-wrap: nowrap; white-space: nowrap; }
}
.skills-panel { --skills-gap: clamp(1.5rem, 3vw, 3rem); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--skills-gap); }
.skill-col { position: relative; }
.skill-col .group:first-child { margin-top: 0; }
/* Divider centred in the gap between columns. */
.skill-col::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--skills-gap) / -2); width: 3px; background: var(--accent); box-shadow: var(--glow); }
.skill-col:first-child::before { display: none; }
.skill-list { list-style: none; margin: 0; padding: 0; }
.skill-list li { display: flex; align-items: center; gap: 0.8em; padding: 0.3em 0; font-size: clamp(1.05rem, 3dvh, 1.6rem); line-height: 1.25; break-inside: avoid; }
.skill-icon { flex: none; width: 1.35em; height: 1.35em; }
/* Languages and Tools are the long lists, so on wide screens they run in two sub-columns to use the width and keep the section within one screen. */
@media (min-width: 1101px) {
  .skill-col:not(:nth-child(2)) .skill-list { columns: 2; column-gap: 1.5rem; }
}
span.skill-icon { text-align: center; color: var(--accent); font-family: var(--font-mono); line-height: 22px; }

.projects {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 52rem;
}
/* Name and tags share the first row so four cards fit on one screen. */
.projects > li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.1rem 1.25rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}
.projects a { color: var(--accent-bright); font-family: var(--font-heading); font-size: 1.2rem; text-decoration: none; }
.projects a:hover { text-decoration: underline; }
.projects p { grid-column: 1 / -1; margin: 0; font-size: 0.95rem; line-height: 1.35; }
/* The preview frame is centred in the column beside the list; the quote footer spans both columns so it can stay on one line. */
#projects { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: auto 1fr auto; }
#projects > :not(.project-media) { grid-column: 1; }
#projects > .section-foot { grid-column: 1 / -1; }
.project-media { grid-column: 2; grid-row: 2; align-self: center; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin: 0; }
.project-media .fig-video { width: clamp(11rem, 18vw, 21rem); }
.project-media .fig-image { width: clamp(15rem, 29vw, 32rem); }
.project-media figure { margin: 0; }
.project-media video, .project-media img { display: block; width: 100%; height: auto; border: 1px solid var(--accent); }
.project-media figcaption { margin-top: 0.4rem; font-family: var(--font-mono); font-size: 0.85rem; }
.project-media figcaption span { color: var(--accent-bright); }
.projects .tags { grid-row: 1; grid-column: 2; }
.projects .tags li { font-size: 0.9rem; padding: 0.1rem 0.7rem; }
.preview-empty, .preview-hint { margin: 0; font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); opacity: 0.7; }
/* On wide screens the media shares one cell and initProjectPreview() in main.ts marks the figure for the project under the pointer or focus as .active. */
@media (min-width: 1101px) {
  .project-media { display: grid; justify-items: center; align-items: center; align-content: start; }
  #projects > .block-body { align-self: center; }
  .project-media > * { grid-area: 1 / 1; }
  .project-media > .preview-hint { grid-area: 2 / 1; margin-top: 0.75rem; }
  .project-media figure:not(.active), .preview-empty:not(.active) { visibility: hidden; }
}
@media (max-width: 1100px) {
  .preview-empty, .preview-hint { display: none; }
}

/* 404.html */
.notfound { min-height: 100dvh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.4rem; padding: 2rem var(--pad-x); font-family: var(--font-mono); font-size: 1.1rem; }
.notfound p { margin: 0; }
.notfound a { margin-top: 1.25rem; }

.contact-body { display: grid; grid-template-columns: minmax(0, 46rem) 1fr; align-items: center; column-gap: 3rem; }
.contact-main { min-width: 0; }
.local-time { margin: 0.5rem 0 0; font-family: var(--font-mono); font-size: 0.95rem; color: var(--accent); }
.local-time::before { content: "// local time "; content: "// local time " / ""; }
.local-time time { color: var(--accent-bright); }
.contact { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 46rem; }
.contact-row { display: flex; border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.contact-row:last-child { border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.contact a {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: 1.1rem 0.75rem;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.4dvh, 1.35rem);
  text-decoration: none;
}
a[data-cmd]::before { content: "$ " attr(data-cmd) " "; content: "$ " attr(data-cmd) " " / ""; color: var(--accent); }
.contact a:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.contact-label { color: var(--accent-bright); overflow-wrap: anywhere; }
.copy {
  min-width: 5.5rem;
  padding: 0 1rem;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: none;
  color: var(--accent);
  font: 0.9rem var(--font-mono);
  cursor: pointer;
}
.copy:hover, .copy:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent-bright); }
/* Decorative; delete this block and the .contact-sigil div in index.html to remove it. */
.contact-sigil {
  font-family: "Daedra", serif;
  font-size: clamp(10rem, 34dvh, 20rem);
  line-height: 1;
  justify-self: center;
  user-select: none;
  color: var(--accent-bright);
  text-shadow: 0 0 6px rgba(51, 255, 51, 0.9), 0 0 18px rgba(51, 255, 51, 0.6), 0 0 40px rgba(20, 180, 20, 0.5);
  animation: ominous-glow 5s ease-in-out infinite;
}

/* Terminal touches, kept to a few places. The "/ ''" alt text keeps screen readers from announcing the decoration. */
::selection { background: var(--accent); color: var(--bg); }
.projects a::before { content: "./"; content: "./" / ""; color: var(--accent); }
.quote footer::before { content: "// "; content: "// " / ""; }
#skills .group::before { content: "~/"; content: "~/" / ""; opacity: 0.6; }
.projects a::after, .contact-label::after { content: "_"; content: "_" / ""; visibility: hidden; }
.projects a:hover::after, .projects a:focus-visible::after, .contact a:hover .contact-label::after, .contact a:focus-visible .contact-label::after { visibility: visible; animation: blink 1s steps(1) infinite; }

/* Timeline: cards alternate above and below one axis, each joined to its dot by a line.
   initTimelines() in main.ts sets --pos and data-side/data-align on each node; the nodes use display: contents so cards share the grid rows. */
.work-body { display: flex; flex-direction: column; }
.timeline {
  --card-w: min(30rem, 33vw);
  --link: 2.25rem;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 4px auto;
  margin: auto 5rem;
}
.timeline::before { content: ""; grid-row: 2; grid-column: 1; background: var(--accent); box-shadow: var(--glow); }
.timeline-node { display: contents; }
.timeline-year {
  position: absolute;
  grid-row: 2 / 3;
  grid-column: 1 / 2;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-bright);
}
.timeline-year-start { right: 100%; margin-right: 1rem; }
.timeline-year-end { left: 100%; margin-left: 2.25rem; }
.timeline-dot {
  position: absolute;
  grid-row: 2 / 3;
  grid-column: 1 / 2;
  left: var(--pos);
  top: 50%;
  width: 30px; height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: radial-gradient(var(--accent-bright) 45%, transparent 50%);
  box-shadow: var(--glow);
  transition: transform 0.15s ease;
}
.timeline-node:hover .timeline-dot { transform: translate(-50%, -50%) scale(1.15); }
.timeline-card { position: relative; grid-column: 1; width: var(--card-w); }
.timeline-card .group { margin: 0 0 0.25rem; }
.timeline-card p { margin: 0; font-size: 1rem; line-height: 1.5; }
.timeline-dates { margin-bottom: 0.35rem; font-family: var(--font-mono); font-size: 0.85rem; opacity: 0.7; }
/* Connector from each dot to its card's edge; 13px is the dot's radius less half the axis height. */
.timeline-dot::before { content: ""; position: absolute; left: calc(50% - 1px); width: 2px; height: calc(var(--link) - 13px); background: var(--accent); box-shadow: var(--glow); }
.timeline-node[data-side="up"] .timeline-card { grid-row: 1; margin-bottom: var(--link); }
.timeline-node[data-side="up"] .timeline-dot::before { bottom: calc(100% + 3px); }
.timeline-node[data-side="down"] .timeline-card { grid-row: 3; margin-top: var(--link); }
.timeline-node[data-side="down"] .timeline-dot::before { top: calc(100% + 3px); }
.timeline-node[data-align="start"] .timeline-card { justify-self: start; }
.timeline-node[data-align="end"] .timeline-card { justify-self: end; text-align: right; }
.timeline-node[data-align="center"] .timeline-card { justify-self: start; margin-left: calc(var(--pos) - var(--card-w) / 2); text-align: center; }

@media (max-width: 1100px) {
  .skill-col:first-child::before { display: none; }
  #projects { display: flex; }
  .project-media { flex-direction: row; flex-wrap: wrap; margin: 2rem 0 0; }
  .skills-body { grid-template-columns: 1fr; align-content: start; grid-template-rows: auto; }
  .project-media .fig-video, .project-media .fig-image { width: min(20rem, 100%); }
}

@media (max-width: 700px) {
  :root { --nav-h: 6.25rem; }
  html { scroll-snap-type: none; }
  #nav { font-size: 0.85rem; }
  #nav .home { font-size: 3.5rem; }
  #nav nav { display: grid; grid-template-columns: repeat(3, 1fr); flex: 1; max-width: 20rem; }
  /* 44px minimum touch targets */
  #nav nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    min-height: 44px;
    padding: 0 0.25rem;
    border-left: 0;
    border-radius: 0.25rem;
    -webkit-tap-highlight-color: transparent;
  }
  #nav nav a:active { background: color-mix(in srgb, var(--accent) 20%, transparent); }
  #dots { right: 0; gap: 0; }
  #dots button { width: 2.75rem; height: 2.75rem; -webkit-tap-highlight-color: transparent; }
  .screen { padding-right: 3rem; }
  .block-body { padding-left: 0; }
  /* Vertical timeline: the axis runs down the left and each card sits beside its dot, in date order. */
  .timeline { display: block; margin: 3rem 0; padding-left: 3.25rem; }
  .timeline::before { position: absolute; left: 19px; top: 0; bottom: 0; width: 4px; }
  .timeline-year-start { top: -2rem; right: auto; left: 0; margin: 0; transform: none; }
  .timeline-year-end { top: auto; bottom: -2rem; left: 0; margin: 0; transform: none; }
  .timeline-node { display: block; position: relative; margin-bottom: 2rem; }
  .timeline-node:last-child { margin-bottom: 0; }
  .timeline-dot { left: calc(-3.25rem + 3px); top: 0; width: 36px; height: 36px; transform: none; }
  .timeline-node:hover .timeline-dot { transform: none; }
  .timeline-node[data-side] .timeline-card, .timeline-node[data-align] .timeline-card { width: auto; margin: 0; text-align: left; }
  .timeline-node[data-side] .timeline-dot::before { display: none; }
  .about-body, .skills-panel { grid-template-columns: 1fr; }
  .projects > li { grid-template-columns: 1fr; }
  .projects .tags { grid-row: auto; grid-column: 1; }
  .contact-body { grid-template-columns: 1fr; }
  .contact-sigil { display: none; }
  .contact a { flex-wrap: wrap; row-gap: 0.1rem; font-size: 0.95rem; }
  .about-photo-frame { max-width: 20rem; justify-self: start; }
  .skill-col::before { display: none; }
  .skill-list li { font-size: 1.1rem; }
}

@media (max-height: 600px) {
  html { scroll-snap-type: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor::after { animation: none; }
  body:not(.intro-active) #glow, .glow-base { animation: none; }
  #nav .home { animation: none; }
  #nav nav a .nav-label::after { animation: none; }
  .projects a::after, .contact-label::after { animation: none; }
  .contact-sigil { animation: none; }
}
