:root {
  --page-bg: #ffffff;
  --text: #000000;
  --text-rgb: 0, 0, 0;
  --muted: rgba(0, 0, 0, 0.28);
  --shader-center: #012807;
  --shader-mid: #00ae1b;
  --shader-edge: #00ae1b;
  --selection-bg: #ffabdc;
  --selection-text: #012807;
  --page-x: clamp(24px, 18.63vw, 536px);
  --page-top: clamp(24px, 2.23vw, 64px);
  --content-width: 1806.695px;
  --topbar-size: clamp(18px, 1.25vw, 30px);
  --hero-size: clamp(42px, 2.78vw, 80px);
  --space-base: clamp(18px, 1.39vw, 40px);
  --space-x: clamp(48px, 8svh, 96px);
  --detail-size: clamp(24px, 1.39vw, 40px);
  --detail-gap: calc(var(--space-x) * 0.5);
  --speaking-gap: calc(var(--space-x) * 0.75);
  --links-gap: calc(var(--space-x) * 4);
  --inline-icon-size: 0.72em;
  --inline-icon-stroke: 1.5;
  --social-icon-size: calc(var(--inline-icon-size) + 4px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #000000;
    --text: #f5f5f5;
    --text-rgb: 245, 245, 245;
    --muted: rgba(245, 245, 245, 0.28);
    --shader-center: #75f6ff;
    --shader-mid: #003208;
    --shader-edge: #003208;
    --selection-bg: #003208;
    --selection-text: #75f6ff;
  }
}

:root[data-theme="light"] {
  --page-bg: #ffffff;
  --text: #000000;
  --text-rgb: 0, 0, 0;
  --muted: rgba(0, 0, 0, 0.28);
  --shader-center: #012807;
  --shader-mid: #00ae1b;
  --shader-edge: #00ae1b;
  --selection-bg: #ffabdc;
  --selection-text: #012807;
}

:root[data-theme="dark"] {
  --page-bg: #000000;
  --text: #f5f5f5;
  --text-rgb: 245, 245, 245;
  --muted: rgba(245, 245, 245, 0.28);
  --shader-center: #75f6ff;
  --shader-mid: #003208;
  --shader-edge: #003208;
  --selection-bg: #003208;
  --selection-text: #75f6ff;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.page-shell {
  position: relative;
  max-width: 2880px;
  margin: 0 auto;
  padding: var(--page-top) var(--page-x) 0;
  overflow: clip;
  isolation: isolate;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 2.23vw, 64px);
  font-size: var(--topbar-size);
  letter-spacing: -0.03em;
  animation: rise-in 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topbar__social,
.topbar__project,
.topbar__clock {
  display: flex;
  align-items: center;
}

.topbar__project {
  gap: clamp(6px, 0.42vw, 12px);
  line-height: 1;
}

/* Home header spans the full viewport width; its side inset matches the top
   inset so the bar sits in an even frame. Social left, projects centre, clock
   right. */
.topbar--home {
  justify-content: space-between;
  /* The line box is taller than the glyphs (inline arrows and leading), so
     pull the bar up to make the visible cap height sit at the side inset. */
  margin-top: -0.62em;
  margin-inline: calc(-1 * var(--page-x));
  padding-inline: var(--page-top);
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 1.39vw, 40px);
  white-space: nowrap;
}

.topbar__nav-link {
  line-height: 1;
  transition: opacity 180ms ease;
}

.topbar__nav-link:hover,
.topbar__nav-link:focus-visible {
  opacity: 0.6;
}

.topbar__project-logo {
  width: auto;
  height: calc(var(--topbar-size) * 0.95);
  display: block;
}

:root[data-theme="dark"] .topbar__project-logo {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .topbar__project-logo {
    filter: invert(1);
  }
}

.topbar__social {
  gap: clamp(8px, 0.56vw, 16px);
}

.topbar__social-link {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.topbar__social-link__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  overflow: visible;
}

.topbar__social-link__label {
  display: none;
}

.topbar__social-link:hover .social-icon--idle,
.topbar__social-link:focus-visible .social-icon--idle {
  opacity: 0;
}

.topbar__social-link:hover .social-icon--hover,
.topbar__social-link:focus-visible .social-icon--hover {
  opacity: 1;
}

@media (min-width: 821px) {
  .topbar,
  .topbar__social,
  .topbar__nav,
  .topbar__project,
  .topbar__clock {
    align-items: baseline;
  }

  .topbar__social {
    gap: clamp(16px, 1.39vw, 40px);
  }

  .topbar__social-link {
    display: inline;
    vertical-align: baseline;
  }

  .topbar__social-link__icon {
    display: none;
  }

  .topbar__social-link__label {
    --arrow-size: 1.6245em;
    --arrow-stroke: 0.0875em;
    display: inline;
    font-size: var(--topbar-size);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
    transition: color 180ms ease, opacity 180ms ease;
  }

  .topbar__social-link__label .arrow-icon {
    margin-left: -0.2688em;
    vertical-align: -0.22em;
  }
}

.topbar__clock .theme-toggle {
  align-self: center;
  translate: 0 -0.06em;
}

.topbar__clock {
  gap: clamp(6px, 0.49vw, 14px);
}

.icon-link,
.clock-icon,
.arrow-icon {
  flex: 0 0 auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  line-height: 1;
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  position: relative;
  overflow: visible;
}

.social-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 160ms ease;
}

:root[data-theme="dark"] .social-icon {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .social-icon {
    filter: invert(1);
  }
}

.social-icon--hover {
  opacity: 0;
}

.icon-link:hover .social-icon--idle,
.icon-link:focus-visible .social-icon--idle {
  opacity: 0;
}

.icon-link:hover .social-icon--hover,
.icon-link:focus-visible .social-icon--hover {
  opacity: 1;
}

.clock-icon,
.arrow-icon {
  width: 100%;
  height: 100%;
}

.clock-icon,
.arrow-icon path,
.clock-icon line,
.clock-icon circle,
.clock-icon path {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.clock-icon {
  width: var(--social-icon-size);
  height: var(--social-icon-size);
  overflow: visible;
}

.clock-icon [data-clock-hour] {
  stroke-width: var(--inline-icon-stroke);
}

.clock-icon [data-clock-minute] {
  stroke-width: var(--inline-icon-stroke);
}

.clock-icon circle {
  stroke-width: var(--inline-icon-stroke);
}

main {
  position: relative;
  z-index: 1;
}

.content-column {
  width: min(100%, var(--content-width));
  margin-inline: auto;
  text-align: center;
}

.hero {
  position: relative;
  padding-top: calc(var(--space-x) * 4);
}

.hero__vision,
.hero__title,
.hero__copy,
.details,
.contact {
  position: relative;
  z-index: 2;
  animation: rise-in 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__title {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(4px, 0.35vw, 10px);
  max-width: var(--content-width);
  font-size: var(--hero-size);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 calc(var(--space-x) * 4);
  animation-delay: 120ms;
}

.hero__vision span,
.hero__name,
.hero__role {
  display: block;
}

.hero__vision {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin: 0;
  font-size: var(--hero-size);
  font-weight: 500;
  letter-spacing: -0.03em;
  animation-delay: 120ms;
}

.hero__role {
  color: var(--muted);
}

.hero__role-link {
  --arrow-size: 1.6815em;
  --arrow-stroke: 0.0875em;
  --embacy-alpha: 0.28;
  --link-shift-x: 0px;
  --link-shift-y: 0px;
  color: rgba(var(--text-rgb), var(--embacy-alpha));
  position: relative;
  display: inline-block;
  overflow: visible;
  transform: translate3d(var(--link-shift-x), var(--link-shift-y), 0);
  will-change: transform;
}

.hero__role-link .arrow-icon {
  position: absolute;
  left: 100%;
  bottom: -0.08em;
  margin-left: -0.09em;
  vertical-align: baseline;
}

.hero__role-accent {
  color: inherit;
  text-decoration: none;
}

.hero__copy {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-x);
  margin-top: var(--space-x);
  animation-delay: 220ms;
}

.hero__lead,
.hero__muted,
.section-title,
.writing__list,
.text-link {
  letter-spacing: -0.03em;
}

.reveal-text-target {
  --reveal-base-opacity: 1;
  --reveal-base-blur: 0px;
  --reveal-ink-opacity: 0;
  --reveal-ink-blur: 0px;
  position: relative;
  overflow: visible;
}

.reveal-text-target.is-reveal-ready {
  --reveal-base-opacity: 0;
  --reveal-base-blur: 0px;
  --reveal-ink-opacity: 1;
  --reveal-ink-blur: 0px;
}

.reveal-text-base {
  position: relative;
  z-index: 1;
  opacity: var(--reveal-base-opacity);
  filter: blur(var(--reveal-base-blur));
}

.reveal-text-ink {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: var(--reveal-ink-opacity);
  filter: blur(var(--reveal-ink-blur));
}

.reveal-text-target.is-revealed .reveal-text-ink {
  opacity: 0;
}

.hero__lead,
.hero__muted {
  margin: 0;
  max-width: var(--content-width);
  font-size: var(--hero-size);
  font-weight: 500;
}

.hero__muted {
  color: var(--muted);
}

.burst {
  --burst-scale: 1;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: clamp(360px, 28.4vw, 818px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(var(--burst-scale));
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

@media (min-width: 821px) {
  .burst {
    width: 100vw;
    height: 100vh;
    aspect-ratio: unset;
  }
}

.burst-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.96;
}

.burst-canvas.burst-canvas--fallback {
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(47, 64, 70, 0.76) 0 10%, rgba(97, 248, 246, 0.78) 11% 23%, rgba(14, 144, 47, 0.28) 40%, rgba(14, 144, 47, 0) 65%);
  filter: blur(clamp(14px, 1.2vw, 34px));
}

/* Showcase: two project cards and the articles card, after the hero copy. */
.showcase {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--space-x) * 2.5);
  animation: rise-in 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 280ms;
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.11vw, 32px);
  text-align: left;
}

.showcase-card {
  --card-pad-x: clamp(12px, 0.59vw, 17px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(16px, 1.11vw, 32px);
  min-width: 0;
  min-height: clamp(150px, 14.6vw, 421.5px);
  padding: var(--card-pad-x);
  border: 1px solid rgba(var(--text-rgb), 0.22);
  border-radius: clamp(8px, 0.35vw, 10px);
  color: var(--text);
  font-size: var(--topbar-size);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  transition: border-color 180ms ease;
}

a.showcase-card {
  aspect-ratio: 562 / 421.5;
}

a.showcase-card:hover,
a.showcase-card:focus-visible {
  border-color: rgba(var(--text-rgb), 0.5);
}

.showcase-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 2988 / 1562;
  overflow: hidden;
  border-radius: clamp(3px, 0.14vw, 4px);
}

.showcase-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-card__label,
.showcase-article {
  --arrow-size: 1.18em;
  --arrow-stroke: 0.1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  width: 100%;
  min-width: 0;
}

.showcase-card__title {
  display: inline-block;
  min-width: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.showcase-card__title--logo {
  display: flex;
  align-items: center;
  gap: clamp(6px, 0.35vw, 10px);
  overflow: visible;
}

.showcase-card__logo {
  width: auto;
  height: 0.95em;
  display: block;
}

:root[data-theme="dark"] .showcase-card__logo {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .showcase-card__logo {
    filter: invert(1);
  }
}

.showcase-card .arrow-icon {
  flex: 0 0 auto;
  margin: 0;
  vertical-align: middle;
  opacity: 0.3;
  transition: opacity 180ms ease;
}

a.showcase-card:hover .arrow-icon,
a.showcase-card:focus-visible .arrow-icon,
.showcase-article:hover .arrow-icon,
.showcase-article:focus-visible .arrow-icon {
  opacity: 1;
}

/* The articles card always takes the right column and two rows; project
   cards flow into the two columns on its left. From the third row on there
   is nothing to the right, so cards use the full width. */
.showcase-card--articles {
  grid-column: 3;
  grid-row: 1 / span 2;
  scroll-margin-top: calc(var(--page-top) + var(--space-x));
}

/* Empty slot next to three project cards. Hidden as soon as a fourth project
   fills it. */
.showcase-card--placeholder {
  aspect-ratio: 562 / 421.5;
  justify-content: flex-end;
  color: rgba(var(--text-rgb), 0.4);
}

a.showcase-card:nth-of-type(4) ~ .showcase-card--placeholder {
  display: none;
}

.showcase + .details {
  margin-top: calc(var(--space-x) * 2.5);
}

.showcase-articles {
  display: grid;
  min-width: 0;
  gap: clamp(8px, 0.42vw, 12px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.showcase-articles > li {
  min-width: 0;
}

.showcase-article {
  align-items: flex-start;
  padding-block: clamp(6px, 0.28vw, 8px);
  border-top: 1px solid rgba(var(--text-rgb), 0.3);
  transition: opacity 180ms ease;
}

.showcase-article:hover,
.showcase-article:focus-visible {
  opacity: 0.6;
}

.showcase-article:hover .arrow-icon,
.showcase-article:focus-visible .arrow-icon {
  opacity: 1;
}

@media (max-width: 1100px) {
  .showcase__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card--articles {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .showcase-card--placeholder {
    display: none;
  }
}

@media (max-width: 820px) {
  /* Narrow header: only social icons and the clock; the project links live
     in the showcase cards below. */
  .topbar__nav {
    display: none;
  }

  .topbar__clock [data-clock] {
    white-space: nowrap;
  }

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

  .showcase-card {
    gap: 24px;
  }

  a.showcase-card {
    aspect-ratio: auto;
  }
}

.details {
  display: grid;
  gap: var(--space-x);
  margin-top: var(--links-gap);
  animation-delay: 340ms;
}

.text-link {
  --arrow-size: 1.6245em;
  --arrow-stroke: 0.0875em;
  --link-shift-x: 0px;
  --link-shift-y: 0px;
  display: inline;
  width: auto;
  overflow: visible;
  font-size: var(--hero-size);
  font-weight: 500;
  line-height: 1;
  transform: translate3d(var(--link-shift-x), var(--link-shift-y), 0);
  will-change: transform;
  transition: color 180ms ease, opacity 180ms ease;
}

.text-link .arrow-icon {
  margin-left: -0.2688em;
}

.text-link--muted {
  color: var(--muted);
}

.text-link--muted .arrow-icon {
  opacity: 0.28;
  transition: opacity 180ms ease;
}

.text-link--muted:hover,
.text-link--muted:focus-visible {
  color: var(--text);
  opacity: 1;
}

.text-link--muted:hover .arrow-icon,
.text-link--muted:focus-visible .arrow-icon {
  opacity: 1;
}

.arrow-icon {
  display: inline-block;
  width: var(--arrow-size, var(--inline-icon-size));
  height: var(--arrow-size, var(--inline-icon-size));
  margin-left: -0.096em;
  vertical-align: -0.3em;
  overflow: visible;
}

.arrow-icon path {
  stroke-width: var(--arrow-stroke, var(--inline-icon-stroke));
}

.arrow-icon [data-logo-segment] {
  fill: var(--segment-color, currentColor);
  stroke: none;
  opacity: 0;
}

.writing {
  display: grid;
  gap: 0;
  position: relative;
  justify-content: center;
  scroll-margin-top: calc(var(--page-top) + var(--space-x));
}

.section-title {
  margin: 0;
  font-size: var(--hero-size);
  font-weight: 500;
  line-height: 1;
}

.speaking-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  margin: 0;
  padding: 0;
  text-align: center;
  cursor: pointer;
  color: var(--text);
  transition: color 180ms ease;
}

.speaking-toggle:hover,
.speaking-toggle:focus-visible {
  color: var(--text);
}

.details > .text-link,
.contact .text-link {
  color: var(--text);
}

.details > .text-link:hover,
.details > .text-link:focus-visible,
.contact .text-link:hover,
.contact .text-link:focus-visible {
  color: var(--text);
}

.writing__list {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  margin-top: 0;
  transition: opacity 220ms ease, transform 260ms ease, max-height 280ms ease;
}

.writing.is-speaking-open .writing__list {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  margin-top: var(--speaking-gap);
  overflow: visible;
}

.writing__list {
  display: grid;
  gap: calc(var(--space-x) * 0.25);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--detail-size);
  font-weight: 500;
}

.speaking-entry {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.45em 0.75em;
  font-size: var(--topbar-size);
  letter-spacing: -0.03em;
  line-height: 1;
  --arrow-size: 1.18em;
  --arrow-stroke: 0.1em;
}

.speaking-title {
  display: inline;
}

.speaking-tag {
  display: inline;
  opacity: 0.5;
}

.speaking-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4em;
  align-items: baseline;
}

.speaking-meta__item {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  letter-spacing: inherit;
  line-height: 1;
  color: inherit;
  opacity: 1;
}

.speaking-entry .arrow-icon {
  margin-left: -0.14em;
  vertical-align: -0.22em;
}

@media (min-width: 821px) {
  main {
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .writing {
    display: grid;
    width: min(100%, var(--content-width));
    overflow: visible;
  }

  .writing__list {
    position: static;
    max-height: 0;
    margin-top: 0;
    transform: translateY(-8px);
    width: min(100%, var(--content-width));
    opacity: 0;
    overflow: hidden;
    white-space: normal;
    pointer-events: none;
  }

  .writing.is-speaking-open .writing__list {
    max-height: none;
    margin-top: var(--speaking-gap);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    overflow: visible;
  }

  body.speaking-inline-open main {
    transform: none;
  }

  .writing__list .text-link--muted {
    color: var(--text);
    opacity: 1;
  }

  .writing__list .text-link--muted .arrow-icon {
    opacity: 1;
  }
}

.writing__list .arrow-icon {
  vertical-align: -0.24em;
}

.contact {
  display: grid;
  gap: var(--space-x);
  margin-top: var(--space-x);
  margin-bottom: calc(var(--space-x) * 5);
  animation-delay: 460ms;
}

@media (max-width: 1280px) {
}

@media (max-width: 820px) {
  :root {
    --page-x: 24px;
    --page-top: 24px;
    --topbar-size: 14px;
    --hero-size: 34px;
    --space-x: clamp(32px, 8svh, 72px);
    --detail-size: 19px;
    --social-icon-size: 18px;
  }

  .topbar {
    gap: 18px;
  }

  .burst {
    --burst-scale: 2.19;
  }

  .writing {
    width: 100%;
  }

  .writing__list {
    white-space: normal;
    transform: translateY(-8px);
    width: 100%;
  }

  .writing.is-speaking-open .writing__list {
    margin-top: var(--speaking-gap);
    overflow: hidden;
  }

}

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

  .topbar,
  .hero__title,
  .hero__copy,
  .showcase,
  .details,
  .contact {
    animation: none;
  }

  .icon-link,
  .topbar__social-link,
  .text-link {
    transition: none;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
