@font-face {
  font-family: "Funnel Display";
  src: url("/assets/fonts/funnel-display.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Funnel Sans";
  src: url("/assets/fonts/funnel-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --light: #DDE4D6;
  --light-deep: #CFD8C6;
  --dark: #1D3328;
  --dark-deep: #142319;
  --muted: #4A5E50;
  --on-dark: #EEF1E8;
  --on-dark-soft: #B4C2B2;
  --accent: #F2B8C1;

  --ground: var(--light);
  --ink: var(--dark);

  --display: "Funnel Display", "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --text: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(16px, 4.2vw, 64px);
  --max: 1600px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --sheet-radius: clamp(20px, 3vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--dark) var(--light);
  background: var(--light);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--light);
  color: var(--dark);
  font: 400 1.0625rem/1.55 var(--text);
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  caret-color: var(--dark);
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
button { font: inherit; color: inherit; }
svg { display: block; }

::selection { background: var(--dark); color: var(--light); }
.sheet ::selection { background: var(--accent); color: var(--dark); }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 4px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--dark); color: var(--light); font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
  opacity: 0;
  transition: transform .3s var(--ease-out), opacity .2s;
}
.skip:focus-visible { transform: none; opacity: 1; outline-color: var(--dark); }

.nowrap { white-space: nowrap; }

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

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

.hero {
  --ground: var(--light);
  position: sticky;
  top: 0;
  z-index: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--gutter);
  container-type: inline-size;
  overflow: hidden;
  background: var(--light);
}

.bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-size: 0.9375rem;
  font-weight: 500;
}
.mark {
  display: inline-flex; align-items: center; gap: 12px;
  justify-self: start;
  text-decoration: none;
}
.mark svg { width: 28px; height: 28px; flex: none; color: var(--dark); }
.mark svg path { transform-origin: 16px 16px; }

.clock {
  display: inline-flex; gap: 10px; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.clock-city { opacity: .78; }
.clock-time { font-weight: 600; min-width: 5.6em; }

.bar-links {
  display: flex; gap: clamp(16px, 2.4vw, 32px); align-items: center;
  justify-self: end;
}
.bar-links a { text-decoration: none; }
.bar-links a:not(.pill):hover { text-decoration: underline; }
.pill {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.pill:hover { background: var(--dark); color: var(--light); }

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 32px clamp(32px, 6vw, 120px);
  align-items: end;
  margin-top: auto;
  padding: clamp(32px, 6vh, 72px) 0 clamp(24px, 4vh, 48px);
}
.lead {
  font: 520 clamp(1.625rem, 3.05vw, 3rem)/1.06 var(--display);
  letter-spacing: -0.025em;
  max-width: 22ch;
  text-wrap: balance;
}
.hero-side { display: grid; gap: 20px; max-width: 36ch; }
.hero-side p:first-child { font-size: 1.0625rem; line-height: 1.5; text-wrap: pretty; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), transform .25s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-solid { background: var(--dark); color: var(--light); }
.btn-solid:hover { background: var(--dark-deep); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--dark); }
.btn-line:hover { background: var(--dark); color: var(--light); }

/* The name is sized so each word spans the full width of the hero.
   Ratios are each word's advance width in em at weight 800 / -0.04em. */
.name {
  --s1: calc(100cqi / 4.27);
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.8;
  margin: 0 0 calc(var(--gutter) * -0.12);
  padding-bottom: clamp(12px, 2vh, 28px);
  white-space: nowrap;
}
.name-line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.name-word { display: block; letter-spacing: -0.04em; }
.n1 { font-size: var(--s1); }
.n2 { font-size: calc(var(--s1) * 1.1296); }

/* ---------- Sheet ---------- */

.sheet {
  --ground: var(--dark);
  position: relative;
  z-index: 1;
  background: var(--dark);
  color: var(--on-dark);
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: clamp(72px, 11vw, 168px) var(--gutter) clamp(72px, 9vw, 140px);
  box-shadow: 0 -18px 40px -24px color-mix(in srgb, var(--dark-deep) 50%, transparent);
  caret-color: var(--accent);
}
.sheet :focus-visible { outline-color: var(--accent); }
.sheet a { text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
.sheet a:hover { color: var(--accent); text-decoration-color: currentColor; }

.block { max-width: var(--max); margin: 0 auto; }
.block + .block { margin-top: clamp(112px, 15vw, 224px); }

.statement {
  font: 700 clamp(2.125rem, 5.4vw, 5.5rem)/0.98 var(--display);
  letter-spacing: -0.035em;
  color: var(--accent);
  max-width: 22ch;
  text-wrap: balance;
}

.section-title {
  font: 700 clamp(2.5rem, 7vw, 7rem)/0.9 var(--display);
  letter-spacing: -0.04em;
  color: var(--accent);
  text-wrap: balance;
}

.rows { margin-top: clamp(56px, 8vw, 120px); border-top: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 12px clamp(24px, 5vw, 96px);
  align-items: baseline;
  padding: clamp(22px, 2.6vw, 36px) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent);
}
.row h3 {
  font: 600 clamp(1.75rem, 3.5vw, 3.25rem)/1 var(--display);
  letter-spacing: -0.03em;
  color: var(--on-dark);
}
.row p { max-width: 54ch; color: var(--on-dark-soft); letter-spacing: 0.004em; text-wrap: pretty; }

/* ---------- Work history ---------- */

.jobs { margin-top: clamp(48px, 7vw, 104px); }
.job {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(0, 9fr);
  gap: 20px clamp(24px, 4vw, 72px);
  padding: clamp(32px, 4vw, 56px) 0;
  border-top: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent);
}
.job:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent); }

.job-when { font-variant-numeric: tabular-nums; color: var(--on-dark); font-weight: 500; }
.quiet { color: var(--on-dark-soft); font-weight: 400; }

.job-body h3 {
  font: 650 clamp(1.625rem, 2.7vw, 2.5rem)/1.04 var(--display);
  letter-spacing: -0.025em;
  color: var(--on-dark);
  text-wrap: balance;
}
.where {
  font: 400 1rem/1 var(--text);
  letter-spacing: 0;
  color: var(--on-dark-soft);
  white-space: nowrap;
  margin-left: 0.4em;
}
.role { margin-top: 8px; color: var(--accent); font-weight: 600; }
.job-body > p:not(.role) { margin-top: 20px; max-width: 66ch; color: var(--on-dark); text-wrap: pretty; }
.points { margin-top: 20px; display: grid; gap: 12px; max-width: 66ch; }
.points li {
  position: relative;
  padding-left: 22px;
  color: var(--on-dark-soft);
  text-wrap: pretty;
}
.points li::before {
  content: "";
  position: absolute; left: 0; top: 0.72em;
  width: 10px; height: 2px;
  background: var(--accent);
}

.school {
  --jgap: clamp(24px, 4vw, 72px);
  margin-top: clamp(32px, 4vw, 56px);
  max-width: 62ch;
  color: var(--on-dark-soft);
  margin-left: calc((100% - var(--jgap)) * 2.4 / 11.4 + var(--jgap));
  text-wrap: pretty;
}

/* ---------- Questions ---------- */

.qa .row h3 { font-size: clamp(1.375rem, 2.3vw, 2.125rem); line-height: 1.08; text-wrap: balance; }
.qa .row p { color: var(--on-dark); }
.qa a { color: var(--accent); }

/* ---------- Stack ---------- */

.stack-head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 24px clamp(24px, 5vw, 96px);
  align-items: end;
}
.stack-head p {
  font: 450 clamp(1.1875rem, 1.6vw, 1.5rem)/1.4 var(--display);
  letter-spacing: -0.01em;
  color: var(--on-dark);
  max-width: 40ch;
  text-wrap: pretty;
}
.tools { margin-top: clamp(48px, 7vw, 104px); border-top: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent); }
.tools > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 8px clamp(24px, 5vw, 96px);
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--on-dark) 22%, transparent);
}
.tools dt { color: var(--on-dark-soft); }
.tools dd {
  font: 550 clamp(1.25rem, 2.1vw, 1.875rem)/1.2 var(--display);
  letter-spacing: -0.02em;
  color: var(--on-dark);
  text-wrap: balance;
}

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

.contact {
  --ground: var(--light);
  position: relative;
  z-index: 1;
  background: var(--light);
  color: var(--dark);
  padding: clamp(88px, 12vw, 184px) var(--gutter) 28px;
  container-type: inline-size;
}
.contact > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.contact-title {
  font: 800 clamp(3rem, 10.4cqi, 11rem)/0.86 var(--display);
  letter-spacing: -0.045em;
  max-width: 11ch;
  margin-left: 0;
  text-wrap: balance;
}

.email {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px 28px;
  margin-top: clamp(40px, 6vw, 88px);
}
.email-link {
  font: 600 clamp(1.5rem, 4.6cqi, 4.5rem)/1.05 var(--display);
  letter-spacing: -0.03em;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.14em;
  overflow-wrap: anywhere;
}
.email-link:hover { text-decoration-thickness: 0.1em; }

.copy {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--dark);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), transform .2s var(--ease-out);
}
.copy svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linejoin: round; }
.copy:hover { background: var(--dark); color: var(--light); }
.copy:active { transform: scale(.96); }
.copy.is-done { background: var(--dark); color: var(--light); }

.links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(56px, 7vw, 104px);
  border-top: 1.5px solid var(--dark);
}
.links li + li a { border-left: 1px solid color-mix(in srgb, var(--dark) 28%, transparent); }
.links a {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 22px 56px 24px 0;
  text-decoration: none;
  height: 100%;
}
.links li + li a { padding-left: 20px; }
.link-name {
  font: 700 clamp(1.5rem, 2.6vw, 2.5rem)/1 var(--display);
  letter-spacing: -0.03em;
}
.link-url { font-size: 0.9375rem; color: var(--muted); overflow-wrap: anywhere; }
.ext {
  position: absolute; right: 16px; top: 24px;
  width: 26px; height: 26px;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .35s var(--ease-out);
}
.links a:hover .ext, .links a:focus-visible .ext { transform: translate(3px, -3px); }
.links a:hover .link-name { text-decoration: underline; text-decoration-thickness: 0.07em; text-underline-offset: 0.12em; }

/* Time zone tool */
.tz {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 28px clamp(24px, 5vw, 96px);
  margin-top: clamp(72px, 9vw, 144px);
  padding-top: 28px;
  border-top: 1.5px solid var(--dark);
}
.tz-text h3 {
  font: 700 clamp(1.75rem, 2.8vw, 2.5rem)/1 var(--display);
  letter-spacing: -0.03em;
}
.tz-text p { margin-top: 12px; max-width: 38ch; color: var(--dark); text-wrap: pretty; }
.tz-text strong { font-weight: 650; font-variant-numeric: tabular-nums; }

.tz-tool { display: grid; gap: 18px; }
.tz-tool[hidden] { display: none; }
.tz-scale {
  --pos: 37.5%;
  --label: 112px;
  position: relative;
  display: grid;
  gap: 8px;
  border-radius: 12px;
}
.tz-row { display: grid; grid-template-columns: var(--label) 1fr; align-items: center; }
.tz-label { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.tz-ticks {
  position: relative;
  height: 48px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--dark) 8%, transparent);
  overflow: hidden;
}
.tz-row:nth-child(2) .tz-ticks { background: var(--dark); color: var(--on-dark); }
.tz-ticks::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 3px; margin-left: -1.5px;
  background: var(--dark);
  box-shadow: 0 0 0 1.5px var(--light);
}
.tz-row:nth-child(2) .tz-ticks::after { background: var(--light); box-shadow: 0 0 0 1.5px var(--dark); }
.tick {
  position: absolute; top: 0; height: 9px;
  width: 1px;
  background: currentColor;
  opacity: .35;
}
.tick.major { height: 16px; opacity: .75; }
.tick-label {
  position: absolute; bottom: 7px;
  transform: translateX(-50%);
  font-size: 0.75rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tz-input {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  left: var(--label);
  width: calc(100% - var(--label));
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
  touch-action: pan-y;
}
.tz-input::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 1px; height: 104px; }
.tz-input::-moz-range-thumb { width: 1px; height: 104px; border: 0; }
.tz-scale:has(.tz-input:focus-visible) { outline: 3px solid var(--dark); outline-offset: 6px; }
.tz-out {
  display: block;
  margin-left: var(--label);
  font: 550 clamp(1.125rem, 1.7vw, 1.5rem)/1.3 var(--display);
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
  margin-top: clamp(88px, 10vw, 160px);
  padding-top: 20px;
  border-top: 1px solid color-mix(in srgb, var(--dark) 28%, transparent);
  font-size: 0.875rem;
  color: var(--muted);
}
.foot a { text-decoration: none; color: var(--dark); font-weight: 600; }
.foot a:hover { text-decoration: underline; }

/* ---------- Load sequence: one moment, the name rising into place ---------- */

@media (prefers-reduced-motion: no-preference) {
  .name-word { animation: rise 1.25s var(--ease-out) both; }
  .n2 { animation-delay: .09s; }
  .bar, .hero-copy { animation: settle 1s var(--ease-out) .35s both; }
  .mark svg path { animation: sweep 1.4s var(--ease-out) .2s both; }

  @supports (animation-timeline: view()) {
    .hero > * {
      animation-name: rise, recede;
      animation-duration: 1.25s, auto;
      animation-timing-function: var(--ease-out), linear;
      animation-fill-mode: both, both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 100vh;
    }
    .hero > .bar, .hero > .hero-copy { animation-name: settle, recede; animation-delay: .35s, 0s; }
    .hero > .name { animation-name: none, recede; }
  }
}
@keyframes rise { from { transform: translateY(104%); } to { transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes sweep { from { transform: rotate(-270deg); } to { transform: none; } }
@keyframes recede { to { transform: translateY(-6vh) scale(.96); opacity: .45; filter: blur(1.5px); } }

/* ---------- Narrow screens ---------- */

@media (max-width: 960px), (orientation: portrait) {
  .hero { min-height: 0; padding-bottom: 8px; }
  .name { order: 1; margin: clamp(40px, 8vh, 96px) 0 0; padding-bottom: 0; }
  .hero-copy { order: 2; margin-top: 0; padding: clamp(36px, 5vw, 56px) 0 clamp(56px, 8vw, 96px); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
}

@media (max-height: 820px) and (min-width: 961px) and (orientation: landscape) {
  .bar { padding: 16px 0; }
  .hero-copy { padding: 16px 0 20px; }
  .lead { max-width: 30ch; font-size: clamp(1.5rem, 2.45vw, 2.5rem); }
}

@media (max-width: 960px) {
  .lead { max-width: 20ch; }
  .row, .stack-head, .tools > div { grid-template-columns: 1fr; }
  .job { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); }
  .job-when { grid-column: 1 / -1; display: flex; gap: 16px; flex-wrap: wrap; }
  .job-body { grid-column: 1 / -1; }
  .school { margin-left: 0; }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .links li:nth-child(3) a { border-left: 0; padding-left: 0; }
  .links li:nth-child(n+3) a { border-top: 1px solid color-mix(in srgb, var(--dark) 28%, transparent); }
  .tz { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; }
  .mark span, .wide-only { display: none; }
  .clock { justify-self: end; margin-right: 4px; }
  .bar { grid-template-columns: auto 1fr auto; }
  .hero-copy { padding: 36px 0 56px; grid-template-columns: 1fr; }
  .links { grid-template-columns: 1fr; }
  .links li + li a { border-left: 0; padding-left: 0; border-top: 1px solid color-mix(in srgb, var(--dark) 28%, transparent); }
  .tz-scale { --label: 0px; }
  .tz-row { grid-template-columns: 1fr; gap: 6px; }
  .tz-out { margin-left: 0; }
  .tick-label { font-size: 0.6875rem; }
}
