:root {
  --dark: #0b0c0b;
  --dark-soft: #141513;
  --hero-dark: #07111a;
  --paper: #f1ece0;
  --paper-deep: #e8e0d0;
  --ink: #11120f;
  --ivory: #ece5d7;
  --muted-dark: #aaa396;
  --muted-paper: #5e5b54;
  --orange: #ff641f;
  --teal: #1597aa;
  --line-dark: rgba(236, 229, 215, 0.24);
  --line-paper: rgba(17, 18, 15, 0.25);
  --header-h: 72px;
  --shell: min(calc(100% - 72px), 1440px);
  --display: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
  --sans: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--orange) var(--dark);
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y pinch-zoom;
  color: var(--ink);
  background: var(--dark);
  font-family: var(--sans);
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open,
body.resume-gate-open {
  overflow: hidden;
}

body {
  cursor: default;
}

a,
button {
  cursor: pointer;
}

a,
button {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border: 0;
}

img,
video,
canvas {
  display: block;
  max-width: 100%;
}

figure,
h1,
h2,
h3,
h4,
p,
dl,
dd,
ol {
  margin: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--dark);
  background: var(--orange);
  transform: translateY(-160%);
}

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

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding-inline: 36px;
  color: var(--ivory);
  background: var(--hero-dark);
  border-bottom: 1px solid var(--line-dark);
}

.brand {
  width: max-content;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav a {
  position: relative;
  padding: 24px 26px;
  color: var(--muted-dark);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav a::after {
  position: absolute;
  right: 26px;
  bottom: 14px;
  left: 26px;
  height: 2px;
  background: var(--orange);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ivory);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-resume {
  justify-self: end;
  padding: 12px 22px;
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--orange);
  font-size: 0.86rem;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease;
}

.header-resume:hover,
.header-resume:focus-visible {
  color: var(--dark);
  background: var(--orange);
}

.nav-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ivory);
  background: var(--hero-dark);
}

.particle-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero::before,
.hero::after {
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-color: var(--orange);
  content: "";
  opacity: 0.7;
}

.hero::before {
  top: 108px;
  right: 5vw;
  border-top: 1px solid;
  border-right: 1px solid;
}

.hero::after {
  right: 5vw;
  bottom: 160px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + clamp(72px, 9vh, 130px));
}

.hero-copy {
  width: min(930px, 72vw);
  align-self: center;
  padding-bottom: 144px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(6.4rem, 11.4vw, 11.4rem);
  font-weight: 850;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.hero-statement {
  margin-top: 42px;
  font-family: var(--display);
  font-size: clamp(2rem, 3.55vw, 4.15rem);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-statement span {
  display: block;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
}

.hero-summary {
  max-width: 680px;
  margin-top: 30px;
  color: #b8b0a3;
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.75;
}

.hero-role {
  position: relative;
  margin-top: 38px;
  padding-top: 25px;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.hero-role::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 4px;
  background: var(--orange);
  content: "";
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}

.button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 210px;
  padding: 17px 22px;
  border: 1px solid var(--line-dark);
  font-weight: 850;
  transition: transform 180ms var(--ease), color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
}

.button-primary {
  color: var(--dark);
  background: var(--orange);
  border-color: var(--orange);
}

.button-secondary {
  color: var(--ivory);
  background: transparent;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  color: var(--dark);
  background: var(--ivory);
}

.project-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-self: end;
  border-top: 1px solid var(--line-dark);
  border-right: 1px solid var(--line-dark);
  border-left: 1px solid var(--line-dark);
}

.project-rail a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  min-height: 128px;
  padding: 26px 30px;
  border-right: 1px solid var(--line-dark);
  transition: color 180ms ease, background 180ms ease;
}

.project-rail a:last-child {
  border-right: 0;
}

.project-rail strong {
  color: var(--orange);
  font-family: var(--mono);
  font-size: clamp(1.8rem, 2.4vw, 2.8rem);
}

.project-rail span {
  font-size: clamp(1.05rem, 1.3vw, 1.35rem);
  font-weight: 850;
}

.project-rail b {
  font-size: 1.4rem;
  font-weight: 400;
  transition: transform 180ms ease;
}

.project-rail a:hover,
.project-rail a:focus-visible {
  color: var(--dark);
  background: var(--orange);
}

.project-rail a:hover strong,
.project-rail a:focus-visible strong {
  color: var(--dark);
}

.project-rail a:hover b,
.project-rail a:focus-visible b {
  transform: translateX(8px);
}

.paper-section {
  color: var(--ink);
  background: var(--paper);
}

.dark-section {
  color: var(--ivory);
  background: var(--dark);
}

.selected-work,
.independent,
.methods,
.experience,
.contact {
  scroll-margin-top: var(--header-h);
}

.selected-work {
  padding-top: 150px;
  padding-bottom: 150px;
}

.selected-work > .mini-heading + .section-heading {
  margin-top: 64px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  align-items: end;
  gap: 80px;
  padding-bottom: 68px;
  border-bottom: 1px solid var(--line-paper);
}

.section-heading h2,
.section-heading h3 {
  max-width: 920px;
  font-family: var(--display);
  font-size: clamp(3.8rem, 6.6vw, 7rem);
  font-weight: 830;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.section-heading-plain h2,
.section-heading-plain h3 {
  font-size: clamp(2.8rem, 4.2vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading > p {
  max-width: 440px;
  padding-bottom: 10px;
  color: var(--muted-paper);
  font-size: 1.05rem;
  line-height: 1.7;
}

.project {
  position: relative;
  margin-top: 96px;
}

.project-modbus {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.55fr);
  gap: 64px;
  align-items: center;
}

.project-modbus,
.project-system,
.independent {
  scroll-margin-top: calc(var(--header-h) + 32px);
}

.project-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-paper);
}

.project-frame img {
  width: 100%;
  height: auto;
}

.modbus-showcase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-paper);
}

.modbus-shot {
  position: relative;
  height: clamp(420px, 36vw, 520px);
  overflow: hidden;
  background: #f8fafb;
}

.modbus-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
}

.modbus-shot span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 18, 15, 0.16);
  font-size: 0.78rem;
  font-weight: 750;
}

.modbus-showcase figcaption {
  grid-column: 1 / -1;
  background: var(--paper);
}

.project-frame figcaption,
.system-media figcaption {
  padding: 12px 16px;
  color: var(--muted-paper);
  border-top: 1px solid var(--line-paper);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.03em;
}

.project-number {
  color: var(--orange);
  font-family: var(--mono);
  font-size: clamp(3.4rem, 5.2vw, 6rem);
  font-weight: 800;
  line-height: 1;
}

.project-copy h3,
.liquid-title h3,
.system-copy h3,
.independent-project h3,
.media-journal h3 {
  font-family: var(--display);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.project-copy h3 {
  margin-top: 18px;
  font-size: clamp(2rem, 2.8vw, 3.3rem);
  line-height: 1.05;
}

.project-subtitle {
  margin-top: 12px;
  color: var(--muted-paper);
  font-size: 0.94rem;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 36px;
  border-top: 1px solid var(--line-paper);
}

.metric-list div {
  min-width: 0;
  padding: 20px 14px 18px 0;
  border-right: 1px solid var(--line-paper);
}

.metric-list div:not(:first-child) {
  padding-left: 16px;
}

.metric-list div:last-child {
  border-right: 0;
}

.metric-list dt {
  color: var(--orange);
  font-family: var(--mono);
  font-size: clamp(1.7rem, 2.3vw, 2.6rem);
  font-weight: 800;
}

.metric-list dd {
  margin-top: 8px;
  color: var(--muted-paper);
  font-size: 0.77rem;
  line-height: 1.55;
}

.project-description {
  margin-top: 28px;
  color: var(--muted-paper);
  font-size: 0.95rem;
  line-height: 1.85;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 26px;
  padding-block: 6px;
  color: var(--ink);
  border-bottom: 2px solid var(--orange);
  font-weight: 850;
}

.project-system {
  margin-top: 140px;
  padding-block: 76px;
  color: var(--ivory);
  background: var(--dark);
}

.system-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.75fr) minmax(0, 1.25fr);
  gap: 54px;
  align-items: center;
}

.system-copy h3 {
  margin-top: 18px;
  font-size: clamp(2.7rem, 4.2vw, 4.35rem);
}

.system-copy .project-subtitle,
.system-copy .project-description {
  color: var(--muted-dark);
}

.metric-list-dark {
  border-color: var(--line-dark);
}

.metric-list-dark div {
  border-color: var(--line-dark);
}

.metric-list-dark dd {
  color: var(--muted-dark);
}

.metric-list-system {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-list-system dt {
  font-size: clamp(1.45rem, 2vw, 2.15rem);
}

.system-media {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.system-media img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.system-media figcaption {
  color: var(--muted-dark);
  border-color: var(--line-dark);
}

.display-case {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
  gap: 64px;
  align-items: end;
  margin-top: 72px;
  padding-block: 36px;
  border-top: 1px solid rgba(122, 165, 191, 0.24);
  border-bottom: 1px solid rgba(122, 165, 191, 0.24);
}

.display-case-kicker {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.display-case-intro h4 {
  margin-top: 12px;
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.display-case-intro > p:not(.display-case-kicker) {
  max-width: 620px;
  margin-top: 22px;
  color: #a5b3bc;
  line-height: 1.75;
}

.display-case-intro > span {
  display: block;
  margin-top: 20px;
  color: #718794;
  font-family: var(--mono);
  font-size: 0.68rem;
}

.display-case-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
}

.display-case-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  min-width: 0;
  padding: 20px 16px 20px 0;
  border-top: 1px solid rgba(122, 165, 191, 0.22);
}

.display-case-steps li:nth-child(odd) {
  padding-right: 24px;
  border-right: 1px solid rgba(122, 165, 191, 0.22);
}

.display-case-steps li:nth-child(even) {
  padding-left: 24px;
}

.display-case-steps strong {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 1rem;
}

.display-case-steps span {
  color: var(--ivory);
  font-size: 0.82rem;
  line-height: 1.65;
}

.hardware-proof {
  margin-top: 76px;
  padding-top: 60px;
  border-top: 1px solid rgba(122, 165, 191, 0.24);
}

.hardware-proof-header {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 0.55fr);
  gap: 70px;
  align-items: end;
}

.hardware-proof-header h4 {
  font-family: var(--display);
  font-size: clamp(2rem, 3.2vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hardware-proof-header p {
  color: #9aabb6;
  line-height: 1.7;
}

.hardware-proof-group {
  margin-top: 46px;
}

.hardware-proof-group + .hardware-proof-group {
  margin-top: 54px;
}

.hardware-proof-group-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(122, 165, 191, 0.22);
}

.hardware-proof-group-title h5 {
  font-family: var(--display);
  font-size: clamp(1.25rem, 1.8vw, 1.85rem);
  letter-spacing: -0.02em;
}

.hardware-proof-group-title p {
  color: #748997;
  font-family: var(--mono);
  font-size: 0.7rem;
}

.hardware-proof-gallery {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.hardware-proof-gallery--pcb {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hardware-proof-gallery--pcb figure {
  grid-column: span 2;
}

.hardware-proof-gallery--pcb .hardware-proof-figure--complex {
  grid-column: span 3;
}

.hardware-proof-gallery--cad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hardware-proof-gallery figure {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 165, 191, 0.22);
  background: #090e13;
}

.hardware-proof-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

.hardware-proof-figure--complex img {
  aspect-ratio: 5 / 4;
  object-fit: contain;
}

.project-liquid {
  margin-top: 140px;
}

.liquid-title {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 36px;
}

.liquid-title h3 {
  font-size: clamp(2.4rem, 4vw, 4.6rem);
}

.liquid-frame img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.metric-list-horizontal {
  width: 58%;
  margin-top: 0;
  margin-left: auto;
  border-top: 0;
  border-bottom: 1px solid var(--line-paper);
}

.independent {
  padding-top: 150px;
  padding-bottom: 150px;
}

.section-heading-dark {
  color: var(--ivory);
  border-color: var(--line-dark);
}

.independent-project {
  margin-top: 84px;
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
}

.independent-title-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.independent-title-row h3,
.deskpet-copy h3 {
  font-size: clamp(2rem, 3vw, 3.6rem);
}

.independent-title-row p,
.deskpet-copy > p {
  margin-top: 10px;
  color: var(--muted-dark);
}

.etf-layout {
  display: block;
}

.dark-media-frame {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.dark-media-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.deskpet-project {
  margin-top: 120px;
}

.deskpet-stage {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: #faf9f6;
}

.deskpet-copy {
  position: absolute;
  z-index: 2;
  top: 48px;
  left: 48px;
  width: 36%;
}

.deskpet-screen {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.deskpet-metrics {
  display: block;
  margin-top: 34px;
  border-top: 0;
}

.deskpet-metrics div {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: baseline;
  width: 260px;
  padding: 13px 0;
  border-right: 0;
  border-bottom: 1px solid rgba(17, 18, 15, 0.18);
}

.deskpet-metrics div:not(:first-child) {
  padding-left: 0;
}

.deskpet-metrics dt {
  font-size: 2.1rem;
}

.deskpet-metrics dd {
  color: var(--muted-paper);
}

.deskpet-action-banner {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.deskpet-slides {
  position: relative;
}

.deskpet-slide {
  display: grid;
  grid-template-columns: minmax(300px, 0.55fr) minmax(300px, 0.45fr);
  min-height: 560px;
  color: var(--ink);
  animation: deskpet-slide-in 420ms var(--ease);
}

.deskpet-slide[hidden] {
  display: none;
}

.deskpet-slide-mei {
  background: #f4edf6;
}

.deskpet-slide-haru {
  background: #edf2ed;
}

.deskpet-slide-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 28px 64px 64px;
}

.deskpet-slide-copy span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.deskpet-slide-copy strong {
  margin-top: 20px;
  font-family: var(--display);
  font-size: clamp(3.2rem, 5.4vw, 6.2rem);
  font-weight: 820;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.deskpet-slide-copy p {
  max-width: 410px;
  margin-top: 24px;
  color: var(--muted-paper);
  font-size: 0.9rem;
  line-height: 1.75;
}

.deskpet-slide > img {
  align-self: end;
  justify-self: center;
  width: 100%;
  height: 560px;
  padding-top: 22px;
  object-fit: contain;
  object-position: center bottom;
}

.deskpet-carousel-controls {
  display: grid;
  grid-template-columns: 52px 1fr auto 44px 52px;
  align-items: center;
  min-height: 62px;
  color: var(--ivory);
  background: var(--dark);
  border-top: 1px solid var(--line-dark);
}

.deskpet-arrow,
.deskpet-autoplay {
  display: grid;
  place-items: center;
  width: 100%;
  height: 62px;
  color: var(--ivory);
  background: transparent;
  border-right: 1px solid var(--line-dark);
}

.deskpet-arrow:last-child {
  border-right: 0;
  border-left: 1px solid var(--line-dark);
}

.deskpet-arrow svg,
.deskpet-autoplay svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.deskpet-arrow:hover,
.deskpet-arrow:focus-visible,
.deskpet-autoplay:hover,
.deskpet-autoplay:focus-visible {
  color: var(--orange);
}

.deskpet-dots {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-inline: 22px;
}

.deskpet-dots button {
  position: relative;
  width: 32px;
  height: 44px;
  padding: 0;
  background: transparent;
}

.deskpet-dots button::after {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 2px;
  background: rgba(236, 229, 215, 0.3);
  content: "";
  transform: translateY(-50%);
  transition: background 160ms ease, transform 160ms ease;
}

.deskpet-dots button:hover::after,
.deskpet-dots button:focus-visible::after,
.deskpet-dots button.is-active::after {
  background: var(--orange);
  transform: translateY(-50%) scaleY(2);
}

.deskpet-carousel-status {
  min-width: 66px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-align: center;
}

.deskpet-autoplay {
  border-left: 1px solid var(--line-dark);
}

.deskpet-autoplay .play-icon,
.deskpet-autoplay.is-paused .pause-icon {
  display: none;
}

.deskpet-autoplay.is-paused .play-icon {
  display: block;
}

@keyframes deskpet-slide-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.media-journal {
  display: grid;
  grid-template-columns: 0.55fr 1fr 0.9fr;
  gap: 40px;
  align-items: center;
  margin-top: 120px;
  padding-block: 28px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.media-journal header > p {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.media-journal h3 {
  margin-top: 16px;
  font-size: clamp(1.8rem, 2.5vw, 3rem);
  line-height: 1.15;
}

.journal-video {
  overflow: hidden;
  background: var(--paper);
}

.journal-video video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.journal-copy {
  color: var(--muted-dark);
  font-size: 0.88rem;
  line-height: 1.8;
}

.journal-copy > p + p {
  margin-top: 18px;
}

.video-action {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 28px;
  padding: 14px 0;
  color: var(--ivory);
  background: transparent;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-align: left;
}

.video-action:hover,
.video-action:focus-visible {
  color: var(--orange);
}

.more-projects {
  margin-top: 72px;
}

.more-projects a {
  display: grid;
  grid-template-columns: 60px 1fr auto 40px;
  gap: 20px;
  align-items: center;
  padding-block: 24px;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.more-projects span,
.more-projects b {
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
}

.more-projects strong {
  font-size: 1.15rem;
}

.more-projects i {
  color: var(--orange);
  font-style: normal;
  font-size: 1.3rem;
}

.methods {
  padding-top: 90px;
  padding-bottom: 110px;
}

.mini-heading {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-paper);
}

.mini-heading h2 {
  font-size: 1rem;
}

.mini-heading span {
  font-family: var(--mono);
  font-size: 0.66rem;
}

.method-list {
  list-style: none;
  padding: 0;
}

.method-list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  min-height: 172px;
  border-bottom: 1px solid var(--line-paper);
}

.method-list strong {
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(3.7rem, 6vw, 6.5rem);
  line-height: 1;
}

.method-copy {
  padding-left: 42px;
  border-left: 1px solid var(--line-paper);
}

.method-copy h3 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 3.5vw, 4.15rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.055em;
}

.method-copy p {
  max-width: 880px;
  margin-top: 12px;
  color: #56534d;
  font-size: clamp(0.92rem, 1.15vw, 1.12rem);
  line-height: 1.65;
}

.experience {
  padding-top: 80px;
  padding-bottom: 120px;
  border-top: 1px solid var(--line-paper);
}

.experience-inner > h3 {
  max-width: 1060px;
  margin-top: 64px;
  font-family: var(--display);
  font-size: clamp(3.2rem, 5.2vw, 6.3rem);
  font-weight: 950;
  line-height: 1.03;
  letter-spacing: -0.075em;
}

.keep-together {
  white-space: nowrap;
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 100px;
  padding-top: 28px;
}

.timeline::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line-paper);
  content: "";
}

.timeline article {
  position: relative;
  min-height: 120px;
}

.timeline article::before {
  position: absolute;
  top: -34px;
  left: 0;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.timeline article:nth-child(2n)::before,
.timeline article:last-child::before {
  background: var(--orange);
  border-color: var(--orange);
}

.timeline time {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline h4 {
  margin-top: 20px;
  font-size: 0.92rem;
}

.timeline p {
  margin-top: 7px;
  color: var(--muted-paper);
  font-size: 0.76rem;
}

.capability-index {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 38px;
  margin-top: 72px;
  padding-block: 26px;
  border-top: 1px solid var(--line-paper);
  border-bottom: 1px solid var(--line-paper);
}

.capability-index span {
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: var(--muted-paper);
  font-size: 0.82rem;
  text-align: left;
}

.capability-index span::before {
  margin-right: 10px;
  color: var(--orange);
  content: "—";
}

.contact {
  padding-top: 80px;
  padding-bottom: 44px;
}

.contact-inner > p {
  padding-bottom: 20px;
  color: var(--muted-dark);
  border-bottom: 1px solid var(--line-dark);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.contact h2 {
  margin-top: 52px;
  font-family: var(--display);
  font-size: clamp(3.6rem, 6vw, 7rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: -0.075em;
}

.email-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
  margin-top: 70px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-dark);
}

.email-row a {
  min-width: 0;
  color: var(--ivory);
  font-family: var(--mono);
  font-size: clamp(2rem, 5.6vw, 6.6rem);
  letter-spacing: -0.07em;
  overflow-wrap: anywhere;
}

.email-row button {
  padding: 12px 20px;
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--orange);
}

.email-row button:hover,
.email-row button:focus-visible {
  color: var(--dark);
  background: var(--orange);
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 28px;
}

.contact-links button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  color: var(--orange);
  background: transparent;
  border-right: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.contact-links button:first-child {
  padding-left: 0;
}

.contact-links button:last-child {
  padding-right: 0;
  border-right: 0;
}

.contact-links button:hover,
.contact-links button:focus-visible {
  color: var(--ivory);
}

.contact footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 70px;
  color: var(--muted-dark);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  padding: 13px 18px;
  color: var(--dark);
  background: var(--orange);
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.resume-gate {
  width: min(calc(100% - 40px), 520px);
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.28);
}

.resume-gate::backdrop {
  background: rgba(7, 17, 26, 0.82);
}

.resume-gate-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--line-paper);
}

.resume-gate-header p {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.resume-gate-header h2 {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.resume-gate-close {
  display: grid;
  flex: 0 0 44px;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0 0 4px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-paper);
  font-size: 1.7rem;
  line-height: 1;
}

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

.resume-gate-form {
  padding: 28px 30px 30px;
}

.resume-gate-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted-paper);
  font-size: 0.8rem;
  font-weight: 800;
}

.resume-gate-form input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  font: 1rem var(--mono);
}

.resume-gate-form input[aria-invalid="true"] {
  border-color: #bd311c;
}

.resume-gate-status {
  margin-top: 12px;
  color: #9e2918;
  font-size: 0.8rem;
}

.resume-gate-status[hidden] {
  display: none;
}

.resume-gate-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 12px;
  margin-top: 26px;
}

.resume-gate-actions button {
  min-height: 48px;
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 850;
}

.resume-gate-cancel {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-paper);
}

.resume-gate-submit {
  color: var(--dark);
  background: var(--orange);
  border: 1px solid var(--orange);
}

.resume-gate-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

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

.has-js .project-modbus.reveal,
.has-js .project-system.reveal {
  transform: none;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

@media (max-width: 1180px) {
  :root {
    --shell: min(calc(100% - 48px), 1100px);
  }

  .site-header {
    padding-inline: 24px;
  }

  .hero-copy {
    width: min(820px, 76vw);
  }

  .project-modbus {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 38px;
  }

  .system-layout {
    gap: 40px;
  }

  .media-journal {
    grid-template-columns: 0.6fr 1.1fr 0.8fr;
    gap: 24px;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-h: 66px;
    --shell: calc(100% - 40px);
  }

  .site-header {
    grid-template-columns: 1fr auto;
    height: var(--header-h);
    padding-inline: 20px;
  }

  .header-resume {
    display: none;
  }

  .nav-toggle {
    position: relative;
    z-index: 103;
    display: grid;
    gap: 7px;
    width: 42px;
    height: 42px;
    padding: 11px 8px;
    background: transparent;
  }

  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ivory);
    transition: transform 200ms ease;
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    z-index: 102;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: calc(100dvh - var(--header-h));
    color: var(--ivory);
    background: var(--dark);
    border-top: 1px solid var(--line-dark);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 200ms ease, transform 200ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-nav a {
    width: 100%;
    padding: 18px 24px;
    border-bottom: 1px solid var(--line-dark);
    font-family: var(--display);
    font-size: 1.8rem;
    text-align: center;
  }

  .site-nav a::after {
    display: none;
  }

  .hero-copy {
    width: 100%;
    padding-bottom: 120px;
  }

  .hero h1 {
    font-size: clamp(5.6rem, 15vw, 8.5rem);
  }

  .hero-statement {
    font-size: clamp(2.1rem, 6vw, 3.8rem);
  }

  .hero-summary {
    max-width: 560px;
  }

  .project-rail a {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    min-height: 104px;
    padding: 20px;
  }

  .project-rail strong {
    font-size: 1.8rem;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .project-modbus,
  .system-layout {
    display: flex;
    flex-direction: column;
  }

  .project-modbus .project-copy {
    order: -1;
    margin-bottom: 8px;
  }

  .project-copy {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 24px;
  }

  .project-copy > *:not(.project-number) {
    grid-column: 2;
  }

  .project-copy .project-number {
    grid-row: 1 / span 6;
  }

  .metric-list-horizontal {
    width: 100%;
  }

  .system-media {
    grid-row: auto;
    order: 1;
  }

  .hardware-proof-header {
    display: block;
  }

  .hardware-proof-header p {
    max-width: 560px;
    margin-top: 18px;
  }

  .hardware-proof-gallery {
    grid-template-columns: 1fr;
  }

  .hardware-proof-gallery--pcb figure,
  .hardware-proof-gallery--pcb .hardware-proof-figure--complex {
    grid-column: auto;
  }

  .hardware-proof-group-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .deskpet-copy {
    width: 42%;
  }

  .deskpet-slide {
    grid-template-columns: minmax(260px, 0.55fr) minmax(280px, 0.45fr);
    min-height: 520px;
  }

  .deskpet-slide-copy {
    padding: 48px 24px 48px 44px;
  }

  .deskpet-slide > img {
    height: 520px;
  }

  .media-journal {
    grid-template-columns: 1fr 1.3fr;
  }

  .journal-copy {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .journal-copy > p + p,
  .video-action {
    margin-top: 0;
  }

  .video-action {
    grid-column: 1 / -1;
  }

  .method-list li {
    grid-template-columns: 110px 1fr;
  }

  .timeline {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 60px;
  }

  .timeline article:nth-child(n + 4) {
    padding-top: 28px;
    border-top: 1px solid var(--line-paper);
  }

  .timeline article:nth-child(n + 4)::before {
    top: -7px;
  }

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

  .contact-links button,
  .contact-links button:first-child,
  .contact-links button:last-child {
    padding-inline: 0;
    border-right: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --shell: calc(100% - 32px);
  }

  .brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
  }

  .hero-inner {
    display: block;
    min-height: 0;
    padding-top: calc(var(--header-h) + 62px);
  }

  .hero-copy {
    padding-bottom: 72px;
  }

  .hero h1 {
    font-size: clamp(4.9rem, 25vw, 6.6rem);
    line-height: 0.94;
  }

  .hero-statement {
    margin-top: 30px;
    font-size: clamp(2rem, 9.3vw, 2.75rem);
    line-height: 1.12;
  }

  .hero-summary {
    margin-top: 32px;
    font-size: 0.98rem;
    line-height: 1.8;
  }

  .hero-summary br {
    display: none;
  }

  .hero-role {
    margin-top: 30px;
    font-size: 0.82rem;
    line-height: 1.6;
  }

  .hero-actions {
    display: block;
  }

  .button {
    min-width: 0;
    width: 100%;
  }

  .button-secondary {
    display: none;
  }

  .project-rail {
    display: block;
    margin-bottom: 0;
  }

  .project-rail a {
    min-height: 86px;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .project-rail a:last-child {
    border-bottom: 0;
  }

  .selected-work,
  .independent {
    padding-top: 100px;
    padding-bottom: 100px;
  }

  .selected-work > .mini-heading + .section-heading {
    margin-top: 46px;
  }

  .section-heading {
    padding-bottom: 40px;
  }

  .section-heading h2,
  .section-heading h3 {
    font-size: clamp(3.1rem, 14.5vw, 4.3rem);
  }

  .section-heading-plain h2,
  .section-heading-plain h3 {
    font-size: clamp(2.7rem, 12vw, 3.6rem);
  }

  .section-heading > p {
    font-size: 0.9rem;
  }

  .project,
  .independent-project {
    margin-top: 64px;
  }

  .project-modbus {
    display: flex;
    flex-direction: column;
  }

  .project-modbus .project-copy {
    order: -1;
    margin-bottom: 8px;
  }

  .project-frame {
    width: 100%;
    margin-left: 0;
  }

  .modbus-showcase {
    display: block;
  }

  .modbus-shot {
    height: clamp(360px, 105vw, 420px);
    border-bottom: 1px solid var(--line-paper);
  }

  .modbus-shot img {
    height: 100%;
    object-fit: cover;
    object-position: center 66%;
  }

  .modbus-shot span {
    display: none;
  }

  .project-copy {
    display: block;
    width: 100%;
  }

  .project-copy h3 {
    margin-top: 16px;
  }

  .metric-list,
  .metric-list-horizontal {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-list-system {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric-list div,
  .metric-list-horizontal div {
    padding: 14px 8px;
  }

  .metric-list div:not(:first-child) {
    padding-left: 8px;
  }

  .metric-list dt {
    font-size: 1.45rem;
  }

  .metric-list dd {
    font-size: 0.65rem;
  }

  .project-system {
    margin-top: 90px;
    padding-block: 52px;
  }

  .system-layout {
    display: flex;
    flex-direction: column;
  }

  .system-media {
    order: 1;
    width: 100%;
    margin-left: 0;
  }

  .hardware-proof {
    margin-top: 52px;
    padding-top: 44px;
  }

  .display-case {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 52px;
    padding-block: 30px;
  }

  .system-copy h3,
  .liquid-title h3 {
    font-size: 2.6rem;
  }

  .project-liquid {
    margin-top: 90px;
  }

  .liquid-title {
    display: block;
  }

  .liquid-title .project-number {
    margin-bottom: 14px;
  }

  .liquid-frame img {
    aspect-ratio: 4 / 3;
  }

  .independent-title-row {
    display: block;
  }

  .etf-layout {
    width: 100%;
    margin-left: 0;
  }

  .deskpet-project {
    width: 100%;
    margin-left: 0;
  }

  .deskpet-stage {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .deskpet-screen {
    height: 420px;
    object-fit: cover;
    object-position: right center;
  }

  .deskpet-copy {
    position: static;
    width: 100%;
    padding: 24px 20px 18px;
  }

  .deskpet-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
  }

  .deskpet-metrics div {
    display: block;
    width: auto;
    padding: 10px 8px;
    border-right: 1px solid rgba(17, 18, 15, 0.18);
    border-bottom: 0;
  }

  .deskpet-metrics div:not(:first-child) {
    padding-left: 8px;
  }

  .deskpet-metrics div:last-child {
    border-right: 0;
  }

  .deskpet-action-banner {
    width: 100%;
    margin-left: 0;
  }

  .deskpet-slide {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    min-height: 560px;
  }

  .deskpet-slide-copy {
    padding: 28px 24px 0;
  }

  .deskpet-slide-copy strong {
    margin-top: 12px;
    font-size: 2.55rem;
  }

  .deskpet-slide-copy p {
    margin-top: 12px;
    font-size: 0.8rem;
  }

  .deskpet-slide > img {
    height: 390px;
    padding: 16px 18px 0;
  }

  .deskpet-carousel-controls {
    grid-template-columns: 44px 1fr auto 40px 44px;
  }

  .deskpet-dots {
    gap: 4px;
    padding-inline: 12px;
  }

  .deskpet-dots button {
    width: 24px;
  }

  .deskpet-carousel-status {
    min-width: 56px;
  }

  .media-journal {
    display: block;
    margin-top: 90px;
  }

  .media-journal header {
    margin-bottom: 24px;
  }

  .journal-video {
    width: 100%;
    margin-left: 0;
  }

  .journal-copy {
    display: block;
    margin-top: 24px;
  }

  .journal-copy > p + p,
  .video-action {
    margin-top: 18px;
  }

  .more-projects a {
    grid-template-columns: 34px 1fr 28px;
  }

  .more-projects b {
    display: none;
  }

  .methods,
  .experience {
    padding-top: 66px;
    padding-bottom: 76px;
  }

  .method-list li {
    display: block;
    min-height: 0;
    padding-block: 32px;
  }

  .method-list strong {
    font-size: 2.7rem;
  }

  .method-copy {
    margin-top: 18px;
    padding-left: 0;
    border-left: 0;
  }

  .method-copy h3 {
    font-size: 2.25rem;
  }

  .method-copy p {
    margin-top: 10px;
    font-size: 0.94rem;
  }

  .experience-inner > h3 {
    margin-top: 46px;
    font-size: 3rem;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 46px 20px;
    margin-top: 72px;
  }

  .timeline article:nth-child(n + 3) {
    padding-top: 22px;
    border-top: 1px solid var(--line-paper);
  }

  .timeline article:nth-child(n + 3)::before {
    top: -7px;
  }

  .capability-index {
    gap: 14px 24px;
    margin-top: 52px;
    padding-block: 22px;
  }

  .capability-index span {
    width: calc(50% - 12px);
    font-size: 0.76rem;
  }

  .contact {
    padding-top: 66px;
  }

  .contact h2 {
    margin-top: 38px;
    font-size: 3.25rem;
  }

  .email-row {
    display: block;
    margin-top: 48px;
  }

  .email-row a {
    font-size: 2.1rem;
  }

  .email-row button {
    margin-top: 22px;
  }

  .contact footer {
    margin-top: 52px;
  }

  .resume-gate {
    width: calc(100% - 28px);
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.28);
  }

  .resume-gate-header {
    gap: 14px;
    padding: 22px 20px 20px;
  }

  .resume-gate-header h2 {
    font-size: 1.48rem;
    line-height: 1.25;
  }

  .resume-gate-form {
    padding: 24px 20px 22px;
  }

  .resume-gate-actions {
    grid-template-columns: 1fr;
  }

  .resume-gate-submit {
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .has-js .reveal {
    opacity: 1;
    transform: none;
  }
}
