:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #141414;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --line: #e4e4e7;
  --select: #0d99ff;
  --accent: #c7b0ff;
  --accent-ink: #141414;
  --glass: rgb(255 255 255 / 0.55);
  --glass-hover: rgb(255 255 255 / 0.85);
  --glass-edge: 0 0 0 1px rgb(24 24 27 / 0.09), 0 1px 2px rgb(24 24 27 / 0.06), 0 4px 12px -4px rgb(24 24 27 / 0.1);
  --lens: #fff;
  --lens-edge: 0 0 0 1px rgb(24 24 27 / 0.1), 0 1px 2px rgb(24 24 27 / 0.08), 0 4px 10px -4px rgb(24 24 27 / 0.18);
  --chip: #f4f4f5;
  --card: #f6f6f7;
  --body: #3f3f46;
  color-scheme: light;

  --sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;

  --page: 1040px;
  --text: 600px;
  --gutter: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dark mode: neutral zinc, same lilac. Project mockups stay light; they're screens. */
:root[data-theme='dark'] {
  --bg: #0b0b0c;
  --surface: #161618;
  --ink: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #8b8b94;
  --line: #27272a;
  --body: #d4d4d8;
  --chip: #1f1f23;
  --card: #141416;
  --glass: rgb(39 39 42 / 0.55);
  --glass-hover: rgb(63 63 70 / 0.7);
  --glass-edge: 0 0 0 1px rgb(255 255 255 / 0.08), 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 12px -4px rgb(0 0 0 / 0.5);
  --lens: #3a3a40;
  --lens-edge: 0 0 0 1px rgb(255 255 255 / 0.1), 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 10px -4px rgb(0 0 0 / 0.5);
  color-scheme: dark;
}

:root[data-theme='dark'] .tone-sage { background: #15191a; }
:root[data-theme='dark'] .tone-mist { background: #14181d; }
:root[data-theme='dark'] .tone-lilac { background: #1a1728; }
:root[data-theme='dark'] .tone-neutral { background: #161618; }
:root[data-theme='dark'] .tone-blush { background: #2a1817; }
/* Dark phone bezels would vanish on a dark tile; give them a faint rim */
:root[data-theme='dark'] .phone {
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.12), 0 30px 60px -25px rgb(0 0 0 / 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  /* 100vw includes the scrollbar on some systems; never let full-bleed strips cause sideways scroll */
  overflow-x: clip;
  transition: background 0.3s, color 0.3s;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  text-wrap: balance;
}

p {
  margin: 0;
}

/* No widows: balance headings, keep the last line of running text from being a single word */
p,
li,
blockquote,
figcaption,
.card-summary,
.exp-company {
  text-wrap: pretty;
}

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

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

::selection {
  background: color-mix(in srgb, var(--select) 22%, transparent);
}

.muted {
  color: var(--ink-3);
}

.label {
  font: 500 15px/1.2 var(--sans);
  color: var(--ink);
}

.label.muted {
  color: var(--ink-3);
}

/* ——— Nav ——— */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Frosted glass once the page scrolls under it */
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: color-mix(in srgb, var(--ink) 7%, transparent);
}

.nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-links {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-edge);
}

/* The lens: a white pill that glides to whichever section is active */
.nav-lens {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: 999px;
  background: var(--lens);
  box-shadow: var(--lens-edge);
  opacity: 0;
  transition:
    transform 0.45s var(--ease),
    width 0.45s var(--ease),
    opacity 0.2s;
}

.nav-lens.is-on {
  opacity: 1;
}

.nav-links a {
  position: relative;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s, transform 0.12s var(--ease);
}

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

.nav-links a.is-active {
  color: var(--ink);
  background: none;
}

.nav-links a:active {
  transform: scale(0.96);
}

.nav-links a:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 2px;
}

.nav-links a.nav-avatar {
  padding: 0;
  margin-right: 4px;
  line-height: 0;
}

.nav-links a.nav-avatar:hover {
  background: none;
}

.nav-avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: var(--glass-edge);
  cursor: pointer;
  transition: background 0.2s, transform 0.12s var(--ease);
}

.theme-toggle:hover {
  background: var(--glass-hover);
}

.theme-toggle:active {
  transform: scale(0.94);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 2px;
}

/* ——— Page ——— */

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding-top: 120px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

/* ——— Hero ——— */

.hero {
  position: relative;
  padding-top: clamp(64px, 12vh, 120px);
}

.hero > * {
  max-width: var(--text);
}

/* Name block: looks plain, becomes a Figma selection on hover */
.frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 8px 16px 8px 8px;
  margin: 0 0 28px -8px;
  outline: 1px solid transparent;
  transition: outline-color 0.15s;
}

.frame-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.frame-name {
  font: 600 26px/1.15 var(--display);
  letter-spacing: -0.02em;
}

.frame-role {
  margin-top: 2px;
  font-size: 17px;
  color: var(--ink-3);
}

.handle {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #fff;
  border: 1px solid var(--select);
}

.handle.tl { top: -4px; left: -4px; }
.handle.tr { top: -4px; right: -4px; }
.handle.bl { bottom: -4px; left: -4px; }
.handle.br { bottom: -4px; right: -4px; }

.frame-size {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--select);
  color: #fff;
  font: 500 11px/1.4 var(--mono);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.handle,
.frame-size,
.mp-cursor {
  opacity: 0;
  pointer-events: none;
}

.mp-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.mp-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0 14px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 12px/1 var(--sans);
  white-space: nowrap;
}

.mp-label img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.mp-cursor svg {
  display: block;
}

@media (hover: hover) and (pointer: fine) {
  .frame.is-hovering {
    cursor: none;
    outline-color: var(--select);
  }
  .frame.is-hovering .handle,
  .frame.is-hovering .frame-size,
  .frame.is-hovering .mp-cursor {
    opacity: 1;
  }
}

.hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-lede + .hero-lede {
  margin-top: 14px;
}

.hero-lede a {
  color: var(--ink);
  text-decoration: underline var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}

.hero-lede a:hover {
  text-decoration-color: var(--ink);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.hero-divider {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: color-mix(in srgb, var(--ink) 18%, transparent);
}

/* Round icon buttons for socials; same glass treatment as the theme toggle */
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--ink-2);
  background: var(--glass);
  box-shadow: var(--glass-edge);
  transition: color 0.2s, background 0.2s, transform 0.12s var(--ease);
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--glass-hover);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 500;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.btn:hover {
  border-color: var(--ink-3);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 85%, var(--bg));
  border-color: transparent;
}

/* ——— Work ——— */

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

.card {
  display: block;
}

.card-wide {
  grid-column: 1 / -1;
}

.card-wide .cover {
  aspect-ratio: 2 / 1;
}



.window-shot {
  width: 100%;
  display: block;
}

.phones {
  align-self: end;
  display: flex;
  justify-content: center;
  gap: 5%;
  width: 100%;
  margin-bottom: -9%;
}

.phones .phone {
  width: 21%;
  margin-top: 0;
}

.phones .phone:nth-child(2) {
  transform: translateY(-8%);
}

.section-tight {
  padding-top: 96px;
}

.cover {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

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

.tone-sage { background: #ebeff0; }
.tone-mist { background: #e8edf2; }
.tone-lilac { background: #f3efff; }
.tone-neutral { background: #f2f2f4; }
/* Pale tint of Gymscle's accent red (#e85048) */
.tone-blush { background: #fdecea; }

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-top: 16px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--chip);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.card-title {
  font-size: 15px;
  font-weight: 500;
}

.card-arrow {
  display: inline-block;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.card:hover .card-arrow,
.card:focus-visible .card-arrow {
  opacity: 1;
  transform: none;
}

.card-summary {
  color: var(--ink-2);
}

/* ——— Cover mockups ——— */



.sk {
  display: block;
  border-radius: 99px;
  background: #e4e4e7;
}

.sk-dark { background: #3f3f46; }
.sk-accent { background: var(--select); }

/* phone */
.phone {
  width: 38%;
  aspect-ratio: 9 / 18.5;
  padding: 6px;
  border-radius: 30px;
  background: #1b1b1b;
  box-shadow: 0 30px 60px -25px rgb(20 20 30 / 0.3);
  transform-origin: bottom;
  margin-top: 22%;
}

.phone-screen {
  height: 100%;
  border-radius: 24px;
  background: #fafafa;
  padding: 30px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 34%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: #1b1b1b;
}

.phone-steps {
  display: flex;
  gap: 4px;
  margin: 12px 0 8px;
}

.phone-steps span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e4e4e7;
}

.phone-steps .on {
  background: #a78bfa;
}

.phone-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
}

.phone-cta {
  margin-top: auto;
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 99px;
  background: #1b1b1b;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
}

/* window */
.window {
  width: 84%;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgb(30 40 60 / 0.4), 0 0 0 1px rgb(0 0 0 / 0.04);
}

.window-bar {
  display: flex;
  gap: 5px;
  padding: 9px 10px;
  border-bottom: 1px solid #ececee;
}

.window-bar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e4e4e7;
}

.dash {
  display: grid;
  grid-template-columns: 26% 1fr;
  aspect-ratio: 16 / 10;
}

.dash-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  border-right: 1px solid #ececee;
  background: #fafafa;
}

.dash-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dash-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid #ececee;
  border-radius: 8px;
}

.dash-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6%;
  padding: 10px;
  border: 1px solid #ececee;
  border-radius: 8px;
}

.dash-chart span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: #e2e6eb;
}

.dash-chart .hl {
  background: var(--select);
}

/* browser */
.browser {
  width: 80%;
}

.window-bar .browser-tabs {
  display: flex;
  gap: 6px;
  margin-left: 14px;
  flex: 1;
}

.browser-tabs span {
  width: 18%;
  height: 7px;
  border-radius: 4px;
  background: #ececee;
}

.browser-tabs .on {
  background: #dedee2;
}

.browser-body {
  display: grid;
  grid-template-columns: 30px 1fr;
  aspect-ratio: 2.4 / 1;
}

.browser-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  background: #f5f5f6;
  border-right: 1px solid #ececee;
}

.browser-rail span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  opacity: 0.85;
}

.browser-rail .on {
  outline: 2px solid color-mix(in srgb, #3d7be0 30%, transparent);
  outline-offset: 2px;
}

.browser-split {
  display: grid;
  grid-template-columns: 1fr 10px 1fr;
  padding: 8px;
  gap: 0;
  background: #f1f1f3;
}

.browser-pane {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.04);
  overflow: hidden;
}

.browser-block {
  height: 30%;
  margin: 6px 0;
  border-radius: 5px;
  background: #e2e8ef;
}

.browser-divider {
  display: grid;
  place-items: center;
}

.browser-divider span {
  width: 3px;
  height: 28px;
  border-radius: 2px;
  background: var(--select);
}

.browser-inbox {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.browser-inbox > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 5px;
}

.browser-inbox > div.on {
  background: #eef3fb;
}

.browser-inbox i {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #e4e4e7;
}

.browser-inbox > div > span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* website */
.site {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 16px;
  background: #fafafa;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav-links {
  display: flex;
  gap: 8px;
}

.site-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 7% 0 6%;
}

.site-word {
  font: 600 clamp(26px, 4vw, 40px) / 1 var(--display);
  letter-spacing: -0.04em;
  color: #27272a;
  margin-bottom: 6px;
}

.site-tiles {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.site-tiles span {
  border-radius: 6px;
  background: #e4e4e7;
}

.site-tiles span:nth-child(2) {
  background: #ddd3ff;
}

/* ——— About ——— */

.about {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 80px;
  align-items: start;
  margin-top: 120px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}

.about-copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
}

.about-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.about-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 6px;
  padding: 0;
  list-style: none;
}

.skills li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.skills svg {
  color: var(--ink-2);
}

.say-hi a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--ink) 25%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.say-hi a:hover {
  text-decoration-color: var(--ink);
}

.exp {
  padding-top: 6px;
}

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

.exp li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.exp li > div {
  display: flex;
  flex-direction: column;
}

.exp-role {
  color: var(--ink);
  font-weight: 500;
}

.exp-company {
  color: var(--ink-3);
  font-size: 14px;
}

.exp-years {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ——— Case study ——— */

.phone-shot {
  padding: 5px;
  overflow: hidden;
}

.phone-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 24px;
}

.cs {
  padding-top: 48px;
}

.cs-back {
  display: inline-block;
  margin-bottom: 40px;
  color: var(--ink-3);
  font-weight: 500;
  transition: color 0.2s;
}

.cs-back:hover {
  color: var(--ink);
}

/* Title and lede keep a readable width; the meta row runs the full width to line up with the hero image */
.cs-title,
.cs-lede {
  max-width: 760px;
}

.cs-title {
  font: 600 clamp(40px, 6vw, 64px) / 1.05 var(--display);
  letter-spacing: -0.035em;
}

.cs-lede {
  margin-top: 16px;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
}

.cs-meta {
  /* Columns size to their content and share the leftover space equally, so the gaps between them match */
  display: flex;
  justify-content: space-between;
  gap: 24px 40px;
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.cs-meta dt {
  font-size: 13px;
  color: var(--ink-3);
}

.cs-meta dd {
  margin: 4px 0 0;
  font-weight: 500;
  text-wrap: pretty;
}

.cs-hero {
  background: var(--card);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4%;
  margin-top: 56px;
  padding: 56px 24px 0;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 2 / 1;
}

.cs-hero img {
  width: 22%;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.08), 0 30px 60px -25px rgb(20 20 30 / 0.3);
}

/* Designed cover: fills the tile edge to edge */
.cs-hero.cs-hero-cover {
  display: block;
  padding: 0;
}

.cs-hero.cs-hero-cover img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.cover picture {
  width: 100%;
  height: 100%;
}

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

.cs-hero img:nth-child(2) {
  margin-bottom: 4%;
}

.cs-section {
  padding-top: 96px;
}

.cs-text {
  max-width: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
}

.cs-h2 {
  margin-bottom: 4px;
  font: 600 26px/1.2 var(--display);
  letter-spacing: -0.025em;
  color: var(--ink);
}

.cs-quote {
  margin: 96px 0 0;
  padding: 40px;
  border-radius: 16px;
  background: var(--card);
}

.cs-quote blockquote {
  margin: 0 0 24px;
  max-width: 820px;
  font: 500 clamp(20px, 2.6vw, 28px) / 1.35 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cs-quote figcaption {
  display: flex;
  flex-direction: column;
}

.cs-phone {
  margin: 0;
  padding: 24px 18%;
  border-radius: 14px;
  background: var(--card);
}

.cs-phone img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.06), 0 16px 32px -20px rgb(20 20 30 / 0.3);
}

/* Full flow: a strip that runs to the window edge. Columns are sized so the last one is always cut off,
   which (with the progress bar below) is the cue that there's more to the right */
.cs-flow {
  --peek: 4.4;
  --gaps: 4;
  margin-top: 40px;
}

.cs-strip {
  /* Distance from the window edge to the text column. No percentages: scroll-padding resolves % against the strip itself */
  --bleed: max(var(--gutter), calc((100vw - var(--page)) / 2 + var(--gutter)));
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(var(--colmax, 300px), calc((100vw - var(--bleed) - 24px * var(--gaps)) / var(--peek)));
  gap: 24px;
  margin: 0 calc(var(--bleed) * -1);
  padding: 0 var(--bleed);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: var(--bleed);
  scrollbar-width: none;
}

.cs-strip::-webkit-scrollbar {
  display: none;
}

.cs-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.cs-strip .cs-grid-item {
  scroll-snap-align: start;
}

.cs-step {
  margin-right: 4px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.cs-strip:focus-visible {
  outline: 2px solid var(--select);
  outline-offset: -2px;
}

.cs-progress {
  position: relative;
  height: 2px;
  margin-top: 28px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.cs-progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--ink);
  transition: left 0.15s linear;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px 24px;
  margin-top: 40px;
}

.cs-grid-item h3 {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 500;
}

.cs-grid-item p {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ink-2);
}

.cs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 120px;
  border-top: 1px solid var(--line);
}

.cs-next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 8px;
  padding: 32px 0;
}

.cs-prev {
  align-items: flex-start;
  text-align: left;
}

@media (max-width: 760px) {
  .cs-pager {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cs-pager .cs-next {
    align-items: flex-start;
    text-align: left;
    padding: 24px 0;
  }
  .cs-pager .cs-next + .cs-next {
    border-top: 1px solid var(--line);
  }
}

.cs-next-title {
  font: 600 clamp(28px, 4vw, 40px) / 1.1 var(--display);
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

.cs-next:hover .cs-next-title {
  color: var(--ink-2);
}

@media (max-width: 760px) {
  .cs-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }
  .cs-hero {
    aspect-ratio: 5 / 4;
    padding: 32px 12px 0;
  }
  .cs-hero img {
    width: 30%;
    border-radius: 14px 14px 0 0;
  }
  .cs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }
  .cs-phone {
    padding: 16px 12%;
  }
  .cs-quote {
    padding: 24px;
  }
  .cs-flow {
    --peek: 1.6;
    --gaps: 1;
  }
}

/* Desktop screenshots: less padding than phones, softer corners */
.cs-phone--desktop {
  padding: 24px;
}

.cs-phone--desktop img {
  border-radius: 8px;
}

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

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

.cs-grid--3 .cs-phone--desktop {
  display: flex;
  align-items: center;
  aspect-ratio: 4 / 3;
  padding: 16px;
}

.cs-wide {
  margin-top: 40px;
}

.cs-wide--narrow .cs-phone--desktop {
  padding: 40px 18%;
}

.cs-wide--narrow .cs-phone--desktop img {
  box-shadow: none;
}

/* Tiles that show a full-length screen you can scroll inside */
.cs-scroll .cs-scroll-inner {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.06), 0 16px 32px -20px rgb(20 20 30 / 0.3);
  scrollbar-width: thin;
  scrollbar-color: rgb(0 0 0 / 0.25) transparent;
}

.cs-scroll .cs-scroll-inner:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cs-scroll .cs-scroll-inner img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* A desktop and a phone window side by side, each scrolling through a full page */
.cs-devices {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin-top: 40px;
}

.cs-device--desktop .cs-phone--desktop {
  aspect-ratio: 16 / 11;
}

.cs-device--mobile .cs-phone--desktop {
  aspect-ratio: 9 / 16;
}

.cs-device--mobile .cs-scroll-inner {
  border-radius: 18px;
}

@media (max-width: 760px) {
  .cs-devices {
    grid-template-columns: minmax(0, 1fr);
  }
  .cs-device--mobile {
    max-width: 320px;
  }
}

/* Full-length web pages, side by side */
.cs-pages {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  margin-top: 40px;
}

/* Label and note sit above each page; subgrid keeps the three screenshots starting on the same line */
.cs-pages-item {
  display: grid;
  grid-row: span 3;
  grid-template-rows: subgrid;
  row-gap: 0;
}

.cs-pages-item h3 {
  margin-top: 0;
}

.cs-pages-item .cs-page {
  align-self: start;
  margin-top: 20px;
}

.cs-page {
  margin: 0;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
}


.cs-page img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.06), 0 16px 32px -20px rgb(20 20 30 / 0.3);
}

@media (max-width: 1000px) {
  .cs-pages {
    grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cs-pages {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
}

.cs-wide--bare .cs-phone--desktop img {
  box-shadow: none;
  border-radius: 0;
}

.cs-flow--desktop {
  --peek: 1.7;
  --gaps: 1;
  --colmax: 640px;
}

/* Screens come in different shapes; a fixed tile keeps rows lined up and centres each screen in it */
.cs-flow--desktop .cs-phone--desktop,
.cs-grid--2 .cs-phone--desktop {
  display: flex;
  align-items: center;
  aspect-ratio: 4 / 3;
}

.cs-hero.cs-hero-shot {
  display: grid;
  place-items: center;
  padding: 6% 8%;
  aspect-ratio: auto;
}

.cs-hero.cs-hero-shot img {
  width: 100%;
  margin: 0;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgb(24 24 27 / 0.06), 0 30px 60px -30px rgb(20 20 30 / 0.35);
}

@media (max-width: 760px) {
  .cs-grid.cs-grid--2,
  .cs-grid.cs-grid--3 {
    grid-template-columns: 1fr;
  }
  .cs-phone--desktop {
    padding: 14px;
  }
  .cs-wide--narrow .cs-phone--desktop {
    padding: 20px 10%;
  }
  .cs-flow--desktop {
    --peek: 1.1;
  }
  .cs-hero.cs-hero-shot {
    padding: 20px;
  }
}

/* ——— Recommendations ——— */

.section-link:hover {
  color: var(--ink);
}

.recs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.rec {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  margin: 0;
  padding: 24px;
  border-radius: 14px;
  background: var(--card);
}

.rec blockquote {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--body);
  font-size: 15px;
  line-height: 1.65;
}

.rec-more.is-hidden {
  visibility: hidden;
}

.rec-text {
  --lines: 8;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--lines);
  line-clamp: var(--lines);
  overflow: hidden;
  /* Short quotes still reserve the full height so every card lines up */
  min-height: calc(var(--lines) * 1.65em);
}

.rec-more {
  padding: 0;
  border: 0;
  background: none;
  font: 500 14px var(--sans);
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.rec figcaption {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rec figcaption > span:last-child {
  display: flex;
  flex-direction: column;
}

.rec-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
}


.rec-name {
  font-weight: 500;
  color: var(--ink);
}

.rec-role {
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}

@media (max-width: 960px) {
  .recs {
    grid-template-columns: 1fr;
  }
  /* Stacked cards don't need to line up, so drop the reserved space */
  .rec-text {
    min-height: 0;
  }
  .rec-more.is-hidden {
    display: none;
  }
}

/* ——— Footer ——— */

.footer {
  padding-bottom: 48px;
}

.footer-email {
  display: inline-block;
  margin: 20px 0 80px;
  font: 500 clamp(32px, 5.5vw, 60px) / 1.05 var(--display);
  letter-spacing: -0.04em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line);
  text-underline-offset: 8px;
  transition: text-decoration-color 0.2s;
  overflow-wrap: anywhere;
}

.footer-email:hover {
  text-decoration-color: var(--ink);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-cv {
  margin-left: 4px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s;
}

.footer-cv:hover {
  color: var(--ink);
}

/* ——— Small screens ——— */

@media (max-width: 760px) {
  :root {
    --gutter: 16px;
  }
  .section {
    padding-top: 88px;
  }
  .hero-lede {
    font-size: 17px;
  }
  .hero-actions {
    gap: 6px;
  }
  .hero-actions .btn {
    padding: 0 12px;
  }
  .hero-actions .btn svg {
    display: none;
  }
  .hero-divider {
    margin: 0 2px;
  }
  .icon-btn {
    width: 34px;
    height: 34px;
  }
  /* Not enough room on phones; the section is still a scroll away */
  .nav-optional {
    display: none;
  }
  .nav-links a {
    padding: 7px 10px;
    font-size: 13px;
  }
  .nav-inner {
    gap: 8px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  .status {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .card-wide .cover {
    aspect-ratio: 5 / 4;
  }
  .card-wide .browser {
    width: 150%;
    margin-left: 50%;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 88px;
    padding-top: 48px;
  }
  .about-copy {
    font-size: 16px;
  }
  .phones .phone {
    width: 28%;
  }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

/* External links in the nav get a small arrow, like the CV link in the footer */
.nav-ext {
  margin-left: 3px;
  font-size: 0.85em;
  opacity: 0.6;
}

/* ——— Phone menu ——— */
.nav-end {
  display: flex;
  gap: 8px;
}
.nav-menu-btn,
.nav-sheet {
  display: none;
}
@media (max-width: 760px) {
  .nav-links a:not(.nav-avatar),
  .nav-lens {
    display: none;
  }
  .nav-menu-btn {
    display: grid;
  }
  /* With the links hidden, the avatar's spacer margin would make the pill lopsided */
  .nav-links a.nav-avatar {
    margin-right: 0;
  }
  .nav-sheet {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    margin-top: 4px;
    padding: 6px;
    border-radius: 20px;
    background: var(--bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: var(--glass-edge), 0 16px 40px -12px rgb(0 0 0 / 0.25);
  }
  .nav-sheet a {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
  }
  .nav-sheet a.is-active,
  .nav-sheet a:active {
    color: var(--ink);
    background: var(--lens);
    box-shadow: var(--lens-edge);
  }
}

/* ——— Image viewer ——— */
.cs-hero img,
.cs-phone img,
.cs-page img {
  cursor: zoom-in;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgb(10 10 12 / 0.97);
  animation: lb-in 0.18s var(--ease);
}

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

.lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 48px 48px 8px;
  overflow: auto;
  overscroll-behavior: contain;
}

.lb-stage img {
  /* auto margins centre it, and unlike align-items they never push an oversized image out of reach */
  margin: auto;
  max-width: min(1200px, 100%);
  max-height: min(78vh, 100%);
  border-radius: 8px;
  cursor: default;
}

/* Full-length pages: fit the width and scroll down through them */
.lb-stage.is-tall {
  display: block;
  text-align: center;
}
.lb-stage.is-tall img {
  max-width: min(820px, 100%);
  max-height: none;
}

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 18px;
  color: rgb(255 255 255 / 0.7);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.lb-actions {
  display: flex;
  gap: 8px;
}

.lb-actions button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  background: rgb(255 255 255 / 0.1);
  cursor: pointer;
  transition: background 0.2s;
}

.lb-actions button:hover {
  background: rgb(255 255 255 / 0.2);
}

@media (max-width: 760px) {
  .lb-stage {
    padding: 24px 16px 8px;
  }
}
