@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/Newsreader-Italic-Latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --surface: #fffdf8;
  --ink: #252321;
  --muted: #66635d;
  --faint: #7c7870;
  --line: #e2ded6;
  --dot: rgb(37 35 33 / 0.13);
  --glow: rgb(37 35 33 / 0.05);
  --bubble-you: #252321;
  --bubble-you-ink: #f7f5f0;
  --bubble-nod: #efece5;
  --shadow: 0 1px 2px rgb(37 35 33 / 0.04), 0 12px 32px -16px rgb(37 35 33 / 0.18);
  --radius: 28px;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #1c1b19;
    --surface: #242220;
    --ink: #f2efe8;
    --muted: #b5b1a9;
    --faint: #98948c;
    --line: #3a3834;
    --dot: rgb(242 239 232 / 0.1);
    --glow: rgb(242 239 232 / 0.05);
    --bubble-you: #f2efe8;
    --bubble-you-ink: #1c1b19;
    --bubble-nod: #33312d;
    --shadow: 0 12px 32px -16px rgb(0 0 0 / 0.6);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 8px;
  z-index: 60;
}

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

/* Intro: the mark draws itself while a counter runs, then the curtain lifts. */

.loader {
  display: none;
}

.intro .loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  background: var(--bg);
  transition: transform 0.9s var(--ease);
}

.intro-done .loader {
  transform: translateY(-100%);
}

.loader-mark {
  width: 72px;
  height: 72px;
}

.loader-mark path {
  fill: transparent;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation:
    draw 1.8s var(--ease) 0.1s forwards,
    fill-in 0.5s ease 1.7s forwards;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fill-in {
  to {
    fill: var(--ink);
  }
}

.loader-count {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.intro body {
  overflow: hidden;
}

/* Reveal on scroll */

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

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

.people .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.people .reveal:nth-child(3) {
  transition-delay: 0.16s;
}

/* Layout */

.site-header,
main,
.site-footer {
  width: min(1080px, 100% - 32px);
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.mark {
  width: 30px;
  height: 30px;
  fill: var(--ink);
  transform-origin: 30% 85%;
  transition: transform 0.4s var(--spring);
}

.brand:hover .mark,
.brand:focus-visible .mark {
  transform: rotate(-10deg);
}

.wordmark {
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}

nav {
  display: flex;
  gap: 24px;
  font-size: 15px;
}

nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--ink);
}

/* Hero */

.hero {
  position: relative;
  isolation: isolate;
  padding: 96px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -120px -50vw 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 60% 70% at 30% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.meta {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h1 em {
  color: var(--muted);
}

.lede {
  margin: 28px 0 0;
  max-width: 34ch;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label span {
  color: var(--faint);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Cards */

.work {
  display: grid;
  gap: 20px;
  padding-bottom: 96px;
}

.card,
.person {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card::before,
.person::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    360px circle at var(--x, 50%) var(--y, 50%),
    var(--glow),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::before,
.person:hover::before {
  opacity: 1;
}

.card {
  display: block;
  padding: 32px;
  text-decoration: none;
}

.js a.card.reveal {
  transition:
    opacity 0.8s var(--ease),
    transform 0.35s var(--spring),
    box-shadow 0.35s ease;
}

a.card:hover,
a.card:focus-visible,
.js a.card.reveal.in:hover,
.js a.card.reveal.in:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-nod {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 820px) {
  .card-nod {
    grid-template-columns: 1fr 1fr;
    padding: 48px;
  }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-head img {
  width: 56px;
  height: 56px;
  border-radius: 18px;
}

.card-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.1;
}

.card-kicker {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.card-text {
  margin: 24px 0 0;
  max-width: 40ch;
  font-size: 17px;
}

/* Example chat: your message, Nod typing, Nod's reply in the same spot. */

.chat {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  max-width: 360px;
}

.bubble {
  margin: 0;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.4;
}

.bubble-you {
  grid-row: 1;
  justify-self: end;
  max-width: 80%;
  background: var(--bubble-you);
  color: var(--bubble-you-ink);
  border-bottom-right-radius: 6px;
}

.bubble-typing,
.bubble-nod {
  grid-row: 2;
  grid-column: 1;
  justify-self: start;
  align-self: start;
  background: var(--bubble-nod);
  border-bottom-left-radius: 6px;
}

.bubble-nod {
  max-width: 85%;
}

.bubble-typing {
  display: inline-flex;
  gap: 4px;
  padding: 13px 14px;
  visibility: hidden;
}

.bubble-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  animation: blink 1s ease-in-out infinite;
}

.bubble-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.bubble-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.js .chat .bubble-you,
.js .chat .bubble-nod {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.js .in .chat .bubble-you {
  animation: pop 0.45s var(--spring) 0.4s forwards;
}

.js .in .chat .bubble-typing {
  animation: typing 1.3s linear 1s forwards;
}

.js .in .chat .bubble-nod {
  animation: pop 0.45s var(--spring) 2.3s forwards;
}

@keyframes pop {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes typing {
  0%,
  99% {
    visibility: visible;
  }
  100% {
    visibility: hidden;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.card-link {
  display: inline-flex;
  gap: 6px;
  margin-top: 28px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 500;
}

.card-link span {
  transition: transform 0.25s ease;
}

a.card:hover .card-link span {
  transform: translateX(3px);
}

.hug {
  margin: 0;
}

.hug img {
  border-radius: 22px;
  background: #ecebe8;
  transition: transform 0.5s var(--spring);
}

a.card:hover .hug img {
  transform: rotate(-1.5deg) scale(1.01);
}

.hug figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.hug strong {
  color: var(--ink);
  font-weight: 600;
}

.card-next {
  border-style: dashed;
  background: transparent;
}

.card-next .card-name {
  font-size: 22px;
}

.card-next .card-text {
  margin-top: 6px;
  color: var(--muted);
}

/* Team */

.team {
  padding-bottom: 96px;
}

.people {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 820px) {
  .people {
    grid-template-columns: repeat(3, 1fr);
  }
}

.person {
  padding: 28px;
}

.person h3 {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
}

.person .role {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.person .bio {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.linkedin {
  position: relative;
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.2s;
}

.linkedin:hover {
  text-decoration-color: currentColor;
}

.avatar {
  display: block;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  transition: transform 0.4s var(--spring);
}

.person:hover .avatar {
  transform: translateY(-3px) rotate(-6deg);
}

/* Contact and footer */

.contact {
  padding-bottom: 96px;
}

.contact-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.2;
}

.contact-line a {
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.site-footer a {
  text-decoration: none;
}

@media (max-width: 520px) {
  nav {
    gap: 16px;
  }
  .hero {
    padding: 56px 0 48px;
  }
  .card {
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .js .chat .bubble-you,
  .js .chat .bubble-nod {
    opacity: 1;
    transform: none;
  }
}
