@font-face { font-family: "Literata"; src: url("fonts/Literata-normal.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/Literata-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("fonts/RedHatMono-normal.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;

  --ground: #faf6ee;
  --ground-2: #f1ebdf;
  --surface: #fffcf6;
  --ink: #1b241f;
  --ink-2: #4e5952;
  --accent: #1f5a43;
  --line: rgb(27 36 31 / 0.13);
  --line-strong: rgb(27 36 31 / 0.3);
  --shadow: 0 1px 2px rgb(20 40 30 / 0.06), 0 10px 28px -8px rgb(20 40 30 / 0.18);

  --cream: #fbf3e4;
  --forest: #173a2c;
  --sage: #9fc2a8;
  --mud: #94702f;

  --serif: "Literata", "Iowan Old Style", Georgia, serif;
  --mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 6px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121a16;
    --ground-2: #18221d;
    --surface: #1c2721;
    --ink: #f1ece2;
    --ink-2: #b6c0b9;
    --accent: #9fc2a8;
    --mud: #d4ab68;
    --line: rgb(241 236 226 / 0.13);
    --line-strong: rgb(241 236 226 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 30px -10px rgb(0 0 0 / 0.6);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; scrollbar-color: var(--line-strong) var(--ground); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--forest); color: var(--cream); }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas { display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.icon { width: 1.05em; height: 1.05em; flex: none; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--ground);
  font-family: var(--mono); font-size: 14px;
}
.skip:focus { top: 16px; }

.h2 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 420;
  line-height: 1.06;
  letter-spacing: -0.032em;
  text-wrap: balance;
  padding-bottom: 0.06em;
}
.lede { margin-top: 18px; max-width: 58ch; font-size: 1.125rem; color: var(--ink-2); text-wrap: pretty; }

/* Buttons */
.btn {
  --h: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--mono); font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn .icon { transition: transform 220ms var(--ease-out); }
.btn--sm { --h: 38px; padding: 0 16px; font-size: 13.5px; }
.btn--ink { background: var(--ink); color: var(--ground); }
.btn--cream { background: var(--cream); color: #1b241f; }
.btn--line-cream { border-color: rgb(251 243 228 / 0.55); color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover { background: color-mix(in oklab, var(--ink) 85%, var(--sage)); }
  .btn--cream:hover { background: #fff; }
  .btn--line-cream:hover { border-color: var(--cream); background: rgb(251 243 228 / 0.1); }
  .btn:hover .icon { transform: translateX(3px); }
}

/* Nav */
.nav { position: fixed; inset: 16px 0 auto; z-index: 20; pointer-events: none; }
.nav__bar {
  pointer-events: auto;
  width: min(1160px, 100% - 2 * var(--gutter));
  margin-inline: auto;
  height: 58px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 10px 0 14px;
  background: var(--surface);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; border-radius: 7px; }
.brand__name { font-size: 19px; font-weight: 480; letter-spacing: -0.025em; }
.nav__links { display: flex; gap: 2px; margin-inline: auto; }
.nav__links a {
  display: block; padding: 8px 12px; border-radius: 999px;
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--ink); background: var(--ground-2); } }
@media (max-width: 860px) { .nav__links { display: none; } .nav__cta { margin-left: auto; } }
@media (max-width: 420px) { .brand__name { display: none; } }

/* Hero */
.flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero {
  touch-action: pan-y;
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(640px, 100svh);
  display: grid; place-items: center;
  background: linear-gradient(100deg, #3a2f1e 0%, #2c3322 45%, #102c22 100%);
  color: var(--cream);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(56% 44% at 50% 52%, rgb(14 20 14 / 0.7), rgb(14 20 14 / 0) 100%);
}
.hero__copy { width: min(1100px, 100% - 2 * var(--gutter)); text-align: center; padding-top: 48px; }
.hero__title {
  font-size: clamp(2.7rem, 6.6vw, 5.4rem);
  font-weight: 420; line-height: 1.02; letter-spacing: -0.04em;
  text-shadow: 0 2px 30px rgb(6 20 14 / 0.3);
}
.hero__title em { font-weight: 400; }
/* The two states in the words themselves: mud-colored and knocked out of line, then clean and smooth. */
.hero__title .messy { color: #d4ab68; white-space: nowrap; }
.hero__title .messy > span { display: inline-block; }
.hero__title .messy > span:nth-child(1) { transform: translateY(0.03em) rotate(-4deg); }
.hero__title .messy > span:nth-child(2) { transform: translateY(-0.05em) rotate(5deg); }
.hero__title .messy > span:nth-child(3) { transform: translateY(0.04em) rotate(-3deg); }
.hero__title .messy > span:nth-child(4) { transform: translateY(-0.02em) rotate(4deg); }
.hero__title .messy > span:nth-child(5) { transform: translateY(0.05em) rotate(-5deg); }
.hero__title .flowing { color: #b6e0c1; }
.hero__title .line { display: block; overflow: hidden; padding: 0 0.08em 0.24em; margin: 0 -0.08em -0.24em; }
.hero__title .line > span { display: inline-block; }
.hero__sub {
  margin: 26px auto 0; max-width: 46ch;
  hyphens: none;
  font-family: var(--mono); font-size: clamp(14.5px, 1.25vw, 16px); font-weight: 500; line-height: 1.6;
  color: rgb(251 243 228 / 0.92); text-wrap: balance;
}
.hero__actions { margin-top: 34px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .line > span { animation: rise 1100ms var(--ease-out) both; }
  .js .hero__title .line:nth-child(2) > span { animation-delay: 110ms; }
  .js .hero__sub { animation: settle 900ms var(--ease-out) 380ms both; }
  .js .hero__actions { animation: settle 900ms var(--ease-out) 470ms both; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes settle { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } }

/* Audience */
.audience { padding: clamp(72px, 10vw, 128px) 0 clamp(24px, 4vw, 48px); }
.audience__text {
  max-width: 24ch;
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  font-weight: 400; line-height: 1.15; letter-spacing: -0.03em;
  text-wrap: balance;
}

/* Services */
.services { padding: clamp(48px, 6vw, 80px) 0 clamp(88px, 11vw, 140px); }
.svc { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
@media (max-width: 720px) { .svc { grid-template-columns: minmax(0, 1fr); } }
.svc li { padding: 24px 0 26px; border-top: 1px solid var(--line-strong); }
.svc h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); font-weight: 450; letter-spacing: -0.025em; line-height: 1.2; }
.svc p { margin-top: 6px; color: var(--ink-2); font-size: 1.05rem; }

/* Work: cream card over the field */
.work {
  touch-action: pan-y;
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(96px, 13vw, 170px) var(--gutter);
  background: linear-gradient(100deg, #10201a, #1d4433);
}
.work__card {
  width: min(1040px, 100%); margin-inline: auto;
  --pad: clamp(28px, 5vw, 60px);
  padding: var(--pad);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 30px 70px -30px rgb(4 18 12 / 0.65);
  overflow: hidden;
}
.work__card .h2 { max-width: 20ch; }

/* The case-study animation: wireline robot shelving and labeling scattered stock. */
.shelfbot { margin: 28px 0 0; padding: 18px 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground); }
.sb { display: block; width: 100%; height: auto; color: var(--ink); }
.sb-line, .sb-line * { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sb .sb-fill { fill: var(--ground); }
.sb .sb-faint { opacity: 0.35; }
.sb .sb-thick { stroke-width: 2.6; }
.sb-floor { stroke: var(--line-strong); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 2 6; }
.sb-eyes circle { fill: currentColor; stroke: none; }
.sb .sb-mud { color: var(--mud); }
.sb .sb-good { color: var(--accent); }
.sb .sb-text { fill: currentColor; stroke: none; font-family: var(--mono); font-weight: 500; }
.sb .sb-cell { fill: currentColor; stroke: none; }
.sb .sb-team { transition: color 300ms ease; }
.sb .sb-check { stroke-width: 1.8; }
.sb .sb-label.ping { animation: sb-ping 520ms var(--ease-out); }
@keyframes sb-ping { 40% { transform: scale(1.35); } }
.sb .sb-label, .sb .sb-label * { stroke: var(--accent); }
.sb .sb-label { opacity: 0; transform: scale(0.6); transform-box: fill-box; transform-origin: center; transition: opacity 220ms ease, transform 320ms var(--ease-out); }
.sb .sb-label.on { opacity: 1; transform: none; }
.shelfbot__bar { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.shelfbot__replay { height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink); cursor: pointer; transition: transform 160ms var(--ease-out), border-color 160ms ease; }
.shelfbot__replay:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .shelfbot__replay:hover { border-color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .sb .sb-label { transition: none; } }
@media (max-width: 640px) { .shelfbot { padding: 10px 8px 8px; margin-top: 22px; } .shelfbot__bar { padding: 0 6px; } }
.ba { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 720px) { .ba { grid-template-columns: minmax(0, 1fr); } }
.ba__col { padding-top: 0; }
.ba__col .ba__label { padding-top: 12px; border-top: 1px solid var(--line-strong); }
.ba__col:last-child .ba__label { border-top-color: var(--accent); }
.ba__label { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.ba__col:last-child .ba__label { color: var(--accent); }
.ba__col p { margin-top: 8px; font-size: 1.1rem; }
.results { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 720px) { .results { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.results li { color: var(--ink-2); font-size: 1rem; line-height: 1.4; }
.results strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 450; letter-spacing: -0.03em; line-height: 1.1; }

/* Approach: a line that draws with the scroll */
.approach { padding: clamp(88px, 11vw, 140px) 0; }
.steps {
  position: relative;
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px;
  padding-top: 30px;
}
.steps::before, .steps::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 2px;
}
.steps::before { background: var(--line); }
.steps::after { background: var(--accent); transform-origin: left; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .steps::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }
  }
}
@keyframes draw { from { transform: scaleX(0); } }
.steps__note { margin-top: 40px; max-width: 60ch; font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); }
.step h3 { font-size: 1.6rem; font-weight: 450; letter-spacing: -0.03em; }
.step p { margin-top: 10px; color: var(--ink-2); font-size: 1rem; }
@media (max-width: 900px) {
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 40px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-left: 26px; }
  .steps::before, .steps::after { top: 0; bottom: 0; left: 0; right: auto; width: 2px; height: auto; }
  .steps::after { transform-origin: top; }
  @keyframes draw { from { transform: scaleY(0); } }
}

/* About */
.about { padding: clamp(88px, 11vw, 140px) 0; background: var(--ground-2); }
.about__wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.about__photo { width: 100%; max-width: 380px; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 900px) { .about__wrap { grid-template-columns: minmax(0, 1fr); } .about__photo { max-width: 260px; } }

.creds { margin-top: 24px; display: grid; gap: 10px; }
.creds li { padding-left: 16px; border-left: 2px solid var(--accent); font-size: 1.05rem; line-height: 1.4; }
.about__link { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--accent); }
.about__link .icon { transition: transform 220ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .about__link:hover .icon { transform: translateX(3px); } }

/* Education, inside About */
.schools { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-strong); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 640px) { .schools { grid-template-columns: minmax(0, 1fr); } }
.school .creds { margin-top: 16px; }
.school__logo {
  display: block; height: 36px;
  background: var(--ink);
  -webkit-mask: var(--logo) no-repeat left center / contain; mask: var(--logo) no-repeat left center / contain;
}
.school__logo--berkeley { --logo: url("img/berkeley-wordmark.svg"); width: 115px; }
.school__logo--cornell { --logo: url("img/cornell-wordmark.svg"); width: 170px; }

/* Contact */
.contact { padding: clamp(96px, 12vw, 160px) 0; }
.contact__title {
  max-width: 17ch;
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  font-weight: 420; line-height: 1.03; letter-spacing: -0.04em;
  padding-bottom: 0.06em; text-wrap: balance;
}
.contact__title em { color: var(--accent); }
.contact .lede { margin-top: 14px; }
.contact__actions { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.contact__email { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .contact__email:hover { color: var(--ink); } }

/* Footer */
.footer { padding: 30px 0 40px; border-top: 1px solid var(--line); }
.footer__wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.footer .brand__mark { width: 26px; height: 26px; border-radius: 6px; }
.footer .brand__name { font-size: 17px; display: inline; }
.footer__meta { display: flex; gap: 22px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.footer__meta a { color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) { .footer__meta a:hover { color: var(--ink); } }
