:root {
  --paper: #f4f2ec;
  --paper-rgb: 244, 242, 236;
  --paper-deep: #e9e5dc;
  --paper-card: #fbfaf6;
  --paper-card-rgb: 251, 250, 246;
  --ink: #1b1b18;
  --ink-soft: #504b43;
  --muted: #746d62;
  --line: #3a352d;
  --line-soft: rgba(58, 53, 45, 0.22);
  --marker: #e7b936;
  --marker-soft: rgba(231, 185, 54, 0.22);
  --blue: #275ba8;
  --blue-soft: #c8d8ee;
  --green: #66a56a;
  --green-ink: #39743f;
  --red: #bd564c;
  --shadow: rgba(64, 49, 31, 0.16);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --hand: "Bradley Hand", "Segoe Print", "Comic Sans MS", "PingFang SC", cursive;
  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, monospace;
}

html[lang="ja-JP"] {
  --sans: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --hand: "Klee", "Hiragino Maru Gothic ProN", "Yu Gothic", "Bradley Hand", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(58, 53, 45, 0.032) 1px, transparent 1px),
    linear-gradient(rgba(58, 53, 45, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px, 32px 32px, auto;
  font-family: var(--sans);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    radial-gradient(rgba(58, 53, 45, 0.1) 0.7px, transparent 0.8px),
    radial-gradient(rgba(255, 255, 255, 0.62) 0.7px, transparent 0.8px);
  background-position:
    0 0,
    11px 17px;
  background-size: 23px 23px;
  content: "";
}

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

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

svg,
img,
canvas {
  display: block;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: var(--paper-card);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  width: 100%;
  padding: 12px 48px 0;
  pointer-events: none;
}

.header-shell {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(310px, 1fr);
  align-items: center;
  width: 100%;
  max-width: 1420px;
  min-height: 56px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 rgba(64, 49, 31, 0);
  backdrop-filter: blur(0);
  transition:
    max-width 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    padding 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 380ms ease,
    border-color 380ms ease,
    box-shadow 380ms ease,
    backdrop-filter 380ms ease;
  pointer-events: auto;
}

.site-header.scrolled .header-shell {
  max-width: 1080px;
  padding: 5px 6px 5px 12px;
  border-color: rgba(58, 53, 45, 0.17);
  background: rgba(var(--paper-card-rgb), 0.8);
  box-shadow:
    0 14px 34px rgba(64, 49, 31, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  backdrop-filter: blur(16px) saturate(1.15);
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header.scrolled .header-shell {
    background: rgba(var(--paper-card-rgb), 0.97);
  }
}

.brand,
.nav-links,
.header-actions {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  font-family: var(--hand);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.brand-name {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  white-space: nowrap;
  transition:
    max-width 360ms ease,
    opacity 220ms ease,
    transform 360ms ease;
}

.site-header.scrolled .brand-name {
  max-width: 0;
  opacity: 0;
  transform: translateX(-8px);
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 7px 5px 8px 4px;
  background: rgba(var(--paper-card-rgb), 0.84);
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.55rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 4px 4px 0 rgba(231, 185, 54, 0.45);
  transform: rotate(-2deg);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-self: center;
  gap: 4px;
  height: 52px;
  padding: 2px;
  border: 1.5px solid rgba(58, 53, 45, 0.18);
  border-radius: 999px;
  background: rgba(var(--paper-card-rgb), 0.72);
  box-shadow: 0 6px 18px rgba(64, 49, 31, 0.06);
  backdrop-filter: blur(12px);
  font-family: var(--hand);
  font-size: 1.03rem;
  font-weight: 800;
  isolation: isolate;
  transition:
    height 420ms ease,
    background 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease,
    backdrop-filter 320ms ease;
}

.site-header.scrolled .nav-links {
  height: 46px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  transition:
    min-width 420ms ease,
    color 160ms ease,
    background 160ms ease;
}

.site-header.scrolled .nav-links a {
  min-width: 76px;
}

.nav-links a::after {
  position: absolute;
  inset: 4px;
  z-index: -1;
  height: auto;
  border: 1.5px solid rgba(58, 53, 45, 0.28);
  border-radius: 999px;
  background: var(--marker);
  opacity: 0;
  transform: scale(0.9) rotate(-1deg);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  content: "";
}

.nav-links a:hover::after,
.nav-links a.active::after {
  opacity: 0.8;
  transform: scale(1) rotate(-1deg);
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: gap 420ms ease;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 48px;
  padding: 2px;
  border: 1.5px solid rgba(58, 53, 45, 0.24);
  border-radius: 999px 960px 999px 940px;
  background: rgba(var(--paper-card-rgb), 0.72);
  box-shadow: 2px 3px 0 rgba(64, 49, 31, 0.045);
  transition:
    height 420ms ease,
    gap 420ms ease,
    padding 420ms ease,
    border-width 320ms ease,
    background 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease;
}

.site-header.scrolled .language-switcher {
  height: 44px;
  border-color: transparent;
  background: rgba(58, 53, 45, 0.055);
  box-shadow: none;
}

.language-switcher button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0 7px;
  place-items: center;
  border: 0;
  border-radius: 999px 920px 999px 940px;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.language-switcher button:hover:not(:disabled) {
  color: var(--blue);
  background: rgba(200, 216, 238, 0.32);
}

.language-switcher button[aria-pressed="true"] {
  background: var(--marker);
  color: var(--ink);
  box-shadow: 1px 2px 0 rgba(64, 49, 31, 0.13);
}

.language-switcher button:disabled {
  opacity: 1;
  cursor: default;
}

.language-switcher--standalone {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 10;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--line);
  cursor: pointer;
}

.icon-button svg {
  width: 27px;
  height: 27px;
  transition: width 320ms ease, height 320ms ease;
}

.sound-toggle[aria-pressed="false"] .sound-wave {
  opacity: 0.25;
}

.sound-toggle[aria-pressed="true"] {
  color: var(--blue);
}

.say-hi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 17px;
  border: 1.5px solid var(--line);
  border-radius: 999px 920px 999px 940px;
  background: var(--blue);
  color: #fff;
  font-family: var(--hand);
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 3px 3px 0 rgba(58, 53, 45, 0.24);
  transform: rotate(-0.3deg);
  cursor: pointer;
  transition:
    width 420ms ease,
    min-width 420ms ease,
    padding 420ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.say-hi-label--compact {
  display: none;
}

.say-hi:hover {
  box-shadow: 1px 1px 0 rgba(58, 53, 45, 0.24);
  transform: translate(2px, 2px) rotate(-0.3deg);
}

@media (min-width: 901px) {
  .site-header.scrolled .header-actions {
    gap: 8px;
  }

  .site-header.scrolled .language-switcher {
    gap: 0;
    padding: 0;
    border-width: 0;
  }

  .site-header.scrolled .sound-toggle svg {
    width: 23px;
    height: 23px;
  }

  .site-header.scrolled .say-hi {
    width: 76px;
    min-width: 76px;
    min-height: 44px;
    padding: 0 10px;
    box-shadow: 1px 1px 0 rgba(58, 53, 45, 0.18);
    transform: none;
  }

  .site-header.scrolled .say-hi:hover {
    box-shadow: none;
    transform: translate(1px, 1px);
  }

  .site-header.scrolled .say-hi-label--full,
  .site-header.scrolled .say-hi svg {
    display: none;
  }

  .site-header.scrolled .say-hi-label--compact {
    display: inline;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .site-header.scrolled .say-hi {
    width: 68px;
    min-width: 68px;
    padding-inline: 8px;
  }
}

.say-hi svg {
  width: 25px;
  height: 25px;
}

.wechat-dialog {
  width: min(390px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.wechat-dialog::backdrop {
  background: rgba(23, 23, 20, 0.38);
  backdrop-filter: blur(4px);
}

.wechat-dialog-paper {
  position: relative;
  max-height: calc(100svh - 32px);
  padding: 22px;
  overflow: auto;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 12px 14px 0 rgba(23, 23, 20, 0.16);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.dialog-close svg {
  width: 24px;
  height: 24px;
}

.dialog-kicker {
  margin: 0 48px 4px 0;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 800;
}

.wechat-dialog h2 {
  margin: 0 48px 16px 0;
  font-family: var(--hand);
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.wechat-dialog img {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
  border: 1.5px solid rgba(58, 53, 45, 0.22);
}

.wechat-dialog-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}

.section-anchor {
  scroll-margin-top: 104px;
}

.experience,
.projects,
.repos,
.now,
.contact,
.site-footer {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding-right: 48px;
  padding-left: 48px;
}

.intro-sequence {
  position: relative;
  height: 260svh;
  scroll-margin-top: 0;
}

.intro-sticky {
  --hero-opacity: 1;
  --hero-y: 0px;
  --intro-primary: 0;
  --intro-secondary: 0;
  position: sticky;
  top: 0;
  width: 100%;
  height: 100svh;
  overflow: clip;
  isolation: isolate;
}

.intro-sticky .three-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.intro-floor {
  position: absolute;
  left: 50%;
  bottom: -82px;
  z-index: 0;
  width: min(760px, 62vw);
  height: 250px;
  border: 1px solid rgba(58, 53, 45, 0.11);
  background-image:
    linear-gradient(90deg, rgba(58, 53, 45, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(58, 53, 45, 0.07) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.45;
  transform: translateX(-50%) perspective(420px) rotateX(58deg);
  transform-origin: center bottom;
}

.intro-sticky .hero-copy {
  position: absolute;
  left: clamp(72px, 7vw, 112px);
  top: 50%;
  z-index: 3;
  width: min(620px, 46vw);
  opacity: var(--hero-opacity);
  transform: translateY(calc(-50% + var(--hero-y)));
  pointer-events: none;
}

.intro-sticky h1 {
  position: relative;
  margin: 0;
  font-size: clamp(4.75rem, 6.4vw, 6rem);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro-sticky h1 span {
  display: block;
  color: var(--ink);
}

.hero-banner {
  display: inline-block;
  max-width: 540px;
  margin: 20px 0 0 -8px;
  padding: 13px 20px 14px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--marker);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 7px 7px 0 rgba(64, 49, 31, 0.1);
  transform: rotate(-3deg);
}

.scroll-cue {
  position: absolute;
  left: clamp(72px, 7vw, 112px);
  bottom: clamp(24px, 3svh, 36px);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 850;
}

.scroll-cue::after {
  width: 22px;
  height: 22px;
  margin-left: 8px;
  color: var(--green);
  font-family: var(--sans);
  font-size: 1.2rem;
  line-height: 1;
  text-align: center;
  animation: scroll-nudge 1.6s ease-in-out infinite;
  content: "↓";
}

.intro-callout {
  position: absolute;
  z-index: 4;
  width: min(300px, 24vw);
  padding: 18px 20px;
  border: 2px solid rgba(58, 53, 45, 0.56);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.94);
  box-shadow: 8px 10px 0 rgba(64, 49, 31, 0.06);
  transform: translateY(18px);
  pointer-events: none;
}

.intro-callout::before {
  position: absolute;
  top: -9px;
  left: 36px;
  width: 66px;
  height: 15px;
  background: rgba(231, 185, 54, 0.4);
  transform: rotate(-2deg);
  content: "";
}

.intro-callout h2 {
  margin: 0 0 5px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.intro-callout p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.45;
}

.intro-callout.identity {
  left: clamp(96px, 13vw, 188px);
  top: 14%;
  opacity: var(--intro-primary);
}

.intro-callout.education {
  left: clamp(88px, 12vw, 174px);
  top: 39%;
  width: min(340px, 27vw);
  opacity: var(--intro-primary);
}

.intro-sticky:is([data-phase="intro"], [data-phase="domain"]) .intro-callout.education {
  pointer-events: auto;
}

.intro-callout.education summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.intro-callout.education summary::-webkit-details-marker {
  display: none;
}

.intro-callout.education summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}

.intro-callout.education summary:hover .education-toggle {
  background: rgba(231, 185, 54, 0.34);
}

.intro-callout .education-label {
  display: block;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: 0;
}

.intro-callout.education .education-degree {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 400;
  line-height: 1.35;
}

.education-toggle {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(58, 53, 45, 0.48);
  border-radius: 50%;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1.3rem;
  line-height: 1;
  place-items: center;
  transition: transform 180ms ease, background-color 180ms ease;
}

.intro-callout.education[open] {
  z-index: 7;
}

.intro-callout.education[open] .education-toggle {
  background: var(--marker);
  transform: rotate(45deg);
}

.education-details {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1.5px dashed rgba(58, 53, 45, 0.34);
}

.intro-callout .education-period {
  display: block;
  margin-bottom: 7px;
  color: var(--green-ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.055em;
}

.intro-callout .education-coursework {
  margin-top: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.intro-callout.role {
  right: clamp(96px, 13vw, 188px);
  top: 30%;
  opacity: var(--intro-primary);
}

.intro-callout.domain {
  left: clamp(96px, 13vw, 188px);
  bottom: 14%;
  opacity: var(--intro-secondary);
}

.intro-callout.builder {
  right: clamp(96px, 13vw, 188px);
  bottom: 16%;
  opacity: var(--intro-secondary);
}

@media (min-width: 981px) {
  .intro-callout::after {
    position: absolute;
    top: 50%;
    width: clamp(28px, calc(24vw - 205px), 140px);
    border-top: 2px solid rgba(102, 165, 106, 0.74);
    content: "";
  }

  .intro-callout.identity::after,
  .intro-callout.education::after,
  .intro-callout.domain::after {
    left: 100%;
    transform: rotate(4deg);
    transform-origin: left center;
  }

  .intro-callout.role::after,
  .intro-callout.builder::after {
    right: 100%;
    transform: rotate(-4deg);
    transform-origin: right center;
  }
}

.digital-ethan {
  pointer-events: none;
  user-select: none;
}

.hero-character {
  position: absolute;
  right: max(10vw, calc((100vw - 1120px) / 2));
  bottom: 5svh;
  z-index: 2;
  width: 240px;
  height: auto;
  max-height: 76svh;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(18px 20px 0 rgba(64, 49, 31, 0.08));
  transform-origin: 50% 70%;
  transition:
    right 420ms ease,
    bottom 420ms ease,
    width 420ms ease,
    opacity 180ms ease;
}

.intro-sticky[data-phase="recenter"] .hero-character,
.intro-sticky[data-phase="intro"] .hero-character,
.intro-sticky[data-phase="domain"] .hero-character {
  right: 50%;
  transform: translateX(50%);
}

.three-ready .hero-character {
  opacity: 0;
}

.project-card::after,
.repo-card::after,
.contact-postcard::after {
  position: absolute;
  inset: 4px -4px -4px 4px;
  z-index: -1;
  border: 1.5px solid rgba(58, 53, 45, 0.16);
  border-radius: inherit;
  content: "";
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.section-heading h2,
.now h2,
.contact h2 {
  position: relative;
  width: fit-content;
  margin: 0;
  font-family: var(--hand);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 900;
  text-wrap: balance;
}

.section-heading h2::after,
.now h2::after,
.contact h2::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  height: 9px;
  background: var(--marker);
  transform: rotate(-1.2deg);
  content: "";
}

.section-heading p,
.now-copy > p,
.contact p {
  max-width: 610px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 620;
}

.section-heading a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(39, 91, 168, 0.42);
  text-underline-offset: 5px;
}

.section-heading a::after {
  content: "→";
}

.projects {
  padding-top: 28px;
  padding-bottom: 56px;
}

.experience {
  padding-top: 46px;
  padding-bottom: 56px;
  border-top: 2px solid rgba(58, 53, 45, 0.12);
}

.experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.experience-card {
  position: relative;
  min-height: 230px;
  padding: 24px;
  border: 2px solid rgba(58, 53, 45, 0.44);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.82);
  box-shadow: 9px 12px 0 rgba(64, 49, 31, 0.055);
  transform: rotate(-0.6deg);
}

.experience-card:nth-child(2) {
  transform: rotate(0.8deg) translateY(8px);
}

.experience-card:nth-child(3) {
  transform: rotate(0.4deg);
}

.experience-card:nth-child(4) {
  transform: rotate(-0.8deg) translateY(4px);
}

.experience-card::before {
  position: absolute;
  top: -12px;
  left: 40px;
  width: 86px;
  height: 18px;
  background: rgba(231, 185, 54, 0.32);
  transform: rotate(-2deg);
  content: "";
}

.experience-card.current {
  border-color: rgba(39, 91, 168, 0.62);
  box-shadow: 10px 13px 0 rgba(39, 91, 168, 0.11);
}

.experience-card.wide {
  grid-column: 1 / -1;
  min-height: 0;
}

.experience-card time {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 800;
}

.experience-card h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.35;
  font-weight: 900;
  text-wrap: pretty;
}

.experience-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.72;
  font-weight: 570;
}

.experience-card p + p {
  margin-top: 12px;
}

.project-board {
  position: relative;
  display: grid;
  grid-template-columns: 48px repeat(3, minmax(0, 1fr)) 48px;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 901px) {
  .project-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-board .board-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
  }

  .project-board [data-project-prev] {
    left: -48px;
  }

  .project-board [data-project-next] {
    right: -48px;
  }
}

.board-arrow {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--line);
  cursor: pointer;
}

.board-arrow svg {
  width: 36px;
  height: 36px;
}

.project-card,
.repo-card,
.contact-postcard {
  position: relative;
  border: 2px solid rgba(58, 53, 45, 0.48);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.82);
  box-shadow: 9px 12px 0 rgba(64, 49, 31, 0.055);
}

.project-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  height: 100%;
  min-width: 0;
  min-height: 354px;
  padding: 20px;
  transform: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card > * {
  min-width: 0;
}

.project-card h3,
.project-card p {
  overflow-wrap: anywhere;
}

.project-card:nth-of-type(2) {
  transform: none;
}

.project-card:nth-of-type(3) {
  transform: none;
}

.project-card::before,
.repo-card .pin::before {
  position: absolute;
  top: -14px;
  left: 50%;
  width: 86px;
  height: 22px;
  background: rgba(231, 185, 54, 0.32);
  transform: translateX(-50%) rotate(-1deg);
  content: "";
}

.project-card.active,
.project-card:hover,
.project-card:focus-within {
  border-color: var(--blue);
  box-shadow: 11px 14px 0 rgba(39, 91, 168, 0.13);
}

.project-card.active {
  transform: none;
}

.project-card:not(:has(.project-link)) {
  cursor: default;
}

.project-shot {
  position: relative;
  min-height: 154px;
  overflow: hidden;
  border: 2px solid rgba(58, 53, 45, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(rgba(58, 53, 45, 0.035) 1px, transparent 1px),
    #f5f0e6;
  background-size: 100% 28px;
}

.project-shot::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 24px;
  border-bottom: 2px solid rgba(58, 53, 45, 0.18);
  background: rgba(var(--paper-card-rgb), 0.72);
  content: "";
}

.project-shot.finpm span {
  position: absolute;
  border: 2px solid rgba(58, 53, 45, 0.32);
  border-radius: 4px;
  background: rgba(var(--paper-card-rgb), 0.9);
}

.project-shot.finpm span:nth-child(1) {
  left: 22px;
  top: 42px;
  width: 82px;
  height: 80px;
}

.project-shot.finpm span:nth-child(2) {
  left: 120px;
  top: 56px;
  width: 118px;
  height: 54px;
}

.project-shot.finpm span:nth-child(3) {
  right: 22px;
  top: 38px;
  width: 72px;
  height: 92px;
}

.project-shot.bond-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 36px 12px 10px;
}

.bond-filters {
  display: flex;
  gap: 5px;
}

.bond-filters span {
  padding: 2px 7px;
  border: 1.5px solid rgba(39, 91, 168, 0.38);
  border-radius: 4px;
  background: rgba(200, 216, 238, 0.28);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
}

.bond-results {
  display: grid;
  gap: 3px;
}

.bond-results [data-bond-row] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 48px;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border-bottom: 1px solid rgba(58, 53, 45, 0.16);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1;
}

.bond-results [data-bond-row] span:first-child {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bond-results [data-bond-row] strong {
  color: var(--green-ink);
  font-size: 0.62rem;
  text-align: right;
}

.bond-prompt {
  margin-top: auto;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.57rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bond-prompt span {
  margin-right: 4px;
  color: var(--green-ink);
  font-weight: 900;
}

.project-shot.learning {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 44px 22px 20px;
}

.project-shot.learning span {
  min-height: 42px;
  border: 2px solid rgba(58, 53, 45, 0.28);
  border-radius: 4px;
  background: rgba(200, 216, 238, 0.34);
}

.project-card h3,
.repo-card h3 {
  margin: 20px 0 9px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.42rem;
  line-height: 1.2;
  font-weight: 900;
  text-wrap: balance;
}

.project-card p,
.repo-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.62;
  font-weight: 570;
}

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

.tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1.5px solid rgba(58, 53, 45, 0.32);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 0.88rem;
  font-weight: 850;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 16px;
  color: var(--blue);
  font-family: var(--hand);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.project-link::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  content: "";
}

.project-card:has(.project-link) {
  cursor: pointer;
}

.repos {
  padding-top: 34px;
  padding-bottom: 58px;
  border-top: 2px solid rgba(58, 53, 45, 0.12);
}

.repo-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.repo-card {
  display: grid;
  grid-template-rows: 72px auto 1fr auto;
  min-height: 314px;
  padding: 20px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.repo-card:nth-child(1) {
  transform: rotate(-1.2deg);
}

.repo-card:nth-child(2) {
  transform: rotate(0.8deg) translateY(5px);
}

.repo-card:nth-child(3) {
  transform: rotate(-0.5deg);
}

.repo-card:nth-child(4) {
  transform: rotate(1deg) translateY(3px);
}

.repo-card:nth-child(5) {
  transform: rotate(-1deg);
}

.repo-card:hover,
.repo-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 11px 14px 0 rgba(39, 91, 168, 0.13);
  outline: none;
  transform: translateY(-8px) rotate(0deg);
}

.repo-card .pin {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #d0d0ca;
  transform: translateX(-50%);
}

.repo-card .pin::before {
  top: 14px;
  width: 62px;
  height: 14px;
  z-index: -1;
}

.repo-sketch {
  align-self: center;
  width: 64px;
  height: 64px;
  color: var(--line);
}

.repo-card h3 {
  margin-top: 10px;
}

.repo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 0.92rem;
  font-weight: 850;
}

.repo-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.repo-meta span::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.repo-meta strong {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
}

.repo-meta strong::before {
  color: var(--marker);
  content: "★";
}

.contribution-note {
  position: relative;
  margin-top: 34px;
  padding: 24px;
  border: 2px solid rgba(58, 53, 45, 0.48);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.88);
  box-shadow: 9px 12px 0 rgba(64, 49, 31, 0.055);
  cursor: pointer;
  transform: rotate(-0.3deg);
}

.contribution-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 92px;
  height: 20px;
  background: rgba(231, 185, 54, 0.3);
  transform: translateX(-50%) rotate(-1deg);
}

.contribution-heading,
.contribution-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.contribution-footer a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.contribution-kicker,
.contribution-total,
.contribution-status {
  margin: 0;
  color: var(--muted);
  font-family: var(--hand);
  font-weight: 850;
}

.contribution-heading h3 {
  margin: 4px 0 0;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.55rem;
  line-height: 1.2;
}

.contribution-calendar-wrap {
  position: relative;
  margin: 22px 0 16px;
}

.contribution-grid {
  --contribution-gap: clamp(1px, 0.22vw, 4px);

  display: grid;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: var(--contribution-gap);
  width: 100%;
}

.contribution-row {
  display: grid;
  grid-template-columns: repeat(53, minmax(0, 1fr));
  gap: var(--contribution-gap);
  min-width: 0;
}

.contribution-day,
.contribution-placeholder {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  border: 1px solid rgba(58, 53, 45, 0.11);
  border-radius: 2px;
  background: rgba(89, 84, 76, 0.07);
}

.contribution-day {
  padding: 0;
  cursor: crosshair;
}

.contribution-day[data-level="0"] { background: var(--paper-card); }
.contribution-day[data-level="1"] { background: #c9d3df; }
.contribution-day[data-level="2"] { background: #8da9ca; }
.contribution-day[data-level="3"] { background: #527fb5; }
.contribution-day[data-level="4"] { background: var(--blue); }

.contribution-tooltip {
  position: absolute;
  z-index: 5;
  max-width: 220px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  pointer-events: none;
}

.now {
  position: relative;
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(420px, 1.05fr);
  gap: 52px;
  padding-top: 54px;
  padding-bottom: 68px;
  border-top: 2px solid rgba(58, 53, 45, 0.12);
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 18px;
  width: 2px;
  background: rgba(58, 53, 45, 0.28);
  content: "";
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 22px;
  align-items: start;
  padding: 0 0 24px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li > span {
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper-card);
  font-family: var(--hand);
  font-weight: 900;
}

.timeline h3 {
  position: relative;
  width: fit-content;
  margin: 2px 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 870;
}

.timeline h3::before {
  position: absolute;
  left: -18px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.timeline h3::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  z-index: -1;
  height: 6px;
  background: var(--marker-soft);
  content: "";
}

.timeline p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.timeline time {
  color: var(--blue);
  font-family: var(--hand);
  font-size: 0.98rem;
  font-weight: 850;
  white-space: nowrap;
}

.daily-scene {
  position: relative;
  min-height: 430px;
}

.paper-plane {
  position: absolute;
  top: 22px;
  right: 38px;
  width: 124px;
  height: 82px;
  color: var(--line);
  opacity: 0.74;
}

.daily-scene::before {
  position: absolute;
  top: 74px;
  left: 42px;
  width: 300px;
  height: 110px;
  border-top: 2px dashed rgba(58, 53, 45, 0.28);
  border-radius: 50%;
  transform: rotate(-9deg);
  content: "";
}

.daily-scene img {
  position: absolute;
  left: 20px;
  bottom: -18px;
  width: min(52vw, 388px);
  max-height: 450px;
  object-fit: contain;
  object-position: bottom;
  filter: drop-shadow(14px 18px 0 rgba(64, 49, 31, 0.08));
}

.daily-note {
  position: absolute;
  right: 0;
  top: 146px;
  width: 214px;
  padding: 22px;
  border: 2px solid rgba(58, 53, 45, 0.42);
  border-radius: 5px;
  background: rgba(var(--paper-card-rgb), 0.82);
  box-shadow: 8px 10px 0 rgba(64, 49, 31, 0.055);
  transform: rotate(1.2deg);
}

.daily-note::before {
  position: absolute;
  top: -12px;
  left: 58px;
  width: 84px;
  height: 18px;
  background: rgba(231, 185, 54, 0.33);
  transform: rotate(-2deg);
  content: "";
}

.daily-note h3 {
  margin: 0 0 14px;
  font-family: var(--hand);
  font-size: 1.8rem;
}

.daily-note p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 0;
  color: var(--ink-soft);
  font-family: var(--hand);
  font-weight: 850;
}

.daily-note span {
  width: 14px;
  height: 14px;
  border: 1.7px solid var(--line);
}

.daily-note b,
.contact-list b {
  font: inherit;
}

.contact {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(300px, 1fr);
  gap: 64px;
  align-items: center;
  align-content: center;
  min-height: calc(100svh - 84px);
  padding-top: 46px;
  padding-bottom: 46px;
  border-top: 2px solid rgba(58, 53, 45, 0.12);
}

.contact-postcard {
  min-height: 250px;
  padding: 38px 42px;
  transform: rotate(-1.2deg);
}

.pushpin {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--red);
  transform: translateX(-50%);
}

.contact-postcard h2 {
  font-size: 2.8rem;
}

.contact-postcard a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: var(--blue);
  font-family: var(--hand);
  font-size: 1.12rem;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.contact-postcard a svg {
  width: 24px;
  height: 24px;
}

.contact-list {
  display: grid;
  gap: 20px;
  margin: 0;
  font-style: normal;
}

.contact-list a,
.contact-list p {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 16px;
  align-items: center;
  margin: 0;
  color: var(--ink-soft);
}

.contact-list svg {
  width: 31px;
  height: 31px;
  color: var(--line);
}

.contact-list span {
  display: grid;
  gap: 4px;
  font-weight: 850;
}

.contact-list small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 600;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-top: 10px;
  padding-bottom: 34px;
  color: var(--muted);
  font-family: var(--hand);
  font-size: 1rem;
  font-weight: 850;
}

.site-footer a {
  color: var(--blue);
}

.site-footer > :last-child {
  justify-self: end;
}

.design-credit {
  text-align: center;
}

:focus-visible {
  outline: 3px solid rgba(39, 91, 168, 0.34);
  outline-offset: 4px;
}

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

@keyframes scroll-nudge {
  0%,
  100% {
    transform: translateY(-2px);
  }

  50% {
    transform: translateY(4px);
  }
}

@media (max-width: 980px) {
  .site-header {
    padding-right: 30px;
    padding-left: 30px;
  }

  .projects,
  .repos,
  .experience,
  .now,
  .contact,
  .site-footer {
    padding-right: 30px;
    padding-left: 30px;
  }

  .intro-sticky .hero-copy {
    left: 30px;
    width: min(420px, 48vw);
  }

  .intro-sticky h1 {
    font-size: 4.8rem;
  }

  .hero-banner {
    max-width: 390px;
    font-size: 1.08rem;
  }

  .scroll-cue {
    left: 30px;
  }

  .hero-character {
    right: 8vw;
    width: 190px;
  }

  .intro-callout {
    width: min(230px, 28vw);
    padding: 16px 17px;
  }

  .intro-callout.education {
    left: 30px;
    top: 43%;
    width: min(290px, 34vw);
  }

  .intro-callout.identity {
    left: 30px;
    top: 9%;
  }

  .intro-callout.role {
    right: 30px;
    top: 34%;
  }

  .intro-callout.domain {
    left: 30px;
    bottom: 14%;
  }

  .intro-callout.builder {
    right: 30px;
    bottom: 16%;
  }

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

  .section-heading h2,
  .now h2,
  .contact h2 {
    font-size: 2.7rem;
  }

  .repo-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .daily-scene {
    min-height: 460px;
  }

  .contact-postcard h2 {
    font-size: 2.4rem;
  }
}

@media (max-width: 1100px) {
  .site-header {
    padding-right: 24px;
    padding-left: 24px;
  }

  .header-shell {
    grid-template-columns: 90px auto 290px;
  }

  .brand-name {
    display: none;
  }

  .nav-links a,
  .site-header.scrolled .nav-links a {
    min-width: 68px;
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 10px 16px 0;
  }

  .header-shell,
  .site-header.scrolled .header-shell {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    max-width: none;
    min-height: 54px;
    padding: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .brand-name {
    display: none;
  }

  .nav-links,
  .site-header.scrolled .nav-links {
    position: fixed;
    right: max(30px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: max(30px, env(safe-area-inset-left));
    height: 54px;
    justify-content: center;
    gap: 4px;
    padding: 5px;
    border: 1.5px solid rgba(58, 53, 45, 0.16);
    border-radius: 999px;
    background: rgba(var(--paper-card-rgb), 0.9);
    box-shadow: 0 10px 28px rgba(64, 49, 31, 0.12);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .nav-links a,
  .site-header.scrolled .nav-links a {
    flex: 1;
    min-width: 0;
  }

  .language-switcher,
  .site-header.scrolled .language-switcher {
    height: 46px;
    border-color: rgba(58, 53, 45, 0.18);
    background: rgba(var(--paper-card-rgb), 0.78);
    box-shadow: none;
  }

  .header-actions {
    grid-column: 2;
  }

  .hero-character {
    bottom: 90px;
  }

  .intro-sticky[data-phase="recenter"] .hero-character,
  .intro-sticky[data-phase="intro"] .hero-character,
  .intro-sticky[data-phase="domain"] .hero-character {
    bottom: 90px;
  }

  .project-board {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .project-board .board-arrow {
    align-self: center;
  }

  .project-card {
    display: none;
    grid-column: 2;
  }

  .project-card.active {
    display: grid;
  }

  .board-arrow:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .board-arrow:last-child {
    grid-column: 3;
    grid-row: 1;
  }

  .repo-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact {
    padding-bottom: 118px;
  }

  .site-footer {
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 10px 16px 0;
  }

  .brand {
    font-size: 1.35rem;
  }

  .brand-name {
    display: none;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 1.34rem;
  }

  .header-actions {
    gap: 5px;
  }

  .language-switcher {
    gap: 0;
    padding: 2px;
  }

  .language-switcher button {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 5px;
    font-size: 0.82rem;
  }

  .say-hi {
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .say-hi svg {
    width: 28px;
    height: 28px;
  }

  .nav-links,
  .site-header.scrolled .nav-links {
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    font-size: 0.94rem;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a,
  .site-header.scrolled .nav-links a {
    min-width: 0;
    flex: 1 0 max-content;
    padding: 0 12px;
  }

  .projects,
  .repos,
  .experience,
  .now,
  .contact,
  .site-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .intro-sticky .hero-copy {
    left: 18px;
    top: 92px;
    width: calc(100% - 36px);
    transform: translateY(var(--hero-y));
  }

  .intro-sticky h1 {
    font-size: min(3.65rem, 18vw);
    line-height: 0.9;
  }

  .scroll-cue {
    display: none;
  }

  .hero-banner {
    max-width: 310px;
    margin-top: 16px;
    padding: 11px 14px 12px;
    font-size: 1.02rem;
    transform: rotate(-3deg);
  }

  .intro-floor {
    bottom: -58px;
    width: 92vw;
    height: 190px;
    background-size: 32px 32px;
  }

  .hero-character {
    right: 24px;
    bottom: 88px;
    width: 140px;
    max-height: 44svh;
  }

  .intro-sticky[data-phase="recenter"] .hero-character {
    right: 50%;
    bottom: 24%;
    width: 134px;
    transform: translateX(50%);
  }

  .intro-sticky[data-phase="intro"] .hero-character,
  .intro-sticky[data-phase="domain"] .hero-character {
    right: 50%;
    bottom: 44%;
    width: 112px;
    transform: translateX(50%);
  }

  .intro-callouts {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 94px;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 230px));
    gap: 10px;
    align-items: stretch;
    justify-content: center;
  }

  .intro-callout {
    position: static;
    width: auto;
    min-width: 0;
    min-height: 76px;
    padding: 12px;
    box-shadow: 4px 5px 0 rgba(64, 49, 31, 0.05);
    transform: translateY(10px);
  }

  .intro-callout.education {
    grid-column: 1 / -1;
    width: auto;
  }

  .intro-callout::before {
    top: -7px;
    left: 20px;
    width: 44px;
    height: 11px;
  }

  .intro-callout h2 {
    font-size: 0.78rem;
    overflow-wrap: anywhere;
  }

  .intro-callout p {
    font-size: 0.78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .section-heading h2,
  .now h2,
  .contact h2 {
    width: 100%;
    max-width: 100%;
    font-size: min(2.25rem, 14vw);
    overflow-wrap: anywhere;
  }

  .section-heading {
    display: grid;
    gap: 10px;
  }

  .section-heading > *,
  .section-heading > * > * {
    min-width: 0;
    max-width: 100%;
  }

  .section-heading a {
    width: fit-content;
    overflow-wrap: anywhere;
  }

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

  .project-board .board-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
  }

  .project-board [data-project-prev] {
    left: -18px;
  }

  .project-board [data-project-next] {
    right: -18px;
  }

  .project-card {
    grid-column: 1;
    min-height: 338px;
    padding: 17px;
  }

  .repo-cards {
    grid-template-columns: 1fr;
  }

  .contribution-note { padding: 18px 14px; }
  .contribution-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .contribution-footer { align-items: center; flex-wrap: wrap; gap: 10px 16px; }
  .contribution-footer > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .contribution-grid { --contribution-gap: 1px; }
  .contribution-heading h3 { font-size: 1.3rem; }

  .now {
    gap: 22px;
  }

  .timeline li {
    grid-template-columns: 34px 1fr;
    gap: 16px;
  }

  .timeline time {
    grid-column: 2;
    margin-top: -12px;
  }

  .daily-scene {
    min-height: 360px;
    overflow: clip;
  }

  .daily-scene img {
    left: -40px;
    width: 310px;
  }

  .daily-note {
    right: 0;
    top: 76px;
    width: 176px;
    padding: 18px;
  }

  .paper-plane {
    display: none;
  }

  .contact {
    gap: 28px;
  }

  .contact-postcard {
    min-height: 0;
    padding: 30px 24px;
  }

  .contact-postcard h2 {
    font-size: 2rem;
  }

  .contact-postcard a {
    max-width: 100%;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
  }

  .contact-list small {
    font-size: 0.74rem;
    overflow-wrap: anywhere;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding-bottom: calc(104px + env(safe-area-inset-bottom));
  }

  .site-footer > :last-child {
    justify-self: center;
  }
}

@media (pointer: coarse) {
  .home-writing-link,
  .post-back,
  .blog-footer a,
  .field-tags a,
  .tag-filter a,
  .contact a {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contribution-note,
  .contribution-day { transition: none !important; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .intro-sequence {
    height: auto;
  }

  .intro-sticky {
    position: relative;
    min-height: 150svh;
    height: auto;
    overflow: visible;
  }

  .intro-sticky .three-canvas {
    visibility: hidden;
    pointer-events: none;
  }

  .intro-sticky .hero-copy {
    top: 30svh;
    opacity: 1;
    transform: none;
  }

  .three-ready .hero-character,
  .hero-character {
    top: 13svh;
    bottom: auto;
    opacity: 1;
    transform: none;
  }

  .intro-callouts {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(100%, 1040px);
    margin: 0 auto;
    padding: 100svh 48px 110px;
  }

  .intro-callout,
  .intro-callout.identity,
  .intro-callout.education,
  .intro-callout.role,
  .intro-callout.domain,
  .intro-callout.builder {
    position: static;
    width: auto;
    min-height: 0;
    opacity: 1 !important;
    transform: none;
  }

  .intro-callout.education {
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 980px) {
  .intro-callouts {
    padding-right: 30px;
    padding-left: 30px;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 640px) {
  .intro-sticky .hero-copy {
    top: 92px;
  }

  .three-ready .hero-character,
  .hero-character {
    top: 300px;
    right: 24px;
    width: 140px;
  }

  .intro-callouts {
    grid-template-columns: repeat(2, minmax(0, 230px));
    justify-content: center;
    padding: 100svh 18px 110px;
  }
}
