/* ==========================================================================
   Roberto Aguilar: personal site
   Dark-first with a light theme. Cool, technical palette. No dependencies.
   ========================================================================== */

/* Tokens ------------------------------------------------------------------ */

:root {
  color-scheme: light;

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Display", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --container: 72rem;
  --radius-sm: 0.45rem;
  --radius: 0.7rem;
  --radius-lg: 1rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Palette fills: the same in both themes */
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --sky: #0ea5e9;
  --teal: #14b8a6;
  --emerald: #10b981;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --violet: #8b5cf6;
  --slate: #64748b;

  /* Ink: readable text shades of each color (darker on light backgrounds) */
  --blue-ink: #1d4ed8;
  --cyan-ink: #0e7490;
  --sky-ink: #0369a1;
  --teal-ink: #0f766e;
  --emerald-ink: #047857;
  --amber-ink: #b45309;
  --orange-ink: #c2410c;
  --red-ink: #b91c1c;
  --violet-ink: #6d28d9;
  --slate-ink: #334155;

  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #edf1f5;
  --border: rgb(15 23 42 / 0.1);
  --border-strong: rgb(15 23 42 / 0.18);
  --text: #0b1220;
  --muted: #475467;
  --faint: #8592a3;
  --nav-bg: rgb(255 255 255 / 0.8);
  --shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 12px 30px -18px rgb(15 23 42 / 0.3);
  --tint: 11%;
  --aurora-a: rgb(37 99 235 / 0.1);
  --aurora-b: rgb(6 182 212 / 0.08);
  --aurora-c: rgb(16 185 129 / 0.05);
  --grid: rgb(15 23 42 / 0.06);
  --noise-opacity: 0.02;

  /* Terminals and code stay dark in both themes */
  --term-bg: #0a0e14;
  --term-bar: #111821;
  --term-border: rgb(148 163 184 / 0.16);
  --term-text: #e6edf3;
  --term-dim: #8b98a5;
  --tok-keyword: #7dd3fc;
  --tok-string: #86efac;
  --tok-number: #fdba74;

  /* The "What I do" scenes */
  --ops-stage: #eef2f6;
  --ops-win: #ffffff;
  --ops-chrome: #f4f6f9;
  --ops-shadow: rgb(15 23 42 / 0.13);

  /* Default accent */
  --hue: var(--blue);
  --ink: var(--blue-ink);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --blue-ink: #93c5fd;
  --cyan-ink: #67e8f9;
  --sky-ink: #7dd3fc;
  --teal-ink: #5eead4;
  --emerald-ink: #6ee7b7;
  --amber-ink: #fcd34d;
  --orange-ink: #fdba74;
  --red-ink: #fca5a5;
  --violet-ink: #c4b5fd;
  --slate-ink: #cbd5e1;
  --bg: #080b10;
  --surface: #0e131a;
  --surface-2: #151c26;
  --border: rgb(148 163 184 / 0.12);
  --border-strong: rgb(148 163 184 / 0.22);
  --text: #e6edf3;
  --muted: #9aa7b4;
  --faint: #66717f;
  --nav-bg: rgb(14 19 26 / 0.74);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 18px 40px -24px rgb(0 0 0 / 0.95);
  --tint: 15%;
  --aurora-a: rgb(37 99 235 / 0.17);
  --aurora-b: rgb(6 182 212 / 0.1);
  --aurora-c: rgb(16 185 129 / 0.06);
  --grid: rgb(148 163 184 / 0.06);
  --noise-opacity: 0.035;
  --ops-stage: #0b1017;
  --ops-win: #121922;
  --ops-chrome: #18202b;
  --ops-shadow: rgb(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --blue-ink: #93c5fd;
    --cyan-ink: #67e8f9;
    --sky-ink: #7dd3fc;
    --teal-ink: #5eead4;
    --emerald-ink: #6ee7b7;
    --amber-ink: #fcd34d;
    --orange-ink: #fdba74;
    --red-ink: #fca5a5;
    --violet-ink: #c4b5fd;
    --slate-ink: #cbd5e1;
    --bg: #080b10;
    --surface: #0e131a;
    --surface-2: #151c26;
    --border: rgb(148 163 184 / 0.12);
    --border-strong: rgb(148 163 184 / 0.22);
    --text: #e6edf3;
    --muted: #9aa7b4;
    --faint: #66717f;
    --nav-bg: rgb(14 19 26 / 0.74);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.5), 0 18px 40px -24px rgb(0 0 0 / 0.95);
    --tint: 15%;
    --aurora-a: rgb(37 99 235 / 0.17);
    --aurora-b: rgb(6 182 212 / 0.1);
    --aurora-c: rgb(16 185 129 / 0.06);
    --grid: rgb(148 163 184 / 0.06);
    --noise-opacity: 0.035;
    --ops-stage: #0b1017;
    --ops-win: #121922;
    --ops-chrome: #18202b;
    --ops-shadow: rgb(0 0 0 / 0.55);
  }
}

/* Give any element its own accent with data-hue="…" */
[data-hue="blue"] { --hue: var(--blue); --ink: var(--blue-ink); }
[data-hue="cyan"] { --hue: var(--cyan); --ink: var(--cyan-ink); }
[data-hue="sky"] { --hue: var(--sky); --ink: var(--sky-ink); }
[data-hue="teal"] { --hue: var(--teal); --ink: var(--teal-ink); }
[data-hue="emerald"] { --hue: var(--emerald); --ink: var(--emerald-ink); }
[data-hue="amber"] { --hue: var(--amber); --ink: var(--amber-ink); }
[data-hue="orange"] { --hue: var(--orange); --ink: var(--orange-ink); }
[data-hue="red"] { --hue: var(--red); --ink: var(--red-ink); }
[data-hue="violet"] { --hue: var(--violet); --ink: var(--violet-ink); }
[data-hue="slate"] { --hue: var(--slate); --ink: var(--slate-ink); }

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(52rem 36rem at 6% -6%, var(--aurora-a), transparent 62%),
    radial-gradient(44rem 32rem at 100% 2%, var(--aurora-b), transparent 60%),
    radial-gradient(56rem 38rem at 50% 108%, var(--aurora-c), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 400 1rem/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Faint grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--blue);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utilities --------------------------------------------------------------- */

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
}

.skip-link:focus {
  top: 1rem;
}

html:not(.js) .needs-js {
  display: none !important;
}

.mono {
  font-family: var(--font-mono);
}

.icon {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
}

/* Small mono labels with a square marker */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  color: var(--ink);
  font: 600 0.75rem/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 1px;
  background: var(--hue);
  box-shadow: 0 0 10px color-mix(in srgb, var(--hue) 70%, transparent);
}

.gradient-text {
  background: linear-gradient(100deg, var(--blue-ink) 0%, var(--cyan-ink) 55%, var(--emerald-ink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.24rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--hue) 32%, transparent);
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--hue) var(--tint), transparent);
  color: var(--ink);
  font: 500 0.75rem/1.4 var(--font-mono);
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pulse-dot {
  position: relative;
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--dot, var(--emerald));
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%,
  100% {
    opacity: 0;
    transform: scale(2.6);
  }
}

/* Status labels: in development, live, paused */
.status {
  --dot: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.26rem 0.6rem 0.26rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--dot) 38%, transparent);
  border-radius: 0.4rem;
  background: color-mix(in srgb, var(--dot) 12%, transparent);
  color: var(--amber-ink);
  font: 600 0.72rem/1.3 var(--font-mono);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status--live {
  --dot: var(--emerald);
  color: var(--emerald-ink);
}

.status--paused {
  --dot: var(--slate);
  color: var(--slate-ink);
}

/* Buttons ----------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.8rem;
  padding: 0 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font: 600 0.9375rem/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s, filter 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 26px -12px rgb(37 99 235 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.2);
  color: #ffffff;
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border-strong);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--hue) 55%, var(--border-strong));
  background: color-mix(in srgb, var(--hue) 8%, var(--surface));
}

.btn .arrow {
  transition: transform 0.2s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Theme toggle icons: the moon in light mode, the sun in dark mode */
.icon-sun {
  display: none;
}

:root[data-theme="dark"] .icon-sun {
  display: block;
}

:root[data-theme="dark"] .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .icon-moon {
    display: none;
  }
}

/* Navigation bar ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: 0.85rem;
}

.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  min-height: 4.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

/* A thin accent line along the top edge */
.navbar::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 12%;
  left: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--cyan), transparent);
  opacity: 0.8;
}

.site-header.is-scrolled .navbar {
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2), 0 20px 50px -24px rgb(0 0 0 / 0.6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  margin-right: auto;
}

.avatar {
  position: relative;
  flex: none;
  width: 3rem;
  height: 3rem;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.avatar img {
  width: 100%;
  height: 100%;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: #1c222b;
  object-fit: cover;
  object-position: 42% 0;
  filter: contrast(1.12) brightness(0.95);
}

.avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0.78rem;
  height: 0.78rem;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--emerald);
}

.brand-text {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.brand-name {
  font: 650 1.05rem/1.2 var(--font-display);
  letter-spacing: -0.015em;
}

.brand-role {
  overflow: hidden;
  color: var(--muted);
  font: 0.75rem/1.4 var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-links {
  display: none;
  order: 3;
  flex-basis: 100%;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding-top: 0.35rem;
}

.navbar.is-open .nav-links,
html:not(.js) .nav-links {
  display: grid;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a .icon {
  color: var(--ink);
  opacity: 0.8;
}

.nav-links a:hover {
  background: color-mix(in srgb, var(--hue) 8%, transparent);
  color: var(--text);
}

.nav-links a[aria-current="page"] {
  background: color-mix(in srgb, var(--hue) 12%, transparent);
  color: var(--text);
}

.nav-links a[aria-current="page"] .icon {
  opacity: 1;
}

/* Underline under the current page */
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0.9rem;
  bottom: 0.3rem;
  left: 0.9rem;
  height: 2px;
  border-radius: 2px;
  background: var(--hue);
  box-shadow: 0 0 10px var(--hue);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  height: 2.65rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--surface-2);
  font: 600 0.78rem/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.lang-switch .icon {
  margin: 0 0.25rem 0 0.35rem;
  color: var(--faint);
}

.lang-option {
  display: grid;
  place-items: center;
  height: 100%;
  min-width: 2.35rem;
  padding: 0 0.5rem;
  border-radius: 0.45rem;
  color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}

a.lang-option:hover {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  color: var(--text);
}

.lang-option[aria-current] {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 14px -8px rgb(37 99 235 / 0.9);
  color: #ffffff;
}

.menu-btn .icon-close,
.navbar.is-open .menu-btn .icon-menu {
  display: none;
}

.navbar.is-open .menu-btn .icon-close {
  display: block;
}

/* Theme switch inside the phone menu; the desktop bar has its own button */
.nav-theme {
  display: none;
  align-items: center;
  gap: 0.55rem;
  grid-column: 1 / -1;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

/* Phones: a compact bar with the avatar, name, language and menu */
@media (max-width: 39.99rem) {
  .navbar {
    gap: 0.6rem 0.7rem;
    min-height: 4.2rem;
    padding: 0.55rem 0.6rem;
  }

  .brand {
    gap: 0.65rem;
  }

  .avatar {
    width: 2.6rem;
    height: 2.6rem;
  }

  .brand-role {
    display: none;
  }

  .brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-tools [data-theme-toggle],
  .lang-switch .icon,
  .lang-switch [aria-current] {
    display: none;
  }

  .lang-switch {
    height: 2.6rem;
    padding: 0.2rem;
  }

  .icon-btn {
    width: 2.6rem;
    height: 2.6rem;
  }

  .nav-theme {
    display: flex;
  }
}

@media (min-width: 60rem) {
  .navbar {
    flex-wrap: nowrap;
    padding-left: 0.85rem;
  }

  .nav-links,
  .navbar.is-open .nav-links,
  html:not(.js) .nav-links {
    display: flex;
    flex-basis: auto;
    order: 0;
    gap: 0.2rem;
    padding: 0;
  }

  .nav-links a {
    padding: 0.62rem 0.95rem;
  }

  .menu-btn {
    display: none;
  }

  .brand {
    flex: 1;
    margin-right: 0;
  }

  .nav-tools {
    flex: 1;
    justify-content: flex-end;
  }
}

/* Page transitions: the main content slides and fades between pages ------- */

.js main {
  animation: page-in 0.55s var(--ease) both;
}

:root[data-enter="back"] main {
  animation-name: page-in-back;
}

:root.is-leaving main {
  animation: page-out 0.24s ease-in both;
}

:root.is-leaving[data-leave="back"] main {
  animation-name: page-out-back;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
}

@keyframes page-in-back {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: translateX(-28px);
  }
}

@keyframes page-out-back {
  to {
    opacity: 0;
    transform: translateX(28px);
  }
}

/* Backgrounds for the top of each page ------------------------------------ */

.hero,
.page-hero {
  position: relative;
  isolation: isolate;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: -7rem 0 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 0%, #000 25%, transparent 75%);
}

/* Slowly drifting color behind the top of the page */
.aurora {
  position: absolute;
  inset: -8rem 0 auto;
  z-index: -1;
  height: 40rem;
  overflow: hidden;
  pointer-events: none;
}

.aurora span {
  position: absolute;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  opacity: 0.5;
  animation: drift 20s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  top: -6rem;
  left: 6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 40%, transparent), transparent);
}

.aurora span:nth-child(2) {
  top: -3rem;
  right: 6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cyan) 28%, transparent), transparent);
  animation-delay: -7s;
}

.aurora span:nth-child(3) {
  top: 9rem;
  left: 40%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--emerald) 18%, transparent), transparent);
  animation-delay: -14s;
}

@keyframes drift {
  to {
    transform: translate(3rem, 2rem) scale(1.1);
  }
}

/* Hero: photo, name and a short introduction ----------------------------- */

.hero {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

/* Phones see the photo first; wider screens put it on the right */
.hero .photo {
  order: -1;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) clamp(17rem, 27vw, 22rem);
    gap: 3rem clamp(3rem, 6vw, 6rem);
  }

  .hero .photo {
    order: 0;
  }
}

.photo {
  width: min(100%, 14rem);
}

@media (min-width: 56rem) {
  .photo {
    width: 100%;
  }
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: #12171e;
  box-shadow: 0 30px 70px -40px rgb(0 0 0 / 0.9);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 0;
  filter: contrast(1.3) brightness(0.84) saturate(0.82);
}

/* A darker bottom and a cool blue and cyan tint, for contrast and mood */
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgb(5 8 12 / 0.75)),
    linear-gradient(135deg, rgb(37 99 235 / 0.3), transparent 60%),
    linear-gradient(315deg, rgb(6 182 212 / 0.16), transparent 50%);
  pointer-events: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.38rem 0.8rem 0.38rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--hue) 35%, var(--border));
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--hue) 9%, var(--surface));
  color: var(--text);
  font-size: 0.8125rem;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}

.status-pill:hover {
  border-color: color-mix(in srgb, var(--hue) 60%, var(--border));
  transform: translateY(-1px);
}

.status-pill strong {
  color: var(--ink);
  font-weight: 650;
}

.status-pill .arrow {
  color: var(--ink);
  transition: transform 0.2s var(--ease);
}

.status-pill:hover .arrow {
  transform: translateX(2px);
}

.hero-name {
  margin-top: 1.1rem;
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.hero-role {
  margin-top: 0.75rem;
  color: var(--ink);
  font: 600 clamp(0.95rem, 1.4vw, 1.05rem) / 1.4 var(--font-mono);
}

.hero-text {
  max-width: 40rem;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* Where I've worked: runs the full width under the photo and the text */
.worked-at {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

@media (min-width: 56rem) {
  .worked-at {
    grid-column: 1 / -1;
  }
}

.worked-label {
  color: var(--faint);
  font: 500 0.72rem/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Companies: the name and an icon for the industry, no logos -------------- */

.orgs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  font: 600 0.9375rem/1.2 var(--font-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* The same icon on its own, for the experience lists */
.org-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--hue) 14%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 34%, transparent);
  color: var(--ink);
}

.org-mark .icon {
  width: 1.3rem;
  height: 1.3rem;
}

/* Project marks: the project's logo, or an emoji on a tile of its color --- */

.mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--hue), color-mix(in srgb, var(--hue) 60%, #0b1220));
  box-shadow: 0 10px 24px -12px var(--hue);
  color: #ffffff;
  font: 700 1.35rem/1 var(--font-display);
  object-fit: cover;
}

.mark--lg {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.8rem;
  font-size: 1.6rem;
}

/* Code colors ------------------------------------------------------------- */

.tk {
  color: var(--tok-keyword);
}

.ts {
  color: var(--tok-string);
}

.tn {
  color: var(--tok-number);
}

/* Sections ---------------------------------------------------------------- */

.section {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section--tight {
  padding-top: 0;
}

.section-head {
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.section-head--split {
  max-width: none;
}

@media (min-width: 52rem) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
  }
}

.section-head--split > div {
  display: grid;
  gap: 0.9rem;
  max-width: 40rem;
}

.section-eyebrow {
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-lede {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Spotlight: a glow in the card's own color follows the pointer */
.spotlight {
  position: relative;
}

.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: radial-gradient(24rem circle at var(--mx, 50%) var(--my, -20%), color-mix(in srgb, var(--hue) 18%, transparent), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
}

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

/* What I do: four areas of the job, next to a loop of small scenes from it */

.what-grid {
  display: grid;
  grid-template-areas: "demo" "list";
  gap: 2rem;
}

@media (min-width: 60rem) {
  .what-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 32rem);
    grid-template-areas: "list demo";
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }
}

.what-list {
  display: grid;
  grid-area: list;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.what-list li {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.45s, background-color 0.45s, box-shadow 0.45s;
}

.what-icon {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--hue) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 28%, transparent);
  color: var(--ink);
  transition: background-color 0.45s, box-shadow 0.45s;
}

.what-icon .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.what-list h3 {
  align-self: center;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.what-list p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* The area the animation is showing */
.what-list li.is-active {
  border-color: color-mix(in srgb, var(--hue) 45%, var(--border));
  background: color-mix(in srgb, var(--hue) 6%, var(--surface));
  box-shadow: var(--shadow);
}

.what-list li.is-active .what-icon {
  background: color-mix(in srgb, var(--hue) 24%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 55%, transparent), 0 0 18px -4px var(--hue);
}

/* The scenes: a support chat, a terminal, a dashboard and a cloud deploy.
   Bars stand in for words. Purely decorative: the page ships the first
   scene finished and still, and the script plays them in turn. */

.ops-demo {
  grid-area: demo;
  width: 100%;
  max-width: 32rem;
  margin-inline: auto;
  padding: clamp(0.75rem, 2.5vw, 1.25rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle, var(--grid) 1px, transparent 1.5px) 0 0 / 18px 18px,
    radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--hue) 9%, transparent), transparent 70%),
    var(--ops-stage);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--hue) 40%, transparent);
}

.ops-stage {
  position: relative;
  aspect-ratio: 480 / 340;
}

/* One scene at a time: the next rises in as the last one lifts away */
.ops-scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  visibility: hidden;
  opacity: 0;
  filter: drop-shadow(0 14px 18px var(--ops-shadow));
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}

.ops-scene.is-shown {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}

.ops-scene.is-leaving {
  visibility: visible;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition-delay: 0s;
}

/* Progress: one segment per scene */
.ops-progress {
  display: flex;
  gap: 0.45rem;
  margin-top: clamp(0.5rem, 2vw, 0.9rem);
}

.ops-demo:not(.is-playing) .ops-progress {
  display: none;
}

.ops-progress span {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}

.ops-progress span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--hue);
  transform: scaleX(0);
  transform-origin: left;
}

.ops-progress .is-done::after {
  transform: none;
}

/* Keep in step with the scene length in main.js */
.ops-progress .is-active::after {
  animation: ops-progress 3s linear both;
}

.ops-demo.is-paused *,
.ops-demo.is-paused *::after {
  animation-play-state: paused !important;
}

/* Shared shapes: a window, its title bar, and bars in place of text */
.o-win {
  fill: var(--ops-win);
}

.o-chrome {
  fill: var(--ops-chrome);
}

.o-side {
  fill: color-mix(in srgb, var(--ops-chrome) 75%, transparent);
}

.o-rule {
  fill: none;
  stroke: var(--border);
}

.o-edge {
  fill: none;
  stroke: var(--border-strong);
}

.o-dot--r {
  fill: color-mix(in srgb, var(--red) 80%, var(--ops-win));
}

.o-dot--y {
  fill: color-mix(in srgb, var(--amber) 85%, var(--ops-win));
}

.o-dot--g {
  fill: color-mix(in srgb, var(--emerald) 80%, var(--ops-win));
}

.o-field,
.o-card {
  fill: var(--ops-win);
  stroke: var(--border);
}

.o-t0 {
  fill: color-mix(in srgb, var(--text) 7%, transparent);
}

.o-t {
  fill: color-mix(in srgb, var(--text) 13%, transparent);
}

.o-t2 {
  fill: color-mix(in srgb, var(--text) 26%, transparent);
}

.o-bubble {
  fill: color-mix(in srgb, var(--text) 6%, var(--ops-win));
}

.o-hue {
  fill: var(--hue);
}

.o-tint {
  fill: color-mix(in srgb, var(--hue) 14%, transparent);
}

.o-on {
  fill: rgb(255 255 255 / 0.85);
}

.o-on-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.o-amber {
  fill: var(--amber);
}

.o-amber-tint {
  fill: color-mix(in srgb, var(--amber) 16%, transparent);
}

.o-amber-soft {
  fill: color-mix(in srgb, var(--amber) 50%, transparent);
}

.o-green {
  fill: var(--emerald);
}

.o-green-tint {
  fill: color-mix(in srgb, var(--emerald) 16%, transparent);
}

.o-green-soft {
  fill: color-mix(in srgb, var(--emerald) 50%, transparent);
}

/* The terminal stays dark in both themes, like the code on the site */
.t-win {
  fill: var(--term-bg);
}

.t-chrome {
  fill: var(--term-bar);
}

.t-rule,
.t-edge {
  fill: none;
  stroke: var(--term-border);
}

.t-title {
  fill: rgb(139 152 165 / 0.35);
}

.t-prompt {
  fill: none;
  stroke: #34d399;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t-band {
  fill: rgb(248 113 113 / 0.14);
}

.t-cursor {
  fill: rgb(230 237 243 / 0.85);
}

.tl {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

.tl-cmd {
  stroke: rgb(230 237 243 / 0.82);
}

.tl-key {
  stroke: var(--tok-keyword);
}

.tl-str {
  stroke: var(--tok-string);
}

.tl-dim {
  stroke: rgb(139 152 165 / 0.5);
}

.tl-err {
  stroke: #f87171;
}

.tl-ok {
  stroke: #34d399;
}

/* The dashboard */
.m-grid {
  fill: none;
  stroke: var(--border);
  stroke-dasharray: 2 4;
}

.m-base {
  fill: none;
  stroke: var(--border-strong);
}

.m-line {
  fill: none;
  stroke: var(--hue);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-area {
  fill: url(#ops-area);
}

.m-stop {
  stop-color: var(--hue);
  stop-opacity: 0.28;
}

.m-stop--end {
  stop-opacity: 0;
}

.m-ring {
  fill: none;
  stroke: var(--hue);
  stroke-width: 1.5;
}

.m-guide {
  fill: none;
  stroke: color-mix(in srgb, var(--hue) 55%, transparent);
  stroke-dasharray: 3 3;
}

.m-point {
  fill: var(--ops-win);
  stroke: var(--hue);
  stroke-width: 2;
}

.m-tip {
  fill: var(--ops-win);
  stroke: var(--border-strong);
}

.m-up,
.m-down {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m-up {
  stroke: var(--emerald);
}

.m-down {
  stroke: var(--red);
}

.m-track,
.m-seg {
  fill: none;
  stroke-width: 9;
}

.m-track {
  stroke: color-mix(in srgb, var(--text) 8%, transparent);
}

.m-seg--a {
  stroke: var(--hue);
}

.m-seg--b {
  stroke: var(--cyan);
}

.m-seg--c {
  stroke: var(--amber);
}

.m-dot-b {
  fill: var(--cyan);
}

.m-dot-c {
  fill: var(--amber);
}

/* The cloud */
.k-cloud {
  fill: var(--ops-win);
  stroke: color-mix(in srgb, var(--hue) 60%, var(--border-strong));
  stroke-width: 2;
  stroke-linejoin: round;
}

.k-shine {
  fill: none;
  stroke: color-mix(in srgb, var(--hue) 45%, transparent);
  stroke-width: 2;
  stroke-linecap: round;
}

.k-link {
  fill: none;
  stroke: color-mix(in srgb, var(--text) 22%, var(--ops-stage));
  stroke-width: 2;
}

.k-pk {
  fill: var(--hue);
}

.k-pk--up {
  fill: var(--emerald);
}

.k-tile {
  fill: color-mix(in srgb, var(--hue) 12%, var(--ops-win));
  stroke: color-mix(in srgb, var(--hue) 40%, transparent);
}

.k-slot {
  fill: none;
  stroke: color-mix(in srgb, var(--hue) 55%, transparent);
  stroke-dasharray: 3 3;
}

.k-new {
  fill: var(--hue);
}

.k-flash {
  fill: none;
  stroke: var(--hue);
  stroke-width: 2;
}

.k-icon {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.k-icon--on {
  stroke: #ffffff;
}

.k-box {
  fill: var(--ops-win);
  stroke: var(--border-strong);
}

.k-led {
  fill: var(--emerald);
}

.k-ping {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 1.5;
}

/* The packets only move while the cloud scene is up */
.ops-scene:not(.is-shown, .is-leaving) .k-packets {
  display: none;
}

/* Motion. Each piece waits for its moment in the scene (--at), then plays.
   Without .is-live everything sits in its final place. */
.ops-scene :is(.a-pop, .a-rise, .a-slide, .a-line, .a-drop, .a-ping, .a-ping-once),
.c-typing,
.c-typing circle {
  transform-box: fill-box;
  transform-origin: center;
}

.ops-scene :is(.a-grow, .a-sweep) {
  transform-box: fill-box;
  transform-origin: 0 50%;
}

.ops-scene .from-bl {
  transform-origin: 0 100%;
}

.ops-scene .from-br {
  transform-origin: 100% 100%;
}

.ops-scene .from-b {
  transform-origin: 50% 100%;
}

.ops-scene :is(.a-draw, .a-type, .a-cloud) {
  stroke-dasharray: 1;
}

.ops-scene :is(.a-out, .a-ping, .a-ping-once),
.c-typing {
  opacity: 0;
}

.ops-scene.is-live .a-pop {
  animation: ops-pop 0.5s var(--ease) var(--at, 0s) both;
}

.ops-scene.is-live .a-rise {
  animation: ops-rise 0.45s var(--ease) var(--at, 0s) both;
}

.ops-scene.is-live .a-fade {
  animation: ops-fade 0.45s ease var(--at, 0s) both;
}

.ops-scene.is-live .a-out {
  animation: ops-out 0.3s ease var(--at, 0s) both;
}

.ops-scene.is-live .a-slide {
  animation: ops-slide 0.5s var(--ease) var(--at, 0s) both;
}

.ops-scene.is-live .a-line {
  animation: ops-line 0.25s ease-out var(--at, 0s) both;
}

.ops-scene.is-live :is(.a-grow, .a-sweep) {
  animation: ops-grow 0.5s var(--ease) var(--at, 0s) both;
}

.ops-scene.is-live .a-draw {
  animation: ops-draw var(--dur, 1s) ease-in-out var(--at, 0s) both;
}

.ops-scene.is-live .a-type {
  animation: ops-type var(--dur, 0.2s) steps(5) var(--at, 0s) both;
}

.ops-scene.is-live .a-blink {
  animation: ops-blink 1s steps(1) var(--at, 0s) infinite;
}

.ops-scene.is-live .a-ping {
  animation: ops-ping 1.6s ease-out var(--at, 0s) infinite both;
}

.ops-scene.is-live .a-ping-once {
  animation: ops-ping 0.8s ease-out var(--at, 0s) both;
}

.ops-scene.is-live .a-drop {
  animation: ops-drop 0.6s ease-out var(--at, 0s) both;
}

.ops-scene.is-live .a-led {
  animation: ops-led 0.3s ease var(--at, 0s) both;
}

.ops-scene.is-live .a-donut {
  animation: ops-donut 0.6s var(--ease) var(--at, 0s) both;
}

.ops-scene.is-live .a-cloud {
  animation: ops-draw 1s ease-in-out both, ops-fill-in 0.5s ease 0.35s both;
}

.ops-scene.is-live .k-packets {
  animation: ops-fade 0.4s ease 1.1s both;
}

.ops-scene.is-live .c-typing {
  animation: ops-typing 0.75s ease var(--at, 0s) both;
}

.ops-scene.is-live .c-typing circle {
  animation: ops-bounce 0.5s ease-in-out infinite;
}

.ops-scene.is-live .c-typing circle:nth-of-type(2) {
  animation-delay: 0.1s;
}

.ops-scene.is-live .c-typing circle:nth-of-type(3) {
  animation-delay: 0.2s;
}

@keyframes ops-pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }

  60% {
    opacity: 1;
    transform: scale(1.04);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

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

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ops-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes ops-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes ops-slide {
  from {
    opacity: 0;
    transform: translateX(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ops-line {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ops-grow {
  from {
    transform: scaleX(0);
  }

  to {
    transform: none;
  }
}

@keyframes ops-draw {
  from {
    stroke-dashoffset: 1;
  }

  to {
    stroke-dashoffset: 0;
  }
}

/* Typing: the bar appears a few characters at a time */
@keyframes ops-type {
  from {
    visibility: hidden;
    stroke-dashoffset: 1;
  }

  to {
    visibility: visible;
    stroke-dashoffset: 0;
  }
}

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

@keyframes ops-ping {
  0% {
    opacity: 0;
    transform: none;
  }

  10% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: scale(var(--ping, 3));
  }
}

@keyframes ops-drop {
  0% {
    opacity: 0;
    transform: translateY(-48px);
  }

  30% {
    opacity: 1;
  }

  70% {
    transform: translateY(2px);
  }

  85% {
    transform: translateY(-1px);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}

@keyframes ops-led {
  from {
    fill: var(--amber);
  }

  to {
    fill: var(--emerald);
  }
}

@keyframes ops-donut {
  from {
    stroke-dasharray: 0 150.8;
  }
}

@keyframes ops-fill-in {
  from {
    fill-opacity: 0;
  }

  to {
    fill-opacity: 1;
  }
}

@keyframes ops-typing {
  0% {
    opacity: 0;
    transform: scale(0.7);
  }

  20%,
  80% {
    opacity: 1;
    transform: none;
  }

  100% {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes ops-bounce {
  0%,
  60%,
  100% {
    transform: none;
  }

  30% {
    transform: translateY(-3px);
  }
}

@keyframes ops-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: none;
  }
}

/* Bento ------------------------------------------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  grid-column: span 6;
  min-width: 0;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hue) 6%, transparent), transparent 40%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--hue) 40%, transparent);
}

/* Quick facts on the left; what I'm building and what I do off the clock
   stacked beside it */
@media (min-width: 52rem) {
  .tile--facts {
    grid-row: span 2;
  }

  .tile--facts,
  .tile--now,
  .tile--life {
    grid-column: span 3;
  }
}

.tile-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font: 500 0.75rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tile-label .label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.tile-label .chip {
  letter-spacing: 0;
  text-transform: none;
}

.tile-icon {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--hue) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 32%, transparent);
  color: var(--ink);
}

.tile-icon .icon {
  width: 1rem;
  height: 1rem;
}

.tile-title {
  margin-top: 1.1rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.tile-text {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.tile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.tile-link .arrow {
  transition: transform 0.2s var(--ease);
}

.tile-link:hover .arrow {
  transform: translateX(3px);
}

/* Quick facts */

/* When the card is stretched beside its neighbours, the facts spread out to fill it */
.facts {
  display: grid;
  flex-grow: 1;
  align-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  grid-template-columns: 1.9rem 1fr;
  gap: 0 0.75rem;
  align-items: start;
}

.facts .tile-icon {
  grid-row: span 2;
}

.fact-label {
  color: var(--faint);
  font: 500 0.7rem/1.5 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fact-value {
  font-size: 0.9rem;
  font-weight: 500;
}

/* A value can run over several lines, like the two degrees */
.fact-line {
  display: block;
}

/* Small print under a value, like the time zone or the university */
.fact-note {
  display: block;
  margin-top: 0.2rem;
  color: var(--faint);
  font: 500 0.75rem/1.4 var(--font-mono);
}

/* A little room between one degree and the next */
.fact-note + .fact-line {
  margin-top: 0.6rem;
}

/* Languages: a code, the name and the level. Used on the home and experience pages. */

.langs {
  display: grid;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.langs li {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.lang-code {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--hue) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 32%, transparent);
  color: var(--ink);
  font: 700 0.68rem/1 var(--font-mono);
  letter-spacing: 0.06em;
}

.lang-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.lang-level {
  color: var(--ink);
  font: 600 0.7rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Building now */

.now-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.now-head .tile-title {
  margin: 0 0 0.35rem;
}

.now-head + .tile-text {
  margin-top: 1rem;
}

/* Toolbox: every skill visible at once, grouped */

.toolbox {
  display: grid;
  gap: 1.25rem 1.5rem;
  margin: 1.25rem 0 0;
}

@media (min-width: 40rem) {
  .toolbox {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .toolbox {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.toolbox div {
  padding-top: 1rem;
  border-top: 2px solid color-mix(in srgb, var(--hue) 55%, transparent);
}

.toolbox dt {
  margin-bottom: 0.6rem;
  color: var(--text);
  font: 650 0.9rem/1.3 var(--font-display);
}

.toolbox dd {
  margin: 0;
}

/* Off the clock */

.life {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.life li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--hue) 28%, var(--border));
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--hue) 8%, transparent);
  font-size: 0.9rem;
  font-weight: 500;
}

.life .icon {
  color: var(--ink);
}

/* Home: experience preview ------------------------------------------------ */

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

.exp-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "logo role"
    "logo company"
    "logo when";
  align-items: center;
  gap: 0.1rem 1.1rem;
  margin: 0 -1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.25s, border-radius 0.25s;
}

@media (min-width: 48rem) {
  .exp-list a {
    grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) 8.5rem 1.25rem;
    grid-template-areas: "logo role company when arrow";
  }
}

.exp-list a:hover {
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--hue) 8%, transparent);
}

.exp-list .org-mark {
  grid-area: logo;
}

.exp-role {
  grid-area: role;
  font: 650 1.05rem/1.35 var(--font-display);
  letter-spacing: -0.015em;
}

.exp-company {
  grid-area: company;
  color: var(--ink);
  font-weight: 500;
}

.exp-when {
  grid-area: when;
  color: var(--muted);
  font: 0.8125rem var(--font-mono);
  white-space: nowrap;
}

@media (min-width: 48rem) {
  .exp-when {
    text-align: right;
  }
}

.exp-arrow {
  display: none;
  grid-area: arrow;
  color: var(--faint);
  transition: transform 0.25s var(--ease), color 0.25s;
}

@media (min-width: 48rem) {
  .exp-arrow {
    display: block;
  }
}

.exp-list a:hover .exp-arrow {
  transform: translateX(3px);
  color: var(--ink);
}

/* Home: project preview --------------------------------------------------- */

.mini-projects {
  display: grid;
  gap: 1rem;
}

@media (min-width: 52rem) {
  .mini-projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.mini-project {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--hue) 13%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

.mini-project:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--hue) 45%, var(--border));
}

.mp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mini-project h3 {
  margin-top: 0.4rem;
  font-size: 1.2rem;
}

.mini-project p {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Call to action ---------------------------------------------------------- */

.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 6vw, 3.75rem);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 0.25rem);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--blue) 10%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--blue) 45%, transparent);
  isolation: isolate;
}

.cta::after {
  content: "";
  position: absolute;
  top: -45%;
  right: -10%;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--cyan) 20%, transparent), transparent);
}

.cta-title {
  max-width: 20ch;
  margin-top: 1.25rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.cta-text {
  max-width: 34rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Inner page headers ------------------------------------------------------ */

.page-hero {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
}

.page-title {
  max-width: 18ch;
  margin-top: 1.1rem;
  font-size: clamp(2.5rem, 5.6vw, 4rem);
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.page-lede {
  max-width: 40rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Experience page --------------------------------------------------------- */

.exp-layout {
  display: grid;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

@media (min-width: 62rem) {
  .exp-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 3rem;
  }

  .exp-aside {
    align-self: start;
  }
}

/* The sidebar only follows the page on screens tall enough to show all of it;
   otherwise its last card would stay out of view */
@media (min-width: 62rem) and (min-height: 88rem) {
  .exp-aside {
    position: sticky;
    top: 7.5rem;
  }
}

.timeline {
  position: relative;
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0 0 0 1.75rem;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0.32rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(var(--blue), var(--cyan) 50%, var(--slate));
  opacity: 0.55;
}

.role {
  position: relative;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--hue) 8%, transparent), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow);
}

.role::before {
  content: "";
  position: absolute;
  top: 2.1rem;
  left: -1.75rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--hue);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hue) 40%, transparent), 0 0 14px var(--hue);
}

.role-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.role-when {
  color: var(--ink);
  font: 600 0.8125rem/1.4 var(--font-mono);
}

.role h2 {
  margin-top: 1rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.role-company {
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 500;
}

.role-company strong {
  color: var(--text);
  font-weight: 650;
}

.role-points {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.role-points li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-size: 0.9625rem;
}

.role-points li::before {
  content: "→";
  color: var(--ink);
  font-weight: 600;
}

.role .tags {
  margin-top: 1.1rem;
}

.exp-aside {
  display: grid;
  gap: 1rem;
}

.side-card {
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--hue) 7%, transparent), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 color-mix(in srgb, var(--hue) 40%, transparent);
}

.side-card h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font: 500 0.75rem/1.2 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-title {
  margin-top: 1rem;
  font: 650 1.15rem/1.3 var(--font-display);
}

.side-card p:not(.side-title) {
  margin-top: 0.25rem;
  color: var(--muted);
}

.skill-groups {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 0;
}

.skill-groups dt {
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 650;
}

.skill-groups dd {
  margin: 0;
}

.side-card .langs {
  margin-top: 1rem;
}

/* Projects page ----------------------------------------------------------- */

.projects {
  display: grid;
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.project {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 0.25rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (min-width: 56rem) {
  .project {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .project:nth-child(even) .project-preview {
    order: 2;
  }
}

.project-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 18rem;
  padding: 2rem 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(80% 90% at 30% 0%, color-mix(in srgb, var(--hue) 24%, transparent), transparent 65%),
    radial-gradient(70% 70% at 100% 100%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 60%),
    var(--surface-2);
}

.project-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid) 1px, transparent 1px);
  background-size: 16px 16px;
}

.project-preview > * {
  position: relative;
  transition: transform 0.5s var(--ease);
}

.project:hover .project-preview > * {
  transform: translateY(-4px) scale(1.02);
}

.project-body {
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font: 0.8125rem var(--font-mono);
}

/* The project's mark next to its name */
.project-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.project h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
}

.project-tagline {
  margin-top: 0.6rem;
  color: var(--ink);
  font-weight: 600;
}

.project-body > p:not(.project-tagline) {
  margin-top: 1rem;
  color: var(--muted);
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.project-facts dt {
  color: var(--faint);
  font: 500 0.6875rem/1.4 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-facts dd {
  margin: 0.2rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.project .tags {
  margin-top: 1.25rem;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* Preview: a SodaBuckets profile */
.sb-mock {
  width: min(100%, 22rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sb-cover {
  height: 4.5rem;
  background:
    linear-gradient(rgb(255 255 255 / 0.08) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(90deg, rgb(255 255 255 / 0.08) 1px, transparent 1px) 0 0 / 14px 14px,
    linear-gradient(120deg, #f97316, #f59e0b 45%, #0ea5e9);
}

.sb-profile {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: -1.6rem;
  padding: 0 1rem;
}

.sb-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.4rem;
  height: 3.4rem;
  border: 3px solid var(--surface);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  font: 700 1rem/1 var(--font-display);
}

.sb-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 650;
}

.sb-verified {
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: color-mix(in srgb, var(--emerald) 18%, transparent);
  color: var(--emerald-ink);
  font: 600 0.625rem/1.4 var(--font-mono);
}

.sb-handle {
  color: var(--muted);
  font-size: 0.75rem;
}

.sb-tabs {
  display: flex;
  gap: 1rem;
  margin: 0.9rem 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.sb-tabs span {
  padding-bottom: 0.5rem;
}

.sb-tabs .is-active {
  box-shadow: inset 0 -2px 0 var(--orange);
  color: var(--orange-ink);
}

.sb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding: 0.9rem 1rem 1rem;
}

.sb-grid i {
  aspect-ratio: 1;
  border-radius: 0.45rem;
}

.sb-grid i:nth-child(1) {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

.sb-grid i:nth-child(2) {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.sb-grid i:nth-child(3) {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

/* Preview: a SQL Raccoon shift */
.sql-mock {
  width: min(100%, 23rem);
  overflow: hidden;
  border: 1px solid var(--term-border);
  border-radius: var(--radius-lg);
  background: var(--term-bg);
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / 0.85);
  color: var(--term-text);
}

.sql-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--term-border);
  background: var(--term-bar);
  color: var(--term-dim);
  font: 0.75rem var(--font-mono);
}

.sql-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 0.3rem;
  background: rgb(16 185 129 / 0.18);
  color: #6ee7b7;
  font-weight: 600;
}

.sql-mock pre {
  margin: 0;
  padding: 0.9rem 1rem;
  font: 0.8125rem/1.75 var(--font-mono);
}

.sql-result {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.95rem;
  border-top: 1px solid var(--term-border);
  background: rgb(16 185 129 / 0.1);
  color: var(--term-dim);
  font: 0.75rem var(--font-mono);
}

.sql-result strong {
  color: #6ee7b7;
}

/* Preview: a Fortran Planet video */
.yt-mock {
  width: min(100%, 23rem);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.yt-screen {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 80% 20%, rgb(217 70 239 / 0.24), transparent 45%),
    radial-gradient(circle at 15% 85%, rgb(109 40 217 / 0.34), transparent 45%),
    var(--term-bg);
}

.yt-screen pre {
  margin: 0;
  color: var(--term-text);
  font: 0.75rem/1.7 var(--font-mono);
}

.yt-play {
  position: absolute;
  display: grid;
  place-items: center;
  width: 3.4rem;
  height: 2.4rem;
  border-radius: 0.65rem;
  background: #ff0033;
  box-shadow: 0 10px 24px -8px rgb(255 0 51 / 0.7);
  color: #ffffff;
  font-size: 1rem;
}

.yt-bar {
  height: 0.25rem;
  background: var(--surface-2);
}

.yt-bar span {
  display: block;
  width: 38%;
  height: 100%;
  background: #ff0033;
}

.yt-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.95rem;
}

.yt-channel {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
}

.yt-info p {
  font-size: 0.8125rem;
  font-weight: 650;
  line-height: 1.35;
}

.yt-info small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

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

.contact-layout {
  display: grid;
  gap: 1rem;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

@media (min-width: 56rem) {
  .contact-layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* Tiles here sit in this page's own grid, not the home page's six columns */
.contact-layout > .tile {
  grid-column: auto;
}

/* My local time, so people know when to expect a reply */
.clock {
  margin-top: 1.1rem;
  background: linear-gradient(100deg, var(--amber-ink), var(--orange-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: 650 clamp(2.6rem, 5vw, 3.2rem) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}

.daynight {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0;
  text-transform: none;
}

.daynight::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.daynight[data-state="night"]::before {
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.email-card {
  padding: clamp(1.5rem, 4vw, 2.25rem);
}

.email-address {
  display: inline-block;
  margin-top: 1.25rem;
  background: linear-gradient(100deg, var(--blue-ink), var(--cyan-ink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: 650 clamp(1.4rem, 3.4vw, 2.1rem) / 1.2 var(--font-display);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.link-cards {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .link-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 56rem) {
  .link-cards {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s, background-color 0.25s;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.link-card .brand-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 0.65rem;
  background: var(--brand);
  box-shadow: 0 10px 22px -12px var(--brand);
  color: #ffffff;
}

.link-card .brand-icon .icon {
  width: 1.3rem;
  height: 1.3rem;
}

.link-card span:not(.brand-icon) {
  display: grid;
  min-width: 0;
}

.link-card strong {
  font-weight: 650;
}

.link-card small {
  overflow: hidden;
  color: var(--muted);
  font: 0.8125rem var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-card .arrow {
  margin-left: auto;
  color: var(--faint);
  transition: transform 0.25s var(--ease), color 0.25s;
}

.link-card:hover .arrow {
  transform: translate(2px, -2px);
  color: var(--text);
}

[data-brand="email"] { --brand: #2563eb; }
[data-brand="linkedin"] { --brand: #0a66c2; }
[data-brand="github"] { --brand: #24292f; }
[data-brand="youtube"] { --brand: #ff0033; }
[data-brand="discord"] { --brand: #5865f2; }
[data-brand="roblox"] { --brand: #393b3d; }

/* "Next page" card at the bottom of inner pages --------------------------- */

.page-next {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.6rem 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--hue) 11%, transparent), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}

.next-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--hue) 50%, var(--border));
}

.next-card small {
  color: var(--ink);
  font: 600 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-card strong {
  display: block;
  margin-top: 0.45rem;
  font: 650 1.4rem/1.25 var(--font-display);
  letter-spacing: -0.02em;
}

.next-card .arrow {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--ink);
  transition: transform 0.25s var(--ease);
}

.next-card:hover .arrow {
  transform: translateX(4px);
}

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

.site-footer {
  position: relative;
  padding-top: 4rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue), var(--cyan), var(--emerald), transparent);
  opacity: 0.5;
}

.footer-inner {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}

.footer-brand p {
  max-width: 22rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-col h2 {
  color: var(--faint);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--muted);
  font-size: 0.9375rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 3.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.8125rem;
}

/* Toast ------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  z-index: 90;
  max-width: calc(100% - 2rem);
  padding: 0.75rem 1.1rem;
  border-radius: 0.6rem;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  box-shadow: 0 16px 40px -14px rgb(37 99 235 / 0.7);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transform: translate(-50%, 1rem);
  transition: opacity 0.25s, transform 0.25s var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Scroll reveal ----------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0s);
}

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

/* Revealed cards keep their hover lift */
.js .mini-project.reveal {
  transition: opacity 0.7s var(--ease), transform 0.3s var(--ease), border-color 0.3s;
}

.js .mini-project.reveal.is-visible:hover {
  transform: translateY(-3px);
}

/* Motion preferences ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

/* Printing (the experience page doubles as a CV) -------------------------- */

@media print {
  /* The #print id never exists; it only makes this rule outrank the dark theme */
  :root:not(#print) {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --border: #d4d4d8;
    --border-strong: #a1a1aa;
    --text: #000000;
    --muted: #333333;
    --faint: #555555;
    --blue-ink: #1e3a8a;
    --cyan-ink: #155e75;
    --sky-ink: #075985;
    --teal-ink: #115e59;
    --emerald-ink: #065f46;
    --amber-ink: #92400e;
    --orange-ink: #9a3412;
    --red-ink: #991b1b;
    --violet-ink: #5b21b6;
    --slate-ink: #1e293b;
    --shadow: none;
  }

  body {
    background: #ffffff;
    font-size: 10pt;
  }

  body::after,
  .site-header,
  .site-footer,
  .aurora,
  .page-actions,
  .page-next,
  .toast {
    display: none !important;
  }

  .js main,
  .js .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .page-hero {
    padding: 0 0 1rem;
  }

  .page-hero::before {
    display: none;
  }

  .exp-layout {
    display: block;
  }

  .exp-aside {
    position: static;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 1rem;
  }

  .role,
  .side-card {
    break-inside: avoid;
  }

  .role::before {
    box-shadow: none;
  }
}
