:root {
  --paper: #f4efe6;
  --paper-deep: #e9dcc8;
  --ink: #1a1714;
  --ink-soft: #3a342d;
  --muted: #7d756a;
  --line: #c9c0b2;
  --accent: #f0652e;
  --dark: #12100e;
  --dark-soft: #1c1713;
  --gold: #c88a45;
  --nav-h: 78px;
  --pad-x: clamp(20px, 5vw, 72px);
  --serif: "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Noto Sans SC", "PingFang SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(rgba(26, 23, 20, .035) 1px, transparent 1px) 0 0 / 3px 3px,
    linear-gradient(115deg, rgba(255,255,255,.35), transparent 40%),
    var(--paper);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 40;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
.one-page > section { scroll-margin-top: var(--nav-h); }

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid rgba(201, 192, 178, .75);
  background: rgba(244, 239, 230, .84);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.03em;
}
.brand-mark,
.icon-round {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 14px;
}
.nav-links {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: clamp(12px, 2vw, 28px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-links a {
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--accent); }
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
}

.rail {
  position: fixed;
  left: clamp(18px, 3vw, 48px);
  top: calc(var(--nav-h) + 34px);
  bottom: 34px;
  z-index: 3;
  width: 16px;
  pointer-events: none;
}
.rail span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}
.rail span:nth-child(2) { left: 7px; }
.rail span:nth-child(3) { left: 14px; }

.cross {
  position: fixed;
  z-index: 4;
  width: 20px;
  height: 20px;
  opacity: .55;
  pointer-events: none;
}
.cross::before,
.cross::after {
  content: "";
  position: absolute;
  background: var(--line);
}
.cross::before { left: 9px; top: 0; width: 1px; height: 20px; }
.cross::after { top: 9px; left: 0; width: 20px; height: 1px; }
.cross.tr { top: calc(var(--nav-h) + 24px); right: 38px; }
.cross.bl { bottom: 34px; left: 34px; }
.cross.br { bottom: 34px; right: 38px; }

.page {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 48px) var(--pad-x) 56px clamp(60px, 8vw, 128px);
  position: relative;
}
.section-index {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.display {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(88px, 15vw, 250px);
  line-height: .82;
  letter-spacing: -.055em;
  font-weight: 700;
}
.title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 10vw, 145px);
  line-height: .9;
  letter-spacing: -.045em;
}
.title-line {
  display: inline-block;
  border-bottom: 3px solid var(--accent);
  padding-bottom: .06em;
}
.lead {
  margin: 24px 0 0;
  max-width: 760px;
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1.48;
  font-weight: 300;
}
.copy {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.85;
}
.accent { color: var(--accent); }
.btn-row { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 34px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 30px;
  border: 1px solid var(--ink);
  font-size: 15px;
  letter-spacing: .04em;
  transition: .25s ease;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 72px;
}
.hero-copy {
  width: min(780px, 54vw);
  padding-bottom: clamp(28px, 6vh, 70px);
  position: relative;
  z-index: 2;
}
.hero .display { font-size: clamp(118px, 19vw, 300px); }
.hero .lead { max-width: 820px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 30px 0 0;
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 13px;
  text-transform: uppercase;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.hero-meta span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.icon-meta span::before { display: none; }
.icon-meta i {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(26,23,20,.26);
  color: var(--ink);
  font-style: normal;
  font-size: 13px;
}
.hero-art {
  position: absolute;
  inset: var(--nav-h) 0 0 0;
  z-index: 0;
  min-height: 0;
  pointer-events: none;
}
.hero-art img {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 0;
  width: min(66vw, 980px);
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.03) contrast(1.03);
  transition: opacity .85s ease, filter 1.1s cubic-bezier(.22,1,.36,1), transform 1.1s cubic-bezier(.22,1,.36,1);
}
.hero-art.is-particle-loading img {
  opacity: .08;
  filter: saturate(1.05) contrast(1.04) blur(14px);
  transform: scale(1.025);
}
.hero-particles {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: .95;
  transition: opacity .45s ease;
}
.hero-particles.is-done { opacity: 0; }
.hero-art.is-particle-done img {
  opacity: 1;
  filter: saturate(1.03) contrast(1.03);
  transform: none;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--paper) 0%, rgba(244,239,230,.98) 33%, rgba(244,239,230,.48) 54%, transparent 76%),
    linear-gradient(180deg, rgba(244,239,230,.72), transparent 22%, rgba(244,239,230,.1) 70%, rgba(244,239,230,.8));
  pointer-events: none;
}
.stamp {
  position: absolute;
  z-index: 2;
  right: 3vw;
  bottom: 36px;
  border: 1px solid rgba(201,192,178,.85);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper);
  background: rgba(18,16,14,.42);
  backdrop-filter: blur(6px);
}
.hero-sketch {
  position: absolute;
  z-index: 3;
  right: clamp(54px, 5.2vw, 92px);
  bottom: 110px;
  width: clamp(142px, 13vw, 208px);
  transform: rotate(-1.5deg);
  filter: sepia(.16) saturate(.92) contrast(.96);
  opacity: .9;
}
.hero-sketch img {
  width: 100%;
  box-shadow: 0 14px 38px rgba(44,32,20,.18);
}
.hero-side {
  position: absolute;
  left: 32px;
  top: 18%;
  bottom: 13%;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: 15px;
}
.hero-side i {
  display: block;
  width: 1px;
  height: 100%;
  background: var(--line);
  margin-left: 9px;
}
.hero-side b {
  writing-mode: vertical-rl;
  letter-spacing: .22em;
  font-weight: 500;
}
.hero-footer {
  position: absolute;
  z-index: 2;
  left: clamp(70px, 5.6vw, 96px);
  right: clamp(70px, 5vw, 88px);
  bottom: 38px;
  display: grid;
  grid-template-columns: minmax(150px, auto) 1fr minmax(190px, auto);
  align-items: center;
  gap: 28px;
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
}
.hero-footer::before {
  content: "";
  height: 1px;
  background: var(--line);
  grid-column: 2;
  grid-row: 1;
}
.hero-footer span:nth-child(2) {
  justify-self: center;
  padding: 0 18px;
  background: linear-gradient(90deg, transparent, rgba(244,239,230,.72) 12%, rgba(244,239,230,.72) 88%, transparent);
  position: relative;
  z-index: 1;
}
.hero-footer span:last-child {
  justify-self: end;
}

.blueprint {
  display: grid;
  grid-template-columns: minmax(280px, 32vw) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 72px);
  align-items: start;
}
.spec-list {
  list-style: none;
  padding: 0;
  margin: 42px 0 0;
  display: grid;
  gap: 18px;
}
.spec-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 18px;
}
.spec-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-style: normal;
  font-family: var(--mono);
}
.blueprint-board {
  position: relative;
  min-height: 650px;
  border: 1px solid var(--line);
  background:
    linear-gradient(rgba(201,192,178,.2) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, rgba(201,192,178,.2) 1px, transparent 1px) 0 0 / 34px 34px,
    rgba(244,239,230,.55);
  overflow: hidden;
}
.blueprint-board img {
  position: absolute;
  left: 32%;
  bottom: 0;
  width: min(52%, 520px);
  height: auto;
  filter: grayscale(.35) contrast(1.1) sepia(.18);
  mix-blend-mode: multiply;
}
.callout,
.spec-table {
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.callout::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
}
.c1 { top: 18%; left: 8%; }
.c2 { top: 37%; right: 9%; }
.c3 { bottom: 22%; left: 10%; }
.spec-table {
  right: 6%;
  bottom: 7%;
  min-width: 240px;
  border: 1px solid var(--line);
}
.spec-table div {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  border-bottom: 1px solid var(--line);
}
.spec-table div:last-child { border-bottom: 0; }
.spec-table span { padding: 10px 12px; }
.spec-table span + span { border-left: 1px solid var(--line); color: var(--ink); }

.motion {
  min-height: 100vh;
  background:
    linear-gradient(rgba(18,16,14,.9), rgba(18,16,14,.96)),
    linear-gradient(rgba(201,192,178,.08) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(201,192,178,.06) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--dark);
  color: var(--paper);
  padding-left: var(--pad-x);
  overflow: hidden;
}
.motion-grid {
  display: grid;
  grid-template-columns: minmax(260px, 25vw) 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.motion-grid > div:first-child {
  position: relative;
  min-height: min(720px, calc(100vh - var(--nav-h) - 110px));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 32px;
}
.motion .title {
  color: var(--paper);
  font-size: clamp(82px, 9vw, 132px);
}
.motion .copy { color: rgba(244,239,230,.76); }
.rec {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  letter-spacing: .12em;
  color: var(--paper);
}
.rec::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(240,101,46,.6);
  animation: pulse 2s infinite;
}
.motion-coords {
  display: grid;
  gap: 8px;
  margin-top: 38px;
  padding-left: 28px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .04em;
  position: relative;
}
.motion-coords::before {
  content: "⌾";
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--accent);
}
.motion-coords strong {
  color: var(--gold);
  font-weight: 500;
}
.memory-card {
  width: min(236px, 74%);
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 10px 10px 18px;
  background: #ead6b5;
  color: var(--ink);
  border: 1px solid rgba(201,192,178,.55);
  transform: rotate(-5deg);
  box-shadow: 0 18px 44px rgba(0,0,0,.38);
}
.memory-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: sepia(.12) saturate(.9) contrast(1.02);
}
.memory-card figcaption {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: rgba(58,52,45,.78);
  text-align: center;
}
.video-frame {
  position: relative;
  border: 1px solid rgba(201,192,178,.55);
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 22px 80px rgba(0,0,0,.42);
  margin-top: 32px;
}
.video-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .9;
}
.video-bg {
  inset: 0 auto 0 0 !important;
  width: 50% !important;
  object-position: left center;
  filter: saturate(.9) sepia(.16) contrast(1.02);
}
.video-person {
  inset: 0 0 0 auto !important;
  width: 64% !important;
  object-position: center 34%;
  filter: saturate(.92) contrast(1.05);
  mix-blend-mode: normal;
}
.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, transparent 42%, rgba(18,16,14,.16) 58%, rgba(18,16,14,.34) 100%),
    linear-gradient(180deg, rgba(0,0,0,.18), transparent 42%, rgba(0,0,0,.46));
}
.player {
  position: absolute;
  z-index: 2;
  left: 36px;
  right: 36px;
  bottom: 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  font-family: var(--mono);
  font-size: 13px;
}
.track {
  height: 4px;
  background: rgba(244,239,230,.5);
}
.track i {
  display: block;
  width: 42%;
  height: 100%;
  background: var(--accent);
}
.route {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 38px;
  position: relative;
}
.route::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 11px;
  border-top: 1px dashed rgba(200,138,69,.58);
}
.route span {
  position: relative;
  padding-top: 34px;
  font-family: var(--mono);
  color: var(--gold);
  text-transform: uppercase;
  text-align: center;
}
.route span::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper-deep);
  border: 1px solid rgba(200,138,69,.8);
  transform: translateX(-50%);
}

.work-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(18,16,14,.86), rgba(18,16,14,.94)),
    linear-gradient(rgba(201,192,178,.08) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(201,192,178,.06) 1px, transparent 1px) 0 0 / 48px 48px,
    url("assets/generated/peter-egypt-wall-anime.png") center / cover;
  color: var(--paper);
  overflow: hidden;
  padding-bottom: 84px;
}
.work-page::after {
  content: "CAIRO · EGYPT · BUILDING";
  position: absolute;
  right: var(--pad-x);
  top: calc(var(--nav-h) + 52px);
  z-index: 1;
  color: rgba(232,203,155,.72);
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: .04em;
}
.work-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 32vw) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 80px);
  align-items: center;
}
.work-page .copy { color: rgba(244,239,230,.78); }
.work-page .title {
  color: var(--paper);
  text-shadow: 0 8px 38px rgba(0,0,0,.42);
}
.terminal {
  border: 1px solid rgba(120,113,102,.8);
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,252,244,.94), rgba(244,239,230,.9)),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
}
.term-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(120,113,102,.5);
  font-family: var(--mono);
}
.term-title {
  margin-left: auto;
  color: rgba(18,16,14,.48);
  font-size: 13px;
}
.window-dots {
  display: flex;
  gap: 18px;
  align-items: center;
}
.window-dots i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(18,16,14,.34);
}
.window-dots i:first-child {
  background: var(--ink);
}
.term-body {
  padding: clamp(34px, 5vw, 72px) clamp(34px, 5vw, 72px) clamp(28px, 4vw, 56px);
  display: block;
  min-height: clamp(360px, 34vw, 500px);
}
.terminal-main {
  min-height: inherit;
  display: grid;
  grid-template-rows: 1fr auto;
}
.code-lines {
  font-family: var(--mono);
  color: rgba(18,16,14,.48);
  line-height: 1.62;
  min-height: 11em;
  white-space: pre;
}
.terminal-output .term-line:first-child {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(25px, 2.4vw, 39px);
  line-height: 1.2;
}
.term-line {
  min-height: 1.62em;
}
.terminal-output:not(.is-complete)::after {
  content: "";
  display: inline-block;
  width: .64em;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.12em;
  background: var(--accent);
  animation: cursorBlink 1s steps(1) infinite;
}
.ok { color: #9ed277; }
.run { color: #cf6a2d; }
.lock { color: #3f72a7; }
.progress {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 26px;
  align-items: center;
  font-family: var(--mono);
}
.progress span:first-child {
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(120,113,102,.9);
  background: transparent;
}
.progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f1b06a);
  transition: width 1.2s cubic-bezier(.2,.8,.2,1);
}
.terminal-progress {
  display: grid;
  grid-template-columns: minmax(210px, auto) minmax(260px, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: end;
  margin-top: 36px;
}
.terminal-progress .progress {
  margin-top: 0;
}
.terminal-status {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(18px, 2vw, 28px);
  white-space: nowrap;
}
.terminal-progress .progress b {
  color: var(--accent);
  font-size: clamp(20px, 2.3vw, 31px);
}
.status-table span:nth-child(even) {
  overflow-wrap: normal;
}
.tech-table.status-table {
  display: block;
  align-self: end;
}
.status-table div {
  grid-template-columns: .8fr 1.2fr;
  border-right: 0;
  border-bottom: 1px solid rgba(201,192,178,.26);
}
.status-table div:nth-child(n+4) { border-top: 0; }
.status-table span {
  min-width: 0;
  overflow-wrap: normal;
}
.work-timeline {
  position: relative;
  z-index: 2;
  margin-top: 50px;
  display: grid;
  grid-template-columns: 80px repeat(7, minmax(26px, 1fr)) repeat(3, minmax(70px, auto));
  align-items: center;
  gap: 0;
  font-family: var(--mono);
  color: rgba(244,239,230,.72);
}
.work-timeline span {
  justify-self: start;
  border: 1px solid rgba(232,203,155,.62);
  padding: 10px 16px;
  color: var(--gold);
  background: rgba(18,16,14,.72);
}
.work-timeline i,
.work-timeline b {
  position: relative;
  display: block;
  height: 1px;
  background: rgba(201,192,178,.55);
}
.work-timeline b { background: var(--accent); }
.work-timeline i::after,
.work-timeline b::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(232,203,155,.84);
  background: var(--dark);
}
.work-timeline b::after { background: var(--accent); }
.work-timeline em {
  padding-left: 18px;
  color: var(--gold);
  font-style: normal;
}
.tech-table {
  border: 1px solid rgba(201,192,178,.35);
  align-self: end;
}
.tech-table div {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border-bottom: 1px solid rgba(201,192,178,.26);
}
.tech-table div:last-child { border-bottom: 0; }
.tech-table span {
  padding: 15px 16px;
  font-family: var(--mono);
}
.tech-table span:nth-child(odd) { color: var(--gold); }

.notes-grid {
  display: grid;
  grid-template-columns: minmax(260px, 35vw) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: start;
}
.note-photo {
  margin-top: 36px;
  width: min(360px, 100%);
  border: 1px solid var(--line);
  padding: 12px;
  transform: rotate(-2deg);
  background: rgba(255,255,255,.18);
}
.note-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: sepia(.38) saturate(.65) contrast(.92);
}
.notes-list {
  display: grid;
  gap: 0;
  margin-top: 70px;
}
.note-row {
  display: grid;
  grid-template-columns: 80px 180px 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 150px;
  border-bottom: 1px solid var(--line);
  transition: .25s ease;
}
.note-row:first-child {
  border-top: 1px solid var(--line);
  background: rgba(240,101,46,.08);
}
.note-row:hover {
  background: rgba(240,101,46,.1);
  padding-left: 10px;
}
.note-no {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 28px;
}
.note-type {
  font-family: var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.note-row h2,
.note-row h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 56px);
}
.note-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 18px;
}
.note-link {
  color: var(--accent);
  font-family: var(--mono);
  white-space: nowrap;
}

.contact-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 28vw) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: stretch;
  padding-bottom: 0;
}
.contact-portrait {
  align-self: stretch;
  position: relative;
  min-height: 620px;
  background: var(--dark);
  overflow: hidden;
}
.contact-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: .86;
}
.contact-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18,16,14,.15), rgba(18,16,14,.78));
}
.contact-main {
  padding: calc(var(--nav-h) + 54px) var(--pad-x) 44px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 180px);
  line-height: .88;
  letter-spacing: -.055em;
}
.contact-title::after {
  content: "";
  display: block;
  width: min(520px, 80%);
  height: 3px;
  margin-top: 18px;
  background: var(--accent);
}
.signal-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr minmax(150px, .8fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.signal-card {
  min-height: 160px;
  padding: 30px 26px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.signal-card:last-child { border-right: 0; }
.signal-card b {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .12em;
}
.signal-card strong {
  font-size: clamp(18px, 1.5vw, 25px);
  overflow-wrap: anywhere;
}
.live,
.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}
.live::before,
.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.soon { color: var(--muted); }
.soon::before { background: var(--muted); }
.qr-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px dashed var(--muted);
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  color: var(--muted);
  font-size: 12px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240,101,46,.55); }
  70% { box-shadow: 0 0 0 9px rgba(240,101,46,0); }
  100% { box-shadow: 0 0 0 0 rgba(240,101,46,0); }
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (max-width: 980px) {
  .nav-links { gap: 12px; font-size: 10px; }
  .hero,
  .blueprint,
  .motion-grid,
  .work-grid,
  .notes-grid,
  .contact-page {
    grid-template-columns: 1fr;
  }
  .hero-art { min-height: 560px; order: -1; }
  .hero-art img { width: 100%; }
  .motion-grid > div:first-child {
    display: block;
    min-height: auto;
    padding-top: 0;
  }
  .memory-card {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 32px;
  }
  .term-body,
  .signal-grid {
    grid-template-columns: 1fr;
  }
  .tech-table.status-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .status-table div:nth-child(3n) { border-right: 1px solid rgba(201,192,178,.26); }
  .status-table div:nth-child(2n) { border-right: 0; }
  .status-table div:nth-child(n+3) { border-top: 1px solid rgba(201,192,178,.26); }
  .signal-card { border-right: 0; border-bottom: 1px solid var(--line); }
  .signal-card:last-child { border-bottom: 0; }
  .contact-main { padding-left: var(--pad-x); }
}

@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  .rail, .cross { display: none; }
  .site-nav { padding: 0 18px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 28px; height: 28px; }
  .nav-links {
    flex: 1 1 auto;
    max-width: calc(100vw - 118px);
    overflow-x: auto;
    justify-content: flex-end;
    scrollbar-width: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .page { padding: calc(var(--nav-h) + 34px) 20px 46px; }
  .hero {
    display: block;
    min-height: auto;
    padding: calc(var(--nav-h) + 42px) 20px 52px;
  }
  .hero-copy {
    width: 100%;
    padding-bottom: 0;
  }
  .display { font-size: clamp(86px, 31vw, 128px); }
  .hero .display { font-size: clamp(86px, 31vw, 128px); }
  .lead { font-size: 22px; }
  .hero-side,
  .hero-footer,
  .hero-sketch {
    display: none;
  }
  .hero-art {
    position: relative;
    inset: auto;
    height: 430px;
    min-height: 0;
    margin: 34px -20px 0;
    overflow: hidden;
  }
  .hero-art img {
    position: absolute;
    right: -74px;
    top: 0;
    z-index: 0;
    width: calc(100% + 130px);
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  .hero-art::before {
    background:
      linear-gradient(90deg, var(--paper) 0%, rgba(244,239,230,.88) 24%, rgba(244,239,230,.22) 60%, transparent 100%),
      linear-gradient(180deg, rgba(244,239,230,.25), transparent 56%, var(--paper));
  }
  .hero-meta {
    gap: 14px 18px;
    font-size: 12px;
  }
  .icon-meta i {
    width: 28px;
    height: 28px;
  }
  .hero-art, .blueprint-board, .contact-portrait { min-height: 0; }
  .blueprint-board, .contact-portrait { min-height: 440px; }
  .spec-table { position: relative; right: auto; bottom: auto; margin: 24px; }
  .callout { display: none; }
  .route { grid-template-columns: 1fr 1fr; }
  .work-page::after { display: none; }
  .work-grid { gap: 28px; }
  .terminal { border-radius: 14px; margin: 0 -4px; }
  .term-bar { padding: 14px 16px; font-size: 12px; }
  .term-body {
    padding: 20px 16px;
    gap: 22px;
    min-height: 260px;
  }
  .project-name {
    font-size: 40px;
    margin-bottom: 14px;
  }
  .code-lines {
    min-height: 7em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 12px;
  }
  .terminal-output .term-line:first-child {
    font-size: 22px;
  }
  .terminal-progress {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .terminal-status {
    font-size: 16px;
    white-space: normal;
  }
  .progress {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
  }
  .progress span:first-child { height: 13px; }
  .terminal-progress { margin-top: 12px; }
  .work-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
  }
  .work-timeline span,
  .work-timeline em {
    padding: 9px 12px;
  }
  .work-timeline i,
  .work-timeline b {
    flex: 1 1 42px;
    min-width: 34px;
  }
  .note-photo {
    width: 100%;
    transform: none;
  }
  .tech-table.status-table { grid-template-columns: 1fr; }
  .status-table div,
  .status-table div:nth-child(2n),
  .status-table div:nth-child(3n) {
    border-right: 0;
  }
  .status-table div + div { border-top: 1px solid rgba(201,192,178,.26); }
  .note-row {
    grid-template-columns: 52px 1fr;
    min-height: auto;
    padding: 24px 0;
  }
  .note-row > *:nth-child(n+3) { grid-column: 2; }
  .note-link { display: none; }
  .footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art.is-particle-loading img,
  .hero-art img {
    opacity: 1;
    filter: saturate(1.03) contrast(1.03);
    transition: none;
    transform: none;
  }
  .hero-particles {
    display: none;
  }
}
