:root {
  --paper: #f3f1ec;
  --ink: #0f0f0f;
  --muted: #686868;
  --line: rgba(15, 15, 15, 0.18);
  --line-strong: rgba(15, 15, 15, 0.56);
  --panel: rgba(255, 255, 255, 0.48);
  --inverse: #101010;
  --inverse-muted: #bdbdbd;
  --radius: 6px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Menlo", "Consolas", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.75), transparent 28rem),
    var(--paper);
  font-family: var(--sans);
  letter-spacing: 0;
  overflow-x: hidden;
}

body.is-booting {
  overflow: hidden;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 15, 15, 0.16) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(rgba(15, 15, 15, 0.16) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--paper);
  transition: opacity 420ms ease, visibility 420ms ease;
}

.boot-screen.is-finished {
  opacity: 0;
  visibility: hidden;
}

.boot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 46%, rgba(15, 15, 15, 0.14) 46.1%, transparent 46.4%),
    linear-gradient(160deg, transparent 0 64%, rgba(15, 15, 15, 0.1) 64.1%, transparent 64.4%);
  animation: boot-drift 1.8s ease-out both;
}

.boot-panel {
  position: relative;
  width: min(760px, calc(100% - 36px));
  border: 1px solid var(--ink);
  background: rgba(243, 241, 236, 0.84);
  box-shadow: 18px 18px 0 rgba(15, 15, 15, 0.14);
  font-family: var(--mono);
}

.boot-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border-top: 1px solid rgba(15, 15, 15, 0.35);
  border-left: 1px solid rgba(15, 15, 15, 0.35);
}

.boot-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
}

.boot-title {
  display: grid;
  gap: 10px;
  padding: 54px 28px 42px;
  text-transform: uppercase;
}

.boot-title span {
  color: var(--muted);
  font-size: 12px;
}

.boot-title strong {
  font-family: var(--sans);
  font-size: clamp(40px, 8vw, 86px);
  line-height: 0.9;
}

.boot-lines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 0 28px 26px;
}

.boot-lines span {
  height: 36px;
  border: 1px solid rgba(15, 15, 15, 0.35);
  background:
    linear-gradient(90deg, transparent 46%, var(--ink) 47%, var(--ink) 50%, transparent 51%),
    linear-gradient(transparent 48%, rgba(15, 15, 15, 0.18) 49%, transparent 51%);
  transform-origin: left center;
  animation: boot-line 1.4s ease-out both;
}

.boot-lines span:nth-child(2) {
  animation-delay: 90ms;
}

.boot-lines span:nth-child(3) {
  animation-delay: 180ms;
}

.boot-lines span:nth-child(4) {
  animation-delay: 270ms;
}

.boot-progress {
  height: 12px;
  margin: 0 28px 18px;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.35);
}

.boot-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--ink);
  animation: boot-progress 1.45s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.boot-log {
  margin: 0;
  padding: 0 28px 24px;
  color: var(--muted);
  font-size: 12px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(15, 15, 15, 0.055) 46.2%, transparent 46.5%),
    linear-gradient(155deg, transparent 0 62%, rgba(15, 15, 15, 0.045) 62.2%, transparent 62.5%);
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.motion-field,
.scroll-progress,
.cursor-dot,
.cursor-ring {
  pointer-events: none;
  position: fixed;
}

.motion-field {
  inset: 0;
  z-index: -1;
  opacity: 0.2;
}

.scroll-progress {
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 3px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
}

.cursor-dot,
.cursor-ring {
  z-index: 90;
  display: none;
  border-radius: 999px;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #fff;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid #fff;
  transition: width 160ms ease, height 160ms ease, opacity 160ms ease;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid var(--line-strong);
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(15, 15, 15, 0.08) calc(100% - 1px)),
    transparent;
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  transition: transform 180ms ease;
}

.brand-path {
  color: var(--muted);
}

.brand:hover .brand-mark {
  transform: translateY(-2px);
}

.top-note {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.nav-links {
  gap: 4px;
  font-family: var(--mono);
  font-size: 12px;
}

.nav-links a {
  padding: 10px 12px;
  border: 1px solid transparent;
}

.nav-links a:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.section-grid,
.section {
  border-bottom: 1px solid var(--line-strong);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: 42px;
  min-height: min(82vh, 760px);
  padding: 52px 0 38px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 0;
  width: min(34vw, 360px);
  height: 1px;
  background: linear-gradient(90deg, var(--ink), transparent);
  opacity: 0.38;
}

.hero-copy {
  position: relative;
}

.hero-copy::after {
  content: "motion / tools / notes";
  position: absolute;
  right: 0;
  bottom: -36px;
  color: rgba(15, 15, 15, 0.22);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.92;
  font-weight: 800;
}

.hero-name,
.hero-welcome {
  display: block;
}

.hero-welcome {
  max-width: 760px;
  margin-top: 14px;
  font-size: clamp(42px, 5.4vw, 76px);
  line-height: 0.98;
}

.hero-kaomoji {
  display: inline-block;
  white-space: nowrap;
}

.hero-text {
  max-width: 680px;
  color: #333;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}

.copy-button:hover {
  color: var(--paper);
  background: var(--ink);
}

.terminal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--inverse);
  color: #ededed;
  box-shadow: 14px 14px 0 rgba(15, 15, 15, 0.1);
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.terminal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.08) 48%, transparent 52%);
  opacity: 0.5;
  transform: translateY(-100%);
  animation: terminal-scan 7s ease-in-out infinite;
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 24px 24px;
}

.terminal-bar {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
}

.terminal-body {
  position: relative;
  z-index: 1;
  padding: 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

.terminal-body p {
  margin-bottom: 8px;
}

.prompt {
  color: #fff;
}

.output {
  color: var(--inverse-muted);
  padding-left: 18px;
}

.typing-output.is-done {
  color: #e9e9e9;
}

.typing-output:not(.is-done)::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 5px;
  transform: translateY(2px);
  background: #d8d8d8;
  animation: blink 1s steps(2, start) infinite;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  margin-left: 6px;
  transform: translateY(3px);
  background: #fff;
  animation: blink 1s steps(2, start) infinite;
}

.status-cursor {
  opacity: 0;
}

.status-cursor.is-visible {
  opacity: 1;
}

.status-line {
  min-height: 1.8em;
  opacity: 1;
  transform: none;
  transition: none;
}

.status-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.marquee {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.marquee div,
.marquee a {
  min-height: 50px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.marquee div:last-child,
.marquee a:last-child {
  border-right: 0;
}

.site-directory a {
  transition: background 160ms ease, color 160ms ease;
}

.site-directory a:hover,
.site-directory a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.section {
  padding: 88px 0;
}

.section-head {
  max-width: 680px;
  margin-bottom: 36px;
}

.section-note {
  max-width: 720px;
  color: #333;
  font-size: 18px;
  line-height: 1.75;
}

h2 {
  font-size: clamp(32px, 4.2vw, 62px);
  line-height: 1;
  font-weight: 800;
}

.work-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.15fr 0.8fr;
  gap: 16px;
}

.work-card {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  padding: 22px;
  border: 1px solid var(--ink);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

a.work-card {
  color: inherit;
}

.work-card > .card-index,
.work-card > h3,
.work-card > p,
.work-card > .tags {
  position: relative;
  z-index: 4;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-top: 1px solid rgba(15, 15, 15, 0.3);
  border-left: 1px solid rgba(15, 15, 15, 0.3);
  opacity: 0;
  transform: translate(8px, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.work-card::after,
.interaction-lab::after {
  content: attr(data-project);
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: rgba(15, 15, 15, 0.08);
  font-family: var(--mono);
  font-size: 54px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  text-transform: uppercase;
}

.work-card:hover {
  background: #fffefa;
  box-shadow: 10px 10px 0 rgba(15, 15, 15, 0.16);
}

.work-card:hover::before {
  opacity: 1;
  transform: translate(0, 0);
}

.work-card.featured {
  min-height: 380px;
  background: #fbfaf7;
}

.study-scan,
.community-nodes {
  position: absolute;
  inset: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 1;
}

.work-card:hover .study-scan,
.work-card:hover .community-nodes {
  opacity: 0.36;
}

.study-scan {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-top: 148px;
}

.study-scan::before {
  content: "";
  position: absolute;
  top: 128px;
  left: -22px;
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink), transparent);
  transform: translateX(-100%);
}

.work-card:hover .study-scan::before {
  animation: scan-line 1.35s ease-out both;
}

.study-scan span {
  position: relative;
  display: block;
  width: 54%;
  height: 22px;
  border: 1px solid rgba(15, 15, 15, 0.28);
  background: rgba(255, 255, 255, 0.32);
}

.study-scan span::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 5px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  opacity: 0;
  transform: rotate(-45deg) scale(0.8);
}

.work-card:hover .study-scan span::after {
  animation: check-in 1.1s ease-out both;
}

.work-card:hover .study-scan span:nth-child(2)::after {
  animation-delay: 120ms;
}

.work-card:hover .study-scan span:nth-child(3)::after {
  animation-delay: 240ms;
}

.community-nodes {
  inset: 28px;
  transform: translateY(92px);
}

.community-nodes::before,
.community-nodes::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 10%;
  height: 1px;
  background: rgba(15, 15, 15, 0.34);
  transform-origin: left center;
  opacity: 0;
}

.community-nodes::before {
  top: 86px;
  transform: rotate(16deg) scaleX(0);
}

.community-nodes::after {
  top: 138px;
  transform: rotate(-13deg) scaleX(0);
}

.work-card:hover .community-nodes::before {
  animation: node-line-a 1.2s ease-out both;
}

.work-card:hover .community-nodes::after {
  animation: node-line-b 1.2s ease-out both 120ms;
}

.community-nodes span {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--ink);
  background: #fbfaf7;
  transform: scale(0.7);
  opacity: 0;
}

.community-nodes span:nth-child(1) {
  left: 12%;
  top: 74px;
}

.community-nodes span:nth-child(2) {
  left: 48%;
  top: 98px;
}

.community-nodes span:nth-child(3) {
  right: 8%;
  top: 68px;
}

.community-nodes span:nth-child(4) {
  left: 32%;
  top: 148px;
}

.work-card:hover .community-nodes span {
  animation: node-pop 620ms ease-out both;
}

.work-card:hover .community-nodes span:nth-child(2) {
  animation-delay: 90ms;
}

.work-card:hover .community-nodes span:nth-child(3) {
  animation-delay: 180ms;
}

.work-card:hover .community-nodes span:nth-child(4) {
  animation-delay: 270ms;
}

.f1-pass {
  position: absolute;
  left: 0;
  right: 0;
  top: 218px;
  height: 74px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
  z-index: 1;
}

.featured:hover .f1-pass {
  opacity: 0.48;
}

.f1-wall {
  position: absolute;
  left: 24px;
  right: 24px;
  height: 10px;
  border-top: 1px solid rgba(15, 15, 15, 0.45);
  border-bottom: 1px solid rgba(15, 15, 15, 0.45);
  background:
    repeating-linear-gradient(
      90deg,
      rgba(15, 15, 15, 0.18) 0 18px,
      transparent 18px 36px
    );
}

.f1-wall:nth-child(1) {
  top: 5px;
}

.f1-wall:nth-child(2) {
  bottom: 3px;
  opacity: 0.56;
}

.car-body {
  position: absolute;
  left: -260px;
  top: 20px;
  width: 178px;
  height: 32px;
  border-bottom: 3px solid var(--ink);
  border-radius: 56% 18% 8% 12% / 72% 60% 20% 24%;
  background:
    linear-gradient(165deg, transparent 0 34%, var(--ink) 35% 38%, transparent 39%),
    linear-gradient(0deg, transparent 0 64%, var(--ink) 65% 70%, transparent 71%);
}

.featured:hover .car-body {
  animation: f1-car-pass 3.1s cubic-bezier(0.18, 0.72, 0.18, 1) both;
}

.car-body::before {
  content: "";
  position: absolute;
  left: 34px;
  top: -15px;
  width: 76px;
  height: 30px;
  border-top: 3px solid var(--ink);
  border-left: 3px solid var(--ink);
  border-radius: 60% 42% 0 0;
  transform: skewX(-20deg);
}

.car-body::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 10px;
  width: 54px;
  height: 3px;
  background: var(--ink);
  transform: rotate(-8deg);
}

.car-nose {
  position: absolute;
  right: -52px;
  top: 12px;
  width: 68px;
  height: 8px;
  border-top: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
  transform: skewX(-24deg);
}

.rear-wing {
  position: absolute;
  left: -28px;
  top: -2px;
  width: 24px;
  height: 34px;
  border-left: 4px solid var(--ink);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  transform: skewX(-8deg);
}

.car-floor {
  position: absolute;
  left: 18px;
  right: -42px;
  bottom: -3px;
  height: 3px;
  background: var(--ink);
}

.halo {
  position: absolute;
  left: 78px;
  top: -18px;
  width: 34px;
  height: 22px;
  border: 3px solid var(--ink);
  border-bottom: 0;
  border-radius: 40px 40px 0 0;
  transform: skewX(-16deg);
}

.cockpit {
  position: absolute;
  left: 86px;
  top: -4px;
  width: 16px;
  height: 9px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fbfaf7;
}

.wheel {
  position: absolute;
  bottom: -18px;
  width: 28px;
  height: 28px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 45%, var(--ink) 46%, var(--ink) 54%, transparent 55%),
    linear-gradient(transparent 45%, var(--ink) 46%, var(--ink) 54%, transparent 55%),
    #fbfaf7;
}

.wheel-front {
  right: 4px;
}

.wheel-rear {
  left: 14px;
}

.card-index,
.tags,
.note-list span,
.note-list em {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.work-card h3 {
  margin: 42px 0 16px;
  font-size: 24px;
  line-height: 1.1;
}

.work-card p {
  color: #353535;
  line-height: 1.75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tags span {
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.42);
}

.code-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 28px 0;
}

.code-map span {
  height: 42px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 45%, var(--ink) 46%, var(--ink) 48%, transparent 49%),
    linear-gradient(transparent 48%, rgba(15, 15, 15, 0.25) 49%, transparent 51%);
  transition: transform 220ms ease, background-position 420ms ease;
}

.featured:hover .code-map span {
  background-position: 10px 0, 0 8px;
  transform: translateY(-3px);
}

.split {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 54px;
  align-items: start;
}

.sticky-head {
  position: sticky;
  top: 24px;
}

.readme {
  border-top: 1px solid var(--ink);
}

.readme-row {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-strong);
  transition: background 220ms ease;
}

.readme-row[id] {
  scroll-margin-top: 28px;
}

#community {
  scroll-margin-top: 42vh;
}

.readme-row:hover {
  background: rgba(255, 255, 255, 0.34);
}

.readme-row:hover span {
  color: var(--ink);
}

.readme-row:hover p {
  transform: translateX(6px);
}

.readme-row span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  transition: color 220ms ease;
}

.readme-row p {
  margin: 0;
  font-size: 20px;
  line-height: 1.6;
  transition: transform 220ms ease;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 0.92em;
}

.inline-link::after {
  content: "↗";
  font-size: 0.78em;
}

.inline-link:hover {
  background: var(--ink);
  color: var(--paper);
}

.note-list {
  border-top: 1px solid var(--ink);
}

.note-list a {
  display: grid;
  grid-template-columns: 120px 1fr 80px;
  gap: 18px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line-strong);
  transition: padding-left 180ms ease, background 180ms ease;
}

.note-list a:hover {
  padding-left: 14px;
  background: rgba(255, 255, 255, 0.42);
}

.note-list a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.note-list strong {
  font-size: 18px;
}

.note-list em {
  font-style: normal;
  text-align: right;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 92px;
  grid-auto-flow: dense;
  gap: 14px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  grid-column: span 2;
  grid-row: span 4;
  border: 1px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(15, 15, 15, 0.1) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(rgba(15, 15, 15, 0.1) 1px, transparent 1px) 0 0 / 28px 28px,
    #fbfaf7;
  isolation: isolate;
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.photo-card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.34), transparent 32%),
    linear-gradient(0deg, rgba(15, 15, 15, 0.74), transparent 48%);
  content: "";
  pointer-events: none;
}

.photo-card:hover {
  transform: translateY(-6px);
  box-shadow: 10px 10px 0 rgba(15, 15, 15, 0.12);
}

.photo-card.is-focus {
  grid-column: span 3;
  grid-row: span 5;
}

.photo-card.is-tall {
  grid-row: span 5;
}

.photo-card.is-wide {
  grid-column: span 4;
  grid-row: span 3;
}

.photo-card img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition: filter 180ms ease, transform 240ms ease;
  user-select: none;
  -webkit-user-drag: none;
}

.photo-card:hover img {
  filter: grayscale(0.2) contrast(1.06);
  transform: scale(1.025);
}

.photo-card span,
.photo-card strong {
  position: absolute;
  left: 18px;
  z-index: 1;
}

.photo-card span {
  top: 18px;
  padding: 6px 8px;
  border: 1px solid rgba(247, 246, 242, 0.76);
  background: rgba(15, 15, 15, 0.42);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.photo-card strong {
  bottom: 18px;
  max-width: calc(100% - 36px);
  color: var(--paper);
  font-size: 22px;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.54);
}

.photo-card.placeholder {
  display: grid;
  align-content: end;
  padding: 18px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(244, 243, 238, 0.66);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.is-viewing-photo .cursor-dot,
.is-viewing-photo .cursor-ring {
  z-index: 90;
}

.photo-lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.is-viewing-photo .site-shell,
.is-viewing-photo .motion-field {
  filter: blur(5px);
}

.lightbox-frame {
  position: relative;
  display: grid;
  width: min(86vw, 1040px);
  height: min(82vh, 760px);
  margin: 0;
  border: 1px solid var(--ink);
  background:
    linear-gradient(90deg, rgba(247, 246, 242, 0.12) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgba(247, 246, 242, 0.12) 1px, transparent 1px) 0 0 / 34px 34px,
    #101010;
  box-shadow: 18px 18px 0 rgba(15, 15, 15, 0.18);
  transform: translateY(14px) scale(0.98);
  transition: transform 180ms ease;
}

.photo-lightbox[aria-hidden="false"] .lightbox-frame {
  transform: translateY(0) scale(1);
}

.lightbox-image {
  width: 100%;
  height: 100%;
  max-height: calc(min(82vh, 760px) - 76px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-frame figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 18px 22px;
  border-top: 1px solid rgba(247, 246, 242, 0.28);
  color: var(--paper);
}

.lightbox-frame figcaption span {
  color: rgba(247, 246, 242, 0.68);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.lightbox-frame figcaption strong {
  font-size: 22px;
}

.lightbox-close {
  position: fixed;
  top: 28px;
  right: 30px;
  z-index: 61;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

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

.auto-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.auto-grid article {
  min-height: 260px;
  padding: 22px;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.36);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.auto-grid article:hover {
  background: #fbfaf7;
  transform: translateY(-6px);
  box-shadow: 10px 10px 0 rgba(15, 15, 15, 0.12);
}

.auto-grid span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.auto-grid strong {
  display: block;
  margin: 42px 0 16px;
  font-size: 26px;
}

.auto-grid p {
  color: #333;
  line-height: 1.75;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
}

.contact-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--ink);
  background: var(--inverse);
  color: var(--paper);
  font-family: var(--mono);
}

.lab,
.timeline-section {
  padding-top: 0;
}

.interaction-lab,
.timeline-panel {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  border: 1px solid var(--ink);
  background:
    linear-gradient(115deg, transparent 0 44%, rgba(15, 15, 15, 0.22) 44.2%, transparent 44.5%) 0 0 / 180px 180px,
    linear-gradient(90deg, transparent 49%, rgba(15, 15, 15, 0.16) 50%, transparent 51%) 0 0 / 36px 36px,
    linear-gradient(transparent 49%, rgba(15, 15, 15, 0.16) 50%, transparent 51%) 0 0 / 36px 36px,
    #fbfaf7;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.interaction-lab::before,
.timeline-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(15, 15, 15, 0.2);
  clip-path: polygon(0 0, 42% 0, 42% 100%, 0 100%);
}

.interaction-lab:hover,
.timeline-panel:hover {
  box-shadow: 12px 12px 0 rgba(15, 15, 15, 0.14);
}

.timeline-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  min-height: 300px;
  padding: 34px 28px;
}

.timeline-track {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 108px;
  height: 1px;
  background: var(--ink);
}

.timeline-track::before,
.timeline-track::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--ink);
  background: var(--paper);
  transform: rotate(45deg);
}

.timeline-track::before {
  left: 0;
}

.timeline-track::after {
  right: 0;
}

.timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 52px 1fr auto;
  gap: 22px;
  min-height: 230px;
  padding: 18px 18px 16px;
  border-left: 1px solid rgba(15, 15, 15, 0.28);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 69px;
  left: -7px;
  width: 13px;
  height: 13px;
  border: 1px solid var(--ink);
  background: var(--paper);
  transition: background 180ms ease, transform 180ms ease;
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 50px;
  height: 1px;
  background: rgba(15, 15, 15, 0.24);
}

.timeline-date,
.timeline-item em {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.timeline-item h3 {
  margin-bottom: 16px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.08;
}

.timeline-item em {
  align-self: end;
  font-style: normal;
}

.timeline-item:hover {
  z-index: 2;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 10px 10px 0 rgba(15, 15, 15, 0.16);
  transform: translateY(-8px);
}

.timeline-item:hover::before {
  background: var(--paper);
  transform: rotate(45deg) scale(1.08);
}

.timeline-item:hover::after {
  background: rgba(255, 255, 255, 0.32);
}

.timeline-item:hover .timeline-date,
.timeline-item:hover em {
  color: rgba(243, 241, 236, 0.78);
}

.lab-ruler {
  position: absolute;
  inset: 22px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.lab-ruler span {
  border-left: 1px solid rgba(15, 15, 15, 0.28);
}

.lab-ruler span:nth-child(2),
.lab-ruler span:nth-child(4) {
  border-left-style: dashed;
}

.lab-copy {
  position: absolute;
  left: 26px;
  bottom: 26px;
  display: grid;
  max-width: 560px;
  gap: 12px;
  z-index: 1;
}

.lab-copy strong {
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1;
}

.lab-copy span {
  max-width: 520px;
  color: #333;
  line-height: 1.7;
}

.lab-track {
  position: absolute;
  top: 56px;
  right: 34px;
  width: min(45%, 480px);
  height: 190px;
  pointer-events: none;
}

.lab-track::before,
.lab-track::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(15, 15, 15, 0.42);
  transform: skewX(-22deg);
}

.lab-track::before {
  top: 28px;
  right: 24px;
  width: 74%;
  height: 92px;
  border-left: 0;
  border-bottom: 0;
}

.lab-track::after {
  right: 112px;
  bottom: 8px;
  width: 46%;
  height: 70px;
  border-right: 0;
  border-top: 0;
}

.lab-track span {
  position: absolute;
  display: block;
  height: 1px;
  background: rgba(15, 15, 15, 0.42);
  transform: rotate(-18deg);
}

.lab-track span:nth-child(1) {
  top: 32px;
  left: 12%;
  width: 48%;
}

.lab-track span:nth-child(2) {
  top: 96px;
  left: 28%;
  width: 58%;
}

.lab-track span:nth-child(3) {
  top: 154px;
  left: 8%;
  width: 36%;
}

.lab-metrics {
  position: absolute;
  top: 28px;
  right: 28px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  width: min(46%, 520px);
  border-top: 1px solid rgba(15, 15, 15, 0.56);
  border-left: 1px solid rgba(15, 15, 15, 0.22);
  background: rgba(251, 250, 247, 0.68);
  backdrop-filter: blur(2px);
}

.lab-metrics div {
  min-height: 82px;
  padding: 14px;
  border-right: 1px solid rgba(15, 15, 15, 0.22);
  border-bottom: 1px solid rgba(15, 15, 15, 0.22);
}

.lab-metrics span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.lab-metrics strong {
  font-family: var(--mono);
  font-size: 15px;
  text-transform: uppercase;
}

.is-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.is-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-panel p {
  margin-bottom: 6px;
  color: var(--inverse-muted);
}

.contact-panel a {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  overflow-wrap: anywhere;
}

.contact-panel a:hover,
.contact-panel a:focus-visible {
  border-bottom-color: var(--paper);
  color: #fff;
}

.contact-link {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  align-items: baseline;
}

.contact-link span {
  color: var(--inverse-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.contact-link strong {
  color: var(--paper);
  font-size: 18px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.contact-panel .external-link {
  display: grid;
  grid-template-columns: 82px 1fr auto;
  align-items: center;
  gap: 18px;
}

.contact-panel .external-link::after {
  content: "open ↗";
  flex: 0 0 auto;
  color: var(--inverse-muted);
  font-size: 12px;
}

.copy-button {
  width: fit-content;
  margin-top: 8px;
  border-color: var(--paper);
  color: var(--paper);
}

.copy-button:hover {
  color: var(--ink);
  background: var(--paper);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 42px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes terminal-scan {
  0%,
  64% {
    transform: translateY(-100%);
  }

  78% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(100%);
  }
}

@keyframes boot-progress {
  0% {
    width: 0;
  }

  58% {
    width: 73%;
  }

  100% {
    width: 100%;
  }
}

@keyframes boot-line {
  0% {
    opacity: 0;
    transform: scaleX(0.18);
  }

  100% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes boot-drift {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scan-line {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(160%);
  }
}

@keyframes check-in {
  0% {
    opacity: 0;
    transform: rotate(-45deg) scale(0.72);
  }

  100% {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
  }
}

@keyframes node-pop {
  0% {
    opacity: 0;
    transform: scale(0.68);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes node-line-a {
  100% {
    opacity: 1;
    transform: rotate(16deg) scaleX(1);
  }
}

@keyframes node-line-b {
  100% {
    opacity: 1;
    transform: rotate(-13deg) scaleX(1);
  }
}

@keyframes f1-car-pass {
  0% {
    left: -260px;
  }

  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    left: calc(100% + 90px);
  }
}

@media (pointer: fine) {
  .cursor-dot,
  .cursor-ring {
    display: block;
  }

  body {
    cursor: none;
  }

  a,
  button,
  [data-tilt],
  .photo-card,
  .photo-lightbox,
  .lightbox-frame,
  .lightbox-image {
    cursor: none;
  }
}

@media (max-width: 900px) {
  .site-shell {
    width: min(100% - 24px, 720px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .hero,
  .split,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 40px 0 30px;
  }

  .marquee {
    grid-template-columns: 1fr;
  }

  .marquee div,
  .marquee a {
    min-height: 40px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .lab {
    padding-top: 64px;
  }

  .timeline-section {
    padding-top: 64px;
  }

  .timeline-panel {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
    padding: 22px;
  }

  .timeline-track {
    top: 22px;
    bottom: 22px;
    left: 32px;
    right: auto;
    width: 1px;
    height: auto;
  }

  .timeline-track::before,
  .timeline-track::after {
    left: -4px;
    right: auto;
  }

  .timeline-track::after {
    top: auto;
    bottom: -4px;
  }

  .timeline-item {
    grid-template-rows: auto;
    gap: 16px;
    min-height: 0;
    padding: 22px 18px 22px 36px;
    border-left: 0;
    border-bottom: 1px solid rgba(15, 15, 15, 0.24);
  }

  .timeline-item::before {
    top: 26px;
    left: 5px;
  }

  .timeline-item::after {
    display: none;
  }

  .lab-track {
    top: 34px;
    right: 18px;
    width: 54%;
    opacity: 0.42;
  }

  .lab-metrics {
    left: 18px;
    right: 18px;
    top: 18px;
    width: auto;
  }

  .lab-copy {
    left: 22px;
    right: 22px;
    bottom: 24px;
  }

  .sticky-head {
    position: static;
  }

  .note-list a,
  .readme-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .note-list em {
    text-align: left;
  }

  .photo-grid,
  .auto-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-auto-rows: auto;
  }

  .photo-card,
  .photo-card.is-focus,
  .photo-card.is-tall,
  .photo-card.is-wide {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 360px;
  }

  .photo-lightbox {
    padding: 18px;
  }

  .lightbox-frame {
    width: calc(100vw - 36px);
    height: min(78vh, 660px);
  }

  .lightbox-image {
    max-height: calc(min(78vh, 660px) - 68px);
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 520px) {
  body {
    background-size: 30px 30px;
  }

  .nav-links a {
    padding: 8px 9px;
  }

  h1 {
    font-size: 46px;
  }

  .terminal-card {
    box-shadow: 10px 10px 0 rgba(15, 15, 15, 0.12);
  }

  .section {
    padding: 64px 0;
  }

  .interaction-lab {
    min-height: 500px;
  }

  .lab-metrics {
    grid-template-columns: 1fr;
  }

  .lab-metrics div {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }

  .lab-metrics span {
    margin-bottom: 0;
  }

  .lab-track {
    width: 78%;
    height: 160px;
    top: 178px;
    opacity: 0.32;
  }
}
