:root {
  --wired-black: #000000;
  --page-ink: #1a1a1a;
  --paper-white: #ffffff;
  --paper-soft: #f7f7f7;
  --link-blue: #057dbc;
  --caption-gray: #757575;
  --hairline: #e2e8f0;
  --rule: #d9d9d9;
  --rule-strong: #b9b9b9;
  --bar-divider: rgba(255, 255, 255, 0.2);
  --bar-hover: rgba(255, 255, 255, 0.06);
  --phone-rail: rgba(0, 0, 0, 0.7);
  --preview-backdrop: rgba(10, 10, 10, 0.68);
  --screenshot-glow: rgba(0, 0, 0, 0.02);
  --screenshot-shade: rgba(0, 0, 0, 0.04);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 20px 48px rgba(0, 0, 0, 0.08);
  --stripe-soft: #f4f4f4;
  --stage-mid: #ffffff;
  --stage-soft: #f7f7f7;
  --stage-edge: #f2f2f2;
  --font-body: "Open Sans", sans-serif;
  --font-display: "Inter", sans-serif;
  --font-mono: "Inconsolata", monospace;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-80: 80px;
  --space-96: 96px;
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --wired-black: #f4f0e8;
  --page-ink: #f4f0e8;
  --paper-white: #101312;
  --paper-soft: #171b1a;
  --link-blue: #7fd5ff;
  --caption-gray: #a8aaa6;
  --hairline: #2d3330;
  --rule: #343a36;
  --rule-strong: #f4f0e8;
  --bar-divider: rgba(244, 240, 232, 0.22);
  --bar-hover: rgba(244, 240, 232, 0.1);
  --phone-rail: rgba(244, 240, 232, 0.55);
  --preview-backdrop: rgba(0, 0, 0, 0.78);
  --screenshot-glow: rgba(255, 255, 255, 0.03);
  --screenshot-shade: rgba(255, 255, 255, 0.06);
  --shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 22px 58px rgba(0, 0, 0, 0.44);
  --stripe-soft: #171b1a;
  --stage-mid: #111413;
  --stage-soft: #161a18;
  --stage-edge: #0b0d0c;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper-white);
  color: var(--page-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 220ms var(--ease-standard),
    color 220ms var(--ease-standard);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 180ms var(--ease-standard), text-decoration-color 180ms var(--ease-standard);
}

a:hover {
  color: var(--link-blue);
}

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

.page-shell {
  --parallax-near: 0px;
  --parallax-mid: 0px;
  --parallax-far: 0px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--space-24) var(--space-80);
}

.ghost-cursor,
.ghost-cursor * {
  cursor:
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 27V13C7 7.5 11 4 16 4s9 3.5 9 9v14l-3-2.5L19 27l-3-2.5L13 27l-3-2.5L7 27Z' fill='white' stroke='black' stroke-width='2'/%3E%3Ccircle cx='13' cy='14' r='2' fill='black'/%3E%3Ccircle cx='19' cy='14' r='2' fill='black'/%3E%3C/svg%3E") 16 16,
    auto;
}

.utility-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
  min-height: 42px;
  margin-bottom: var(--space-32);
  background: var(--wired-black);
  border-bottom: 1px solid var(--wired-black);
}

.utility-bar a {
  padding: 10px 16px;
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 180ms var(--ease-standard), background-color 180ms var(--ease-standard);
}

.utility-bar a + a {
  border-left: 1px solid var(--bar-divider);
}

.utility-bar a:hover {
  color: var(--link-blue);
  background: var(--bar-hover);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  margin-left: auto;
  padding: 7px 14px;
  border: 0;
  border-left: 1px solid var(--bar-divider);
  background: transparent;
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard);
}

.theme-toggle:hover {
  color: var(--link-blue);
  background: var(--bar-hover);
}

.theme-toggle-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 22px;
  height: 24px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 13px 13px 3px 3px;
}

.theme-toggle-ghost::before,
.theme-toggle-ghost::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  border-radius: 0 0 8px 0;
  background: var(--wired-black);
}

.theme-toggle-ghost::before {
  left: 1px;
}

.theme-toggle-ghost::after {
  right: 1px;
}

.theme-toggle-eye {
  width: 3.5px;
  height: 3.5px;
  margin-top: 1px;
  border-radius: 50%;
  background: currentColor;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: var(--space-32);
  align-items: stretch;
  padding: var(--space-48) 0 var(--space-56);
  border-top: 2px solid var(--wired-black);
  border-bottom: 1px solid var(--wired-black);
  overflow: clip;
}

.parallax-chapter {
  position: relative;
  isolation: isolate;
}

.parallax-chapter::before {
  content: "";
  position: absolute;
  inset: 18px auto auto -24px;
  z-index: -1;
  width: 96px;
  height: 1px;
  background: var(--wired-black);
  transform: translateY(var(--parallax-far));
  opacity: 0.28;
  pointer-events: none;
}

.hero-copy,
.project,
.capability-grid article,
.credential-card,
.proof-strip article,
.contact-banner {
  border: 1px solid var(--rule);
  background: var(--paper-white);
  transition:
    transform 240ms var(--ease-standard),
    border-color 240ms var(--ease-standard),
    box-shadow 240ms var(--ease-standard),
    background-color 240ms var(--ease-standard);
}

.hero-copy {
  min-height: 100%;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: none;
  padding: clamp(24px, 3vw, 36px);
  overflow: clip;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  width: min(32%, 180px);
  height: 2px;
  background: var(--wired-black);
  transform: translateY(var(--parallax-mid));
  opacity: 0.36;
}

.hero-copy > * {
  position: relative;
  z-index: 2;
}

.eyebrow,
.label,
.project-kicker,
.proof-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow,
.project-kicker,
.proof-label {
  color: var(--page-ink);
}

.eyebrow {
  margin-bottom: var(--space-12);
}

.hero h1,
.section-heading h2,
.project h3,
.capability-grid h3,
.credential-card h3,
.contact-banner h2,
.proof-value {
  font-family: var(--font-display);
  color: var(--page-ink);
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 11ch;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.93;
}

.hero-intro {
  margin-bottom: var(--space-12);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 62ch;
  margin-top: var(--space-20);
  color: var(--page-ink);
  font-size: 19px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  margin-top: var(--space-32);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  color: var(--wired-black);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.button:hover {
  background: var(--wired-black);
  color: var(--paper-white);
  transform: translateY(-2px);
}

.hero-portrait-column {
  display: grid;
  gap: var(--space-16);
  min-width: 0;
}

.portrait-stage {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--wired-black);
  background:
    repeating-linear-gradient(
      90deg,
      var(--paper-white),
      var(--paper-white) 28px,
      var(--stripe-soft) 28px,
      var(--stripe-soft) 29px
    );
  overflow: clip;
}

.portrait-frame {
  position: absolute;
  inset: 34px 34px 58px 52px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  box-shadow: 12px 12px 0 var(--wired-black);
}

.portrait-frame img {
  display: block;
  width: 100%;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

.portrait-frame picture {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.portrait-frame figcaption {
  padding: 10px 12px;
  border-top: 2px solid var(--wired-black);
  background: var(--paper-white);
  color: var(--page-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portrait-rule {
  position: absolute;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
}

.portrait-rule-back {
  top: 18px;
  right: 16px;
  width: 54%;
  height: 58%;
}

.portrait-rule-front {
  right: 42px;
  bottom: 26px;
  z-index: 3;
  width: 34%;
  height: 16px;
  background: var(--wired-black);
}

.parallax-layer {
  will-change: transform;
  transition: transform 80ms linear;
}

.parallax-layer-near {
  transform: translate3d(0, var(--parallax-near), 0);
}

.parallax-layer-mid {
  transform: translate3d(0, var(--parallax-mid), 0);
}

.parallax-layer-far {
  transform: translate3d(0, var(--parallax-far), 0);
}

.interactive-portrait {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  padding: var(--space-16) 0;
}

.ghost-shell {
  position: relative;
  width: 220px;
  height: 270px;
  transition: transform 260ms var(--ease-standard);
}

.ghost-face {
  position: relative;
  width: 100%;
  height: 220px;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  border-radius: 120px 120px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ghost-wave {
  position: absolute;
  bottom: 0;
  width: 78px;
  height: 70px;
  border: 2px solid var(--wired-black);
  border-top: none;
  border-radius: 0 0 78px 78px;
  background: var(--paper-white);
}

.ghost-wave-one {
  left: 0;
}

.ghost-wave-two {
  left: 71px;
}

.ghost-wave-three {
  right: 0;
}

.eyes-wrapper {
  display: flex;
  gap: 24px;
  transform: translateY(-8px);
}

.eye {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--wired-black);
  border-radius: 50%;
  background: var(--paper-white);
  overflow: hidden;
}

.pupil {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--wired-black);
  border-radius: 50%;
  transform: translate(0, 0);
  will-change: transform;
}

.mascot-note {
  margin-top: var(--space-16);
  color: var(--caption-gray);
  font-size: 14px;
  max-width: 26ch;
}

.floating-ghost {
  position: fixed;
  top: auto;
  right: -42px;
  bottom: 118px;
  z-index: 800;
  pointer-events: auto;
  cursor:
    url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 27V13C7 7.5 11 4 16 4s9 3.5 9 9v14l-3-2.5L19 27l-3-2.5L13 27l-3-2.5L7 27Z' fill='white' stroke='black' stroke-width='2'/%3E%3Ccircle cx='13' cy='14' r='2' fill='black'/%3E%3Ccircle cx='19' cy='14' r='2' fill='black'/%3E%3C/svg%3E") 16 16,
    pointer;
  transform: rotate(-7deg);
  will-change: right, transform;
  transition:
    right 620ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-ghost.is-out {
  right: 20px;
  transform: rotate(-2deg) translateY(-8px);
}

.floating-ghost .ghost-shell {
  width: 138px;
  height: 172px;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.12));
}

.floating-ghost .ghost-face {
  height: 138px;
}

.floating-ghost .ghost-wave {
  width: 49px;
  height: 42px;
}

.floating-ghost .ghost-wave-two {
  left: 45px;
}

.floating-ghost .eyes-wrapper {
  gap: 16px;
}

.floating-ghost .eye {
  width: 30px;
  height: 30px;
}

.floating-ghost .pupil {
  width: 11px;
  height: 11px;
}

.proof-strip {
  display: grid;
  gap: var(--space-16);
}

.hero-proof-card {
  grid-template-columns: 1fr;
  margin: 0;
}

.proof-strip article {
  padding: 22px 24px 24px;
}

.proof-strip article:hover {
  transform: translateY(-4px);
  border-color: var(--wired-black);
  box-shadow: var(--shadow-soft);
}

.proof-value {
  font-size: 48px;
  line-height: 0.92;
  margin-bottom: var(--space-8);
}

.proof-label {
  margin-bottom: var(--space-10);
}

.content-section {
  position: relative;
  margin-top: var(--space-64);
  padding-top: var(--space-40);
  border-top: 1px solid var(--wired-black);
}

.section-heading {
  position: sticky;
  top: 18px;
  z-index: 4;
  max-width: 840px;
  margin-bottom: var(--space-32);
  padding: 0 0 var(--space-16);
  background: var(--paper-white);
}

.section-heading h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  max-width: 14ch;
}

.project {
  display: grid;
  gap: var(--space-28);
  padding: 24px;
}

.project:hover,
.capability-grid article:hover,
.credential-card:hover,
.contact-banner:hover,
.hero-copy:hover {
  transform: translateY(-3px);
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-card);
}

.project-featured {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  column-gap: 40px;
  border-top: 2px solid var(--wired-black);
  align-items: center;
  overflow: clip;
}

.project-featured > .screenshot-stage {
  width: 100%;
  align-self: center;
  transform: translate3d(0, var(--parallax-mid), 0);
  transition: transform 80ms linear;
}

.project-featured > .project-content {
  transform: translate3d(0, var(--parallax-near), 0);
  transition: transform 80ms linear;
}

.project-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-24);
  margin-top: var(--space-24);
}

.project-visual {
  min-height: 0;
  border: 1px solid var(--wired-black);
  background:
    linear-gradient(180deg, transparent 0%, var(--screenshot-shade) 100%),
    repeating-linear-gradient(
      -45deg,
      var(--paper-white),
      var(--paper-white) 18px,
      var(--stripe-soft) 18px,
      var(--stripe-soft) 36px
    );
}

.project-visual.compact {
  min-height: 250px;
}

.carousel-stage {
  display: flex;
  min-height: 300px;
  padding: 18px;
}

.browser-carousel {
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-16);
}

.carousel-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.browser-frame {
  overflow: hidden;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  box-shadow: 8px 8px 0 var(--wired-black);
  transition:
    transform 180ms var(--ease-standard),
    box-shadow 180ms var(--ease-standard);
}

.carousel-image-button:hover .browser-frame {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--rule-strong);
}

.browser-bar,
.preview-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 12px;
  border-bottom: 2px solid var(--wired-black);
  background: var(--paper-white);
}

.browser-bar span,
.preview-browser-bar span {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--wired-black);
  border-radius: 50%;
}

.browser-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.carousel-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-12);
  align-items: center;
}

.carousel-controls button {
  min-height: 40px;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  color: var(--wired-black);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.carousel-controls button:hover {
  background: var(--wired-black);
  color: var(--paper-white);
  transform: translateY(-2px);
}

.carousel-controls p {
  min-width: 54px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-align: center;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dots button {
  width: 24px;
  height: 8px;
  border: 1.5px solid var(--wired-black);
  background: transparent;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.carousel-dots button:hover,
.carousel-dots button.is-active {
  background: var(--wired-black);
  transform: translateY(-1px);
}

.screenshot-stage {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  padding: 0 18px 12px;
  overflow-x: clip;
  overflow-y: visible;
  background:
    linear-gradient(180deg, transparent 0%, var(--screenshot-glow) 100%),
    linear-gradient(135deg, var(--stage-soft) 0%, var(--stage-mid) 55%, var(--stage-edge) 100%);
}

.device-showcase {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  min-height: 0;
  height: auto;
  margin-top: -88px;
  padding: 0;
  line-height: 0;
}

.phone-shot {
  position: relative;
  background: transparent;
  transition: transform 240ms var(--ease-standard), filter 240ms var(--ease-standard);
}

.phone-button {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.phone-button:hover .iphone-shell {
  box-shadow:
    0 34px 58px rgba(0, 0, 0, 0.24),
    0 12px 20px rgba(0, 0, 0, 0.14);
}

.iphone-shell {
  position: relative;
  overflow: hidden;
  padding: 3px;
  border: 1.5px solid #111111;
  border-radius: 36px;
  background: linear-gradient(180deg, #2a2a2a 0%, #050505 100%);
  box-shadow:
    0 28px 50px rgba(0, 0, 0, 0.2),
    0 10px 18px rgba(0, 0, 0, 0.12);
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 2;
  width: 36%;
  height: 18px;
  border-radius: 999px;
  background: #000000;
  transform: translateX(-50%);
}

.iphone-shell::before,
.iphone-shell::after {
  content: "";
  position: absolute;
  top: 108px;
  width: 2px;
  background: var(--phone-rail);
  border-radius: 1px;
}

.iphone-shell::before {
  left: -3px;
  height: 32px;
}

.iphone-shell::after {
  right: -3px;
  height: 52px;
}

.iphone-screen {
  overflow: hidden;
  border-radius: 33px;
  background: var(--paper-white);
}

.iphone-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.phone-shot-center {
  z-index: 3;
  width: min(39%, 206px);
  transform: translateY(-30px);
}

.phone-shot-left,
.phone-shot-right {
  z-index: 2;
  width: min(27%, 136px);
}

.phone-shot-left .iphone-shell,
.phone-shot-right .iphone-shell {
  border-radius: 26px;
  padding: 2px;
}

.phone-shot-left .iphone-screen,
.phone-shot-right .iphone-screen {
  border-radius: 23px;
}

.phone-shot-left .dynamic-island,
.phone-shot-right .dynamic-island {
  top: 7px;
  width: 34%;
  height: 12px;
}

.phone-shot-left {
  margin-right: -14px;
  transform: translate(18px, 18px) rotate(-10deg);
}

.phone-shot-right {
  margin-left: -14px;
  transform: translate(-18px, 22px) rotate(10deg);
}

.phone-shot-left:hover {
  transform: translate(12px, 10px) rotate(-8deg);
}

.phone-shot-center:hover {
  transform: translateY(-36px);
}

.phone-shot-right:hover {
  transform: translate(-12px, 14px) rotate(8deg);
}

.visual-placeholder {
  display: flex;
  min-height: inherit;
  height: 100%;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-24);
}

.visual-placeholder p {
  max-width: 28ch;
  color: var(--caption-gray);
}

.classified-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0%, var(--screenshot-shade) 100%),
    repeating-linear-gradient(
      0deg,
      var(--paper-white),
      var(--paper-white) 14px,
      var(--stripe-soft) 14px,
      var(--stripe-soft) 15px
    );
}

.classified-folder {
  position: relative;
  width: min(100%, 420px);
  padding-top: 20px;
  transform: rotate(-1.5deg);
}

.classified-tab {
  position: absolute;
  top: 0;
  left: 18px;
  width: 44%;
  height: 42px;
  border: 2px solid var(--wired-black);
  border-bottom: 0;
  background: var(--paper-white);
}

.classified-document {
  position: relative;
  min-height: 230px;
  padding: 24px;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  box-shadow: 10px 10px 0 var(--wired-black);
}

.classified-stamp {
  display: inline-flex;
  margin-bottom: var(--space-16);
  padding: 8px 12px;
  border: 2px solid var(--wired-black);
  color: var(--wired-black);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-5deg);
}

.classified-id,
.classified-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classified-id {
  margin-bottom: var(--space-16);
}

.redacted-line,
.redacted-grid span {
  display: block;
  background: var(--wired-black);
}

.redacted-line {
  height: 14px;
  margin-bottom: var(--space-10);
}

.redacted-line-long {
  width: 84%;
}

.redacted-line-short {
  width: 56%;
}

.redacted-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: var(--space-20) 0;
}

.redacted-grid span {
  height: 34px;
}

.classified-note {
  max-width: 34ch;
  color: var(--caption-gray);
}

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

.project-kicker {
  margin-bottom: var(--space-8);
}

.project h3 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.03;
  max-width: 14ch;
}

.project-summary {
  margin-top: var(--space-16);
  color: var(--page-ink);
  max-width: 62ch;
}

.project-note {
  margin-top: var(--space-12);
  color: var(--caption-gray);
  font-size: 14px;
  max-width: 52ch;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.project-link::after {
  content: "->";
  font-size: 0.95em;
  line-height: 1;
}

.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 42px);
  background: var(--preview-backdrop);
  backdrop-filter: blur(10px);
  animation: overlay-fade 240ms var(--ease-standard);
}

.preview-viewer {
  position: relative;
  display: flex;
  width: min(100%, 1120px);
  max-height: calc(100vh - 56px);
  flex-direction: column;
  gap: var(--space-16);
}

.preview-viewer-phone {
  width: min(100%, 420px);
}

.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(44px, 7vw, 72px);
}

.preview-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  padding: 10px 14px;
  border: 2px solid var(--paper-white);
  background: rgba(0, 0, 0, 0.58);
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.preview-close:hover {
  background: var(--paper-white);
  color: var(--wired-black);
  transform: translateY(-2px);
}

.preview-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  min-height: 46px;
  padding: 0 14px;
  border: 2px solid var(--paper-white);
  background: rgba(0, 0, 0, 0.72);
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translateY(-50%);
  transition:
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.preview-nav:hover {
  background: var(--paper-white);
  color: var(--wired-black);
}

.preview-nav-previous {
  left: 0;
}

.preview-nav-next {
  right: 0;
}

.preview-count {
  color: var(--paper-white);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.preview-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-16);
  align-items: center;
  padding: 0 clamp(44px, 7vw, 72px);
}

.preview-thumbnails {
  display: flex;
  gap: var(--space-8);
  min-width: 0;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.preview-thumbnails button {
  flex: 0 0 118px;
  overflow: hidden;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.42);
  background: transparent;
  cursor: pointer;
  opacity: 0.68;
  transition:
    border-color 180ms var(--ease-standard),
    opacity 180ms var(--ease-standard),
    transform 180ms var(--ease-standard);
}

.preview-thumbnails button:hover,
.preview-thumbnails button.is-active {
  border-color: var(--paper-white);
  opacity: 1;
  transform: translateY(-2px);
}

.preview-thumbnails img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
}

.preview-phone {
  position: relative;
  width: min(100%, 300px);
  max-height: min(78vh, 680px);
  padding: 6px;
  border: 2px solid #111111;
  border-radius: 48px;
  background: linear-gradient(180deg, #2a2a2a 0%, #050505 100%);
  box-shadow:
    0 42px 80px rgba(0, 0, 0, 0.28),
    0 18px 30px rgba(0, 0, 0, 0.16);
}

.preview-browser {
  overflow: hidden;
  width: min(100%, 1040px);
  border: 2px solid var(--paper-white);
  background: var(--paper-white);
  box-shadow:
    0 42px 80px rgba(0, 0, 0, 0.28),
    0 18px 30px rgba(0, 0, 0, 0.16);
}

.preview-island {
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 2;
  width: 34%;
  height: 24px;
  border-radius: 999px;
  background: #000000;
  transform: translateX(-50%);
}

.preview-screen {
  overflow: hidden;
  border-radius: 42px;
  background: var(--paper-white);
}

.preview-screen img {
  display: block;
  width: 100%;
  max-height: calc(min(78vh, 680px) - 12px);
  height: auto;
  object-fit: contain;
}

.preview-browser-screen {
  max-height: min(62vh, 680px);
  overflow: auto;
  background: var(--paper-white);
}

.preview-browser-screen img {
  display: block;
  width: 100%;
  height: auto;
}

.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px 8px 10px;
  border: 2px solid var(--wired-black);
  background: var(--paper-white);
  color: var(--wired-black);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 8px 8px 0 var(--wired-black);
  cursor: pointer;
  animation: back-to-top-in 260ms var(--ease-standard);
  transition:
    transform 180ms var(--ease-standard),
    box-shadow 180ms var(--ease-standard),
    background-color 180ms var(--ease-standard),
    color 180ms var(--ease-standard);
}

.back-to-top:hover {
  background: var(--wired-black);
  color: var(--paper-white);
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0 var(--rule-strong);
}

.back-to-top-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 30px;
  height: 34px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 17px 17px 4px 4px;
}

.back-to-top-ghost::before,
.back-to-top-ghost::after {
  content: "";
  position: absolute;
  bottom: -6px;
  width: 11px;
  height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 11px 0;
  background: inherit;
}

.back-to-top-ghost::before {
  left: 1px;
}

.back-to-top-ghost::after {
  right: 1px;
}

.back-to-top-eye {
  width: 5px;
  height: 5px;
  margin-top: 2px;
  border-radius: 50%;
  background: currentColor;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: var(--space-24);
  padding-top: var(--space-20);
  border-top: 1px solid var(--rule);
}

.label {
  margin-bottom: var(--space-4);
  color: var(--caption-gray);
}

.detail-list,
.signal-list {
  list-style: none;
}

.detail-list li,
.signal-list li {
  position: relative;
  padding-left: 16px;
}

.detail-list li + li,
.signal-list li + li {
  margin-top: var(--space-12);
}

.detail-list li::before,
.signal-list li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--page-ink);
}

.capability-grid,
.credentials-grid {
  display: grid;
  gap: var(--space-24);
}

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

.capability-grid article,
.credential-card {
  padding: 24px;
}

.capability-grid h3,
.credential-card h3 {
  margin-bottom: var(--space-12);
  font-size: 26px;
  line-height: 1.08;
}

.muted,
.credential-card p,
.credential-card li,
.capability-grid p {
  color: var(--page-ink);
}

.credentials-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-banner {
  margin-top: var(--space-64);
  padding: 28px 32px 32px;
  border-top: 2px solid var(--wired-black);
  overflow: clip;
}

.contact-banner::after {
  content: "";
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: -1;
  width: min(34vw, 340px);
  height: 52%;
  border: 2px solid var(--wired-black);
  transform: translateY(var(--parallax-mid));
  opacity: 0.12;
}

.contact-banner h2 {
  max-width: 15ch;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1;
}

.reveal-item {
  opacity: 1;
}

.reveal-ready .reveal-item {
  opacity: 0;
  will-change: clip-path, opacity;
  transition:
    clip-path 680ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 420ms ease-out;
}

.reveal-ready .reveal-in {
  clip-path: inset(0 0 16% 0);
}

.reveal-ready .reveal-rise {
  clip-path: inset(0 0 9% 0);
}

.reveal-delay-1 {
  transition-delay: 90ms;
}

.reveal-delay-2 {
  transition-delay: 180ms;
}

.reveal-item.is-visible {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  will-change: auto;
}

@media (max-width: 1024px) {
  .project-visual {
    min-height: 270px;
  }

  .hero,
  .project-featured,
  .project-grid-two,
  .capability-grid,
  .credentials-grid,
  .proof-strip,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: var(--space-40);
  }

  .portrait-stage {
    min-height: 620px;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-proof-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-featured > .screenshot-stage {
    align-self: start;
  }

  .project-featured > .screenshot-stage,
  .project-featured > .project-content {
    transform: none;
  }

  .project-featured {
    column-gap: 24px;
  }

  .device-showcase {
    min-height: 320px;
    height: auto;
    margin-top: -6px;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 0 var(--space-16) var(--space-56);
  }

  .utility-bar {
    margin-bottom: var(--space-24);
  }

  .theme-toggle {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-left: 0;
    border-top: 1px solid var(--bar-divider);
    border-left: 0;
  }

  .hero {
    padding: var(--space-24) 0 var(--space-40);
  }

  .parallax-chapter::before,
  .hero-copy::after,
  .contact-banner::after {
    display: none;
  }

  .section-heading {
    position: static;
    padding-bottom: 0;
  }

  .portrait-stage {
    min-height: 430px;
  }

  .portrait-frame {
    inset: 24px 22px 52px 24px;
    box-shadow: 8px 8px 0 var(--wired-black);
  }

  .portrait-frame figcaption {
    font-size: 11px;
  }

  .portrait-rule-front {
    right: 26px;
    bottom: 24px;
  }

  .project,
  .proof-strip article,
  .capability-grid article,
  .credential-card,
  .contact-banner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .floating-ghost {
    opacity: 0.82;
  }

  .floating-ghost .ghost-shell {
    width: 104px;
    height: 130px;
  }

  .floating-ghost .ghost-face {
    height: 104px;
  }

  .floating-ghost .ghost-wave {
    width: 37px;
    height: 32px;
  }

  .floating-ghost .ghost-wave-two {
    left: 34px;
  }

  .floating-ghost .eyes-wrapper {
    gap: 12px;
  }

  .floating-ghost .eye {
    width: 24px;
    height: 24px;
  }

  .floating-ghost .pupil {
    width: 9px;
    height: 9px;
  }

  .floating-ghost {
    right: -36px;
    bottom: 96px;
    transition-duration: 520ms;
  }

  .floating-ghost.is-out {
    right: 12px;
    transform: rotate(-2deg) translateY(-6px);
  }

  .hero-proof-card {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .content-section {
    margin-top: var(--space-48);
    padding-top: var(--space-32);
  }

  .section-heading {
    margin-bottom: var(--space-24);
  }

  .project-grid {
    gap: var(--space-16);
  }

  .carousel-stage {
    min-height: 260px;
    padding: var(--space-12);
  }

  .classified-visual {
    min-height: 280px;
    padding: var(--space-16);
  }

  .classified-document {
    padding: 20px;
    box-shadow: 7px 7px 0 var(--wired-black);
  }

  .carousel-controls {
    grid-template-columns: 1fr 52px 1fr;
    gap: var(--space-8);
  }

  .carousel-controls button {
    min-height: 38px;
  }

  .screenshot-stage {
    padding: var(--space-12) var(--space-16) var(--space-16);
  }

  .device-showcase {
    min-height: 0;
    margin-top: 0;
    padding: var(--space-12) 0;
    gap: var(--space-12);
    align-items: flex-start;
  }

  .phone-shot-center,
  .phone-shot-left,
  .phone-shot-right {
    width: calc((100% - 24px) / 3);
  }

  .phone-shot-center {
    transform: translateY(-8px);
  }

  .phone-shot-left,
  .phone-shot-right {
    margin: 0;
    transform: none;
  }

  .iphone-shell {
    padding: 2px;
    border-radius: 24px;
  }

  .dynamic-island {
    top: 8px;
    height: 12px;
  }

  .iphone-screen {
    border-radius: 22px;
  }

  .preview-overlay {
    align-items: center;
    padding: 16px;
  }

  .preview-viewer {
    max-height: calc(100vh - 32px);
    gap: var(--space-12);
  }

  .preview-close {
    top: 0;
    right: 0;
    padding: 9px 10px;
  }

  .preview-stage {
    padding: 52px 0 0;
  }

  .preview-nav {
    top: auto;
    bottom: 10px;
    min-height: 42px;
    padding: 0 12px;
    transform: none;
  }

  .preview-nav-previous {
    left: 0;
  }

  .preview-nav-next {
    right: 0;
  }

  .preview-footer {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    padding: 0;
  }

  .preview-thumbnails button {
    flex-basis: 92px;
  }

  .preview-phone {
    width: min(100%, 238px);
    max-height: calc(100vh - 132px);
    border-radius: 34px;
    padding: 5px;
  }

  .preview-island {
    top: 12px;
    height: 18px;
  }

  .preview-screen {
    border-radius: 28px;
  }

  .preview-screen img {
    max-height: calc(100vh - 142px);
  }

  .preview-browser-screen {
    max-height: 58vh;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-height: 44px;
    padding: 7px 12px 7px 9px;
    box-shadow: 6px 6px 0 var(--wired-black);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
  }

  .parallax-layer,
  .project-featured > .screenshot-stage,
  .project-featured > .project-content,
  .parallax-chapter::before,
  .hero-copy::after,
  .contact-banner::after {
    transform: none !important;
  }
}

@keyframes overlay-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes back-to-top-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

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

/* Cinematic parallax revision */
body {
  background: #070808;
}

.page-shell {
  max-width: none;
  padding: 0;
  overflow: hidden;
  background: #070808;
  color: #f7f3ec;
}

.utility-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 52px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 36px);
  border: 0;
  background: rgba(7, 8, 8, 0.86);
  backdrop-filter: blur(16px);
}

.utility-bar a,
.theme-toggle {
  color: #f7f3ec;
}

.theme-toggle-ghost::before,
.theme-toggle-ghost::after {
  background: #070808;
}

.hero {
  min-height: calc(100vh - 52px);
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: none;
  padding: clamp(56px, 8vw, 112px) clamp(18px, 5vw, 76px);
  border: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.96) 0%, rgba(7, 8, 8, 0.72) 47%, rgba(7, 8, 8, 0.28) 100%),
    url("/portfolio/chester-portrait.jpg") center right / min(58vw, 920px) auto no-repeat,
    #070808;
}

.hero-atmosphere {
  position: absolute;
  inset: -12% -8% auto auto;
  width: min(58vw, 820px);
  height: 82%;
  border: 1px solid rgba(247, 243, 236, 0.22);
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.09), rgba(247, 243, 236, 0)),
    repeating-linear-gradient(90deg, rgba(247, 243, 236, 0.14) 0 1px, transparent 1px 42px);
  opacity: 0.42;
}

.hero-copy,
.project,
.capability-grid article,
.credential-card,
.proof-strip article,
.contact-banner {
  border-color: rgba(247, 243, 236, 0.18);
  background: rgba(247, 243, 236, 0.055);
  color: #f7f3ec;
  box-shadow: none;
}

.hero-copy {
  max-width: 820px;
  padding: clamp(24px, 3vw, 44px) 0;
  border: 0;
  background: transparent;
}

.hero-copy::after,
.parallax-chapter::before {
  background: #f7f3ec;
}

.eyebrow,
.project-kicker,
.proof-label,
.label {
  color: rgba(247, 243, 236, 0.68);
}

.hero h1,
.section-heading h2,
.project h3,
.capability-grid h3,
.credential-card h3,
.contact-banner h2,
.proof-value {
  color: #f7f3ec;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 0.88;
}

.hero-intro {
  color: #f7f3ec;
}

.hero-summary {
  max-width: 54ch;
  color: rgba(247, 243, 236, 0.78);
  font-size: clamp(18px, 1.5vw, 22px);
}

.button {
  border-color: #f7f3ec;
  background: transparent;
  color: #f7f3ec;
}

.button-primary {
  background: #f7f3ec;
  color: #070808;
}

.button:hover {
  border-color: #f7f3ec;
  background: #f7f3ec;
  color: #070808;
}

.button-primary:hover {
  background: transparent;
  color: #f7f3ec;
}

.hero-portrait-column {
  position: relative;
  align-self: stretch;
  align-content: center;
}

.portrait-stage {
  min-height: min(76vh, 760px);
  border-color: rgba(247, 243, 236, 0.24);
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.06), rgba(247, 243, 236, 0.02)),
    #121414;
}

.portrait-frame {
  inset: 28px 28px 72px 28px;
  border-color: rgba(247, 243, 236, 0.86);
  background: #070808;
  box-shadow: 18px 18px 0 rgba(247, 243, 236, 0.14);
}

.portrait-frame img {
  filter: saturate(0.96) contrast(1.04);
}

.portrait-frame figcaption {
  border-color: rgba(247, 243, 236, 0.78);
  background: rgba(7, 8, 8, 0.92);
  color: rgba(247, 243, 236, 0.82);
}

.portrait-rule {
  border-color: rgba(247, 243, 236, 0.3);
  background: transparent;
}

.portrait-rule-front {
  background: #f7f3ec;
}

.proof-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  z-index: 3;
  margin-top: -48px;
}

.proof-strip article {
  min-height: 150px;
  border-color: rgba(247, 243, 236, 0.16);
  background: rgba(7, 8, 8, 0.78);
  backdrop-filter: blur(14px);
}

.proof-strip article p:not(.proof-value, .proof-label),
.project-summary,
.project-note,
.muted,
.credential-card p,
.credential-card li,
.capability-grid p,
.detail-list li {
  color: rgba(247, 243, 236, 0.76);
}

.content-section {
  max-width: none;
  min-height: 88vh;
  margin: 0;
  padding: clamp(72px, 10vw, 140px) clamp(18px, 5vw, 76px);
  border-top: 1px solid rgba(247, 243, 236, 0.14);
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.035), rgba(247, 243, 236, 0)),
    #070808;
}

.section-heading {
  top: 78px;
  max-width: 980px;
  background: linear-gradient(180deg, rgba(7, 8, 8, 0.96), rgba(7, 8, 8, 0.82));
}

.section-heading h2 {
  max-width: 15ch;
  font-size: clamp(42px, 6vw, 86px);
  line-height: 0.92;
}

.project {
  border: 1px solid rgba(247, 243, 236, 0.15);
  background: rgba(247, 243, 236, 0.045);
}

.project:hover,
.capability-grid article:hover,
.credential-card:hover,
.contact-banner:hover,
.hero-copy:hover {
  transform: none;
  border-color: rgba(247, 243, 236, 0.32);
  box-shadow: none;
}

.cinematic-project {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: clamp(22px, 3vw, 42px);
}

.project-featured {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  column-gap: clamp(30px, 5vw, 84px);
  border-top: 1px solid rgba(247, 243, 236, 0.32);
}

.project-visual {
  border-color: rgba(247, 243, 236, 0.25);
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0.08), rgba(7, 8, 8, 0.6)),
    #101211;
}

.screenshot-stage {
  min-height: 620px;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(247, 243, 236, 0.13), transparent 42%),
    #101211;
}

.device-showcase {
  margin-top: 0;
  transform: scale(1.1);
}

.browser-frame,
.classified-document,
.back-to-top {
  border-color: #f7f3ec;
  background: #101211;
  box-shadow: 12px 12px 0 rgba(247, 243, 236, 0.12);
}

.browser-bar,
.preview-browser-bar {
  border-color: #f7f3ec;
  background: #101211;
}

.browser-bar span,
.preview-browser-bar span {
  border-color: #f7f3ec;
}

.project h3 {
  max-width: 13ch;
  font-size: clamp(34px, 4vw, 68px);
  line-height: 0.94;
}

.project-grid-two {
  gap: clamp(22px, 3vw, 42px);
  margin-top: clamp(28px, 4vw, 56px);
}

.project-grid-two .cinematic-project {
  align-content: space-between;
}

.carousel-stage,
.classified-visual {
  min-height: 390px;
}

.classified-visual {
  background:
    linear-gradient(180deg, rgba(7, 8, 8, 0), rgba(7, 8, 8, 0.44)),
    repeating-linear-gradient(0deg, rgba(247, 243, 236, 0.07) 0 1px, transparent 1px 16px),
    #101211;
}

.classified-tab,
.classified-document {
  border-color: #f7f3ec;
  background: #101211;
}

.classified-stamp {
  border-color: #f7f3ec;
  color: #f7f3ec;
}

.redacted-line,
.redacted-grid span {
  background: #f7f3ec;
}

.project-grid {
  border-color: rgba(247, 243, 236, 0.16);
}

.capability-grid {
  max-width: 1180px;
}

.capability-grid article {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-color: rgba(247, 243, 236, 0.16);
  background:
    linear-gradient(180deg, rgba(247, 243, 236, 0.02), rgba(247, 243, 236, 0.08)),
    #0e100f;
}

.capability-grid h3,
.credential-card h3 {
  font-size: clamp(28px, 3vw, 48px);
  line-height: 0.98;
}

.credentials-grid {
  max-width: 1180px;
}

.credential-card {
  min-height: 260px;
  border-color: rgba(247, 243, 236, 0.16);
  background: #0e100f;
}

.contact-banner {
  min-height: 76vh;
  margin: 0;
  padding: clamp(56px, 8vw, 120px) clamp(18px, 5vw, 76px);
  border: 0;
  border-top: 1px solid rgba(247, 243, 236, 0.16);
  background:
    linear-gradient(90deg, rgba(7, 8, 8, 0.95), rgba(7, 8, 8, 0.66)),
    url("/portfolio/chester-portrait.jpg") right center / min(48vw, 680px) auto no-repeat,
    #070808;
}

.contact-banner h2 {
  max-width: 14ch;
  font-size: clamp(46px, 7vw, 96px);
  line-height: 0.9;
}

.contact-banner::after {
  border-color: rgba(247, 243, 236, 0.22);
}

.back-to-top {
  color: #f7f3ec;
}

.back-to-top:hover {
  background: #f7f3ec;
  color: #070808;
}

@media (max-width: 1024px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    background:
      linear-gradient(180deg, rgba(7, 8, 8, 0.9), rgba(7, 8, 8, 0.72)),
      url("/portfolio/chester-portrait.jpg") center top / cover no-repeat,
      #070808;
  }

  .hero-copy {
    padding-top: min(16vh, 120px);
  }

  .portrait-stage {
    min-height: 560px;
  }

  .proof-strip {
    grid-template-columns: 1fr;
    margin-top: var(--space-16);
  }

  .project-featured,
  .project-grid-two,
  .capability-grid,
  .credentials-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .cinematic-project {
    min-height: 0;
  }

  .screenshot-stage {
    min-height: 520px;
  }

  .contact-banner {
    background:
      linear-gradient(180deg, rgba(7, 8, 8, 0.92), rgba(7, 8, 8, 0.78)),
      url("/portfolio/chester-portrait.jpg") center top / cover no-repeat,
      #070808;
  }
}

@media (max-width: 640px) {
  .utility-bar {
    position: relative;
    padding: 0;
  }

  .hero,
  .content-section,
  .contact-banner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .portrait-stage {
    min-height: 420px;
  }

  .section-heading {
    position: static;
    background: transparent;
  }

  .section-heading h2,
  .contact-banner h2 {
    font-size: 42px;
  }

  .project h3 {
    font-size: 36px;
  }

  .screenshot-stage {
    min-height: 360px;
  }

  .device-showcase {
    transform: none;
  }

  .carousel-stage,
  .classified-visual {
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero,
  .contact-banner {
    background-attachment: scroll;
  }

  .hero-atmosphere {
    transform: none !important;
  }
}

/* Theme-aware cinematic depth pass */
:root {
  --cinema-bg: #f6f1e8;
  --cinema-bg-soft: #ebe4d7;
  --cinema-ink: #111312;
  --cinema-muted: rgba(17, 19, 18, 0.68);
  --cinema-panel: rgba(255, 255, 255, 0.62);
  --cinema-panel-strong: rgba(255, 255, 255, 0.82);
  --cinema-line: rgba(17, 19, 18, 0.18);
  --cinema-line-strong: rgba(17, 19, 18, 0.34);
  --cinema-shadow: rgba(17, 19, 18, 0.14);
  --cinema-veil-hero: linear-gradient(90deg, rgba(246, 241, 232, 0.98) 0%, rgba(246, 241, 232, 0.78) 46%, rgba(246, 241, 232, 0.28) 100%);
  --cinema-veil-contact: linear-gradient(90deg, rgba(246, 241, 232, 0.98), rgba(246, 241, 232, 0.72));
}

html[data-theme="dark"] {
  --cinema-bg: #070808;
  --cinema-bg-soft: #101211;
  --cinema-ink: #f7f3ec;
  --cinema-muted: rgba(247, 243, 236, 0.72);
  --cinema-panel: rgba(247, 243, 236, 0.055);
  --cinema-panel-strong: rgba(7, 8, 8, 0.78);
  --cinema-line: rgba(247, 243, 236, 0.18);
  --cinema-line-strong: rgba(247, 243, 236, 0.34);
  --cinema-shadow: rgba(0, 0, 0, 0.34);
  --cinema-veil-hero: linear-gradient(90deg, rgba(7, 8, 8, 0.96) 0%, rgba(7, 8, 8, 0.72) 47%, rgba(7, 8, 8, 0.28) 100%);
  --cinema-veil-contact: linear-gradient(90deg, rgba(7, 8, 8, 0.95), rgba(7, 8, 8, 0.66));
}

body,
.page-shell {
  background: var(--cinema-bg);
  color: var(--cinema-ink);
}

.utility-bar {
  background: color-mix(in srgb, var(--cinema-bg) 86%, transparent);
}

.utility-bar a,
.theme-toggle,
.hero h1,
.hero-intro,
.section-heading h2,
.project h3,
.capability-grid h3,
.credential-card h3,
.contact-banner h2,
.proof-value,
.back-to-top {
  color: var(--cinema-ink);
}

.theme-toggle-ghost::before,
.theme-toggle-ghost::after {
  background: var(--cinema-bg);
}

.hero {
  perspective: 1200px;
  background:
    var(--cinema-veil-hero),
    url("/portfolio/chester-portrait.jpg") center right / min(58vw, 920px) auto no-repeat,
    var(--cinema-bg);
}

.hero-atmosphere {
  border-color: var(--cinema-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cinema-ink) 10%, transparent), transparent),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--cinema-ink) 14%, transparent) 0 1px, transparent 1px 42px);
}

.scroll-scene {
  --scene-progress: 0;
  --scene-tilt: 0deg;
  --scene-lift: 0px;
  --scene-depth: 0px;
  --scene-scale: 1;
  --scene-scale-pop: 1;
  --scene-portrait-lift: 0px;
  --scene-portrait-depth: 0px;
  --scene-portrait-tilt-x: 0deg;
  --scene-portrait-tilt-y: 0deg;
  --scene-project-lift: 0px;
  --scene-visual-lift: 0px;
  --scene-visual-depth: 0px;
  --scene-visual-tilt: 0deg;
  --scene-content-lift: 0px;
  --scene-content-depth: 0px;
  --scene-content-tilt: 0deg;
  perspective: 1300px;
  transform-style: preserve-3d;
}

.hero.scroll-scene > .hero-copy,
.content-section.scroll-scene > .section-heading,
.content-section.scroll-scene > .capability-grid,
.content-section.scroll-scene > .credentials-grid,
.contact-banner.scroll-scene > * {
  transform: none;
  will-change: auto;
}

.hero.scroll-scene > .hero-copy,
.content-section.scroll-scene > .section-heading,
.cinematic-project.scroll-scene .project-content,
.contact-banner.scroll-scene > .eyebrow,
.contact-banner.scroll-scene > h2,
.contact-banner.scroll-scene > .hero-actions {
  position: relative;
  z-index: 4;
}

.hero.scroll-scene > .hero-portrait-column {
  z-index: 2;
  transform:
    translate3d(0, var(--scene-portrait-lift), var(--scene-portrait-depth))
    rotateX(var(--scene-portrait-tilt-x))
    rotateY(var(--scene-portrait-tilt-y))
    scale(var(--scene-scale-pop));
}

.cinematic-project.scroll-scene {
  transform: none;
  transform-origin: center center;
  transition:
    transform 80ms linear,
    border-color 220ms var(--ease-standard),
    background-color 220ms var(--ease-standard);
  will-change: transform;
}

.cinematic-project.scroll-scene .project-visual {
  position: relative;
  z-index: 1;
  transform:
    translate3d(0, var(--scene-visual-lift), var(--scene-visual-depth))
    rotateY(var(--scene-visual-tilt))
    scale(var(--scene-scale-pop));
  transform-style: preserve-3d;
  transition: transform 80ms linear;
  will-change: transform;
}

.cinematic-project.scroll-scene .project-content {
  position: relative;
  z-index: 3;
  transform: none;
  transition: none;
  will-change: auto;
}

.hero-copy,
.project,
.capability-grid article,
.credential-card,
.proof-strip article,
.contact-banner {
  border-color: var(--cinema-line);
  background: var(--cinema-panel);
  color: var(--cinema-ink);
}

.hero-copy {
  background: transparent;
}

.hero-copy::after,
.parallax-chapter::before,
.portrait-rule-front,
.redacted-line,
.redacted-grid span {
  background: var(--cinema-ink);
}

.eyebrow,
.project-kicker,
.proof-label,
.label,
.hero-summary,
.proof-strip article p:not(.proof-value, .proof-label),
.project-summary,
.project-note,
.muted,
.credential-card p,
.credential-card li,
.capability-grid p,
.detail-list li,
.classified-note {
  color: var(--cinema-muted);
}

.button {
  border-color: var(--cinema-ink);
  color: var(--cinema-ink);
}

.button-primary,
.button:hover {
  background: var(--cinema-ink);
  color: var(--cinema-bg);
}

.button-primary:hover {
  background: transparent;
  color: var(--cinema-ink);
}

.portrait-stage,
.project-visual,
.classified-tab,
.classified-document,
.browser-frame,
.browser-bar,
.preview-browser-bar,
.credential-card,
.capability-grid article {
  border-color: var(--cinema-line-strong);
  background: var(--cinema-bg-soft);
}

.portrait-frame {
  border-color: var(--cinema-line-strong);
  background: var(--cinema-bg);
  box-shadow: 18px 18px 0 var(--cinema-shadow);
}

.portrait-frame figcaption {
  border-color: var(--cinema-line-strong);
  background: var(--cinema-panel-strong);
  color: var(--cinema-muted);
}

.portrait-rule,
.contact-banner::after {
  border-color: var(--cinema-line);
}

.proof-strip article {
  background: var(--cinema-panel-strong);
}

.content-section {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cinema-ink) 4%, transparent), transparent),
    var(--cinema-bg);
}

.section-heading {
  background: color-mix(in srgb, var(--cinema-bg) 88%, transparent);
}

.project,
.capability-grid article,
.credential-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--cinema-ink) 3%, transparent), color-mix(in srgb, var(--cinema-ink) 8%, transparent)),
    var(--cinema-bg-soft);
}

.browser-frame,
.classified-document,
.back-to-top {
  box-shadow: 12px 12px 0 var(--cinema-shadow);
}

.browser-bar span,
.preview-browser-bar span,
.classified-stamp {
  border-color: var(--cinema-ink);
  color: var(--cinema-ink);
}

.contact-banner {
  background:
    var(--cinema-veil-contact),
    url("/portfolio/chester-portrait.jpg") right center / min(48vw, 680px) auto no-repeat,
    var(--cinema-bg);
}

html[data-theme="light"] .preview-overlay {
  background: rgba(17, 19, 18, 0.72);
}

@media (max-width: 1024px) {
  .hero {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--cinema-bg) 90%, transparent), color-mix(in srgb, var(--cinema-bg) 72%, transparent)),
      url("/portfolio/chester-portrait.jpg") center top / cover no-repeat,
      var(--cinema-bg);
  }

  .contact-banner {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--cinema-bg) 92%, transparent), color-mix(in srgb, var(--cinema-bg) 78%, transparent)),
      url("/portfolio/chester-portrait.jpg") center top / cover no-repeat,
      var(--cinema-bg);
  }

  .hero.scroll-scene > .hero-copy,
  .hero.scroll-scene > .hero-portrait-column,
  .content-section.scroll-scene > .section-heading,
  .content-section.scroll-scene > .capability-grid,
  .content-section.scroll-scene > .credentials-grid,
  .contact-banner.scroll-scene > *,
  .cinematic-project.scroll-scene,
  .cinematic-project.scroll-scene .project-visual,
  .cinematic-project.scroll-scene .project-content {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero.scroll-scene > .hero-copy,
  .hero.scroll-scene > .hero-portrait-column,
  .content-section.scroll-scene > .section-heading,
  .content-section.scroll-scene > .capability-grid,
  .content-section.scroll-scene > .credentials-grid,
  .contact-banner.scroll-scene > *,
  .cinematic-project.scroll-scene,
  .cinematic-project.scroll-scene .project-visual,
  .cinematic-project.scroll-scene .project-content {
    transform: none !important;
  }
}

.back-to-top,
html[data-theme="light"] .back-to-top {
  border-color: var(--cinema-ink);
  background: var(--cinema-panel-strong);
  color: var(--cinema-ink);
  box-shadow: 8px 8px 0 var(--cinema-shadow);
}

.back-to-top:hover,
html[data-theme="light"] .back-to-top:hover {
  background: var(--cinema-ink);
  color: var(--cinema-bg);
  box-shadow: 10px 10px 0 var(--cinema-shadow);
}

/* Layout correction pass: remove sticky overlap and normalize section rhythm. */
.content-section {
  min-height: auto;
  padding: clamp(48px, 7vw, 88px) clamp(18px, 5vw, 76px);
}

.section-heading {
  position: relative;
  top: auto;
  z-index: 1;
  display: grid;
  gap: var(--space-12);
  max-width: 980px;
  margin: 0 0 clamp(28px, 4vw, 52px);
  padding: 0;
  background: transparent;
}

.section-heading h2 {
  max-width: 18ch;
}

.content-section.scroll-scene > .section-heading,
.content-section.scroll-scene > .capability-grid,
.content-section.scroll-scene > .credentials-grid,
.contact-banner.scroll-scene > *,
.project-featured > .project-content,
.cinematic-project.scroll-scene .project-content {
  transform: none;
  will-change: auto;
}

.project-featured {
  align-items: center;
}

.cinematic-project {
  min-height: auto;
}

.project-grid-two {
  align-items: stretch;
}

.project-grid-two .cinematic-project {
  align-content: start;
}

.project-content {
  gap: 0;
}

.project-summary {
  margin-top: var(--space-16);
}

.project-grid,
.detail-list {
  margin-top: var(--space-20);
}

.capability-grid,
.credentials-grid {
  align-items: stretch;
}

.capability-grid article,
.credential-card {
  min-height: 220px;
}

.contact-banner {
  min-height: auto;
  padding: clamp(48px, 7vw, 92px) clamp(18px, 5vw, 76px);
}

.contact-banner h2 {
  max-width: 16ch;
}

@media (max-width: 1024px) {
  .content-section {
    padding-top: clamp(40px, 7vw, 64px);
    padding-bottom: clamp(44px, 7vw, 72px);
  }

  .section-heading {
    margin-bottom: var(--space-32);
  }

  .project-featured {
    gap: var(--space-32);
  }

  .screenshot-stage {
    min-height: 420px;
  }

  .capability-grid article,
  .credential-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .content-section,
  .contact-banner {
    padding-top: var(--space-40);
    padding-bottom: var(--space-48);
  }

  .section-heading {
    margin-bottom: var(--space-24);
  }

  .section-heading h2,
  .contact-banner h2 {
    max-width: none;
  }

  .project {
    gap: var(--space-24);
  }

  .screenshot-stage {
    min-height: 320px;
  }

  .project-grid,
  .detail-list {
    margin-top: var(--space-16);
  }
}

/* Hero rhythm correction: keep the opener high in the first viewport. */
.hero {
  align-items: start;
  min-height: calc(100vh - 52px);
  padding-top: clamp(24px, 4vw, 52px);
  padding-bottom: clamp(48px, 7vw, 96px);
}

.hero-copy {
  align-self: start;
  padding-top: 0;
}

.hero-portrait-column {
  align-self: start;
}

@media (max-width: 1024px) {
  .hero {
    padding-top: var(--space-24);
  }

  .hero-copy {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: var(--space-20);
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--cinema-bg) 92%, transparent), color-mix(in srgb, var(--cinema-bg) 78%, transparent)),
      url("/portfolio/chester-portrait-640.webp") center 10% / min(92vw, 420px) auto no-repeat,
      var(--cinema-bg);
  }
}

/* Live GitHub activity is deliberately framed as a build log, not a stock profile widget. */
.contribution-section {
  position: relative;
  margin-top: clamp(16px, 3vw, 40px);
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid var(--cinema-line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--cinema-ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--cinema-ink) 4%, transparent) 1px, transparent 1px),
    var(--cinema-panel);
  background-size: 24px 24px, 24px 24px, auto;
  box-shadow: 12px 12px 0 var(--cinema-shadow);
}

.contribution-section::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 96px;
  height: 96px;
  border-left: 1px solid var(--cinema-line);
  border-bottom: 1px solid var(--cinema-line);
  background: color-mix(in srgb, var(--cinema-ink) 3%, transparent);
  content: "";
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.contribution-header,
.contribution-footer,
.contribution-terminal-bar,
.contribution-profile-link {
  display: flex;
  align-items: center;
}

.contribution-header {
  position: relative;
  z-index: 1;
  justify-content: space-between;
  gap: var(--space-24);
  margin-bottom: var(--space-24);
}

.contribution-header h2 {
  max-width: 560px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.contribution-profile-link {
  flex: 0 0 auto;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--cinema-line-strong);
  background: var(--cinema-bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.contribution-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 0 3px color-mix(in srgb, #3fb950 20%, transparent);
}

.contribution-terminal {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--cinema-line-strong);
  background: var(--cinema-bg);
}

.contribution-terminal-bar {
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--cinema-line);
  background: var(--cinema-panel-strong);
}

.contribution-terminal-bar span {
  width: 8px;
  height: 8px;
  border: 1px solid var(--cinema-line-strong);
  border-radius: 50%;
}

.contribution-terminal-bar p {
  margin-left: 8px;
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contribution-chart-wrap {
  padding: clamp(18px, 3vw, 32px);
  overflow-x: auto;
}

.contribution-chart-wrap img {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}

.contribution-footer {
  justify-content: space-between;
  gap: var(--space-16);
  padding: 12px clamp(18px, 3vw, 32px);
  border-top: 1px solid var(--cinema-line);
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .contribution-section {
    padding: 28px 18px;
    box-shadow: 8px 8px 0 var(--cinema-shadow);
  }

  .contribution-header,
  .contribution-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .contribution-footer {
    gap: 4px;
  }
}

/* Simple external contribution-chart embed. */
.github-activity {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--cinema-line);
  background: var(--cinema-panel);
  box-shadow: 12px 12px 0 var(--cinema-shadow);
}

.github-activity h2 {
  max-width: 760px;
  margin-top: var(--space-8);
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.github-activity img {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin-top: var(--space-24);
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid var(--cinema-line);
  border-radius: 12px;
  background: #ffffff;
}

/* Portfolio-native treatment for the external contribution image. */
.github-activity.scroll-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--cinema-line-strong);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--cinema-ink) 5%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--cinema-ink) 5%, transparent) 1px, transparent 1px),
    var(--cinema-panel);
  background-size: 28px 28px, 28px 28px, auto;
  transform:
    translate3d(0, var(--scene-project-lift), var(--scene-content-depth))
    rotateX(var(--scene-content-tilt))
    scale(var(--scene-scale));
  transform-origin: center center;
  transition:
    transform 80ms linear,
    border-color 220ms var(--ease-standard),
    background-color 220ms var(--ease-standard);
  will-change: transform;
}

.github-activity.scroll-scene::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--link-blue);
  content: "";
}

.github-activity-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-24);
}

.github-activity-header h2 {
  max-width: 690px;
}

.github-activity-source {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--cinema-line-strong);
  background: var(--cinema-bg);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.github-activity-source span,
.github-activity-note span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--link-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--link-blue) 20%, transparent);
}

.github-activity-map {
  max-width: 970px;
  margin: var(--space-24) auto 0;
  border: 1px solid var(--cinema-line-strong);
  background: var(--cinema-bg);
  box-shadow: 10px 10px 0 var(--cinema-shadow);
}

.github-activity-map-bar {
  display: flex;
  gap: var(--space-16);
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cinema-line);
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.github-activity-chart {
  padding: clamp(16px, 3vw, 30px);
  overflow-x: auto;
}

.github-activity .github-activity-chart img {
  min-width: 680px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.github-activity-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-top: 1px solid var(--cinema-line);
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .github-activity.scroll-scene {
    transform: none;
  }

  .github-activity-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .github-activity-map-bar span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .github-activity.scroll-scene {
    transform: none;
  }
}

.github-activity-total {
  flex: 0 0 auto;
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
}

.github-activity-total strong {
  color: var(--cinema-ink);
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.github-activity-grid {
  display: flex;
  gap: 4px;
  width: max-content;
  min-width: 710px;
  padding: 4px 2px;
}

.github-activity-calendar {
  display: flex;
  gap: 10px;
  width: max-content;
  margin: 0 auto;
}

.github-activity-calendar-body {
  position: relative;
  padding-top: 18px;
}

.github-activity-month-labels {
  position: absolute;
  top: 0;
  left: 2px;
  width: 100%;
  height: 14px;
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.github-activity-month-labels span {
  position: absolute;
}

.github-activity-day-labels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 18px;
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 11px;
  text-align: right;
}

.github-activity-day-labels span {
  display: block;
  width: 22px;
  height: 11px;
}

.github-activity-week {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.github-activity-day {
  position: relative;
  display: block;
  width: 11px;
  height: 11px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cinema-ink) 9%, transparent), transparent 58%),
    color-mix(in srgb, var(--cinema-ink) 5%, var(--cinema-bg));
  clip-path: polygon(27% 0, 100% 0, 100% 73%, 73% 100%, 0 100%, 0 27%);
  transition: background-color 220ms var(--ease-standard), filter 220ms var(--ease-standard);
}

.github-activity-day::after {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 2px;
  height: 2px;
  background: color-mix(in srgb, var(--cinema-bg) 76%, transparent);
  content: "";
}

.github-activity-day.level-1 {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--link-blue) 48%, transparent), transparent 62%),
    color-mix(in srgb, var(--link-blue) 25%, var(--cinema-bg));
}

.github-activity-day.level-2 {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--link-blue) 70%, transparent), transparent 62%),
    color-mix(in srgb, var(--link-blue) 48%, var(--cinema-bg));
}

.github-activity-day.level-3 {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cinema-bg) 22%, transparent), transparent 62%),
    color-mix(in srgb, var(--link-blue) 73%, var(--cinema-bg));
}

.github-activity-day.level-4 {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--cinema-bg) 32%, transparent), transparent 62%),
    var(--link-blue);
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--link-blue) 42%, transparent));
}

.github-activity-day.is-empty {
  visibility: hidden;
}

.github-activity-loading {
  min-width: 680px;
  padding: 24px 2px;
  color: var(--cinema-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.github-activity-note {
  justify-content: space-between;
}

.github-activity-note a {
  flex: 0 0 auto;
  color: var(--cinema-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .github-activity-total {
    text-align: left;
  }

  .github-activity-grid {
    min-width: 710px;
  }

  .github-activity-week {
    gap: 4px;
  }

  .github-activity-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Contribution ledger: document-panel treatment aligned with the case-study system. */
.github-activity.scroll-scene {
  --activity-paper: #f3f0e8;
  --activity-ink: #111111;
  --activity-muted: #77736a;
  --activity-line: #bdb8ad;
  --activity-empty: #e4dfd4;
  --activity-low: #cbe6ee;
  --activity-mid: #8bc7d8;
  --activity-high: #4aa6c4;
  --activity-max: #1d7f9f;
  padding: clamp(64px, 9vw, 96px) clamp(20px, 4vw, 40px);
  border-color: var(--activity-line);
  border-right: 0;
  border-left: 0;
  background:
    linear-gradient(to right, rgb(17 17 17 / 4.5%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(17 17 17 / 4.5%) 1px, transparent 1px),
    var(--activity-paper);
  background-size: 32px 32px, 32px 32px, auto;
  color: var(--activity-ink);
  box-shadow: none;
}

.github-activity.scroll-scene::before {
  display: none;
}

.github-activity-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 6vw, 72px);
  width: min(1120px, 100%);
  margin: 0 auto;
  align-items: start;
}

.github-activity .eyebrow {
  margin-bottom: 20px;
  color: var(--activity-muted);
  font-size: 11px;
  letter-spacing: 0.2em;
}

.github-activity-header h2 {
  max-width: 720px;
  color: var(--activity-ink);
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.github-activity-total {
  padding-top: 42px;
  color: var(--activity-muted);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-align: left;
}

.github-activity-total strong {
  color: var(--activity-ink);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: 900;
}

.github-activity-map {
  width: min(980px, 100%);
  margin: clamp(28px, 4vw, 48px) auto 0;
  border-color: var(--activity-line);
  background: rgb(243 240 232 / 92%);
  box-shadow: 12px 12px 0 rgb(17 17 17 / 8%);
}

.github-activity-map-bar,
.github-activity-note {
  border-color: var(--activity-line);
  color: var(--activity-muted);
}

.github-activity-map-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  padding: 14px 16px;
  background: transparent;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.github-activity-chart {
  padding: clamp(24px, 4vw, 48px) clamp(18px, 7vw, 64px);
}

.github-activity-calendar {
  margin: 0 auto;
}

.github-activity-grid,
.github-activity-week,
.github-activity-day-labels {
  gap: 5px;
}

.github-activity-grid {
  min-width: 843px;
}

.github-activity-month-labels,
.github-activity-day-labels {
  color: var(--activity-muted);
}

.github-activity-day {
  width: 11px;
  height: 11px;
  clip-path: none;
  border: 0;
  border-radius: 2px;
  background: var(--activity-empty);
  filter: none;
}

.github-activity-day::after {
  display: none;
}

.github-activity-day.level-1 { background: var(--activity-low); }
.github-activity-day.level-2 { background: var(--activity-mid); }
.github-activity-day.level-3 { background: var(--activity-high); }
.github-activity-day.level-4 { background: var(--activity-max); }

.github-activity-note {
  padding: 14px 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.github-activity-note a {
  color: var(--activity-ink);
}

@media (max-width: 768px) {
  .github-activity.scroll-scene {
    padding: 64px 20px;
    box-shadow: none;
  }

  .github-activity-header {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .github-activity-total {
    padding-top: 0;
  }

  .github-activity-map {
    margin-top: 0;
    box-shadow: 7px 7px 0 rgb(17 17 17 / 8%);
  }

  .github-activity-map-bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .github-activity-chart {
    padding: 24px 16px;
  }
}

/* Audit-trail encoding: contribution intensity is expressed through tick density, not GitHub-style color blocks. */
.github-activity.scroll-scene {
  --activity-signal: #1f2a44;
  --activity-signal-soft: rgb(31 42 68 / 22%);
  --activity-tick-base: #d3ccbb;
}

.github-activity-day {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 11px;
  height: 15px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.github-activity-day.level-1,
.github-activity-day.level-2,
.github-activity-day.level-3,
.github-activity-day.level-4 {
  background: transparent;
}

.github-activity-tick {
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 1px;
  background: var(--activity-tick-base);
}

.github-activity-day.level-1 .github-activity-tick { height: 6px; background: var(--activity-signal-soft); }
.github-activity-day.level-2 .github-activity-tick { height: 9px; background: rgb(31 42 68 / 42%); }
.github-activity-day.level-3 .github-activity-tick { height: 12px; background: rgb(31 42 68 / 68%); }
.github-activity-day.level-4 .github-activity-tick { height: 15px; background: var(--activity-signal); }

.github-activity-flag {
  position: relative;
  display: block;
  width: 8px;
  height: 8px;
  border: 1.4px solid var(--activity-signal);
  background: var(--activity-paper);
  transform: translateY(-2px);
}

.github-activity-flag::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  background: var(--activity-signal);
  content: "";
  transform: translate(-50%, -50%);
}

.github-activity-week,
.github-activity-day-labels {
  gap: 5px;
}

.github-activity-day-labels {
  line-height: 15px;
}

.github-activity-day-labels span {
  height: 15px;
}

.github-activity-stat-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 20px;
}

.github-activity-stat-row strong {
  color: var(--activity-ink);
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.github-activity-stat-row span {
  color: var(--activity-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Keep the ledger crisp and fully visible at every viewport size. */
.github-activity.scroll-scene {
  transform: none;
  will-change: auto;
}

.github-activity-chart {
  overflow: hidden;
}

.github-activity-calendar,
.github-activity-calendar-body,
.github-activity-grid {
  width: 100%;
  min-width: 0;
}

.github-activity-calendar {
  gap: clamp(6px, 1vw, 10px);
}

.github-activity-calendar-body {
  min-width: 0;
}

.github-activity-grid {
  display: flex;
  justify-content: space-between;
  gap: 0;
  padding: 4px 0;
}

.github-activity-week {
  flex: 1 1 0;
  align-items: center;
  gap: clamp(1px, 0.45vw, 5px);
}

.github-activity-day {
  width: clamp(4px, 1.05vw, 12px);
  height: clamp(7px, 1.7vw, 17px);
}

.github-activity-day-labels {
  gap: clamp(1px, 0.45vw, 5px);
  line-height: clamp(7px, 1.7vw, 17px);
}

.github-activity-day-labels span {
  height: clamp(7px, 1.7vw, 17px);
}

.github-activity-tick {
  width: 2px;
  height: 2px;
  background: #c7bfae;
  opacity: 0.62;
}

.github-activity-day.level-1 .github-activity-tick {
  width: min(48%, 4px);
  height: max(6px, 42%);
  background: rgb(31 42 68 / 62%);
  opacity: 1;
}

.github-activity-day.level-2 .github-activity-tick {
  width: min(58%, 5px);
  height: max(9px, 62%);
  background: rgb(31 42 68 / 78%);
  opacity: 1;
}

.github-activity-day.level-3 .github-activity-tick {
  width: min(70%, 6px);
  height: max(12px, 82%);
  background: var(--activity-signal);
  box-shadow: 0 2px 0 rgb(31 42 68 / 18%);
  opacity: 1;
}

.github-activity-day.level-4 .github-activity-tick {
  width: min(82%, 7px);
  height: 100%;
  background: var(--activity-signal);
  box-shadow: 0 3px 0 rgb(31 42 68 / 25%);
  opacity: 1;
}

html[data-theme="dark"] .github-activity.scroll-scene {
  --activity-paper: #101312;
  --activity-ink: #f4f0e8;
  --activity-muted: #a8aaa6;
  --activity-line: #3b4540;
  --activity-empty: #28312d;
  --activity-signal: #78cbe9;
  --activity-signal-soft: rgb(120 203 233 / 30%);
  --activity-tick-base: #53605a;
  background:
    linear-gradient(to right, rgb(244 240 232 / 5%) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(244 240 232 / 5%) 1px, transparent 1px),
    var(--activity-paper);
  box-shadow: none;
}

html[data-theme="dark"] .github-activity-map {
  background: rgb(16 19 18 / 92%);
  box-shadow: 12px 12px 0 rgb(0 0 0 / 32%);
}

html[data-theme="dark"] .github-activity-day.level-1 .github-activity-tick {
  background: color-mix(in srgb, var(--activity-signal) 48%, transparent);
}

html[data-theme="dark"] .github-activity-day.level-2 .github-activity-tick {
  background: color-mix(in srgb, var(--activity-signal) 66%, transparent);
}

html[data-theme="dark"] .github-activity-day.level-3 .github-activity-tick {
  background: color-mix(in srgb, var(--activity-signal) 84%, transparent);
  box-shadow: 0 2px 0 rgb(120 203 233 / 16%);
}

html[data-theme="dark"] .github-activity-day.level-4 .github-activity-tick {
  box-shadow: 0 3px 0 rgb(120 203 233 / 24%);
}

/* Keep text on the main rasterization plane. Fractional 3D transforms soften glyphs. */
.hero.scroll-scene > .hero-portrait-column,
.github-activity.scroll-scene {
  transform: none;
  will-change: auto;
}

/* Motion pass: projects are treated as evidence entering the field of view. */
.cinematic-project.scroll-scene .project-visual {
  transform: translateY(var(--scene-visual-lift));
  transform-style: flat;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-atmosphere {
  transform-origin: left center;
  animation: signal-sweep 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-actions .button,
.carousel-controls button,
.back-to-top {
  transition:
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.hero-actions .button:active,
.carousel-controls button:active,
.back-to-top:active {
  transform: translateY(1px) scale(0.98);
}

@keyframes signal-sweep {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0;
  }

  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-project.scroll-scene .project-visual,
  .hero-atmosphere,
  .hero-actions .button,
  .carousel-controls button,
  .back-to-top {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }
}

@media (max-width: 640px) {
  .github-activity.scroll-scene {
    padding: 48px 16px;
  }

  .github-activity-header {
    gap: 20px;
  }

  .github-activity .eyebrow {
    margin-bottom: 14px;
    font-size: 10px;
  }

  .github-activity-header h2 {
    max-width: 12ch;
    font-size: clamp(32px, 10vw, 44px);
    line-height: 0.98;
  }

  .github-activity-map {
    width: 100%;
    margin-top: 24px;
    box-shadow: 6px 6px 0 rgb(17 17 17 / 8%);
  }

  .github-activity-map-bar {
    gap: 5px;
    padding: 12px;
    font-size: 9px;
  }

  .github-activity-chart {
    padding: 20px 10px 18px;
  }

  .github-activity-calendar {
    gap: 6px;
  }

  .github-activity-day-labels {
    width: 20px;
    padding-top: 16px;
    font-size: 8px;
  }

  .github-activity-day-labels span {
    width: 20px;
  }

  .github-activity-calendar-body {
    padding-top: 16px;
  }

  .github-activity-month-labels {
    font-size: 8px;
  }

  .github-activity-month-labels span:nth-child(even) {
    display: none;
  }

  .github-activity-day {
    width: 4px;
    height: 10px;
  }

  .github-activity-day-labels,
  .github-activity-week {
    gap: 3px;
  }

  .github-activity-day-labels {
    line-height: 10px;
  }

  .github-activity-day-labels span {
    height: 10px;
  }

  .github-activity-tick {
    width: 2px;
  }

  .github-activity-day.level-1 .github-activity-tick { height: 4px; }
  .github-activity-day.level-2 .github-activity-tick { height: 6px; width: 3px; }
  .github-activity-day.level-3 .github-activity-tick { height: 8px; width: 4px; }
  .github-activity-day.level-4 .github-activity-tick { height: 10px; width: 4px; }

  .github-activity-flag {
    width: 7px;
    height: 7px;
  }

  .github-activity-stat-row {
    justify-content: flex-start;
    padding: 0 12px 16px;
  }

  .github-activity-stat-row strong {
    font-size: 30px;
  }

  .github-activity-note {
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    font-size: 9px;
    line-height: 1.45;
  }
}
