/*
 * Kevin Cloyd — Creative Portfolio
 * Shared styles for index.html, works.html, about.html and contact.html.
 *
 * Themes:  "Daylight" (light, default) and "Lamplight" (dark), switched by
 *          pulling the lamp cord. Both share the tokens in section 01.
 * Layout:  every page fits one screen at common desktop and phone sizes.
 *          Short screens, zoom and large text fall back to normal scrolling.
 * Fonts:   Manrope and Instrument Serif Italic, served locally (SIL OFL).
 */

/* 00. Fonts --------------------------------------------------------------- */

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-Italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* 01. Design tokens ------------------------------------------------------- */

:root {
  color-scheme: light;

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;

  /* Daylight palette */
  --bg: #f4f4ed;
  --bg-deep: #ebebe2;
  --surface: #fcfcf8;
  --surface-hi: #ffffff;
  --surface-sunk: #f0f0e8;
  --ink: #0b1e3f;
  --ink-soft: #243552;
  --muted: #5b6780;
  --line: #dce0e5;
  --line-soft: #e8e9e3;
  --accent: #ff7a16;
  --accent-ink: #b04f05;
  --accent-soft: #ffeedf;
  --on-accent: #0b1e3f;
  --blue-soft: #d5e2ff;
  --tile-bg: #ff7a16;
  --tile-ink: #ffffff;
  --btn-bg: #0b1e3f;
  --btn-ink: #fcfcf8;
  --btn-icon: #ff9a4d;
  --focus: #1d5fd6;
  --curve: rgba(11, 30, 63, 0.13);
  --panel-bg: linear-gradient(125deg, rgba(255, 255, 255, 0.94) 0%, rgba(250, 250, 246, 0.9) 42%, rgba(222, 232, 255, 0.94) 100%);
  --panel-edge: rgba(255, 255, 255, 0.95);
  --sidebar-bg: rgba(250, 250, 245, 0.82);
  --avatar-bg: radial-gradient(circle at 50% 35%, #ffffff 0%, #e4ebfb 58%, #d0dcf7 100%);
  --info-bg: #0b1e3f;
  --info-ink: #f4f4ed;
  --info-muted: #b8c2d6;
  --info-line: rgba(244, 244, 237, 0.14);
  --info-surface: rgba(255, 255, 255, 0.07);

  /* Illustration palette */
  --ill-dark: #0b1e3f;
  --ill-dark-2: #1b2f55;
  --ill-sky: #d5e2ff;
  --ill-sky-2: #9db7f2;
  --ill-hill: #7f9bd6;
  --ill-peach: #ffdcc0;
  --ill-muted: #c9d0dc;
  --ill-light: rgba(255, 255, 255, 0.78);

  --shadow-card: 0 1px 2px rgba(11, 30, 63, 0.04), 0 10px 26px -14px rgba(11, 30, 63, 0.16);
  --shadow-lift: 0 2px 6px rgba(11, 30, 63, 0.05), 0 22px 40px -18px rgba(11, 30, 63, 0.28);
  --shadow-panel: 0 30px 70px -44px rgba(11, 30, 63, 0.4);
  --shadow-float: 0 18px 40px -16px rgba(11, 30, 63, 0.3);

  /* Lamp */
  --lamp-metal: #0b1e3f;
  --lamp-metal-hi: rgba(255, 255, 255, 0.16);
  --lamp-rim: #1c2f52;
  --lamp-bulb: #e9e6dc;
  --lamp-cord: #6d778a;
  --lamp-bead: #0b1e3f;
  --lamp-glow: 255, 196, 102;

  /* Space, shape and motion */
  --sidebar-w: clamp(15rem, 17.5vw, 18.5rem);
  --pad-x: clamp(1rem, 2.2vw, 2.5rem);
  --pad-y: clamp(0.875rem, 2.6vh, 2rem);
  --gap: clamp(0.625rem, 1.6vh, 1rem);
  --gap-lg: clamp(0.875rem, 2.2vh, 1.5rem);
  --r-panel: clamp(1.5rem, 2.3vw, 2.25rem);
  --r-card: clamp(1.125rem, 1.6vw, 1.5rem);
  --r-sm: 0.75rem;
  --dock-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 180ms;
  --t-med: 280ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Lamplight palette: deep night blue with warm lamp accents */
  --bg: #0b0f17;
  --bg-deep: #080b11;
  --surface: #131925;
  --surface-hi: #19202e;
  --surface-sunk: #0f141e;
  --ink: #f4f0e6;
  --ink-soft: #dcd6ca;
  --muted: #a6aebf;
  --line: #242c3b;
  --line-soft: #1c2330;
  --accent: #ffb547;
  --accent-ink: #ffc46b;
  --accent-soft: rgba(255, 181, 71, 0.13);
  --on-accent: #1a1206;
  --blue-soft: #1f2b45;
  --tile-bg: #ffb547;
  --tile-ink: #1a1206;
  --btn-bg: #ffc65c;
  --btn-ink: #1b1407;
  --btn-icon: #1b1407;
  --focus: #8db8ff;
  --curve: rgba(255, 226, 170, 0.075);
  --panel-bg: linear-gradient(140deg, rgba(38, 32, 25, 0.9) 0%, rgba(19, 24, 35, 0.9) 38%, rgba(15, 20, 30, 0.93) 100%);
  --panel-edge: rgba(255, 226, 170, 0.08);
  --sidebar-bg: rgba(13, 17, 26, 0.86);
  --avatar-bg: radial-gradient(circle at 50% 30%, #4a3b28 0%, #2a2520 45%, #171b25 100%);
  --info-bg: #171d2a;
  --info-ink: #f4f0e6;
  --info-muted: #a6aebf;
  --info-line: rgba(255, 226, 170, 0.1);
  --info-surface: rgba(255, 226, 170, 0.05);

  --ill-dark: #2b3550;
  --ill-dark-2: #222a3e;
  --ill-sky: #25365a;
  --ill-sky-2: #3f5a93;
  --ill-hill: #4b639a;
  --ill-peach: #4d3c28;
  --ill-muted: #343e52;
  --ill-light: rgba(244, 240, 230, 0.7);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 12px 28px -16px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 44px -18px rgba(0, 0, 0, 0.7);
  --shadow-panel: 0 30px 70px -40px rgba(0, 0, 0, 0.8);
  --shadow-float: 0 18px 40px -14px rgba(0, 0, 0, 0.7);

  --lamp-metal: #252c3c;
  --lamp-metal-hi: rgba(255, 226, 170, 0.18);
  --lamp-rim: #ffe2a0;
  --lamp-bulb: #fff6d8;
  --lamp-cord: #a39781;
  --lamp-bead: #ffc65c;
}

/* 02. Base and accessibility --------------------------------------------- */

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

h1,
h2,
h3,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform var(--t-fast) var(--ease);
}

.skip-link:focus {
  transform: none;
}

.icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.logo {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.logo--claude { color: #d97757; }
.logo--openai { color: var(--ink); }
.logo--vscode { color: #007acc; }
.logo--hostinger { color: #673de6; }

:root[data-theme="dark"] .logo--vscode { color: #3ba7f0; }
:root[data-theme="dark"] .logo--hostinger { color: #a488ff; }

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  font-size: 1.08em;
  line-height: 1;
}

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

/* 03. Ambient curves ------------------------------------------------------ */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient::before {
  /* Warm lamp spill for the dark theme; invisible in daylight. */
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--lamp-glow), 0.09) 0%, transparent 62%);
  opacity: 0;
  transition: opacity 600ms ease;
}

:root[data-theme="dark"] .ambient::before {
  opacity: 1;
}

.ambient svg {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
}

.ambient ellipse {
  fill: none;
  stroke: var(--curve);
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .ambient g:nth-child(1) ellipse { animation: drift-a 46s var(--ease-in-out) infinite alternate; }
  .ambient g:nth-child(2) ellipse { animation: drift-b 58s var(--ease-in-out) infinite alternate; }
  .ambient g:nth-child(3) ellipse { animation: drift-c 72s var(--ease-in-out) infinite alternate; }
}

@keyframes drift-a {
  to { transform: translate(-2.5%, 2%) rotate(-3deg); }
}

@keyframes drift-b {
  to { transform: translate(2%, -2.5%) rotate(2.5deg) scale(1.03); }
}

@keyframes drift-c {
  to { transform: translate(-1.5%, -1.5%) rotate(4deg); }
}

.is-page-hidden .ambient ellipse,
.is-page-hidden .ill *,
.is-page-hidden .lamp-glow i {
  animation-play-state: paused !important;
}

/* 04. Shell --------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: clip;
}

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--pad-y) var(--pad-x);
}

.main:focus {
  outline: none;
}

/* 05. Sidebar ------------------------------------------------------------- */

.sidebar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 0 clamp(1rem, 1.4vw, 1.5rem) clamp(0.875rem, 2vh, 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  view-transition-name: sidebar;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: var(--line);
}

.sidebar > *:not(.lamp-glow) {
  position: relative;
  z-index: 1;
}

.sb-ceiling {
  position: relative;
  flex: none;
  height: clamp(5.75rem, 12.5vh, 6.5rem);
}

.sb-ceiling .lamp {
  left: 50%;
  margin-left: -40px;
}

.sb-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sb-avatar {
  position: relative;
  display: block;
  width: clamp(5.75rem, 13vh, 7.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--avatar-bg);
  box-shadow: 0 0 0 5px var(--surface-hi), 0 0 0 6px var(--line), var(--shadow-float);
  overflow: hidden;
  transition: box-shadow 600ms ease, transform var(--t-med) var(--ease);
}

.sb-avatar:hover {
  transform: translateY(-2px) rotate(-1.5deg);
}

.sb-avatar img,
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
  transform: scale(1.12) translateY(5%);
}

:root[data-theme="dark"] .sb-avatar {
  box-shadow: 0 0 0 5px #1a1a1c, 0 0 0 6px rgba(var(--lamp-glow), 0.35), 0 0 44px -6px rgba(var(--lamp-glow), 0.45);
}

:root[data-theme="dark"] .sb-avatar img {
  filter: brightness(1.04) sepia(0.08);
}

.sb-name {
  margin-top: clamp(0.75rem, 1.8vh, 1rem);
  font-size: 1.1875rem;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.sb-role {
  margin-top: 0.125rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 550;
}

.sb-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
  padding: 0.3125rem 0.75rem 0.3125rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.sb-meta .icon {
  width: 0.9375rem;
  height: 0.9375rem;
  color: var(--accent-ink);
}

.live-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.18);
}

.sb-social {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: clamp(0.75rem, 1.8vh, 1rem);
}

.sb-divider {
  flex: none;
  height: 1px;
  margin: clamp(0.875rem, 2.2vh, 1.375rem) 0.25rem;
  background: var(--line);
}

.sb-nav {
  display: grid;
  gap: 0.25rem;
}

.sb-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: clamp(2.75rem, 5.9vh, 3.125rem);
  padding: 0 0.875rem;
  border-radius: 0.9375rem;
  color: var(--muted);
  font-weight: 650;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}

.sb-link:hover {
  color: var(--ink);
  background: var(--surface-sunk);
}

.sb-link:hover .icon {
  transform: translateX(1px) scale(1.06);
}

.sb-link .icon {
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) ease;
}

.sb-link__num {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.sb-link[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-hi);
  box-shadow: 0 0 0 1px var(--line), 0 8px 18px -12px rgba(11, 30, 63, 0.35);
}

.sb-link[aria-current="page"] .icon {
  color: var(--accent-ink);
}

.sb-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 50%;
  width: 0.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

.sb-foot {
  margin-top: auto;
  padding-top: 1rem;
}

.sb-theme {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 0.875rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.35;
}

.sb-theme strong {
  display: block;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

.sb-theme .icon {
  color: var(--accent-ink);
}

.sb-copy {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-align: center;
}

/* 06. Lamp theme switch --------------------------------------------------- */

.lamp {
  position: absolute;
  top: 0;
  width: 80px;
  height: 64px;
  z-index: 3;
}

.lamp__fixture {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 64px;
  overflow: visible;
  transform-origin: 40px 0;
  transform: rotate(var(--lamp-angle, 0deg));
}

.lamp__wire {
  stroke: var(--lamp-cord);
  stroke-width: 1.5;
}

.lamp__cap {
  fill: var(--lamp-metal);
}

.lamp__shade {
  fill: var(--lamp-metal);
  transition: fill 500ms ease;
}

.lamp__shine {
  fill: var(--lamp-metal-hi);
}

.lamp__rim {
  fill: var(--lamp-rim);
  transition: fill 400ms ease;
}

.lamp__bulb {
  fill: var(--lamp-bulb);
  transition: fill 300ms ease;
}

:root[data-theme="dark"] .lamp__bulb {
  filter: drop-shadow(0 0 6px rgba(var(--lamp-glow), 0.95)) drop-shadow(0 0 16px rgba(var(--lamp-glow), 0.6));
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="dark"] .lamp.is-flicker .lamp__bulb,
  :root[data-theme="dark"] .lamp.is-flicker .lamp__rim {
    animation: bulb-flicker 620ms steps(1, end) both;
  }
}

@keyframes bulb-flicker {
  0% { opacity: 0.25; }
  12% { opacity: 1; }
  22% { opacity: 0.35; }
  34% { opacity: 1; }
  46% { opacity: 0.7; }
  60%, 100% { opacity: 1; }
}

.lamp__cord {
  position: absolute;
  inset: 0;
  width: 80px;
  height: 64px;
  overflow: visible;
  pointer-events: none;
}

.lamp__cord path {
  fill: none;
  stroke: var(--lamp-cord);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.lamp__pull {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  /* Rest position; script.js takes over for physics. */
  transform: translate(42px, 64px);
}

.lamp__pull:active {
  cursor: grabbing;
}

.lamp__pull:focus-visible {
  outline-offset: -4px;
  border-radius: 50%;
}

.lamp__bead {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 17px;
  margin: -8.5px 0 0 -5px;
  border-radius: 5px 5px 6px 6px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 45%), var(--lamp-bead);
  box-shadow: 0 3px 6px -2px rgba(11, 30, 63, 0.45);
  transform: rotate(var(--bead-tilt, 0deg));
  transition: background-color 400ms ease, box-shadow 400ms ease;
}

:root[data-theme="dark"] .lamp__bead {
  box-shadow: 0 0 12px rgba(var(--lamp-glow), 0.55);
}

html:not(.js) .lamp__pull,
html:not(.js) .lamp__cord,
html:not(.js) .lamp__hint,
html:not(.js) .sb-theme,
html:not(.js) .tabs,
html:not(.js) .pager,
html:not(.js) [data-copy-email],
html:not(.js) [data-copy-message] {
  display: none;
}

.lamp__hint {
  position: absolute;
  top: 70px;
  left: 82px;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent-ink);
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-med) ease, transform var(--t-med) var(--ease);
}

.lamp__hint svg {
  width: 22px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.lamp.is-hinting .lamp__hint {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .lamp.is-hinting:not(.is-active) .lamp__bead {
    animation: bead-nudge 5s var(--ease) 1.2s infinite;
  }
}

@keyframes bead-nudge {
  0%, 84%, 100% { transform: translateY(0) rotate(0); }
  88% { transform: translateY(5px) rotate(4deg); }
  93% { transform: translateY(-2px) rotate(-3deg); }
  97% { transform: translateY(1px) rotate(1deg); }
}

/* The cone of light and floating dust, visible in the dark theme.
   --apex is the bulb's position inside this box, so the hot spot around
   the bulb is a full circle rather than a band cut off at the top. */
.lamp-glow {
  --apex: 120px;
  position: absolute;
  top: calc(51px - var(--apex));
  left: 50%;
  z-index: 0;
  width: 560px;
  /* Never taller than the screen, so the glow never adds a scrollbar. */
  height: min(760px, calc(100dvh + var(--apex) - 60px));
  margin-left: -280px;
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% var(--apex);
  transform: translateX(var(--lamp-shift, 0px)) rotate(var(--lamp-angle, 0deg));
  background:
    radial-gradient(circle at 50% var(--apex), rgba(var(--lamp-glow), 0.4) 0, rgba(var(--lamp-glow), 0.13) 48px, transparent 115px),
    conic-gradient(from 150deg at 50% var(--apex), transparent 0deg, rgba(var(--lamp-glow), 0.2) 11deg, rgba(var(--lamp-glow), 0.26) 30deg, rgba(var(--lamp-glow), 0.2) 49deg, transparent 60deg, transparent 360deg);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(var(--apex) + 30px), rgba(0, 0, 0, 0.55) 50%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(var(--apex) + 30px), rgba(0, 0, 0, 0.55) 50%, transparent 90%);
  transition: opacity 500ms ease;
}

:root[data-theme="dark"] .lamp-glow {
  opacity: 1;
}

.lamp-glow i {
  position: absolute;
  top: var(--apex);
  left: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 236, 200, 0.75);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="dark"] .lamp-glow i {
    animation: dust 9s linear infinite;
  }
}

.lamp-glow i:nth-child(1) { --x: -40px; --y: 120px; animation-delay: 0s; }
.lamp-glow i:nth-child(2) { --x: 30px; --y: 90px; animation-delay: -2s; width: 2px; height: 2px; }
.lamp-glow i:nth-child(3) { --x: -12px; --y: 200px; animation-delay: -4s; }
.lamp-glow i:nth-child(4) { --x: 62px; --y: 180px; animation-delay: -6s; width: 2px; height: 2px; }
.lamp-glow i:nth-child(5) { --x: -80px; --y: 240px; animation-delay: -7.5s; width: 2px; height: 2px; }
.lamp-glow i:nth-child(6) { --x: 12px; --y: 150px; animation-delay: -3.2s; }

@keyframes dust {
  0% { opacity: 0; transform: translate(var(--x), var(--y)); }
  20% { opacity: 0.8; }
  80% { opacity: 0.5; }
  100% { opacity: 0; transform: translate(calc(var(--x) + 18px), calc(var(--y) - 60px)); }
}

/* 07. Mobile header and dock --------------------------------------------- */

.m-header,
.m-nav {
  display: none;
}

.m-header {
  position: relative;
  align-items: center;
  min-height: 4rem;
  margin: 0 calc(var(--pad-x) * -1);
  padding: env(safe-area-inset-top, 0px) calc(var(--pad-x) + 5rem) 0 var(--pad-x);
  view-transition-name: mobile-header;
}

.m-header > *:not(.lamp-glow) {
  position: relative;
  z-index: 1;
}

/* Behind the page content, so the light falls on the "wall", not on text. */
.m-header .lamp-glow {
  top: calc(env(safe-area-inset-top, 0px) + 40px - var(--apex));
  left: auto;
  right: calc(var(--pad-x) + 1.4rem - 280px);
  z-index: -1;
  margin-left: 0;
  width: 560px;
  height: min(580px, calc(100dvh + var(--apex) - 120px));
}

.m-header .lamp__pull::before {
  /* A larger touch area than the scaled bead. */
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
}

.m-header .lamp {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  right: calc(var(--pad-x) - 0.5rem);
  transform-origin: 40px 0;
  transform: scale(0.78);
  z-index: 3;
}

.m-header .lamp__hint {
  left: auto;
  right: 32px;
  top: 70px;
  flex-direction: row-reverse;
}

.m-header .lamp__hint svg {
  transform: scaleX(-1);
}

.m-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 2.75rem;
}

.m-id__avatar {
  flex: none;
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--avatar-bg);
  box-shadow: 0 0 0 2px var(--surface-hi), 0 0 0 3px var(--line);
}

:root[data-theme="dark"] .m-id__avatar {
  box-shadow: 0 0 0 2px #1a1a1c, 0 0 0 3px rgba(var(--lamp-glow), 0.35), 0 0 22px -4px rgba(var(--lamp-glow), 0.5);
}

.m-id strong {
  display: block;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.m-id small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.m-nav {
  position: fixed;
  left: 50%;
  bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  width: min(calc(100% - 1.5rem), 27rem);
  padding: 0.375rem;
  border: 1px solid var(--line);
  border-radius: 1.375rem;
  background: color-mix(in srgb, var(--surface-hi) 86%, transparent);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  transform: translateX(-50%);
  view-transition-name: mobile-nav;
}

.m-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  min-height: 3.25rem;
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}

.m-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface-sunk);
}

.m-nav a[aria-current="page"] .icon {
  color: var(--accent-ink);
}

.m-nav a.is-contact {
  background: var(--accent);
  color: var(--on-accent);
}

.m-nav a.is-contact .icon {
  color: var(--on-accent);
}

.m-nav a.is-contact[aria-current="page"] {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--on-accent) 35%, transparent);
}

/* 08. Shared controls ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 2.875rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) ease, background-color var(--t-fast) ease, border-color var(--t-fast) ease, color var(--t-fast) ease;
}

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

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn .icon {
  width: 1.125rem;
  height: 1.125rem;
  transition: transform var(--t-fast) var(--ease);
}

.btn:hover .icon--go {
  transform: translate(2px, -2px);
}

.btn:hover .icon--next {
  transform: translateX(3px);
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 0 10px 22px -12px rgba(11, 30, 63, 0.7);
}

.btn--primary .icon {
  color: var(--btn-icon);
}

.btn--primary:hover {
  box-shadow: 0 14px 28px -12px rgba(11, 30, 63, 0.75);
}

:root[data-theme="dark"] .btn--primary {
  box-shadow: 0 10px 26px -10px rgba(var(--lamp-glow), 0.55);
}

.btn--ghost {
  border-color: var(--line);
  background: var(--surface-hi);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--ink) 30%, var(--line));
  box-shadow: var(--shadow-card);
}

.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--sm {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-hi);
  color: var(--ink);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) ease, background-color var(--t-fast) ease, color var(--t-fast) ease;
}

.icon-btn:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  color: var(--accent-ink);
}

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

.tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.6875rem;
  background: var(--tile-bg);
  color: var(--tile-ink);
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--accent) 80%, transparent);
}

.tile .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.tile--sm {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
}

.tile--sm .icon {
  width: 0.9375rem;
  height: 0.9375rem;
}

.tile--soft {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 1.75rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.pill--accent {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.stack li {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-height: 2rem;
  padding: 0 0.75rem 0 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tags li {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 750;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link .icon {
  width: 1rem;
  height: 1rem;
  transition: transform var(--t-fast) var(--ease);
}

.text-link:hover .icon {
  transform: translateX(2px);
}

.round-arrow {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-hi);
  color: var(--ink);
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) ease, color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.round-arrow .icon {
  width: 1rem;
  height: 1rem;
}

/* 09. Page head, panels and cards ---------------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex: none;
}

.page-head__text {
  display: grid;
  gap: clamp(0.375rem, 1vh, 0.625rem);
  min-width: 0;
}

.page-head h1 {
  font-size: clamp(2rem, min(3.3vw, 6.1vh), 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.page-head .lede {
  max-width: 40rem;
  color: var(--muted);
  font-size: clamp(0.9375rem, 1.9vh, 1.0625rem);
  line-height: 1.5;
}

.page-head__actions {
  display: flex;
  flex: none;
  gap: 0.625rem;
  padding-bottom: 0.25rem;
}

.panel {
  position: relative;
  flex: 1 1 0;
  padding: clamp(0.625rem, 1.5vh, 1rem);
  border: 1px solid var(--panel-edge);
  border-radius: var(--r-panel);
  background: var(--panel-bg);
  box-shadow: var(--shadow-panel), 0 0 0 1px var(--line-soft);
}

.card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  isolation: isolate;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) ease, border-color var(--t-fast) ease;
}

a.card:hover,
.card--hover:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}

a.card:hover .round-arrow,
.card--hover:hover .round-arrow {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
  transform: rotate(-45deg);
}

/* Pointer-following light on cards; enabled by script.js on fine pointers. */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--blue-soft) 70%, transparent), transparent 65%);
  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

:root[data-theme="dark"] .card::after {
  background: radial-gradient(20rem circle at var(--mx, 50%) var(--my, 50%), rgba(var(--lamp-glow), 0.09), transparent 65%);
}

.has-spotlight .card:hover::after {
  opacity: 1;
}

/* 10. Waiz Earn device composition --------------------------------------- */

/* Sized by its grid track: a min-height here would make Chrome resolve
   the container-query units below against a zero height. */
.devices {
  position: relative;
  display: block;
  container-type: size;
  cursor: pointer;
}

.devices__stage {
  position: absolute;
  inset: 0;
  width: min(100cqw, 100cqh * 1.58);
  aspect-ratio: 1.58;
  margin: auto;
}

.devices__halo {
  position: absolute;
  inset: 8% 6% 0 12%;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 50%, color-mix(in srgb, var(--blue-soft) 90%, transparent), transparent 68%);
  transition: transform 500ms var(--ease);
}

:root[data-theme="dark"] .devices__halo {
  background: radial-gradient(circle at 55% 50%, rgba(var(--lamp-glow), 0.12), transparent 65%);
}

.devices__browser {
  position: absolute;
  top: 3%;
  left: 0;
  width: 86%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--surface-hi);
  box-shadow: 0 24px 40px -22px rgba(11, 30, 63, 0.5);
  transform: rotate(-1.2deg);
  transition: transform 420ms var(--ease);
}

.devices__bar {
  display: flex;
  align-items: center;
  gap: 4%;
  height: 7%;
  min-height: 0.875rem;
  padding: 0 3%;
  background: var(--surface-sunk);
  border-bottom: 1px solid var(--line-soft);
}

.devices__browser .devices__bar {
  height: auto;
  aspect-ratio: 30;
}

.dots {
  display: inline-flex;
  gap: 0.25rem;
}

.dots i {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--line);
}

.dots i:first-child {
  background: #ff6b5a;
}

.dots i:nth-child(2) {
  background: #ffbf3f;
}

.dots i:nth-child(3) {
  background: #3dc76b;
}

.devices__url {
  flex: 1;
  max-width: 55%;
  height: 58%;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--surface-hi);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.devices__browser img {
  width: 100%;
  height: auto;
  aspect-ratio: 1901 / 872;
  object-fit: cover;
  background: #0c1024;
}

.devices__phone {
  position: absolute;
  right: 1%;
  bottom: 1%;
  width: 25%;
  padding: 1.1%;
  border-radius: 13% / 7.5%;
  background: #0b0f18;
  box-shadow: inset 0 0 0 1.5px #2b3242, 0 26px 40px -18px rgba(11, 30, 63, 0.6);
  transform: rotate(2.5deg);
  transition: transform 420ms var(--ease);
}

.devices__phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 483 / 766;
  object-fit: cover;
  border-radius: 10% / 6.2%;
  background: #0c1024;
}

.devices__badge {
  position: absolute;
  left: 4%;
  bottom: 4%;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-hi) 90%, transparent);
  box-shadow: var(--shadow-card);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.devices__badge .icon {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--accent-ink);
}

.devices:hover .devices__browser,
.feature:hover .devices__browser {
  transform: translate(-1.5%, -2.5%) rotate(-2deg);
}

.devices:hover .devices__phone,
.feature:hover .devices__phone {
  transform: translate(2%, -4%) rotate(4deg);
}

.devices:hover .devices__halo,
.feature:hover .devices__halo {
  transform: scale(1.06);
}

/* 11. Illustrations (decorative, not work samples) ----------------------- */

.ill {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ill .i-dark { fill: var(--ill-dark); }
.ill .i-dark-2 { fill: var(--ill-dark-2); }
.ill .i-sky { fill: var(--ill-sky); }
.ill .i-sky-2 { fill: var(--ill-sky-2); }
.ill .i-hill { fill: var(--ill-hill); }
.ill .i-accent { fill: var(--accent); }
.ill .i-peach { fill: var(--ill-peach); }
.ill .i-muted { fill: var(--ill-muted); }
.ill .i-light { fill: var(--ill-light); }
.ill .i-paper { fill: var(--surface-hi); stroke: var(--line); stroke-width: 1; }
.ill .i-panel { fill: var(--surface-hi); stroke: var(--line); stroke-width: 1; }
.ill .i-play-bg { fill: rgba(255, 255, 255, 0.94); }

.ill .i-playhead,
.ill .i-clap-top,
.ill .i-print-front,
.ill .i-knob,
.ill .i-spark,
.ill .i-phone-group {
  transform-box: fill-box;
}

.ill .i-clap-top {
  transform-origin: 0% 100%;
  transform: rotate(-16deg);
}

.ill .i-print-front {
  transform-origin: 50% 50%;
}

.ill .i-spark {
  transform-origin: 50% 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .ill .i-playhead { animation: playhead 7s var(--ease-in-out) infinite alternate paused; }
  .ill .i-clap-top { animation: clap 3.2s var(--ease) infinite paused; }
  .ill .i-spark { animation: twinkle 2.8s ease-in-out infinite paused; }
  .ill .i-knob { animation: knob 4s var(--ease-in-out) infinite alternate paused; }
  .ill .i-knob:nth-of-type(2) { animation-duration: 5s; }
  .ill .i-print-front { animation: print 5s var(--ease-in-out) infinite alternate paused; }

  .card:hover .ill *,
  .stage .ill *,
  .m-tile:hover .ill * {
    animation-play-state: running;
  }
}

@keyframes playhead {
  from { transform: translateX(-52px); }
  to { transform: translateX(64px); }
}

@keyframes clap {
  0%, 62% { transform: rotate(-16deg); }
  72% { transform: rotate(0deg); }
  80% { transform: rotate(-6deg); }
  88%, 100% { transform: rotate(-16deg); }
}

@keyframes twinkle {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.7; }
  50% { transform: scale(1.15) rotate(45deg); opacity: 1; }
}

@keyframes knob {
  from { transform: translateX(-8px); }
  to { transform: translateX(10px); }
}

@keyframes print {
  from { transform: rotate(0deg) translateY(0); }
  to { transform: rotate(-3deg) translateY(-3px); }
}

/* 12. Home ---------------------------------------------------------------- */

.home-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1.62fr 1fr;
  gap: var(--gap);
  height: 100%;
}

.feature {
  grid-column: 1 / 9;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(14rem, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "kicker devices"
    "copy devices"
    "foot foot";
  gap: clamp(0.5rem, 1.4vh, 0.875rem) clamp(1rem, 2vw, 1.5rem);
  padding: clamp(1rem, 2.2vh, 1.375rem) clamp(1rem, 1.6vw, 1.375rem);
}

.feature > .kicker {
  grid-area: kicker;
}

.feature__copy {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.375rem;
  min-height: 0;
}

.feature__copy h2 {
  font-size: clamp(1.75rem, min(2.6vw, 4.8vh), 2.75rem);
  letter-spacing: -0.045em;
}

.feature__label {
  color: var(--accent-ink);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.feature__desc {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: clamp(0.875rem, 1.9vh, 0.9375rem);
  line-height: 1.5;
}

.feature .devices {
  grid-area: devices;
}

.feature__foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem 1rem;
  padding-top: clamp(0.5rem, 1.2vh, 0.75rem);
  border-top: 1px solid var(--line-soft);
}

.feature__built {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.feature__built > span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 1499px) {
  .feature__built > span {
    display: none;
  }
}

.portrait-card {
  grid-column: 9 / 13;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.portrait-card__top {
  display: grid;
  gap: 0.5rem;
  padding: clamp(1rem, 2.2vh, 1.375rem) clamp(1rem, 1.6vw, 1.375rem) 0;
}

.portrait-card__top h2 {
  font-size: clamp(1.375rem, min(1.9vw, 3.5vh), 1.875rem);
  letter-spacing: -0.035em;
}

.portrait-card__top p {
  color: var(--muted);
  font-size: 0.875rem;
}

.portrait-card__media {
  position: relative;
  flex: 1;
  min-height: 9rem;
  margin-top: 0.5rem;
}

.portrait-card__media::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18%;
  width: 118%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--surface-hi) 0%, var(--blue-soft) 52%, color-mix(in srgb, var(--blue-soft) 50%, var(--surface)) 72%, transparent 73%);
  transform: translateX(-50%);
}

:root[data-theme="dark"] .portrait-card__media::before {
  background: radial-gradient(circle at 50% 30%, rgba(var(--lamp-glow), 0.34) 0%, rgba(var(--lamp-glow), 0.1) 45%, transparent 72%);
}

.portrait-card__media img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  transform: translateX(-50%);
  transition: transform 500ms var(--ease);
}

:root[data-theme="dark"] .portrait-card__media img {
  filter: drop-shadow(0 -6px 22px rgba(var(--lamp-glow), 0.25)) brightness(0.98);
}

.portrait-card:hover .portrait-card__media img {
  transform: translateX(-50%) scale(1.025);
}

.portrait-card__bar {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.625rem 0.625rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface-hi) 86%, transparent);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.portrait-card__bar strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 780;
  line-height: 1.25;
}

.portrait-card__bar small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.cat-row {
  grid-column: 1 / 9;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  min-height: 0;
}

.cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 9.5rem;
  padding: clamp(0.75rem, 1.8vh, 1rem);
  overflow: hidden;
}

.cat-card__head {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.cat-card__head h3 {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cat-card__head p {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.cat-card__art {
  position: relative;
  flex: 1;
  min-height: 3.5rem;
  margin: 0 -0.25rem -0.25rem;
}

.cat-card__art .ill {
  position: absolute;
  inset: 0;
}

.cat-card .round-arrow {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
}

/* 13. Works --------------------------------------------------------------- */

.works-grid {
  display: grid;
  grid-template-columns: clamp(15rem, 22vw, 20rem) minmax(0, 1fr);
  gap: var(--gap);
  height: 100%;
}

.selector {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
}

.selector__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.5rem 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tabs {
  display: grid;
  gap: 0.5rem;
}

.tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: clamp(3.5rem, 8.2vh, 4.5rem);
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--muted);
  text-align: left;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) var(--ease), color var(--t-fast) ease;
}

.tab:hover {
  background: var(--surface-hi);
  color: var(--ink);
  transform: translateX(2px);
}

.tab .tile {
  background: var(--surface-sunk);
  color: var(--muted);
  box-shadow: none;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}

.tab__text {
  display: grid;
  min-width: 0;
}

.tab__text strong {
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.25;
}

.tab__text small {
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab__num {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tab[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: var(--surface-hi);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.tab[aria-selected="true"] .tile {
  background: var(--tile-bg);
  color: var(--tile-ink);
}

.tab[aria-selected="true"] .tab__num {
  color: var(--accent-ink);
}

.selector__note {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--info-bg);
  color: var(--info-ink);
}

.selector__note p {
  color: var(--info-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.selector__note strong {
  color: var(--info-ink);
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.1;
}

.selector__note .text-link {
  color: #ffb070;
}

:root[data-theme="dark"] .selector__note .text-link {
  color: var(--accent-ink);
}

.stages {
  position: relative;
  display: grid;
  min-height: 0;
}

.stage {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: clamp(0.625rem, 1.6vh, 1rem);
  min-height: 0;
  padding: clamp(0.875rem, 2vh, 1.25rem) clamp(1rem, 1.6vw, 1.375rem);
}

.stage:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-card);
}

@media (prefers-reduced-motion: no-preference) {
  .stage.is-entering {
    animation: stage-in 320ms var(--ease) both;
  }
}

@keyframes stage-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
}

.stage__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stage__visual {
  position: relative;
  flex: 1;
  min-height: 9rem;
  overflow: hidden;
  border-radius: calc(var(--r-card) - 0.25rem);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(160deg, var(--surface-sunk), color-mix(in srgb, var(--blue-soft) 45%, var(--surface)));
}

:root[data-theme="dark"] .stage__visual {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 240, 210, 0.07) 1px, transparent 0) 0 0 / 18px 18px,
    radial-gradient(ellipse at 30% 0%, rgba(var(--lamp-glow), 0.1), transparent 60%),
    var(--surface-sunk);
}

.stage__visual .devices {
  position: absolute;
  inset: 6% 6% 4%;
  min-height: 0;
}

.stage__art {
  position: absolute;
  inset: 10% 12%;
}

.stage__caption {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
}

.stage__info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem 1.5rem;
}

.stage__info h2 {
  font-size: clamp(1.5rem, min(2.3vw, 4.2vh), 2.375rem);
  letter-spacing: -0.04em;
}

.stage__info p {
  max-width: 36rem;
  margin-top: 0.375rem;
  color: var(--muted);
  font-size: clamp(0.875rem, 1.9vh, 0.9375rem);
  line-height: 1.5;
}

.stage__info .tags {
  margin-top: 0.625rem;
}

.stage__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tool-roles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.tool-roles li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface-hi);
}

.tool-roles .logo {
  width: 1.25rem;
  height: 1.25rem;
}

.tool-roles strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 750;
  line-height: 1.25;
}

.tool-roles small {
  display: block;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.25;
}

.media-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0b0f18;
}

.media-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-cover__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border-radius: 999px;
  background: rgba(252, 252, 248, 0.92);
  color: #0b1e3f;
  font-weight: 750;
  box-shadow: var(--shadow-float);
}

.pager {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pager__pos {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

.pager__pos b {
  color: var(--ink);
}

.pager__dots {
  display: flex;
  gap: 0.375rem;
}

.pager__dots i {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--line);
  transition: width var(--t-med) var(--ease), background-color var(--t-med) ease;
}

.pager__dots i.is-on {
  width: 1.375rem;
  background: var(--accent);
}

/* 14. About --------------------------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: var(--gap);
  height: 100%;
}

.about-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, var(--surface-hi) 0%, color-mix(in srgb, var(--blue-soft) 80%, var(--surface)) 55%, var(--blue-soft) 100%);
}

:root[data-theme="dark"] .about-photo {
  background:
    radial-gradient(ellipse 70% 55% at 50% 10%, rgba(var(--lamp-glow), 0.26), transparent 70%),
    linear-gradient(180deg, #1b1c22, #11151f);
}

.about-photo__rings {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 118%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.about-photo__rings::before,
.about-photo__rings::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 50%;
}

.about-photo__rings::after {
  inset: 26%;
  border-style: dashed;
}

.about-photo img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: auto;
  height: 92%;
  max-width: none;
  transform: translateX(-50%);
}

:root[data-theme="dark"] .about-photo img {
  filter: drop-shadow(0 -8px 28px rgba(var(--lamp-glow), 0.28));
}

.about-photo__top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem;
}

.about-photo figcaption {
  position: absolute;
  left: 0.875rem;
  right: 0.875rem;
  bottom: 0.875rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  background: color-mix(in srgb, var(--surface-hi) 86%, transparent);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.about-photo figcaption h2 {
  font-size: clamp(1.125rem, min(1.6vw, 3vh), 1.5rem);
  letter-spacing: -0.03em;
}

.about-photo figcaption p {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.about-side {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--gap);
  min-height: 0;
}

.bio {
  display: grid;
  gap: clamp(0.5rem, 1.4vh, 0.875rem);
  padding: clamp(1rem, 2.4vh, 1.5rem) clamp(1rem, 1.8vw, 1.5rem);
}

.bio h2 {
  font-size: clamp(1.25rem, min(1.8vw, 3.3vh), 1.625rem);
  letter-spacing: -0.03em;
}

.bio p {
  color: var(--ink-soft);
  font-size: clamp(0.9375rem, 2vh, 1.0625rem);
  line-height: 1.6;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.375rem 0.75rem 0.375rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 650;
}

.facts .icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent-ink);
}

.skills {
  display: flex;
  flex-direction: column;
  padding: clamp(0.875rem, 2vh, 1.25rem) clamp(1rem, 1.8vw, 1.5rem);
}

.skills__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.skills__head h2 {
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.skills ul {
  display: grid;
  flex: 1;
  grid-auto-rows: 1fr;
}

.skill {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.25rem;
  height: 100%;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--line-soft);
  transition: padding var(--t-fast) var(--ease), background-color var(--t-fast) ease;
}

.skills li:last-child .skill {
  border-bottom: 0;
}

.skill:hover {
  padding-left: 0.625rem;
}

.skill__text {
  display: grid;
  min-width: 0;
}

.skill__text strong {
  font-size: 0.9375rem;
  font-weight: 750;
  line-height: 1.3;
}

.skill__text small {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 550;
}

.skill__num {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.skill .round-arrow {
  width: 2rem;
  height: 2rem;
}

.skill:hover .round-arrow {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
  transform: rotate(-45deg);
}

/* 15. Contact ------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: var(--gap);
  height: 100%;
}

.contact-tabs {
  display: none;
}

.info {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.625rem, 1.6vh, 1rem);
  min-height: 0;
  padding: clamp(1rem, 2.4vh, 1.5rem);
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--r-card);
  background: var(--info-bg);
  color: var(--info-ink);
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}

.info::before {
  content: "";
  position: absolute;
  right: -30%;
  top: -40%;
  z-index: -1;
  width: 90%;
  aspect-ratio: 1;
  border: 1px solid var(--info-line);
  border-radius: 50%;
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.015), 0 0 0 80px rgba(255, 255, 255, 0.012);
}

:root[data-theme="dark"] .info {
  border-color: var(--line);
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(var(--lamp-glow), 0.12), transparent 70%),
    var(--info-bg);
}

.info > h2 {
  color: var(--info-ink);
  font-size: clamp(1.25rem, min(1.8vw, 3.3vh), 1.625rem);
  letter-spacing: -0.03em;
}

.info .eyebrow {
  color: #ffb070;
}

:root[data-theme="dark"] .info .eyebrow {
  color: var(--accent-ink);
}

.direct {
  display: grid;
  gap: 0.5rem;
}

.direct__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.5rem;
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border: 1px solid var(--info-line);
  border-radius: 1rem;
  background: var(--info-surface);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.direct__row:hover {
  border-color: rgba(255, 176, 112, 0.45);
}

.direct__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
}

.direct__icon .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.direct__link {
  display: grid;
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  align-content: center;
}

.direct__link small {
  color: var(--info-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.direct__link strong {
  overflow: hidden;
  color: var(--info-ink);
  font-size: 0.9375rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.direct__link:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  flex: none;
  min-height: 2.5rem;
  padding: 0 0.875rem;
  border: 1px solid var(--info-line);
  border-radius: 999px;
  background: transparent;
  color: var(--info-ink);
  font-size: 0.8125rem;
  font-weight: 700;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease;
}

.mini-btn:hover {
  background: var(--info-surface);
  border-color: rgba(255, 176, 112, 0.5);
}

.mini-btn .icon {
  width: 1rem;
  height: 1rem;
}

.mini-btn.is-done {
  border-color: rgba(61, 199, 107, 0.6);
  color: #7ee2a0;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem 0 0.875rem;
  border: 1px solid var(--info-line);
  border-radius: 999px;
  color: var(--info-ink);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, transform var(--t-fast) var(--ease);
}

.socials a:hover {
  transform: translateY(-2px);
  background: var(--info-surface);
  border-color: rgba(255, 176, 112, 0.5);
}

.socials .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.faq {
  display: grid;
  gap: 0.375rem;
  margin-top: auto;
}

.faq__title {
  color: var(--info-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.faq details {
  border-bottom: 1px solid var(--info-line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  color: var(--info-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

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

.faq summary .icon {
  width: 1rem;
  height: 1rem;
  color: #ffb070;
  transition: transform var(--t-med) var(--ease);
}

:root[data-theme="dark"] .faq summary .icon {
  color: var(--accent-ink);
}

.faq details[open] summary .icon {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 0 0.75rem;
  color: var(--info-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.faq a {
  color: var(--info-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: clamp(0.625rem, 1.6vh, 0.875rem);
  min-height: 0;
  padding: clamp(1rem, 2.4vh, 1.5rem) clamp(1rem, 1.8vw, 1.5rem);
}

.form__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.form__head h2 {
  font-size: clamp(1.25rem, min(1.8vw, 3.3vh), 1.625rem);
  letter-spacing: -0.03em;
}

.form__head p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

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

.field {
  display: grid;
  gap: 0.375rem;
  min-width: 0;
}

.field--grow {
  flex: 1;
  grid-template-rows: auto 1fr;
  min-height: 0;
}

.field label {
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 750;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 2.875rem;
  padding: 0.75rem 0.9375rem;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  background: var(--surface-hi);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

.field textarea {
  min-height: 6.5rem;
  height: 100%;
  resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}

.field input:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--ink) 25%, var(--line));
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--focus) 18%, transparent);
}

.field [aria-invalid="true"] {
  border-color: #d64545;
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.14);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.form__note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.form__note .icon {
  width: 1rem;
  height: 1rem;
  color: var(--accent-ink);
}

.status {
  min-height: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 650;
}

.status:empty {
  min-height: 0;
}

.time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-hi);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 650;
  white-space: nowrap;
}

.time-pill strong {
  color: var(--ink);
}

/* 16. Project viewer ------------------------------------------------------ */

.viewer {
  width: min(78rem, calc(100vw - 2rem));
  height: min(54rem, calc(100dvh - 2rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.5);
}

.viewer::backdrop {
  background: rgba(8, 13, 24, 0.58);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.viewer[open] {
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  .viewer[open] {
    animation: viewer-in 320ms var(--ease);
  }

  .viewer[open]::backdrop {
    animation: fade-in 260ms ease;
  }
}

@keyframes viewer-in {
  from { opacity: 0; transform: translateY(16px) scale(0.975); }
}

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

.viewer__head {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0.875rem 0.875rem 1.25rem;
  border-bottom: 1px solid var(--line-soft);
}

.viewer__title {
  min-width: 0;
}

.viewer__title h2 {
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.viewer__title p {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.viewer__head .stack {
  margin-left: auto;
}

.viewer__head .stack li {
  min-height: 1.875rem;
  font-size: 0.75rem;
}

.viewer__close {
  margin-left: 0.25rem;
}

.viewer__head .stack[hidden] + .viewer__close {
  margin-left: auto;
}

.viewer__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1.25rem;
}

.seg {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-sunk);
}

.seg button {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  min-height: 2.375rem;
  padding: 0 0.9375rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}

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

.seg button[aria-pressed="true"] {
  background: var(--surface-hi);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(11, 30, 63, 0.08), 0 4px 12px -6px rgba(11, 30, 63, 0.3);
}

.seg button[aria-pressed="true"] .icon {
  color: var(--accent-ink);
}

.seg button .icon {
  width: 1rem;
  height: 1rem;
}

.seg button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.seg__live-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.2);
}

.viewer__size {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.viewer__stage {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  min-height: 0;
  margin: 0 0.75rem;
  padding: clamp(0.75rem, 2vh, 1.5rem);
  overflow: hidden;
  border-radius: calc(var(--r-card) - 0.125rem);
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 0) 0 0 / 20px 20px,
    linear-gradient(160deg, var(--surface-sunk), color-mix(in srgb, var(--blue-soft) 40%, var(--surface-sunk)));
}

:root[data-theme="dark"] .viewer__stage {
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 240, 210, 0.06) 1px, transparent 0) 0 0 / 20px 20px,
    var(--surface-sunk);
}

.viewer__fit {
  position: relative;
  width: 1px;
  height: 1px;
}

.device {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  transform: scale(var(--scale, 0.5));
}

.device__chrome {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 46px;
  padding: 0 18px;
  background: #eef0f3;
  border-bottom: 1px solid #dde1e6;
}

.device__chrome .dots {
  gap: 8px;
}

.device__chrome .dots i {
  width: 12px;
  height: 12px;
}

.device__url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  max-width: 560px;
  height: 30px;
  margin: 0 auto;
  border-radius: 9px;
  background: #ffffff;
  color: #5b6780;
  font: 600 14px/1 var(--font);
}

.device__url svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.device__screen {
  position: relative;
  width: calc(var(--w, 1440) * 1px);
  height: calc(var(--h, 900) * 1px);
  overflow: hidden;
  background: #0b0f1a;
}

.device__frame {
  position: absolute;
  inset: 0;
}

.device__screen img,
.device__screen iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  object-position: top;
}

.device__screen iframe {
  background: #ffffff;
}

.device--desktop {
  overflow: hidden;
  border-radius: 16px;
  background: #eef0f3;
  box-shadow: 0 0 0 1px rgba(11, 30, 63, 0.12), 0 40px 80px -30px rgba(11, 30, 63, 0.45);
}

.device--mobile {
  padding: 16px;
  border-radius: 64px;
  background: #0c1019;
  box-shadow: inset 0 0 0 2px #2c3345, inset 0 0 0 6px #10141e, 0 0 0 1px #000, 0 40px 80px -28px rgba(0, 0, 0, 0.55);
}

.device--mobile .device__chrome {
  display: none;
}

.device--mobile .device__screen {
  border-radius: 48px;
}

.device__camera {
  display: none;
}

.device--mobile .device__camera {
  position: absolute;
  top: 5px;
  left: 50%;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1f2636;
  transform: translateX(-50%);
}

.device__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: linear-gradient(110deg, #f1f3f6 30%, #fafbfc 50%, #f1f3f6 70%) 0 0 / 300% 100%;
  color: #5b6780;
  font: 700 22px/1.3 var(--font);
}

@media (prefers-reduced-motion: no-preference) {
  .device__loading {
    animation: shimmer 1.6s linear infinite;
  }

  .spinner {
    animation: spin 900ms linear infinite;
  }
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #d5e2ff;
  border-top-color: #ff7a16;
  border-radius: 50%;
}

@keyframes shimmer {
  to { background-position: -150% 0; }
}

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

.viewer__empty {
  display: grid;
  justify-items: center;
  gap: 0.625rem;
  max-width: 26rem;
  padding: 1.5rem;
  text-align: center;
}

.viewer__empty .tile {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
}

.viewer__empty h3 {
  font-size: 1.25rem;
}

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

.viewer__empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.375rem;
}

.viewer__media {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: clamp(0.75rem, 2vh, 1.25rem);
}

.viewer__media video,
.viewer__media .gallery__main {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 0.75rem;
  background: #06080d;
}

.gallery__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.gallery__thumbs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  max-width: 60%;
  padding: 0.25rem;
}

.gallery__thumbs button {
  flex: none;
  width: 3.5rem;
  height: 2.5rem;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: var(--surface-sunk);
}

.gallery__thumbs button[aria-current="true"] {
  border-color: var(--accent);
}

.gallery__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.25rem 0.875rem;
}

.viewer__status {
  min-width: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
}

.viewer__status button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-ink);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.viewer__actions {
  display: flex;
  flex: none;
  gap: 0.5rem;
}

body.has-dialog {
  overflow: hidden;
}

/* 17. Motion -------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: reveal 620ms var(--ease) backwards;
    animation-delay: calc(var(--d, 0) * 70ms + 40ms);
  }

  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 260ms;
  }
}

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

/* The theme reveal grows from the lamp; named layers are paused meanwhile. */
.theme-vt .sidebar,
.theme-vt .m-nav,
.theme-vt .m-header {
  view-transition-name: none;
}

.theme-vt::view-transition-old(root),
.theme-vt::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

.theme-vt::view-transition-new(root) {
  animation: theme-reveal 760ms cubic-bezier(0.3, 0.7, 0.2, 1) both;
}

@keyframes theme-reveal {
  from {
    clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%));
  }
  to {
    clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0%));
  }
}

/* 18. Desktop height tuning ---------------------------------------------- */

@media (min-width: 64rem) and (max-height: 820px) {
  .feature__desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .sb-theme [data-theme-hint] {
    display: none;
  }
}

@media (min-width: 64rem) and (min-height: 1000px) {
  .cat-card__head h3 {
    font-size: 1.125rem;
  }

  .stack li {
    min-height: 2.25rem;
    font-size: 0.875rem;
  }
}

/* Short laptop screens: a tighter sidebar keeps navigation in view. */
@media (min-width: 64rem) and (max-height: 700px) {
  .sb-ceiling {
    height: 5.5rem;
  }

  .sb-avatar {
    width: 4.75rem;
  }

  .sb-name {
    margin-top: 0.625rem;
  }

  .sb-meta {
    margin-top: 0.375rem;
  }

  .sb-social {
    margin-top: 0.625rem;
  }

  .sb-divider {
    margin: 0.75rem 0.25rem;
  }

  .sb-link {
    min-height: 2.5rem;
  }

  .sb-theme {
    display: none;
  }
}

/* Desktop screens that are too short for the one-screen layout scroll. */
@media (min-width: 64rem) and (max-height: 639px) {
  .panel {
    flex: 1 0 auto;
  }

  .home-grid {
    grid-template-rows: 20rem 12rem;
  }

  .works-grid,
  .about-grid,
  .contact-grid {
    min-height: 30rem;
  }
}

/* 19. Tablet and phone ---------------------------------------------------- */

@media (max-width: 63.99rem) {
  :root {
    --pad-x: clamp(0.875rem, 4vw, 1.5rem);
    --gap: 0.625rem;
    --gap-lg: 0.75rem;
  }

  .shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .main {
    gap: var(--gap-lg);
    padding: 0 var(--pad-x) calc(var(--dock-h) + 1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .m-header {
    display: flex;
  }

  .m-nav {
    display: grid;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-head h1 {
    font-size: clamp(1.75rem, min(8.2vw, 4.6vh), 2.75rem);
    letter-spacing: -0.04em;
  }

  .page-head .lede {
    font-size: 0.9375rem;
  }

  .page-head__actions {
    display: none;
  }

  .panel {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  /* Home */
  .home-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
  }

  .feature {
    flex: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(6.25rem, 1fr) auto;
    grid-template-areas:
      "kicker"
      "copy"
      "devices"
      "foot";
    gap: 0.625rem;
    min-height: 0;
    padding: 0.875rem;
  }

  .feature__copy h2 {
    font-size: 1.625rem;
  }

  .feature__desc {
    display: none;
  }

  .feature__foot {
    gap: 0.625rem;
  }

  .feature__built {
    width: 100%;
  }

  .feature__built > span {
    display: none;
  }

  /* On phones the tools read as a light logo row instead of pills. */
  .feature__built .stack {
    gap: 0.25rem 0.875rem;
  }

  .feature__built .stack li {
    min-height: 1.5rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.75rem;
    gap: 0.3125rem;
  }

  .feature__built .stack .logo {
    width: 0.8125rem;
    height: 0.8125rem;
  }

  .feature__foot .btn {
    width: 100%;
  }

  .portrait-card,
  .cat-row {
    display: none;
  }

  .m-tiles {
    display: grid;
  }

  /* Works */
  .works-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
  }

  .selector__head,
  .selector__note,
  .tab__text small,
  .tab__num {
    display: none;
  }

  .tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.375rem;
  }

  .tab {
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-height: 3.75rem;
    padding: 0.375rem 0.25rem;
    border-radius: 0.875rem;
    text-align: center;
  }

  .tab:hover {
    transform: none;
  }

  .tab .tile {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
  }

  .tab .tile .icon {
    width: 0.9375rem;
    height: 0.9375rem;
  }

  .tab__text strong {
    font-size: 0.6875rem;
    line-height: 1.2;
  }

  .stages {
    flex: 1;
  }

  .stage {
    padding: 0.75rem;
    gap: 0.625rem;
  }

  .stage__top .pill:first-child {
    display: none;
  }

  .stage__visual {
    min-height: 8.5rem;
  }

  .stage__info {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.625rem;
  }

  .stage__info h2 {
    font-size: 1.5rem;
  }

  .stage__info p {
    margin-top: 0.25rem;
    font-size: 0.875rem;
  }

  .stage__info .tags {
    display: none;
  }

  .stage__actions {
    justify-content: stretch;
  }

  .stage__actions .btn {
    flex: 1;
  }

  /* "Open website" stays one tap away inside the preview. */
  .stage__actions .btn--ghost[data-waiz-link] {
    display: none;
  }

  .tool-roles {
    display: none;
  }

  .pager {
    display: flex;
  }

  /* About */
  .about-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
  }

  .about-photo {
    flex-direction: row;
    align-items: center;
    min-height: 0;
    padding: 0.625rem;
    gap: 0.875rem;
  }

  .about-photo__rings,
  .about-photo__top {
    display: none;
  }

  .about-photo__frame {
    position: relative;
    flex: none;
    width: 4rem;
    height: 4rem;
    overflow: hidden;
    border-radius: 1rem;
    background: var(--avatar-bg);
  }

  .about-photo figcaption h2 {
    font-size: 1.0625rem;
  }

  .about-photo img {
    height: 118%;
    bottom: -4%;
  }

  .about-photo figcaption {
    position: static;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .about-photo figcaption .pill {
    display: none;
  }

  .about-side {
    display: flex;
    flex-direction: column;
    flex: 1;
  }

  .bio {
    padding: 0.75rem 0.9375rem;
    gap: 0.5rem;
  }

  .bio h2 {
    display: none;
  }

  .bio p {
    font-size: 0.9375rem;
    line-height: 1.5;
  }

  .facts {
    display: none;
  }

  .skills {
    flex: 1;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .skills::after {
    display: none;
  }

  .skills__head {
    display: none;
  }

  .skills ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.5rem;
  }

  .skill {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3125rem;
    min-height: 0;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }

  .skills li:last-child .skill {
    border-bottom: 1px solid var(--line);
  }

  .skill:hover {
    padding-left: 0.75rem;
  }

  .skill__num,
  .skill .round-arrow {
    display: none;
  }

  .skill__text small {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .skill .tile {
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 0.5625rem;
  }

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

  /* Contact */
  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
  }

  .info {
    display: contents;
  }

  .info::before,
  .info > .eyebrow,
  .info > h2,
  .direct,
  .socials {
    display: none;
  }

  .quick {
    display: grid;
  }

  .js .contact-tabs {
    display: flex;
  }

  .js .contact-tabs .seg {
    width: 100%;
  }

  .js .contact-tabs .seg button {
    flex: 1;
    justify-content: center;
  }

  .faq {
    margin: 0;
    padding: 0.5rem 1rem 0.75rem;
    border-radius: var(--r-card);
    background: var(--info-bg);
  }

  .faq__title {
    padding-top: 0.5rem;
  }

  .js .contact-grid[data-view="message"] .faq,
  .js .contact-grid[data-view="faq"] .form {
    display: none;
  }

  .form {
    flex: 1;
    gap: 0.625rem;
    padding: 0.875rem;
  }

  /* The Message / Questions switch already names this panel. */
  .js .form__head {
    display: none;
  }

  .form__head h2 {
    font-size: 1.125rem;
  }

  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .field {
    gap: 0.25rem;
  }

  .field input {
    padding-inline: 0.75rem;
  }

  .field textarea {
    min-height: 4.75rem;
  }

  .form__actions .btn--primary {
    flex: 1;
  }

  .form__note {
    font-size: 0.75rem;
  }

  /* Viewer */
  .viewer {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .viewer__head {
    padding: calc(0.625rem + env(safe-area-inset-top, 0px)) 0.75rem 0.625rem 1rem;
  }

  .viewer__head .tile,
  .viewer__head .stack {
    display: none;
  }

  .viewer__close {
    margin-left: auto;
  }

  .viewer__bar {
    padding: 0.625rem 0.75rem;
  }

  .viewer__bar .seg {
    flex: 1;
  }

  .viewer__bar .seg button {
    flex: 1;
    justify-content: center;
    padding: 0 0.5rem;
    font-size: 0.8125rem;
  }

  .viewer__size {
    display: none;
  }

  .viewer__stage {
    margin: 0 0.5rem;
  }

  .viewer__foot {
    flex-direction: column;
    align-items: stretch;
    padding: 0.625rem 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .viewer__actions .btn {
    flex: 1;
  }
}

/* Shorter phones drop the About greeting line; the bio says the same. */
@media (max-width: 63.99rem) and (max-height: 819px) {
  .page-about .page-head .lede,
  .page-contact .page-head .lede {
    display: none;
  }
}

/* Mobile-only pieces that stay hidden on desktop. */
.m-tiles,
.quick {
  display: none;
}

@media (max-width: 63.99rem) {
  .m-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .quick {
    display: grid;
  }
}

.m-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-height: 5rem;
  padding: 0.5rem 0.25rem;
  text-align: center;
}

.m-tile__art {
  position: relative;
  width: 100%;
  height: 2.5rem;
}

.m-tile__art .ill {
  position: absolute;
  inset: 0;
}

.m-tile__photo {
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--avatar-bg);
}

.m-tile span {
  font-size: 0.6875rem;
  font-weight: 750;
  line-height: 1.2;
}

.quick {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.375rem;
}

.quick a,
.quick button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  min-height: 3.875rem;
  padding: 0.5rem 0.125rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 750;
  box-shadow: var(--shadow-card);
}

.quick .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.quick a:first-child {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

/* Tablets have room for two columns. */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "kicker devices"
      "copy devices"
      "foot foot";
  }

  .feature__desc {
    display: block;
  }

  .feature__foot .btn {
    width: auto;
  }

  .feature__built {
    width: auto;
  }

  .m-tile {
    min-height: 6.5rem;
  }

  .m-tile__art {
    height: 3.5rem;
  }

  .skills ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

/* Short phone screens and landscape phones scroll instead of clipping. */
@media (max-width: 63.99rem) and (max-height: 700px), (max-width: 63.99rem) and (orientation: landscape) {
  .feature {
    flex: none;
  }

  .feature .devices {
    height: 11rem;
    flex: none;
  }

  .stages {
    flex: none;
  }

  .stage__visual {
    height: 11rem;
    flex: none;
  }
}

/* 20. Reduced motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .ambient ellipse,
  .ill *,
  .lamp-glow i {
    animation: none !important;
  }
}
