/* ============================================================
   style.css: the design system for my portfolio (also used by cv.html).

   How it is organised:
   - Design tokens first: named colours, shadows, sizes and fonts. Every rule
     below uses these names (var(--text), var(--radius) ...) instead of raw
     values, so changing a colour in one place changes it everywhere.
   - Dark is my default theme. The light theme only swaps the token values
     (:root[data-theme="light"]); the rules themselves never change.
   - Then the page from top to bottom: base, buttons, header, hero, work,
     about, journal, lab, resume, contact, footer and dialogs.
   - Last: scroll reveal, tablet and phone layouts, reduced motion, print,
     and an auto-generated block for very old browsers.

   Layout rule: one selector and one declaration per line. After editing I run
   python3 tools/format_css.py and python3 tests/make_css_fallback.py.
   ============================================================ */
:root {
  color-scheme: dark;

  /* Surfaces (page, cards, raised cards) and the hairline borders between them */
  --bg: #0b0d12;
  --surface: #12151c;
  --surface-2: #171b23;
  --surface-3: #1e232d;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.16);
  --header-bg: rgba(11,13,18,.78);
  --field-bg: rgba(0,0,0,.28);

  /* Text: main, secondary (muted) and tertiary (dim) */
  --text: #edf0f5;
  --muted: #a7afbd;
  --dim: #8a93a2;

  /* Accent colours (my brand blue), the "available" green, warnings and the focus ring */
  --brand: #8ea8ff;
  --brand-strong: #3a66de;
  --brand-hover: #4673ec;
  --brand-soft: rgba(142,168,255,.12);
  --brand-line: rgba(142,168,255,.42);
  --green: #6fdcaa;
  --green-soft: rgba(111,220,170,.1);
  --warning: #f0cf91;
  --focus: #9dbcff;

  /* Shadows and the soft background glow */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 18px 44px rgba(0,0,0,.34);
  --shadow-lg: 0 32px 90px rgba(0,0,0,.5);
  --glow: rgba(58,102,222,.18);

  /* Section colours: one per homepage section (see "Section colours"), plus a soft version for glows and a
     stronger one for selected text. The six come from the project illustrations. Bright here, deeper in light. */
  --c-violet: #b49cff;
  --c-violet-soft: rgba(180,156,255,.14);
  --c-violet-select: rgba(180,156,255,.32);
  --c-teal: #5fd3e0;
  --c-teal-soft: rgba(95,211,224,.12);
  --c-teal-select: rgba(95,211,224,.30);
  --c-amber: #f4c46b;
  --c-amber-soft: rgba(244,196,107,.11);
  --c-amber-select: rgba(244,196,107,.30);
  --c-mint: #75e0b2;
  --c-mint-soft: rgba(117,224,178,.10);
  --c-mint-select: rgba(117,224,178,.28);
  --c-coral: #ff9a7a;
  --c-coral-soft: rgba(255,154,122,.12);
  --c-coral-select: rgba(255,154,122,.30);
  --c-magenta: #f08ad8;
  --c-magenta-soft: rgba(240,138,216,.13);
  --c-magenta-select: rgba(240,138,216,.30);
  --on-colour: #10131a;
  --hero-glow: linear-gradient(135deg, rgba(58,102,222,.42), rgba(150,110,255,.30) 55%, rgba(240,138,216,.22));

  /* Corner rounding and the maximum page width */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1160px;

  /* Font stacks; the system fonts after each name are fallbacks while the real font loads */
  --font-sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}

/* Light theme: the same token names with light values. main.js sets data-theme="light" on <html>. */
:root[data-theme="light"] {
  color-scheme: only light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --surface-3: #e5eaf3;
  --border: rgba(16,24,40,.1);
  --border-strong: rgba(16,24,40,.22);
  --header-bg: rgba(246,248,252,.84);
  --field-bg: #ffffff;
  --text: #141a27;
  --muted: #454e5e;
  --dim: #566072;
  --brand: #2a55c9;
  --brand-strong: #2a55c9;
  --brand-hover: #2248b0;
  --brand-soft: rgba(42,85,201,.08);
  --brand-line: rgba(42,85,201,.4);
  --green: #0f7a52;
  --green-soft: rgba(15,122,82,.08);
  --warning: #8a5a00;
  --focus: #2a55c9;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --shadow-md: 0 16px 40px rgba(16,24,40,.1);
  --shadow-lg: 0 30px 80px rgba(16,24,40,.22);
  --glow: rgba(42,85,201,.1);
  --c-violet: #6a3fd6;
  --c-violet-soft: rgba(106,63,214,.09);
  --c-violet-select: rgba(106,63,214,.18);
  --c-teal: #0b7383;
  --c-teal-soft: rgba(11,115,131,.08);
  --c-teal-select: rgba(11,115,131,.18);
  --c-amber: #8f5a00;
  --c-amber-soft: rgba(196,128,0,.10);
  --c-amber-select: rgba(196,128,0,.22);
  --c-mint: #0f7a52;
  --c-mint-soft: rgba(15,122,82,.08);
  --c-mint-select: rgba(15,122,82,.18);
  --c-coral: #b5401f;
  --c-coral-soft: rgba(181,64,31,.08);
  --c-coral-select: rgba(181,64,31,.18);
  --c-magenta: #a3338a;
  --c-magenta-soft: rgba(163,51,138,.08);
  --c-magenta-select: rgba(163,51,138,.18);
  --on-colour: #ffffff;
  --hero-glow: linear-gradient(135deg, rgba(42,85,201,.20), rgba(106,63,214,.16) 55%, rgba(163,51,138,.12));
}

/* ---------- Base ---------- */

/* Base: box sizing, smooth scrolling and the page background. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 60% 40% at 80% -5%, var(--glow), transparent 70%);
}

@supports (overflow-x: clip) {
  body {
    overflow-x: clip;
  }
}

/* Links and form controls inherit the page font and colour. */
a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* Keyboard focus ring, shown on every focusable element. */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

::selection {
  background: var(--brand-soft);
  color: var(--text);
}

::target-text {
  background: var(--brand-soft);
}

/* The hidden attribute always hides, whatever the display rules say. */
[hidden] {
  display: none !important;
}

/* Headings: Manrope, tight letter spacing, sizes that grow with the screen. */
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--text);
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 5.6vw, 74px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.045em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
}

h3 {
  letter-spacing: -.02em;
}

/* Layout helpers: the centred page width and the vertical space around sections. */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
  margin-inline: auto;
}

.section {
  padding-top: clamp(76px, 10vw, 128px);
  padding-bottom: clamp(76px, 10vw, 128px);
}

/* Text for screen readers only (visually hidden but still read aloud). */
.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;
}

/* Skip link: off screen until a keyboard user tabs to it. */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* While a dialog is open, the page behind it does not scroll. */
html.modal-open {
  overflow: hidden;
}

/* Eyebrow: the small numbered label above each heading (for example "01 / SELECTED WORK"). */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--brand);
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-heading .eyebrow::before,
.about-copy > .eyebrow::before,
.resume-copy > .eyebrow::before,
.contact-panel > .eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

/* Green status dot (availability, portrait caption). */
.status-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

/* Gradient words in the headings, with a plain colour where gradients on text are not supported. */
.gradient-text {
  color: var(--brand);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .gradient-text {
    background: linear-gradient(95deg, #c9d6ff 0%, #8ea8ff 55%, #8fd6ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  [data-theme="light"] .gradient-text {
    background: linear-gradient(95deg, #1b3f9e 0%, #2a55c9 55%, #0b6f99 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* ---------- Buttons ----------
   Two styles used across the site: .button-primary (solid blue) and .button-quiet (outlined). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, translate .2s ease;
}

.button span {
  font-size: 16px;
  font-weight: 500;
}

.button:hover {
  translate: 0 -1px;
}

.button:active {
  translate: 0 0;
}

.button-primary {
  background: var(--brand-strong);
  color: #fff;
  box-shadow: 0 8px 24px rgba(58,102,222,.25);
}

.button-primary:hover {
  background: var(--brand-hover);
}

.button-quiet {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text);
}

.button-quiet:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.button:disabled {
  opacity: .6;
  cursor: progress;
  translate: 0 0;
}

/* ---------- Header and navigation ---------- */

/* Sticky header; main.js adds .is-scrolled once the page moves, which adds the shadow. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  backdrop-filter: saturate(160%) blur(16px);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Brand: the "G." mark and my name, top left. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 13.5px var(--font-display);
  letter-spacing: .14em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 15px;
  letter-spacing: -.06em;
}

.brand-dot {
  color: var(--brand);
}

/* Navigation links; the underline marks the section currently in view. */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links > a {
  position: relative;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .2s ease, background-color .2s ease;
}

.nav-links > a:not(.nav-cta):hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-links > a[aria-current="location"] {
  color: var(--text);
}

.nav-links > a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.nav-links > a[aria-current="location"]::after {
  transform: scaleX(1);
}

/* "Let's talk" button at the end of the navigation. */
.nav-cta {
  margin-left: 10px;
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  font-weight: 700;
}

.nav-cta:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.nav-cta span {
  margin-left: 6px;
  color: var(--brand);
}

/* Light/dark switch: shows a sun in the dark theme and a moon in the light theme. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.theme-toggle:hover {
  border-color: var(--brand-line);
  background: var(--brand-soft);
}

.theme-toggle svg {
  display: block;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .icon-moon,
[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

/* Menu button for phones (two bars that turn into an X when open). */
.menu-toggle {
  display: none;
  place-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}

.menu-toggle:hover {
  background: var(--surface-2);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ---------- Hero ---------- */

/* Hero layout: text on the left, portrait on the right. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 56px;
  min-height: 640px;
  padding-top: 72px;
  padding-bottom: 32px;
}

.hero-copy {
  min-width: 0;
}

.hero-copy .eyebrow {
  color: var(--muted);
}

.hero-intro {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18.5px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* Availability pill under the hero buttons. */
.availability {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 28px 0 0;
  padding: 8px 16px 8px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.availability b {
  color: var(--text);
  font-weight: 700;
}

/* The "Currently learning" line with a short accent rule. */
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin-top: 28px;
  color: var(--dim);
  font: 12.5px/1.8 var(--font-mono);
}

.meta-line {
  flex: none;
  width: 28px;
  height: 1px;
  background: var(--brand);
}

/* Portrait area: the soft glow, the framed photo and its caption. */
.hero-visual {
  position: relative;
  min-width: 0;
  padding: 30px 0;
}

.portrait-visual {
  display: grid;
  grid-template-columns: min(100%, 380px);
  justify-content: center;
  align-content: center;
  min-height: 480px;
}

.visual-glow {
  position: absolute;
  top: 12%;
  left: 18%;
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--hero-glow);
  filter: blur(80px);
}

.portrait-frame {
  grid-row: 2;
  position: relative;
  z-index: 1;
  width: min(100%, 380px);
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transition: border-color .25s ease;
}

.portrait-frame:hover {
  border-color: var(--border-strong);
}

.portrait-image {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 4.5;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 16px;
  background: var(--surface-2);
}

/* Placeholder shown only when the photo fails to load (corner marks and a silhouette). */
.portrait-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 400px;
  aspect-ratio: 4 / 4.5;
  overflow: hidden;
  padding: 28px;
  border: 1px dashed var(--brand-line);
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 32%, var(--brand-soft), transparent 50%), var(--surface-2);
  text-align: center;
}

.portrait-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--brand);
  opacity: .7;
}

.portrait-corner-tl {
  top: 16px;
  left: 16px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.portrait-corner-tr {
  top: 16px;
  right: 16px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.portrait-corner-bl {
  bottom: 16px;
  left: 16px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.portrait-corner-br {
  bottom: 16px;
  right: 16px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.portrait-silhouette {
  position: relative;
  width: 112px;
  height: 135px;
  margin-bottom: 10px;
  opacity: .55;
}

.silhouette-head {
  position: absolute;
  top: 4px;
  left: 38px;
  width: 38px;
  height: 44px;
  border-radius: 48% 48% 45% 45%;
  background: linear-gradient(140deg, #7692c2, #263b5c);
}

.silhouette-body {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 94px;
  height: 82px;
  border-radius: 50% 50% 15px 15px;
  background: linear-gradient(135deg, #4a6288, #17253a);
  clip-path: polygon(24% 0, 76% 0, 100% 100%, 0 100%);
}

.portrait-slot-label {
  color: var(--text);
  font: 500 11px var(--font-mono);
  letter-spacing: .16em;
}

.portrait-slot-help {
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* Switch between photo and placeholder (main.js adds .portrait-missing). */
.portrait-frame:not(.portrait-missing) .portrait-placeholder {
  display: none;
}

.portrait-frame.portrait-missing .portrait-image {
  display: none;
}

/* Caption under the photo. */
.portrait-caption {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 4px;
  color: var(--muted);
  font: 12px var(--font-mono);
  letter-spacing: .08em;
}

.portrait-caption .status-dot {
  width: 7px;
  height: 7px;
}

.portrait-caption-mark {
  margin-left: auto;
  color: var(--brand);
  font: 800 15px var(--font-display);
}

/* Round portrait: the second shape, chosen with data-portrait="round" on the portrait area in index.html
   (data-portrait="rounded" keeps the rounded rectangle above). The photo becomes a circle inside a ring,
   centred on the face, and the caption sits centred underneath. Suits a head-and-shoulders photo. */
[data-portrait="round"] .portrait-frame {
  width: min(100%, 360px);
  padding: 11px;
  border: 0;
  background: none;
  box-shadow: none;
}

[data-portrait="round"] .portrait-image,
[data-portrait="round"] .portrait-placeholder {
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 10px var(--surface), 0 0 0 11px var(--border), var(--shadow-lg);
  transition: box-shadow .25s ease;
}

[data-portrait="round"] .portrait-image {
  object-position: center 25%;
}

.portrait-visual[data-portrait="round"] {
  grid-template-columns: min(100%, 360px);
}

/* The round caption sits closer to the frame's lower edge, so Grow tucks in less there. */
[data-portrait="round"] .chip-two {
  margin-top: -4px;
}

[data-portrait="round"] .portrait-frame:hover .portrait-image {
  box-shadow: 0 0 0 10px var(--surface), 0 0 0 11px var(--border-strong), var(--shadow-lg);
}

[data-portrait="round"] .portrait-corner {
  display: none;
}

[data-portrait="round"] .portrait-caption {
  justify-content: center;
  padding: 24px 8px 0;
}

[data-portrait="round"] .portrait-caption-mark {
  margin-left: 6px;
}

/* The two small chips on the portrait's corners ("Build" and "Grow"). They are placed in the grid around the frame,
   not floated over it, so they can never cover the photo or the caption, at any width. */
.floating-chip {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

/* Build on the frame's top-right corner, Grow on its bottom-left corner. Each overlaps the frame by 7px, which stays
   inside the frame's 11px border band, so a chip can touch the frame but never the photo or the caption. On wider
   screens they also stand slightly outside the frame's sides, like a tab. */
.chip-one {
  grid-row: 1;
  justify-self: end;
  margin-bottom: -7px;
  margin-right: -14px;
}

.chip-two {
  grid-row: 3;
  justify-self: start;
  margin-top: -7px;
  margin-left: -14px;
}

.floating-chip b,
.floating-chip small {
  display: block;
  line-height: 1.3;
}

.floating-chip b {
  font-size: 13.5px;
}

.floating-chip small {
  color: var(--muted);
  font-size: 12px;
}

.chip-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 16px;
}

.chip-blue {
  background: var(--brand-soft);
  color: var(--brand);
}

/* Strip along the bottom of the hero: location, year and "Scroll to explore". */
.hero-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font: 12px var(--font-mono);
  letter-spacing: .1em;
}

.hero-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  transition: color .2s ease;
}

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

/* ---------- Section headings ----------
   The title on the left and a short note on the right, used by every section. */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 40px;
}

.section-heading .eyebrow,
.about-copy .eyebrow,
.resume-copy .eyebrow {
  margin-bottom: 16px;
}

.section-note {
  max-width: 400px;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

/* ---------- Work: filter chips and project cards ---------- */

/* Filter chips above the project cards (built by render.js from each project's category). */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 28px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
}

.filter-count {
  color: inherit;
  font: 500 12px var(--font-mono);
  opacity: .75;
}

/* Project grid: three columns on laptops, two on tablets, one on phones. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* Shared card surface for projects, notes, Lab entries, the resume card, the Now strip and skills. */
.project-card,
.journal-card,
.lab-item,
.resume-card,
.now,
.skill-card {
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Project card: illustration on top, text below; it lifts slightly on hover. */
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s ease, box-shadow .25s ease, translate .25s ease;
}

.project-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  translate: 0 -4px;
}

.project-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px 22px 18px;
}

.project-type {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font: 12px var(--font-mono);
  letter-spacing: .02em;
}

.project-type span:first-child {
  color: var(--brand);
}

.project-info h3 {
  margin: 14px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.project-info p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* The bottom row of a card: status pill, Details button and project link. */
.project-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
}

.project-links > a,
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text);
  font-weight: 600;
  transition: color .2s ease;
}

.project-links > a:hover,
.link-button:hover {
  color: var(--brand);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Status pill: a blue dot by default, green when the project is completed. */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.status-pill[data-status="completed"] i {
  background: var(--green);
}

/* Plain lists shown only when JavaScript is off (render.js replaces them). */
.fallback-list {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
}

.fallback-list strong {
  color: var(--text);
}

.js .fallback-list {
  display: none;
} /* shown only when JavaScript is off or content.js failed to load */

/* Card illustrations: the small drawings at the top of each project card (built from the templates in render.js).
   Decorative, and dark in both themes, so their text stays light. */
.project-art {
  position: relative;
  height: 220px;
  overflow: hidden;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  color: #eef1f7;
  transition: filter .25s ease;
}

.project-card:hover .project-art {
  filter: saturate(1.1) brightness(1.05);
}

/* Label row inside each illustration. */
.art-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9aa8bf;
  font: 11px var(--font-mono);
  letter-spacing: .12em;
}

.art-symbol {
  color: #a9c0ff;
  font-size: 20px;
}

/* Background colour of each illustration, one per `art` value in content.js. */
.art-web {
  background: radial-gradient(ellipse at 20% 90%, rgba(112,80,225,.42), transparent 60%), #15131f;
}

.art-study {
  background: radial-gradient(ellipse at 70% 15%, rgba(33,153,167,.38), transparent 60%), #0f1a20;
}

.art-terminal {
  background: radial-gradient(ellipse at 15% 100%, rgba(117,224,178,.30), transparent 60%), #0f1a17;
}

.art-gpa {
  background: radial-gradient(ellipse at 85% 10%, rgba(244,187,91,.32), transparent 60%), #181710;
}

.art-calc {
  background: radial-gradient(ellipse at 85% 95%, rgba(240,120,90,.34), transparent 60%), #1a1412;
}

.art-edumind {
  background: radial-gradient(ellipse at 20% 10%, rgba(205,100,190,.36), transparent 60%), #17111a;
}

/* The small "screen" drawn inside each illustration, which rises a little on hover. */
.web-preview,
.study-preview,
.term-preview,
.gpa-preview,
.calc-preview,
.ml-preview {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 27%;
  bottom: -12%;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 9px 9px 0 0;
  background: rgba(11,14,22,.8);
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
  transition: translate .35s ease;
}

.project-card:hover .web-preview,
.project-card:hover .study-preview,
.project-card:hover .term-preview,
.project-card:hover .gpa-preview,
.project-card:hover .calc-preview,
.project-card:hover .ml-preview {
  translate: 0 -6px;
}

/* Portfolio website illustration. */
.web-preview {
  padding: 13px 15px;
  background: rgba(19,17,28,.93);
}

.web-nav {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 7px;
}

.web-nav b {
  margin-right: auto;
}

.web-nav b span {
  color: #ac8dff;
}

.web-nav i {
  width: 15px;
  height: 3px;
  border-radius: 3px;
  background: #50465d;
}

.web-headline {
  margin-top: 20px;
  font: 800 24px/1.05 var(--font-display);
  letter-spacing: -.07em;
}

.web-headline em {
  color: #b7a1ff;
  font-style: normal;
}

.web-lines i {
  display: block;
  width: 70%;
  height: 3px;
  margin-top: 8px;
  border-radius: 4px;
  background: #393344;
}

.web-lines i:nth-child(2) {
  width: 49%;
}

.web-button {
  display: inline-block;
  margin-top: 14px;
  padding: 6px 9px;
  border: 1px solid #68568e;
  border-radius: 3px;
  font: 6px var(--font-mono);
}

/* Learning Lab illustration. */
.study-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(10,23,27,.88);
}

.study-ring {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border: 1px solid #4b9b9d;
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(62,160,162,.06), 0 0 0 22px rgba(62,160,162,.035);
  color: #9bcfd0;
  font: 8px var(--font-mono);
  text-align: center;
}

.study-ring b {
  color: #e3fbf6;
}

.study-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.study-tags span {
  padding: 4px 6px;
  border: 1px solid #29464b;
  border-radius: 3px;
  color: #82b9bb;
  font: 7px var(--font-mono);
}

/* Library Terminal illustration. */
.term-preview {
  background: rgba(8,16,14,.92);
}

.term-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 11px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #86c3ac;
  font: 7px var(--font-mono);
  letter-spacing: .1em;
}

.term-bar i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3d5d52;
}

.term-bar span {
  margin-left: auto;
}

.term-lines {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.term-lines b {
  display: block;
  width: 34%;
  height: 4px;
  border-radius: 3px;
  background: #75e0b2;
}

.term-lines i {
  display: block;
  height: 3px;
  border-radius: 3px;
  background: #2b4b41;
}

.term-lines i:nth-child(2) {
  width: 78%;
}

.term-lines i:nth-child(3) {
  width: 55%;
}

.term-lines i:nth-child(4) {
  width: 68%;
}

.term-lines i:nth-child(5) {
  width: 42%;
}

.term-lines u {
  display: block;
  width: 8px;
  height: 12px;
  background: #75e0b2;
  opacity: .75;
}

/* GPA Tracker illustration. */
.gpa-preview {
  background: rgba(22,21,14,.92);
}

.gpa-head,
.ml-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font: 7px var(--font-mono);
  letter-spacing: .1em;
}

.gpa-head {
  color: #cdbb8c;
}

.gpa-head b {
  color: #f4c97a;
  font-size: 10px;
}

.gpa-rows {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.gpa-rows div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gpa-rows i {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: #3b3723;
}

.gpa-rows em {
  width: 16%;
  height: 4px;
  border-radius: 3px;
  background: #c9a24d;
}

.gpa-rows div:nth-child(2) em {
  width: 22%;
}

.gpa-rows div:nth-child(3) em {
  width: 12%;
}

.gpa-rows div:nth-child(4) em {
  width: 19%;
}

/* Calculator illustration. */
.calc-preview {
  padding: 11px;
  background: rgba(24,17,15,.92);
}

.calc-screen {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 5px;
  background: #0f0a09;
  color: #c9a79b;
  font: 7px var(--font-mono);
  letter-spacing: .06em;
}

.calc-screen b {
  color: #ffb199;
  font-size: 15px;
  font-weight: 500;
}

.calc-keys {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.calc-keys i {
  height: 13px;
  border-radius: 3px;
  background: #2c211e;
}

.calc-keys i:nth-child(4n) {
  background: #c8705a;
}

/* EduMind AI illustration. */
.ml-preview {
  background: rgba(23,15,23,.92);
}

.ml-head {
  color: #c9a3c2;
}

.ml-head b {
  color: #f0b6e6;
  font-size: 10px;
}

.ml-plot {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 52px;
  margin: 12px 12px 0;
  border-bottom: 1px solid #3a2a38;
}

.ml-plot b {
  flex: 1;
  height: 28%;
  border-radius: 2px 2px 0 0;
  background: #8e5a88;
}

.ml-plot b:nth-child(2) {
  height: 36%;
}

.ml-plot b:nth-child(3) {
  height: 33%;
}

.ml-plot b:nth-child(4) {
  height: 48%;
}

.ml-plot b:nth-child(5) {
  height: 55%;
}

.ml-plot b:nth-child(6) {
  height: 52%;
}

.ml-plot b:nth-child(7) {
  height: 70%;
}

.ml-plot b:nth-child(8) {
  height: 82%;
}

.ml-tags {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 10px 12px;
}

.ml-tags span {
  padding: 4px 6px;
  border: 1px solid #4a3247;
  border-radius: 3px;
  color: #c9a3c2;
  font: 7px var(--font-mono);
}

/* ---------- About ---------- */

/* About and Resume sit on a slightly raised band across the full width. */
.about-section,
.resume-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

/* About layout: the "G" stamp on the left (it stays in view while scrolling), my story on the right. */
.about-layout {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 80px;
  align-items: start;
}

.about-stamp {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 42%, var(--brand-soft), transparent 62%), var(--surface);
}

.stamp-ring {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  box-shadow: 0 0 0 14px var(--brand-soft);
}

.stamp-ring span {
  color: var(--brand);
  font: 800 56px var(--font-display);
  letter-spacing: -.1em;
}

.about-stamp p {
  margin: 40px 0 12px;
  color: var(--muted);
  font: 12px var(--font-mono);
  letter-spacing: .16em;
}

.stamp-line {
  width: 36px;
  height: 1px;
  background: var(--brand);
}

.stamp-caption {
  margin-top: 12px;
  color: var(--dim);
  font-size: 13px;
}

/* My story paragraphs and the three principle cards. */
.about-copy > p:not(.eyebrow) {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.principles div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.principles span {
  color: var(--brand);
  font: 500 12px var(--font-mono);
}

.principles b {
  margin-top: 4px;
  font-size: 15px;
}

.principles small {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

/* "Now" strip: what I am doing at the moment (filled from content.js). */
.now {
  margin-top: 28px;
  padding: 22px 24px;
  border-radius: var(--radius);
}

.now-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0 0 14px;
}

.now h3 {
  margin: 0;
  font-size: 19px;
}

.now-date,
.skills-count {
  color: var(--brand);
  font: 500 12px var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.now-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.now-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 15.5px;
  line-height: 1.6;
}

.now-list b {
  color: var(--brand);
  font: 500 12px var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.now-list span {
  color: var(--muted);
}

/* Skills: grouped skill cards, each naming the projects that use it. */
.skills {
  margin-top: 36px;
}

.skills-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 0 4px;
}

.skills h3 {
  margin: 0;
  font-size: 19px;
}

.skills-note {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.skill-group + .skill-group {
  margin-top: 24px;
}

.skill-group-title,
.skill-group-next > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: var(--dim);
  font: 500 12px var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.skill-group-title::after,
.skill-group-next > h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list > .skill-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.skill-card {
  --accent: #8ea8ff;
  --accent-bg: rgba(142,168,255,.12);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  overflow: hidden;
  border-radius: 14px;
  transition: border-color .2s ease;
}

.skill-card[data-group="tools"] {
  --accent: #72d5ff;
  --accent-bg: rgba(114,213,255,.12);
}

.skill-card[data-group="practice"] {
  --accent: #f4c97a;
  --accent-bg: rgba(244,201,122,.12);
}

.skill-card[data-group="next"] {
  --accent: #c7a6ff;
  --accent-bg: rgba(170,130,255,.12);
  border-style: dashed;
  background: transparent;
}

[data-theme="light"] .skill-card {
  --accent: #2a55c9;
  --accent-bg: rgba(42,85,201,.1);
}

[data-theme="light"] .skill-card[data-group="tools"] {
  --accent: #0b6f99;
  --accent-bg: rgba(11,111,153,.1);
}

[data-theme="light"] .skill-card[data-group="practice"] {
  --accent: #8a5a00;
  --accent-bg: rgba(190,125,0,.12);
}

[data-theme="light"] .skill-card[data-group="next"] {
  --accent: #6d3fc4;
  --accent-bg: rgba(109,63,196,.1);
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 75%);
}

.skill-card > * {
  position: relative;
}

.skill-icon {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  font: 700 12.5px var(--font-mono);
}

.skill-card b {
  font-size: 15px;
  line-height: 1.3;
}

.skill-meta {
  color: var(--dim);
  font: 500 12px var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.skill-tag {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

@media (hover: hover) {
  .skill-card:hover {
    border-color: var(--border-strong);
  }
}

/* ---------- Journal ---------- */

/* Journal grid and note cards; "Read note" opens the reading dialog. */
.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.journal-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color .25s ease, box-shadow .25s ease, translate .25s ease;
}

.journal-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  translate: 0 -4px;
}

.journal-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--dim);
  font: 12px var(--font-mono);
  letter-spacing: .06em;
}

.journal-top span:first-child {
  color: var(--brand);
}

.journal-card h3 {
  margin: 24px 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.journal-card p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

.journal-read-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}

.journal-read-button span {
  color: var(--brand);
  font-size: 16px;
  transition: translate .2s ease;
}

.journal-read-button:hover {
  color: var(--brand);
}

.journal-read-button:hover span {
  translate: 2px -2px;
}

/* ---------- Learning Lab ---------- */

/* Lab groups: a title and blurb, then a list of expandable script entries. */
.lab-groups {
  display: grid;
  gap: 40px;
}

.lab-group {
  min-width: 0;
}

.lab-group-head {
  margin-bottom: 14px;
}

.lab-group-head h3 {
  margin: 0 0 4px;
  font-size: 22px;
}

.lab-group-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.lab-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

/* One Lab entry: a <details> element that opens to show facts and a code excerpt. */
.lab-item {
  min-width: 0;
  border-radius: 14px;
  transition: border-color .2s ease;
}

.lab-item:hover {
  border-color: var(--border-strong);
}

.lab-item[open] {
  border-color: var(--brand-line);
}

.lab-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: 14px;
  cursor: pointer;
  list-style: none;
}

.lab-summary::-webkit-details-marker {
  display: none;
}

.lab-summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--brand);
  font-size: 17px;
  line-height: 1;
}

.lab-item[open] .lab-summary::after {
  content: '\2212';
}

.lab-title {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.lab-title b {
  font-size: 16px;
}

.lab-file {
  color: var(--brand);
  font: 500 13px var(--font-mono);
  overflow-wrap: anywhere;
}

.lab-status {
  color: var(--dim);
  font: 12px var(--font-mono);
  letter-spacing: .06em;
  text-align: right;
}

.lab-body {
  min-width: 0;
  padding: 0 20px 20px;
}

.lab-lead {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
}

/* Two-column fact lists (label and text), used in Lab entries and project details. */
.lab-facts,
.article-body .facts {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 16px;
  margin: 0 0 16px;
}

.lab-facts dt,
.article-body .facts dt {
  color: var(--brand);
  font: 500 11.5px/1.9 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lab-facts dd,
.article-body .facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.75;
}

/* Code excerpt: always dark, scrolls sideways instead of wrapping. */
.lab-code {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid #232a37;
  border-radius: var(--radius-sm);
  background: #0b0e14;
  color: #d3e1ff;
  font: 13px/1.7 var(--font-mono);
  tab-size: 4;
}

.lab-code code {
  font: inherit;
  white-space: pre;
}

.lab-note {
  margin: 22px 0 0;
  color: var(--dim);
  font-size: 13.5px;
}

/* ---------- Resume ---------- */

/* Resume layout: intro on the left (stays in view while scrolling), resume card on the right. */
.resume-layout {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  gap: 72px;
  align-items: start;
}

.resume-copy {
  position: sticky;
  top: 110px;
}

.resume-copy > p:not(.eyebrow) {
  max-width: 430px;
  margin: 22px 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.resume-actions {
  margin-top: 6px;
}

.microcopy {
  margin-top: 16px !important;
  color: var(--dim) !important;
  font-size: 13px !important;
}

/* Resume card: my name, then rows for education, focus and projects. */
.resume-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.resume-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resume-avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--brand-strong);
  color: #fff;
  font: 800 20px var(--font-display);
}

.resume-card-top h3 {
  margin: 0;
  font-size: 18px;
}

.resume-card-top p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.resume-mark {
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--brand);
  font: 500 12px var(--font-mono);
}

.resume-rule {
  height: 1px;
  margin: 24px 0;
  background: var(--border);
}

.resume-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  margin: 22px 0;
}

.resume-item > span {
  padding-top: 2px;
  color: var(--dim);
  font: 12px var(--font-mono);
  letter-spacing: .1em;
}

.resume-item b {
  font-size: 15px;
}

.resume-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 14px;
}

.resume-item small {
  color: var(--dim);
  font-size: 12.5px;
}

.edu-list {
  display: grid;
  gap: 14px;
}

.resume-proj + .resume-proj {
  margin-top: 14px;
}

.resume-placeholder {
  margin-bottom: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- Contact ---------- */

/* Contact panel: one large card with a soft glow and a decorative ring in the corner. */
.contact-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(28px, 6vw, 72px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: radial-gradient(ellipse 70% 60% at 100% 0%, var(--brand-soft), transparent 70%), var(--surface);
  box-shadow: var(--shadow-md);
}

.contact-panel > *:not(.contact-orb) {
  position: relative;
  z-index: 1;
}

.contact-panel h2 {
  font-size: clamp(34px, 4.6vw, 56px);
}

.contact-panel > p:not(.eyebrow) {
  max-width: 560px;
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.contact-orb {
  position: absolute;
  top: -140px;
  right: -90px;
  width: 320px;
  height: 320px;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  opacity: .35;
  box-shadow: 0 0 0 30px var(--brand-soft), 0 0 0 70px var(--brand-soft);
}

/* GitHub and LinkedIn links (filled from content.js). */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: -6px 0 30px;
  font-size: 15px;
  font-weight: 600;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-bottom: 1px solid var(--brand-line);
  color: var(--text);
  transition: color .2s ease, border-color .2s ease;
}

.social-links a:hover {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

/* Contact form: two fields side by side, the message box, the action buttons and the status note. */
.contact-form {
  max-width: 720px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-form label {
  display: block;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--text);
  font-size: 15.5px;
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--dim);
  opacity: 1;
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--brand-line);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

/* An email address that fails the check in main.js gets a warning border. */
.contact-form input[aria-invalid="true"] {
  border-color: var(--warning);
  box-shadow: 0 0 0 4px rgba(240,207,145,.12);
}

.contact-form .botcheck {
  display: none;
} /* needs the extra class: otherwise the input rule above would show the spam trap */

/* The "I am human" check (hCaptcha). The box keeps the widget's height while it loads, so the buttons do not jump. */
.form-captcha {
  min-height: 78px;
  margin-bottom: 16px;
}

/* Send, email draft and copy buttons, and the status message under them. */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.form-note {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.7;
}

.form-note-warning {
  color: var(--warning) !important;
}

/* ---------- Footer ---------- */

/* Footer: brand and links, the analytics note, and the copyright line. */

/* The footer's top edge: a thin line through all six section colours, tying the page together. */
.site-footer {
  background: linear-gradient(90deg, var(--c-violet), var(--c-teal), var(--c-amber), var(--c-mint), var(--c-coral), var(--c-magenta)) top / 100% 2px no-repeat;
}

.footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 30px;
  padding-bottom: 30px;
}

.footer-main > p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links a,
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color .2s ease;
}

.footer-links a:hover,
.footer-bottom a:hover {
  color: var(--text);
}

.footer-social {
  display: contents;
}

.analytics-note {
  padding-bottom: 14px;
}

.analytics-note p {
  margin: 0;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 22px;
  border-top: 1px solid var(--border);
  color: var(--dim);
  font: 12px var(--font-mono);
}

.footer-bottom a {
  color: var(--muted);
}

/* ---------- Dialogs ---------- */

/* Dialog basics, plus the stand-in styling main.js uses in browsers without <dialog>. */
dialog:not([open]) {
  display: none;
}

dialog.dialog-fallback[open] {
  display: block;
  position: fixed;
  z-index: 1000;
  top: 50%;
  left: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(0,0,0,.74), 0 30px 100px rgba(0,0,0,.6);
}

/* The X button (44px, an easy target on phones). */
.close-dialog {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.close-dialog:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

/* Reading dialog: the header and the action bar stay in view while the text scrolls. */
.article-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: min(88vh, 880px);
  max-height: min(88dvh, 880px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.article-dialog::backdrop,
.image-dialog::backdrop {
  background: rgba(5,7,10,.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.article-dialog-head {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 3vw, 24px) clamp(18px, 4vw, 34px) 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.article-dialog-head .eyebrow {
  margin-bottom: 6px;
  font-size: 11.5px;
}

.article-dialog-head h2 {
  max-width: 580px;
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.2;
}

/* Text inside the reading dialog: headings, paragraphs, lists and facts. */
.article-body {
  padding: 20px clamp(18px, 4vw, 34px) 10px;
}

.article-body h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.article-body h3:first-child {
  margin-top: 4px;
}

.article-body p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.article-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
}

.article-body li {
  margin: 6px 0;
}

.article-body li::marker {
  color: var(--brand);
}

.article-body .facts {
  margin: 6px 0 4px;
}

/* Action bar: Copy text, Copy link and Close. */
.article-dialog-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px clamp(18px, 4vw, 34px);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.article-dialog-actions .button {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13.5px;
}

.article-dialog-actions .close-bottom {
  margin-left: auto;
}

.article-dialog-actions .form-note {
  margin: 0;
  font-size: 13px;
}

.article-dialog-actions .form-note:empty {
  display: none;
}

/* Screenshots and the demo video inside the detail dialog, and the full-size screenshot viewer. */
.shots,
.demo {
  margin: 4px 0 8px;
}

.shot-strip {
  display: grid;
  gap: 12px;
  margin: 10px 0 4px;
}

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

.shot-phone {
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.shot {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}

.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0b0e14;
  cursor: zoom-in;
  transition: border-color .2s ease;
}

.shot-open:hover {
  border-color: var(--brand-line);
}

.shot-open:focus-visible {
  outline-offset: -3px;
}

.shot-open img {
  display: block;
  width: 100%;
  height: auto;
}

.shot figcaption {
  margin-top: 6px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.5;
}

.shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--brand-line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
}

.shot-wide .shot-placeholder {
  aspect-ratio: 16 / 9;
}

.shot-phone .shot-placeholder {
  aspect-ratio: 9 / 16;
}

.shot-placeholder b {
  color: var(--text);
  font: 500 11.5px var(--font-mono);
  letter-spacing: .14em;
}

.shot-placeholder span {
  font-size: 12.5px;
}

.demo video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  margin: 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}

.demo-caption,
.article-body .demo-transcript {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.7;
}

/* Full-size screenshot viewer. */
.image-dialog {
  width: min(1000px, calc(100% - 20px));
  max-height: 92vh;
  max-height: 92dvh;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.image-dialog-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.image-dialog img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 76vh;
  max-height: 76dvh;
  margin: 0 auto;
  border-radius: 10px;
}

.image-dialog .form-note {
  margin: 10px 2px 0;
  text-align: center;
}

/* ---------- Ticker (moving word band) ----------
   A band of words that slides left in a loop: my skills under the hero, and the sayings on story.html.
   js/ticker.js copies the words once (two identical halves) and adds .is-moving; the track then moves by exactly
   one half and starts again, so the loop has no gap. The Pause button stops it (and, with a mouse, hovering). The window clips the
   track, so the band can never make the page scroll sideways. */

/* A band of my brand blue flowing into violet, with white words, the same in both themes (white is above 4.5:1 on
   both ends). The solid brand blue under the gradient is what contrast checks measure (the gradient's weaker end)
   and what browsers without gradients show. */
.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(24px, 4vw, 40px);
  padding: 12px 14px 12px 4px;
  border-radius: var(--radius);
  background: var(--brand-strong) linear-gradient(90deg, var(--brand-strong), #6a3fd6);
  color: #ffffff;
}

.ticker-window {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font: 500 13px/1.5 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* The dot after every word, including the last, so both halves of the loop are exactly the same width. */
.ticker-item::after {
  content: '\00b7';
  margin: 0 18px;
  color: rgba(255,255,255,.65);
}

.ticker.is-moving .ticker-track {
  animation: ticker-move 40s linear infinite;
}

.ticker.is-paused .ticker-track {
  animation-play-state: paused;
}

/* Hovering pauses the band only where there is a real pointer: on a touch screen a tap would leave it frozen while
   its button still says Pause. */
@media (hover: hover) {
  .ticker.is-moving:hover .ticker-track {
    animation-play-state: paused;
  }
}

.ticker-toggle {
  flex: none;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font: 500 12px var(--font-mono);
  cursor: pointer;
}

.ticker-toggle:hover {
  border-color: #ffffff;
  background: rgba(255,255,255,.14);
}

/* The usual light-blue focus ring would vanish on the blue band, so it is white here. */
.ticker-toggle:focus-visible {
  outline-color: #ffffff;
}

@keyframes ticker-move {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Section colours ----------
   Blue stays the brand. Each homepage section gets one colour of its own, set once here as --sec and --sec-soft and
   inherited by its label, headline word, background glow and hover effects: Work violet, About teal, Journal amber,
   Lab mint, Resume coral, Contact magenta (tokens at the top of this file). Project cards and filter chips go one step
   further, with a colour per project and per category. Colour that carries meaning is never reused as decoration:
   the status pills keep green for completed and blue for in progress. */
#home {
  --sec: var(--c-violet);
  --sec-soft: var(--c-violet-soft);
}

#work {
  --sec: var(--c-violet);
  --sec-soft: var(--c-violet-soft);
}

#about {
  --sec: var(--c-teal);
  --sec-soft: var(--c-teal-soft);
}

#journal {
  --sec: var(--c-amber);
  --sec-soft: var(--c-amber-soft);
}

#lab {
  --sec: var(--c-mint);
  --sec-soft: var(--c-mint-soft);
}

#resume {
  --sec: var(--c-coral);
  --sec-soft: var(--c-coral-soft);
}

#contact {
  --sec: var(--c-magenta);
  --sec-soft: var(--c-magenta-soft);
}

/* Section labels ("01 / SELECTED WORK") and headline words take the section's colour. */
#work .eyebrow,
#about .eyebrow,
#journal .eyebrow,
#lab .eyebrow,
#resume .eyebrow,
#contact .eyebrow,
#work .gradient-text,
#about .gradient-text,
#journal .gradient-text,
#lab .gradient-text,
#resume .gradient-text,
#contact .gradient-text {
  color: var(--sec);
}

/* Where gradient text works, the headline word flows from brand blue into the section's colour, and the hero's
   word carries the whole journey: blue, violet, magenta. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  #work .gradient-text,
  #about .gradient-text,
  #journal .gradient-text,
  #lab .gradient-text,
  #resume .gradient-text,
  #contact .gradient-text {
    background: linear-gradient(95deg, var(--brand) 0%, var(--sec) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }

  #home .gradient-text {
    background: linear-gradient(95deg, var(--brand) 0%, var(--c-violet) 55%, var(--c-magenta) 100%);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

/* The hero word flows slowly: a gradient twice as wide as the word slides across it in 16 seconds. Only for
   visitors who have not asked for reduced motion; everyone else sees the still gradient above. */
@media (prefers-reduced-motion: no-preference) {
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    #home .gradient-text {
      background: linear-gradient(95deg, var(--brand), var(--c-violet), var(--c-magenta), var(--c-violet), var(--brand)) 0 50% / 200% 100%;
      -webkit-background-clip: text;
      background-clip: text;
      animation: hero-flow 16s linear infinite;
    }
  }
}

@keyframes hero-flow {
  to {
    background-position: 200% 50%;
  }
}

/* Soft glows in each section's colour, on alternating sides. Each is centred well inside its section and fades out
   before any edge, so no straight edge shows where a section ends. The hero has three: blue, violet, magenta. */
#home {
  background: radial-gradient(ellipse 30% 40% at 22% 30%, var(--brand-soft), transparent 70%), radial-gradient(ellipse 28% 38% at 70% 45%, var(--c-violet-soft), transparent 70%), radial-gradient(ellipse 25% 25% at 48% 78%, var(--c-magenta-soft), transparent 70%);
}

#work {
  background: radial-gradient(ellipse 40% 34% at 28% 22%, var(--sec-soft), transparent 70%);
}

#about {
  background: radial-gradient(ellipse 35% 40% at 78% 24%, var(--sec-soft), transparent 70%);
}

#journal {
  background: radial-gradient(ellipse 40% 34% at 72% 22%, var(--sec-soft), transparent 70%);
}

#lab {
  background: radial-gradient(ellipse 40% 34% at 28% 24%, var(--sec-soft), transparent 70%);
}

#resume {
  background: radial-gradient(ellipse 35% 45% at 22% 70%, var(--sec-soft), transparent 70%), var(--surface-2);
}

/* Selected text takes the section's colour. */
#work ::selection {
  background: var(--c-violet-select);
}

#about ::selection {
  background: var(--c-teal-select);
}

#journal ::selection {
  background: var(--c-amber-select);
}

#lab ::selection {
  background: var(--c-mint-select);
}

#resume ::selection {
  background: var(--c-coral-select);
}

#contact ::selection {
  background: var(--c-magenta-select);
}

/* Work: every project card in the colour of its illustration (its `art` in content.js), found with :has().
   Browsers without :has() keep brand blue for the tags and the section's violet for the hover. */
.project-card:has(.art-web) {
  --proj: var(--c-violet);
  --proj-soft: var(--c-violet-soft);
}

.project-card:has(.art-study) {
  --proj: var(--c-teal);
  --proj-soft: var(--c-teal-soft);
}

.project-card:has(.art-terminal) {
  --proj: var(--c-mint);
  --proj-soft: var(--c-mint-soft);
}

.project-card:has(.art-gpa) {
  --proj: var(--c-amber);
  --proj-soft: var(--c-amber-soft);
}

.project-card:has(.art-calc) {
  --proj: var(--c-coral);
  --proj-soft: var(--c-coral-soft);
}

.project-card:has(.art-edumind) {
  --proj: var(--c-magenta);
  --proj-soft: var(--c-magenta-soft);
}

.project-card .project-type span:first-child,
.project-card .link-button {
  color: var(--proj, var(--brand));
}

/* Hovered cards get a gradient border: the card's own colour inside the padding, a gradient under the transparent
   border, from the card's (or section's) colour into brand blue. */
#work .project-card:hover {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--proj, var(--sec)), var(--brand)) border-box;
  box-shadow: 0 18px 44px var(--proj-soft, var(--sec-soft));
}

/* Filter chips: one colour per category; the chosen chip fills with it. "All" keeps brand blue. Hover tints only chips
   that are not chosen: on a chosen chip, coloured text would vanish into its own fill. */
.filter-chip[data-filter="python"] {
  --chip: var(--c-mint);
}

.filter-chip[data-filter="web"] {
  --chip: var(--c-violet);
}

.filter-chip[data-filter="learning"] {
  --chip: var(--c-teal);
}

.filter-chip[data-filter="ai"] {
  --chip: var(--c-magenta);
}

#work .filter-chip[data-filter]:not([data-filter="all"]):not([aria-pressed="true"]):hover {
  border-color: var(--chip);
  color: var(--chip);
}

#work .filter-chip[data-filter]:not([data-filter="all"])[aria-pressed="true"] {
  border-color: var(--chip);
  background: var(--chip);
  color: var(--on-colour);
}

/* About: the "G" stamp, the principle numbers and the "Now" strip in teal. */
#about .stamp-ring {
  border-color: var(--sec);
  box-shadow: 0 0 0 14px var(--sec-soft);
}

#about .stamp-ring span,
#about .principles span,
#about .now-date,
#about .now-list b {
  color: var(--sec);
}

#about .principles div:hover {
  border-color: var(--sec);
}

/* Journal: amber arrows and a gradient border on hover. */
#journal .journal-card:hover {
  border-color: transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--sec), var(--brand)) border-box;
  box-shadow: 0 18px 44px var(--sec-soft);
}

#journal .journal-read-button span,
#journal .journal-read-button:hover {
  color: var(--sec);
}

/* Learning Lab: mint markers and open entries. */
#lab .lab-item:hover {
  border-color: var(--sec);
}

#lab .lab-item[open] {
  border-color: var(--sec);
  box-shadow: 0 12px 32px var(--sec-soft);
}

#lab .lab-summary::after {
  color: var(--sec);
}

/* Resume: a coral top edge on the CV card. */
#resume .resume-card {
  box-shadow: inset 0 3px 0 var(--sec), var(--shadow-md);
}

#resume .resume-mark {
  border-color: var(--sec);
  color: var(--sec);
}

/* Contact: the magenta orb. */
#contact .contact-orb {
  border-color: var(--sec);
  box-shadow: 0 0 0 30px var(--sec-soft), 0 0 0 70px var(--sec-soft);
  opacity: .55;
}

/* ---------- Scroll reveal (progressive enhancement) ----------
   Content starts hidden only once the inline script in <head> has added the "js" class,
   so visitors without working JavaScript still see everything. main.js adds .is-visible
   as each element scrolls into view. Hover lifts use the separate `translate` property,
   so they never fight the reveal's `transform`. */
.reveal {
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.project-card.reveal,
.journal-card.reveal {
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1), border-color .25s ease, box-shadow .25s ease, translate .25s ease;
}

/* Fallback heights for older browsers that do not understand aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {
  .visual-glow {
    height: 300px;
  }

  .shot-wide .shot-placeholder {
    min-height: 150px;
  }

  .shot-phone .shot-placeholder {
    min-height: 220px;
  }
}

/* ---------- Off-screen sections (load speed) ----------
   The browser skips laying out a home-page section until it is about to scroll into view. Laying out the whole
   page at once kept a slow phone from responding for over a second while the page loaded; this cuts that by
   about a third. The hero is always laid out. Each skipped section keeps an estimated height, measured from the real page,
   so the page length and the scrollbar stay steady. The heights leave out the section's own padding, which the
   browser adds on top. "auto" makes the browser remember the real height once the section has been shown.
   Browsers without content-visibility ignore all of this and lay out everything as before.
   Skipping also clips anything drawn outside a section, such as the contact card's shadow (up to 62px), so the
   clip edge is moved 64px out.
   The heights are for laptops; the tablet and phone versions follow. */
#work,
#about,
#journal,
#lab,
#resume,
#contact,
.site-footer {
  content-visibility: auto;
  overflow-clip-margin: 64px;
}

#work {
  contain-intrinsic-height: auto 1285px;
}

#about {
  contain-intrinsic-height: auto 2160px;
}

#journal {
  contain-intrinsic-height: auto 1080px;
}

#lab {
  contain-intrinsic-height: auto 1095px;
}

#resume {
  contain-intrinsic-height: auto 1205px;
}

#contact {
  contain-intrinsic-height: auto 965px;
}

.site-footer {
  contain-intrinsic-height: auto 162px;
}

@media (max-width: 960px) {
  #work {
    contain-intrinsic-height: auto 1840px;
  }

  #about {
    contain-intrinsic-height: auto 2520px;
  }

  #journal {
    contain-intrinsic-height: auto 1400px;
  }

  #lab {
    contain-intrinsic-height: auto 1140px;
  }

  #resume {
    contain-intrinsic-height: auto 1440px;
  }

  #contact {
    contain-intrinsic-height: auto 870px;
  }

  .site-footer {
    contain-intrinsic-height: auto 198px;
  }
}

@media (max-width: 680px) {
  #work {
    contain-intrinsic-height: auto 3440px;
  }

  #about {
    contain-intrinsic-height: auto 2920px;
  }

  #journal {
    contain-intrinsic-height: auto 2310px;
  }

  #lab {
    contain-intrinsic-height: auto 1440px;
  }

  #resume {
    contain-intrinsic-height: auto 1810px;
  }

  #contact {
    contain-intrinsic-height: auto 1150px;
  }

  .site-footer {
    contain-intrinsic-height: auto 265px;
  }
}

/* ---------- Tablet (960px and narrower) ----------
   Two columns for the cards, and tighter spacing in the navigation. */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .project-grid,
  .journal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-layout {
    gap: 44px;
  }

  .resume-layout {
    gap: 40px;
  }

  .nav-links {
    gap: 2px;
    font-size: 14px;
  }

  .nav-links > a {
    padding: 8px 9px;
  }

  .nav-cta {
    margin-left: 4px;
  }

  .shot-phone {
    grid-auto-columns: minmax(140px, 1fr);
  }
}

/* ---------- Phone (680px and narrower) ----------
   One column everywhere, the folding menu, and full-width form buttons. */
@media (max-width: 680px) {
  .container {
    width: min(100% - 32px, var(--container));
  }

  .nav {
    min-height: 64px;
    gap: 12px;
  }

  .brand {
    order: 1;
  }

  .theme-toggle {
    order: 2;
    margin-left: auto;
  }

  .menu-toggle {
    order: 3;
    display: grid;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 16px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    font-size: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > a {
    padding: 13px 8px;
  }

  .nav-links > a:not(.nav-cta)::after {
    left: 8px;
    right: auto;
    width: 28px;
    bottom: 6px;
  }

  .nav-cta {
    margin: 10px 0 0;
    padding: 12px 14px;
    text-align: center;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    min-height: 0;
    padding-top: 52px;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 2;
    padding: 16px 6px 24px;
  }

  .hero-bottom {
    order: 3;
    flex-wrap: wrap;
    margin-top: 0;
    font-size: 11.5px;
  }

  .hero-bottom a {
    width: 100%;
  }

  .hero-intro {
    font-size: 16.5px;
  }

  .hero-actions {
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 28px;
  }

  .hero-actions .button {
    flex: 0 1 auto;
    min-width: 0;
    gap: 8px;
    padding: 8px 14px;
    font-size: 14px;
    text-align: center;
  }

  .availability {
    align-items: flex-start;
    border-radius: 16px;
    font-size: 13.5px;
  }

  .availability .status-dot {
    margin-top: 7px;
  }

  .hero-meta {
    margin-top: 24px;
    font-size: 12px;
  }

  .portrait-visual {
    min-height: 0;
  }

  .portrait-frame {
    width: min(100%, 340px);
  }

  [data-portrait="round"] .portrait-frame {
    width: min(100%, 340px);
  }

  .portrait-visual,
  .portrait-visual[data-portrait="round"] {
    grid-template-columns: min(100%, 340px);
  }

  .chip-one {
    margin-right: 0;
  }

  .chip-two {
    margin-left: 0;
  }

  .portrait-placeholder {
    min-height: 320px;
  }

  .floating-chip {
    padding: 8px 12px 8px 8px;
  }

  .floating-chip small {
    font-size: 11.5px;
  }

  .portrait-caption {
    font-size: 11.5px;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 28px;
  }

  .section-note {
    max-width: none;
    font-size: 15px;
  }

  .filter-bar {
    margin-top: -6px;
  }

  .project-grid,
  .journal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .project-art {
    height: 210px;
  }

  .about-layout,
  .resume-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .about-stamp {
    position: static;
    min-height: 240px;
  }

  .resume-copy {
    position: static;
  }

  .about-copy > p:not(.eyebrow),
  .resume-copy > p:not(.eyebrow),
  .contact-panel > p:not(.eyebrow) {
    font-size: 15.5px;
  }

  .principles {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .now {
    padding: 18px;
  }

  .now-list li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    font-size: 14.5px;
  }

  .skill-card {
    padding: 14px 12px;
  }

  .lab-summary {
    align-items: flex-start;
    padding: 14px 16px;
  }

  .lab-status {
    display: none;
  }

  .lab-body {
    padding: 0 16px 16px;
  }

  .lab-facts,
  .article-body .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .lab-facts dd,
  .article-body .facts dd {
    margin-bottom: 10px;
  }

  .resume-card {
    padding: 22px 18px;
  }

  .resume-item {
    grid-template-columns: 86px 1fr;
  }

  .resume-item > span {
    font-size: 11px;
  }

  .contact-panel {
    padding: 30px 20px;
    border-radius: 20px;
  }

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

  .contact-form input:not([type="checkbox"]),
  .contact-form textarea {
    font-size: 16px;
  } /* 16px stops iOS zooming on focus */

  .contact-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-actions .button {
    width: 100%;
  }

  .footer-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    font-size: 11.5px;
  }

  .article-body p {
    font-size: 15.5px;
  }

  .article-body ul {
    font-size: 15px;
  }

  .article-dialog-actions {
    gap: 8px;
  }
}

/* Narrow phones (380px and below): slightly tighter caption spacing keeps the portrait caption on one line. */
@media (max-width: 380px) {
  .portrait-caption {
    gap: 6px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 11px;
    letter-spacing: .02em;
  }

  .floating-chip {
    gap: 8px;
    padding: 8px 10px 8px 8px;
  }

  .chip-icon {
    width: 28px;
    height: 28px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .contact-form input:not([type="checkbox"]),
  .contact-form textarea {
    font-size: 16px;
  }
}

@media (hover: none) {
  .project-card:hover,
  .journal-card:hover {
    box-shadow: var(--shadow-sm);
    translate: 0 0;
  }

  .project-card:hover .project-art {
    filter: none;
  }
}

/* ---------- Reduced motion ----------
   For visitors who ask their system for less motion: no animations and no fade-in. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  /* The word bands stand still, so there is nothing to pause. */
  .ticker-track {
    animation: none !important;
  }

  .ticker-toggle {
    display: none !important;
  }
}

/* ---------- Print ----------
   A plain black-on-white version: decoration, buttons and the contact form are hidden. */
@media print {
  :root,
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #fff;
    --surface: #fff;
    --surface-2: #fff;
    --text: #111;
    --muted: #333;
    --dim: #444;
    --border: #ddd;
    --brand: #2455a8;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }

  .js .reveal {
    opacity: 1 !important;
    transform: none !important;
  } /* never print blank sections */

  body {
    background: white !important;
    color: #111 !important;
  }

  body::before {
    display: none;
  }

  .site-header,
  .theme-toggle,
  .hero-visual,
  .hero-bottom,
  .project-art,
  .contact-panel,
  .site-footer,
  .button,
  .filter-bar,
  .shots,
  .demo,
  .availability,
  .now,
  .analytics-note {
    display: none !important;
  }

  .section,
  .resume-section,
  .about-section {
    padding: 16px 0;
    border: 0;
    background: white !important;
  }

  .container {
    width: 100%;
  }

  .hero {
    display: block;
    min-height: 0;
    padding-top: 10px;
  }

  .hero h1 {
    font-size: 28px;
  }

  .project-grid,
  .journal-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card,
  .journal-card,
  .resume-card,
  .lab-item {
    background: white;
    color: #111;
    border-color: #ddd;
    box-shadow: none;
    break-inside: avoid;
  }

  .about-layout,
  .resume-layout {
    display: block;
  }

  .about-stamp {
    display: none;
  }

  .gradient-text {
    background: none !important;
    color: #2455a8 !important;
    -webkit-text-fill-color: #2455a8 !important;
  }

  .lab-item .lab-body {
    display: block;
  }

  /* Every section is laid out for printing, whether or not it has been scrolled to. */
  #work,
  #about,
  #journal,
  #lab,
  #resume,
  #contact,
  .site-footer {
    content-visibility: visible;
  }
}

/* >>> AUTO-GENERATED FALLBACK (tests/make_css_fallback.py): do not edit by hand >>> */
@supports not (--a: 0) {
  body {
    background: #0b0d12;
    color: #edf0f5;
    font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  body::before {
    background: radial-gradient(ellipse 60% 40% at 80% -5%, rgba(58,102,222,.18), transparent 70%);
  }

  :focus-visible {
    outline: 2px solid #9dbcff;
  }

  ::selection {
    background: rgba(142,168,255,.12);
    color: #edf0f5;
  }

  ::target-text {
    background: rgba(142,168,255,.12);
  }

  h1,
  h2,
  h3,
  h4 {
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: #edf0f5;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 32px;
  }

  .container {
    width: calc(100% - 48px);
  }

  .section {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .skip-link {
    border-radius: 10px;
    background: #edf0f5;
    color: #0b0d12;
  }

  .eyebrow {
    color: #8ea8ff;
    font: 500 12px/1.4 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .status-dot {
    background: #6fdcaa;
    box-shadow: 0 0 0 3px rgba(111,220,170,.1);
  }

  .gradient-text {
    color: #8ea8ff;
  }

  .button {
    border-radius: 10px;
  }

  .button-primary {
    background: #3a66de;
  }

  .button-primary:hover {
    background: #4673ec;
  }

  .button-quiet {
    border-color: rgba(255,255,255,.16);
    color: #edf0f5;
  }

  .button-quiet:hover {
    border-color: rgba(142,168,255,.42);
    background: rgba(142,168,255,.12);
  }

  .site-header {
    background: rgba(11,13,18,.78);
  }

  .site-header.is-scrolled {
    border-bottom-color: rgba(255,255,255,.08);
  }

  .brand {
    font: 800 13.5px 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  .brand-mark {
    background: #3a66de;
  }

  .brand-dot {
    color: #8ea8ff;
  }

  .nav-links {
    color: #a7afbd;
  }

  .nav-links > a:not(.nav-cta):hover {
    color: #edf0f5;
    background: #171b23;
  }

  .nav-links > a[aria-current="location"] {
    color: #edf0f5;
  }

  .nav-links > a:not(.nav-cta)::after {
    background: #8ea8ff;
  }

  .nav-cta {
    border: 1px solid rgba(255,255,255,.16);
    color: #edf0f5 !important;
  }

  .nav-cta:hover {
    border-color: rgba(142,168,255,.42);
    background: rgba(142,168,255,.12);
  }

  .nav-cta span {
    color: #8ea8ff;
  }

  .theme-toggle {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: #12151c;
    color: #edf0f5;
  }

  .theme-toggle:hover {
    border-color: rgba(142,168,255,.42);
    background: rgba(142,168,255,.12);
  }

  .menu-toggle {
    border-radius: 10px;
  }

  .menu-toggle:hover {
    background: #171b23;
  }

  .menu-toggle span {
    background: #edf0f5;
  }

  .hero-copy .eyebrow {
    color: #a7afbd;
  }

  .hero-intro {
    color: #a7afbd;
  }

  .availability {
    border: 1px solid rgba(255,255,255,.08);
    background: #12151c;
    color: #a7afbd;
  }

  .availability b {
    color: #edf0f5;
  }

  .hero-meta {
    color: #8a93a2;
    font: 12.5px/1.8 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .meta-line {
    background: #8ea8ff;
  }

  .portrait-visual {
    grid-template-columns: 100%;
  }

  .visual-glow {
    background: linear-gradient(135deg, rgba(58,102,222,.42), rgba(150,110,255,.30) 55%, rgba(240,138,216,.22));
  }

  .portrait-frame {
    width: 100%;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    background: #12151c;
    box-shadow: 0 32px 90px rgba(0,0,0,.5);
  }

  .portrait-frame:hover {
    border-color: rgba(255,255,255,.16);
  }

  .portrait-image {
    background: #171b23;
  }

  .portrait-placeholder {
    border: 1px dashed rgba(142,168,255,.42);
    background: radial-gradient(ellipse at 50% 32%, rgba(142,168,255,.12), transparent 50%), #171b23;
  }

  .portrait-corner {
    border-color: #8ea8ff;
  }

  .portrait-slot-label {
    color: #edf0f5;
    font: 500 11px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .portrait-slot-help {
    color: #a7afbd;
  }

  .portrait-caption {
    color: #a7afbd;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .portrait-caption-mark {
    color: #8ea8ff;
    font: 800 15px 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  [data-portrait="round"] .portrait-frame {
    width: 100%;
  }

  [data-portrait="round"] .portrait-image,
  [data-portrait="round"] .portrait-placeholder {
    box-shadow: 0 0 0 10px #12151c, 0 0 0 11px rgba(255,255,255,.08), 0 32px 90px rgba(0,0,0,.5);
  }

  .portrait-visual[data-portrait="round"] {
    grid-template-columns: 100%;
  }

  [data-portrait="round"] .portrait-frame:hover .portrait-image {
    box-shadow: 0 0 0 10px #12151c, 0 0 0 11px rgba(255,255,255,.16), 0 32px 90px rgba(0,0,0,.5);
  }

  .floating-chip {
    border: 1px solid rgba(255,255,255,.08);
    background: #12151c;
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  .floating-chip small {
    color: #a7afbd;
  }

  .chip-icon {
    background: rgba(111,220,170,.1);
    color: #6fdcaa;
  }

  .chip-blue {
    background: rgba(142,168,255,.12);
    color: #8ea8ff;
  }

  .hero-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .hero-bottom a {
    color: #a7afbd;
  }

  .hero-bottom a:hover {
    color: #edf0f5;
  }

  .section-note {
    color: #a7afbd;
  }

  .filter-chip {
    border: 1px solid rgba(255,255,255,.08);
    background: #12151c;
    color: #a7afbd;
  }

  .filter-chip:hover {
    border-color: rgba(255,255,255,.16);
    color: #edf0f5;
  }

  .filter-chip[aria-pressed="true"] {
    border-color: #3a66de;
    background: #3a66de;
  }

  .filter-count {
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .project-card,
  .journal-card,
  .lab-item,
  .resume-card,
  .now,
  .skill-card {
    border: 1px solid rgba(255,255,255,.08);
    background: #12151c;
  }

  .project-card {
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
  }

  .project-card:hover {
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  .project-type {
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .project-type span:first-child {
    color: #8ea8ff;
  }

  .project-info p {
    color: #a7afbd;
  }

  .project-links {
    border-top: 1px solid rgba(255,255,255,.08);
  }

  .project-links > a,
  .link-button {
    color: #edf0f5;
  }

  .project-links > a:hover,
  .link-button:hover {
    color: #8ea8ff;
  }

  .status-pill {
    background: #171b23;
    color: #a7afbd;
  }

  .status-pill i {
    background: #8ea8ff;
  }

  .status-pill[data-status="completed"] i {
    background: #6fdcaa;
  }

  .fallback-list {
    color: #a7afbd;
  }

  .fallback-list strong {
    color: #edf0f5;
  }

  .project-art {
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .art-top {
    font: 11px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .web-headline {
    font: 800 24px/1.05 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  .web-button {
    font: 6px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .study-ring {
    font: 8px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .study-tags span {
    font: 7px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .term-bar {
    font: 7px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .gpa-head,
  .ml-head {
    font: 7px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .calc-screen {
    font: 7px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .ml-tags span {
    font: 7px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .about-section,
  .resume-section {
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #171b23;
  }

  .about-stamp {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 24px;
    background: radial-gradient(circle at 50% 42%, rgba(142,168,255,.12), transparent 62%), #12151c;
  }

  .stamp-ring {
    border: 1px solid rgba(142,168,255,.42);
    box-shadow: 0 0 0 14px rgba(142,168,255,.12);
  }

  .stamp-ring span {
    color: #8ea8ff;
    font: 800 56px 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  .about-stamp p {
    color: #a7afbd;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .stamp-line {
    background: #8ea8ff;
  }

  .stamp-caption {
    color: #8a93a2;
  }

  .about-copy > p:not(.eyebrow) {
    color: #a7afbd;
  }

  .principles div {
    border: 1px solid rgba(255,255,255,.08);
    background: #12151c;
  }

  .principles span {
    color: #8ea8ff;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .principles small {
    color: #a7afbd;
  }

  .now {
    border-radius: 16px;
  }

  .now-date,
  .skills-count {
    color: #8ea8ff;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .now-list b {
    color: #8ea8ff;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .now-list span {
    color: #a7afbd;
  }

  .skills-note {
    color: #a7afbd;
  }

  .skill-group-title,
  .skill-group-next > h3 {
    color: #8a93a2;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .skill-group-title::after,
  .skill-group-next > h3::after {
    background: rgba(255,255,255,.08);
  }

  .skill-card::before {
    background: linear-gradient(90deg, #8fb2ff, transparent 75%);
  }

  .skill-icon {
    background: rgba(75,131,255,.16);
    color: #8fb2ff;
    font: 700 12.5px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .skill-meta {
    color: #8a93a2;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .skill-tag {
    border: 1px solid rgba(255,255,255,.08);
    background: #171b23;
    color: #a7afbd;
  }

  @media (hover: hover) {
    .skill-card:hover {
      border-color: rgba(255,255,255,.16);
    }
  }

  .journal-card {
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
  }

  .journal-card:hover {
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  .journal-top {
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .journal-top span:first-child {
    color: #8ea8ff;
  }

  .journal-card p {
    color: #a7afbd;
  }

  .journal-read-button {
    border-top: 1px solid rgba(255,255,255,.08);
    color: #edf0f5;
  }

  .journal-read-button span {
    color: #8ea8ff;
  }

  .journal-read-button:hover {
    color: #8ea8ff;
  }

  .lab-group-head p {
    color: #a7afbd;
  }

  .lab-item:hover {
    border-color: rgba(255,255,255,.16);
  }

  .lab-item[open] {
    border-color: rgba(142,168,255,.42);
  }

  .lab-summary::after {
    background: #171b23;
    color: #8ea8ff;
  }

  .lab-file {
    color: #8ea8ff;
    font: 500 13px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .lab-status {
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .lab-lead {
    color: #edf0f5;
  }

  .lab-facts dt,
  .article-body .facts dt {
    color: #8ea8ff;
    font: 500 11.5px/1.9 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .lab-facts dd,
  .article-body .facts dd {
    color: #a7afbd;
  }

  .lab-code {
    border-radius: 10px;
    font: 13px/1.7 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .lab-note {
    color: #8a93a2;
  }

  .resume-copy > p:not(.eyebrow) {
    color: #a7afbd;
  }

  .microcopy {
    color: #8a93a2 !important;
  }

  .resume-card {
    border-radius: 24px;
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  .resume-avatar {
    background: #3a66de;
    font: 800 20px 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  }

  .resume-card-top p {
    color: #a7afbd;
  }

  .resume-mark {
    border: 1px solid rgba(255,255,255,.08);
    color: #8ea8ff;
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .resume-rule {
    background: rgba(255,255,255,.08);
  }

  .resume-item > span {
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .resume-item p {
    color: #a7afbd;
  }

  .resume-item small {
    color: #8a93a2;
  }

  .resume-placeholder {
    color: #8a93a2;
  }

  .contact-panel {
    padding: 28px;
    border: 1px solid rgba(255,255,255,.08);
    background: radial-gradient(ellipse 70% 60% at 100% 0%, rgba(142,168,255,.12), transparent 70%), #12151c;
    box-shadow: 0 18px 44px rgba(0,0,0,.34);
  }

  .contact-panel h2 {
    font-size: 34px;
  }

  .contact-panel > p:not(.eyebrow) {
    color: #a7afbd;
  }

  .contact-orb {
    border: 1px solid rgba(142,168,255,.42);
    box-shadow: 0 0 0 30px rgba(142,168,255,.12), 0 0 0 70px rgba(142,168,255,.12);
  }

  .social-links a {
    border-bottom: 1px solid rgba(142,168,255,.42);
    color: #edf0f5;
  }

  .social-links a:hover {
    border-bottom-color: #8ea8ff;
    color: #8ea8ff;
  }

  .contact-form label {
    color: #edf0f5;
  }

  .contact-form input:not([type="checkbox"]),
  .contact-form textarea {
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: rgba(0,0,0,.28);
    color: #edf0f5;
  }

  .contact-form input::placeholder,
  .contact-form textarea::placeholder {
    color: #8a93a2;
  }

  .contact-form input:hover,
  .contact-form textarea:hover {
    border-color: rgba(142,168,255,.42);
  }

  .contact-form input:focus,
  .contact-form textarea:focus {
    border-color: #8ea8ff;
    box-shadow: 0 0 0 4px rgba(142,168,255,.12);
  }

  .contact-form input[aria-invalid="true"] {
    border-color: #f0cf91;
  }

  .form-note {
    color: #8a93a2;
  }

  .form-note-warning {
    color: #f0cf91 !important;
  }

  .site-footer {
    background: linear-gradient(90deg, #b49cff, #5fd3e0, #f4c46b, #75e0b2, #ff9a7a, #f08ad8) top / 100% 2px no-repeat;
  }

  .footer-main > p {
    color: #8a93a2;
  }

  .footer-links {
    color: #a7afbd;
  }

  .footer-links a:hover,
  .footer-bottom a:hover {
    color: #edf0f5;
  }

  .analytics-note p {
    color: #8a93a2;
  }

  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    color: #8a93a2;
    font: 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .footer-bottom a {
    color: #a7afbd;
  }

  .close-dialog {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    background: #171b23;
    color: #edf0f5;
  }

  .close-dialog:hover {
    border-color: rgba(255,255,255,.16);
    background: #1e232d;
  }

  .article-dialog {
    width: calc(100% - 28px);
    max-height: 88vh;
    max-height: 88dvh;
    border: 1px solid rgba(255,255,255,.16);
    background: #12151c;
    color: #edf0f5;
    box-shadow: 0 32px 90px rgba(0,0,0,.5);
  }

  .article-dialog-head {
    padding: 16px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #12151c;
  }

  .article-dialog-head h2 {
    font-size: 22px;
  }

  .article-body {
    padding: 20px 18px 10px;
  }

  .article-body p {
    color: #a7afbd;
  }

  .article-body ul {
    color: #a7afbd;
  }

  .article-body li::marker {
    color: #8ea8ff;
  }

  .article-dialog-actions {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: #12151c;
  }

  .shot-open {
    border: 1px solid rgba(255,255,255,.08);
  }

  .shot-open:hover {
    border-color: rgba(142,168,255,.42);
  }

  .shot figcaption {
    color: #8a93a2;
  }

  .shot-placeholder {
    border: 1px dashed rgba(142,168,255,.42);
    background: #171b23;
    color: #a7afbd;
  }

  .shot-placeholder b {
    color: #edf0f5;
    font: 500 11.5px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .demo video {
    border: 1px solid rgba(255,255,255,.08);
  }

  .demo-caption,
  .article-body .demo-transcript {
    color: #8a93a2;
  }

  .image-dialog {
    width: calc(100% - 20px);
    border: 1px solid rgba(255,255,255,.16);
    background: #12151c;
    color: #edf0f5;
    box-shadow: 0 32px 90px rgba(0,0,0,.5);
  }

  .ticker {
    margin-top: 24px;
    border-radius: 16px;
    background: #3a66de linear-gradient(90deg, #3a66de, #6a3fd6);
  }

  .ticker-item {
    font: 500 13px/1.5 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  .ticker-toggle {
    font: 500 12px 'DM Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  }

  #home {
    background: radial-gradient(ellipse 30% 40% at 22% 30%, rgba(142,168,255,.12), transparent 70%), radial-gradient(ellipse 28% 38% at 70% 45%, rgba(180,156,255,.14), transparent 70%), radial-gradient(ellipse 25% 25% at 48% 78%, rgba(240,138,216,.13), transparent 70%);
  }

  #work ::selection {
    background: rgba(180,156,255,.32);
  }

  #about ::selection {
    background: rgba(95,211,224,.30);
  }

  #journal ::selection {
    background: rgba(244,196,107,.30);
  }

  #lab ::selection {
    background: rgba(117,224,178,.28);
  }

  #resume ::selection {
    background: rgba(255,154,122,.30);
  }

  #contact ::selection {
    background: rgba(240,138,216,.30);
  }

  #work .filter-chip[data-filter]:not([data-filter="all"])[aria-pressed="true"] {
    color: #10131a;
  }

  @media (max-width: 680px) {
    .container {
      width: calc(100% - 32px);
    }

    .nav-links {
      border-bottom: 1px solid rgba(255,255,255,.08);
      background: #12151c;
      box-shadow: 0 18px 44px rgba(0,0,0,.34);
    }

    .portrait-frame {
      width: 100%;
    }

    [data-portrait="round"] .portrait-frame {
      width: 100%;
    }

    .portrait-visual,
    .portrait-visual[data-portrait="round"] {
      grid-template-columns: 100%;
    }
  }

  @media (hover: none) {
    .project-card:hover,
    .journal-card:hover {
      box-shadow: 0 1px 2px rgba(0,0,0,.3);
    }
  }

  .container {
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* <<< END AUTO-GENERATED FALLBACK <<< */
