/* =========================================================
   EMAYABARATHI â€” PAPER JOURNAL PORTFOLIO
   Art direction: torn-paper engineering notebook / technical scrapbook.
   Reusable visual primitives:
   .paper-section .tactile-paper .paper-note .paper-photo .ink-word
   .project-paper-card .parallax-layer .section-print .paper-button
   ========================================================= */

:root {
  --paper: #f2eadc;
  --paper-soft: #f8f3e9;
  --paper-warm: #ddcbaa;
  --paper-shadow: #b9aa92;
  --charcoal: #171715;
  --charcoal-soft: #24231f;
  --navy: #10263a;
  --navy-soft: #173047;
  --ink: #1c1b18;
  --ink-soft: #585147;
  --cream-text: #f4eee4;
  --cream-muted: #c7bfb1;
  --gold: #865b20;
  --gold-soft: #d2ad68;
  --ink-blue: #3f6380;
  --line: rgba(28, 27, 24, 0.17);
  --line-light: rgba(244, 238, 228, 0.18);

  --serif: "EB Garamond", "GFS Baskerville", "DejaVu Serif", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --script: "Caveat", "Comic Neue", cursive;

  --page: 1280px;
  --gutter: clamp(22px, 5vw, 72px);
  --section-space: clamp(88px, 9vw, 150px);
  --ease-paper: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-paper: 0 18px 44px rgba(31, 27, 22, 0.14), 0 3px 9px rgba(31, 27, 22, 0.08);
  --shadow-paper-hover: 0 26px 56px rgba(31, 27, 22, 0.2), 0 5px 12px rgba(31, 27, 22, 0.11);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--charcoal);
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

::selection {
  color: var(--gold-soft);
  background: var(--navy);
}

.skip-link {
  position: fixed;
  left: 18px;
  top: -80px;
  z-index: 9999;
  padding: 10px 14px;
  color: var(--paper-soft);
  background: var(--navy);
  transition: top .2s ease;
}
.skip-link:focus { top: 18px; }

.anchor-alias {
  position: absolute;
  top: -80px;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------------------------------------------------------
   REUSABLE PAPER / TEXTURE PRIMITIVES
   --------------------------------------------------------- */
.paper-section {
  position: relative;
  isolation: isolate;
}

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

.paper-dark {
  color: var(--cream-text);
  background: var(--charcoal);
}

.paper-navy {
  color: var(--cream-text);
  background: var(--navy);
}

.paper-graph {
  color: var(--ink);
  background-color: #ece3d3;
  background-image:
    linear-gradient(rgba(63, 99, 128, .075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 99, 128, .075) 1px, transparent 1px);
  background-size: 28px 28px;
}

.paper-grain,
.dark-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .34;
  background-image: url("images/paper/paper-grain.svg");
  background-repeat: repeat;
  background-size: 290px 290px;
  mix-blend-mode: multiply;
}

.dark-grain {
  opacity: .26;
  background-image: url("images/paper/dark-grain.svg");
  mix-blend-mode: screen;
}

.paper-dark.torn-top::before,
.paper-navy.torn-top::before,
.paper-light.torn-top::before,
.paper-graph.torn-top::before {
  content: "";
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  top: -46px;
  height: 74px;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: 100% 74px;
  pointer-events: none;
}
.paper-dark.torn-top::before { background-image: url("images/paper/torn-edge-dark.svg"); }
.paper-navy.torn-top::before { background-image: url("images/paper/torn-edge-navy.svg"); }
.paper-light.torn-top::before,
.paper-graph.torn-top::before { background-image: url("images/paper/torn-edge-light.svg"); }

.tactile-paper {
  transition: transform .32s var(--ease-paper), box-shadow .32s var(--ease-paper);
  transform-origin: center;
}
@media (hover: hover) and (pointer: fine) {
  .tactile-paper:hover {
    transform: translateY(-4px) rotate(0deg) !important;
    box-shadow: var(--shadow-paper-hover);
  }
}

.section-print {
  position: absolute;
  z-index: 5;
  top: 44px;
  left: max(var(--gutter), calc((100vw - var(--page)) / 2 + 24px));
  font-family: var(--sans);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .17em;
}
.section-print-dark { color: rgba(28, 27, 24, .66); }
.section-print-light { color: rgba(244, 238, 228, .52); }

.script-kicker,
.script-contact,
.ink-word {
  font-family: var(--script);
}

.tiny-annotation {
  font-family: var(--script);
  color: rgba(28, 27, 24, .68);
  font-size: .9rem;
  letter-spacing: .02em;
}

.paper-note {
  display: inline-block;
  padding: 8px 18px 10px;
  font-family: var(--script);
  font-size: 1.28rem;
  line-height: 1;
  transform: rotate(-2.4deg);
  clip-path: polygon(2% 9%, 97% 0, 100% 90%, 4% 100%, 0 47%);
}
.paper-note-navy {
  color: var(--paper-soft);
  background: var(--navy);
  box-shadow: 0 9px 18px rgba(16, 38, 58, .16);
}

.paper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  font-family: var(--sans);
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: .035em;
  transition: transform .25s var(--ease-paper), box-shadow .25s var(--ease-paper), background .25s ease, color .25s ease;
}
.paper-button-primary {
  color: var(--paper-soft);
  background: var(--navy);
  border-color: var(--navy);
  clip-path: polygon(1% 5%, 98% 0, 100% 88%, 96% 100%, 2% 96%, 0 40%);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .14);
}
.paper-button-secondary {
  color: var(--ink);
  background: rgba(248, 243, 233, .42);
}
.paper-button:hover,
.paper-button:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-paper);
}
.paper-button span { transition: transform .25s var(--ease-paper); }
.paper-button:hover span { transform: translate(4px, -3px); }

/* ---------------------------------------------------------
   NAVIGATION
   --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  color: var(--cream-text);
  background-color: var(--charcoal);
  background-image: url("images/paper/dark-grain.svg");
  background-repeat: repeat;
  background-size: 300px 300px;
  border-bottom: 1px solid rgba(244, 238, 228, .08);
}

.nav-shell {
  position: relative;
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signature-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 210px;
  min-height: 55px;
  color: var(--gold-soft);
}
.brand-text {
  position: relative;
  z-index: 2;
  font-family: var(--script);
  font-size: 1.75rem;
  font-weight: 600;
  transform: rotate(-1.4deg);
}
.brand-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--paper-soft);
  background: var(--navy);
  border: 1px solid rgba(211, 164, 78, .52);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .18);
  clip-path: polygon(12% 6%, 88% 6%, 100% 22%, 100% 78%, 88% 94%, 12% 94%, 0 78%, 0 22%);
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.signature-svg {
  position: absolute;
  z-index: 1;
  left: -10px;
  bottom: 4px;
  width: 205px;
  height: 30px;
  opacity: .56;
}
.signature-stroke {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.top-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(24px, 3vw, 46px);
  height: 100%;
}
.nav-link {
  position: relative;
  z-index: 2;
  color: var(--cream-text);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .22s ease, transform .22s ease;
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--gold-soft); transform: translateY(-1px); }
.nav-link.active { color: var(--gold-soft); }
.nav-ink-line {
  position: absolute;
  left: 0;
  bottom: 15px;
  width: 40px;
  height: 7px;
  background: var(--gold);
  clip-path: polygon(0 42%, 18% 29%, 37% 50%, 58% 33%, 76% 45%, 100% 25%, 98% 72%, 74% 61%, 55% 78%, 34% 62%, 16% 75%, 1% 62%);
  transition: transform .48s var(--ease-paper), width .42s var(--ease-paper);
  opacity: .9;
}
.nav-toggle { display: none; }

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
  min-height: 790px;
  padding: 116px 0 126px;
}
.hero-shell {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(460px, 1.08fr);
  align-items: center;
  gap: clamp(38px, 6vw, 92px);
}
.hero-copy { position: relative; z-index: 10; }
.hello-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 18px;
}
.hello-note { position: relative; z-index: 2; }
.hand-arrow {
  position: absolute;
  left: 102px;
  top: 12px;
  width: 122px;
  height: 80px;
  overflow: visible;
}
.hand-arrow path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hero-name {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: clamp(4.8rem, 7vw, 7.6rem);
  line-height: .82;
  font-weight: 600;
  letter-spacing: -.045em;
}
.gold-dot { color: var(--gold); }
.hero-role {
  max-width: 690px;
  margin: 28px 0 16px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.7vw, 2.6rem);
  font-weight: 600;
  line-height: 1.03;
}
.hero-role em {
  color: var(--ink-blue);
  font-style: normal;
}

/* Hero role rotator â€” torn paper label swaps through target roles. */
.hero-role-block {
  max-width: 690px;
  margin: 28px 0 16px;
}
.hero-role-primary {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 2.8vw, 2.75rem);
  font-weight: 600;
  line-height: 1;
}
.role-paper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 300px;
  margin: 10px 0 11px;
  padding: 10px 18px 11px;
  color: var(--paper-soft);
  background: var(--navy);
  clip-path: polygon(1% 10%, 97% 2%, 100% 87%, 94% 100%, 3% 94%, 0 25%);
  transform: rotate(-.6deg);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .12);
  overflow: hidden;
}
.role-paper::after {
  content: "TARGET ROLE / 01";
  position: absolute;
  top: 4px;
  right: 10px;
  color: rgba(248, 243, 233, .5);
  font-family: "Courier New", monospace;
  font-size: .45rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.role-paper-prefix {
  color: var(--gold-soft);
  font-family: var(--script);
  font-size: 1.15rem;
  line-height: 1;
}
.role-rotator {
  position: relative;
  display: block;
  min-width: 235px;
  height: 25px;
  overflow: hidden;
}
.role-current {
  position: absolute;
  inset: 0 auto auto 0;
  display: flex;
  align-items: center;
  height: 25px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  will-change: transform, opacity;
}
.hero-role-support {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.35vw, 2.25rem);
  font-weight: 600;
  line-height: 1.05;
}
.hero-role-support em {
  color: var(--ink-blue);
  font-style: normal;
}
.hero-lede {
  max-width: 620px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.72;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero-presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: .84rem;
}
.hero-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: var(--paper-soft);
  background: var(--navy);
  border: 1px solid rgba(134, 91, 32, .46);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .16);
  clip-path: polygon(10% 5%, 91% 1%, 100% 18%, 97% 88%, 85% 100%, 7% 95%, 0 72%, 2% 13%);
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 700;
}
.hero-presence-link,
.hero-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}
.hero-presence-link {
  position: relative;
  padding: 7px 12px 8px;
  color: var(--ink);
  background: rgba(248, 243, 233, .72);
  border: 1px solid rgba(16, 38, 58, .20);
  box-shadow: 0 7px 14px rgba(31, 27, 22, .07);
  clip-path: polygon(2% 7%, 98% 0, 100% 89%, 92% 100%, 3% 96%, 0 22%);
  font-weight: 700;
  transition: transform .26s var(--ease-paper), box-shadow .26s var(--ease-paper), border-color .26s ease;
}
.hero-presence-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .26s var(--ease-paper);
}
.hero-presence-link:hover,
.hero-presence-link:focus-visible {
  transform: translateY(-2px) rotate(-.25deg);
  border-color: rgba(134, 91, 32, .42);
  box-shadow: 0 12px 20px rgba(31, 27, 22, .11);
}
.hero-presence-link:hover::after,
.hero-presence-link:focus-visible::after { transform: scaleX(1); }
.hero-presence-link em {
  font-style: normal;
  color: var(--ink-blue);
  transition: transform .26s var(--ease-paper);
}
.hero-presence-link:hover em,
.hero-presence-link:focus-visible em { transform: translate(3px, -1px); }
.hero-presence i,
.hero-location i { color: var(--navy); }
.hero-location {
  padding: 6px 10px;
  color: var(--ink-soft);
  background: rgba(221, 203, 170, .34);
  border-left: 2px solid var(--gold);
  font-weight: 600;
}
.developer-note {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 16px 22px;
  color: var(--ink-soft);
  background: #e5d2ab;
  box-shadow: var(--shadow-paper);
  clip-path: polygon(2% 7%, 98% 1%, 100% 91%, 94% 100%, 4% 96%, 0 38%);
  transform: rotate(-1.2deg);
  font-family: var(--script);
  font-size: 1rem;
  line-height: 1.17;
}
.developer-symbol {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 2rem;
  font-weight: 600;
}
.annotation-build {
  position: absolute;
  left: 290px;
  bottom: 22px;
  transform: rotate(-2deg);
}

.hero-collage {
  position: relative;
  min-height: 610px;
  perspective: 1100px;
}
.collage-back-sheet {
  position: absolute;
  z-index: 0;
  inset: 26px 2% 22px 10%;
  background: #cfbea0;
  clip-path: polygon(3% 4%, 18% 1%, 33% 4%, 50% 1%, 70% 5%, 95% 2%, 99% 19%, 97% 39%, 100% 60%, 96% 83%, 89% 98%, 67% 96%, 49% 100%, 30% 97%, 10% 100%, 2% 90%, 4% 68%, 0 48%, 4% 25%);
  transform: rotate(1.3deg);
  box-shadow: var(--shadow-paper);
}
.portrait-paper {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 0;
  width: 89%;
  height: 570px;
  padding: 13px;
  background: var(--paper-soft);
  clip-path: polygon(4% 4%, 17% 0, 31% 3%, 47% 1%, 66% 4%, 84% 1%, 97% 6%, 100% 22%, 97% 39%, 100% 55%, 97% 74%, 100% 91%, 89% 99%, 70% 96%, 54% 100%, 34% 97%, 16% 100%, 2% 94%, 4% 76%, 0 58%, 3% 40%, 1% 22%);
  box-shadow: 0 24px 46px rgba(32, 27, 21, .22);
  transform: rotate(-.6deg);
}
.portrait-paper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 23%;
  filter: saturate(.78) contrast(1.02) sepia(.04);
  clip-path: polygon(2% 1%, 97% 0, 100% 96%, 93% 100%, 2% 98%, 0 8%);
}
.tape,
.photo-tape {
  display: block;
  position: absolute;
  background-image: url("images/paper/tape.svg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  opacity: .78;
  pointer-events: none;
}
.tape-top {
  top: -23px;
  left: 48%;
  width: 120px;
  height: 48px;
  transform: translateX(-50%) rotate(-4deg);
}
.tape-small {
  z-index: 6;
  right: 12px;
  bottom: 85px;
  width: 85px;
  height: 36px;
  transform: rotate(12deg);
}
.code-fragment {
  position: absolute;
  z-index: 5;
  left: -10px;
  bottom: 30px;
  width: min(360px, 62%);
  padding: 22px 24px 24px;
  color: #edf0eb;
  background-color: var(--navy-soft);
  background-image: url("images/paper/grid-paper.svg");
  clip-path: polygon(2% 5%, 13% 0, 28% 5%, 44% 1%, 65% 5%, 86% 1%, 100% 8%, 97% 30%, 100% 54%, 96% 79%, 100% 96%, 79% 100%, 57% 96%, 34% 100%, 12% 95%, 0 88%, 3% 66%, 0 43%, 4% 20%);
  box-shadow: 0 20px 34px rgba(16, 38, 58, .25);
  transform: rotate(3.2deg);
}
.fragment-label {
  display: block;
  margin-bottom: 12px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .16em;
  opacity: .64;
}
.code-fragment pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: "Courier New", monospace;
  font-size: clamp(.68rem, 1.2vw, .84rem);
  line-height: 1.55;
}
.chart-fragment {
  position: absolute;
  z-index: 4;
  right: -24px;
  bottom: 8px;
  width: 260px;
  padding: 18px 18px 10px;
  background-color: #e8dece;
  background-image:
    linear-gradient(rgba(63, 99, 128, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 99, 128, .11) 1px, transparent 1px);
  background-size: 20px 20px;
  box-shadow: var(--shadow-paper);
  clip-path: polygon(3% 5%, 95% 0, 100% 92%, 91% 100%, 4% 97%, 0 35%);
  transform: rotate(-2.8deg);
}
.chart-svg { width: 100%; height: auto; }
.chart-grid { fill: none; stroke: rgba(28,27,24,.16); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-dot { fill: var(--gold); }
.annotation-coordinates {
  position: absolute;
  z-index: 7;
  top: 74px;
  right: -4px;
  color: rgba(28,27,24,.68);
  transform: rotate(4deg);
}

/* ---------------------------------------------------------
   SELECTED WORK
   --------------------------------------------------------- */
.work-section { padding: 126px 0 140px; }
.work-layout {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(44px, 6vw, 86px);
  align-items: start;
}
.work-intro {
  position: sticky;
  top: 132px;
  padding-top: 28px;
}
.work-intro .script-kicker {
  margin: 0 0 -8px;
  color: var(--gold-soft);
  font-size: 3.1rem;
  line-height: 1;
  transform: rotate(-2deg);
}
.paper-mask-heading {
  position: relative;
  overflow: hidden;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.3rem, 6.5vw, 6.4rem);
  line-height: .85;
  font-weight: 600;
}
.paper-mask-heading span { display: inline-block; }
.work-intro > p:not(.script-kicker) {
  margin: 26px 0 20px;
  color: var(--cream-muted);
  font-size: .95rem;
  line-height: 1.7;
}
.text-link {
  display: inline-flex;
  gap: 8px;
  color: var(--gold-soft);
  font-size: .82rem;
  font-weight: 700;
}
.work-stack {
  display: grid;
  gap: 42px;
}
.project-paper-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 48%) minmax(0, 1fr);
  min-height: 350px;
  color: var(--ink);
  background: var(--paper-soft);
  box-shadow: var(--shadow-paper);
  clip-path: polygon(1% 3%, 13% 0, 29% 2%, 47% 0, 66% 2%, 84% 0, 99% 4%, 100% 26%, 98% 49%, 100% 73%, 97% 97%, 82% 100%, 65% 98%, 48% 100%, 29% 98%, 12% 100%, 0 96%, 2% 72%, 0 51%, 2% 27%);
  overflow: hidden;
  transform: rotate(-.25deg);
}
.project-paper-card:nth-child(even) { transform: rotate(.32deg); }
.project-photo-reveal {
  position: relative;
  min-height: 350px;
  display: grid;
  place-items: center;
  padding: clamp(18px, 2.1vw, 28px);
  overflow: hidden;
  background-color: #d8d0c3;
  background-image:
    linear-gradient(rgba(16, 38, 58, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 38, 58, .055) 1px, transparent 1px);
  background-size: 22px 22px;
}
.project-photo-reveal picture {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-soft);
  border: 1px solid rgba(16, 38, 58, .18);
  box-shadow: 0 12px 24px rgba(31, 27, 22, .13);
}
.project-photo-reveal picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.project-photo-reveal > img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--paper-soft);
  border: 1px solid rgba(16, 38, 58, .18);
  box-shadow: 0 12px 24px rgba(31, 27, 22, .13);
}
.project-paper-mask {
  display: none;
}
.project-index {
  position: absolute;
  z-index: 3;
  top: 15px;
  left: 14px;
  min-width: 40px;
  padding: 6px 9px;
  color: var(--paper-soft);
  background: var(--navy);
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .08em;
  transform: rotate(-2deg);
}
.project-copy {
  position: relative;
  padding: 38px clamp(26px, 3vw, 46px) 34px;
  align-self: center;
}
.project-meta {
  margin-bottom: 9px;
  color: var(--ink-blue);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.project-copy h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 2.4vw, 2.4rem);
  line-height: 1;
  font-weight: 600;
}
.project-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .91rem;
  line-height: 1.65;
}
.paper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.paper-tags span {
  padding: 3px 7px;
  color: var(--navy);
  background: #dbe1e3;
  font-size: .67rem;
  font-weight: 700;
  line-height: 1.4;
}
.project-arrow-link,
.project-status-ink {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.project-arrow-link {
  position: relative;
}
.project-arrow-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  clip-path: polygon(0 40%, 14% 10%, 33% 43%, 51% 20%, 71% 52%, 100% 12%, 99% 72%, 72% 75%, 50% 64%, 31% 77%, 12% 62%, 0 80%);
  transition: transform .35s var(--ease-paper);
}
.project-arrow-link span { transition: transform .28s var(--ease-paper); }
.project-arrow-link:hover::after { transform: scaleX(1); }
.project-arrow-link:hover span { transform: translate(5px, -4px); }
.project-status-ink { color: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .project-paper-card:hover .project-photo-reveal picture,
  .project-paper-card:hover .project-photo-reveal > img {
    box-shadow: 0 16px 30px rgba(31, 27, 22, .17);
  }
}

/* ---------------------------------------------------------
   STORY / BACKGROUND
   --------------------------------------------------------- */
.story-section { padding: 126px 0 128px; }
.story-grid {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(340px, 1.05fr) minmax(300px, .95fr);
  gap: clamp(32px, 5vw, 68px);
  align-items: center;
}
.story-photo-stage {
  position: relative;
  min-height: 560px;
}
.story-grid-paper {
  position: absolute;
  inset: 28px 0 24px 18px;
  background-color: #dfd2bb;
  background-image:
    linear-gradient(rgba(63, 99, 128, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 99, 128, .10) 1px, transparent 1px),
    url("images/paper/paper-grain.svg");
  background-size: 22px 22px, 22px 22px, 280px 280px;
  clip-path: polygon(3% 4%, 94% 0, 99% 93%, 84% 100%, 3% 96%, 0 18%);
  transform: rotate(2.1deg);
}
.paper-photo {
  position: absolute;
  z-index: 3;
  top: 32px;
  left: 28px;
  width: min(88%, 430px);
  padding: 12px 12px 42px;
  background: var(--paper-soft);
  box-shadow: var(--shadow-paper);
  transform: rotate(-3deg);
}
.paper-photo picture {
  display: block;
  width: 100%;
}
.paper-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  filter: grayscale(1) contrast(1.05);
}
.paperclip {
  position: absolute;
  z-index: 6;
  top: -28px;
  left: 46px;
  width: 28px;
  height: 78px;
  border: 3px solid #7b756c;
  border-bottom-color: transparent;
  border-radius: 18px 18px 0 0;
  transform: rotate(4deg);
}
.photo-tape {
  top: -22px;
  right: 24px;
  width: 95px;
  height: 38px;
  transform: rotate(8deg);
}
.hand-note {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 28px;
  width: 185px;
  padding: 18px 18px 20px;
  color: var(--navy);
  background: #e8d9bc;
  box-shadow: var(--shadow-paper);
  font-family: var(--script);
  font-size: 1.18rem;
  line-height: 1.12;
  transform: rotate(-4.5deg);
  clip-path: polygon(3% 4%, 95% 0, 100% 93%, 89% 99%, 4% 96%, 0 25%);
}
.story-calculation {
  position: absolute;
  right: 0;
  bottom: 16px;
  color: rgba(28, 27, 24, .68);
  font-family: "Courier New", monospace;
  font-size: .65rem;
  transform: rotate(3deg);
}
.story-copy .script-kicker {
  margin: 0 0 -2px;
  color: var(--gold);
  font-size: 2.8rem;
  line-height: .85;
}
.story-copy h2 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 3.5vw, 3.6rem);
  line-height: .98;
  font-weight: 600;
}
.story-copy p:not(.script-kicker) {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.72;
}
.story-facts { border-top: 1px solid var(--line); }
.fact-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 15px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.fact-icon {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 3px;
  color: var(--navy);
  font-size: 1.25rem;
}
.fact-row h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 1.35rem;
  line-height: 1;
}
.fact-row p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .82rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   JOURNEY
   --------------------------------------------------------- */
.journey-section { padding: 126px 0 142px; }
.journey-shell {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}
.journey-heading {
  max-width: 630px;
  margin-bottom: 56px;
}
.journey-heading .script-kicker {
  margin: 0 0 -8px;
  color: var(--gold);
  font-size: 2.8rem;
}
.journey-heading h2 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.6vw, 4.9rem);
  line-height: .9;
  font-weight: 600;
}
.journey-heading > p:not(.script-kicker) {
  margin: 0;
  color: var(--ink-soft);
  font-size: .93rem;
}
.journey-board {
  position: relative;
  min-height: 420px;
  padding: 18px;
  background: rgba(248, 243, 233, .54);
  border: 1px solid rgba(63, 99, 128, .16);
  box-shadow: 0 16px 32px rgba(32, 27, 21, .09);
}
.journey-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.journey-path {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.journey-line circle { fill: var(--paper-soft); stroke: var(--gold); stroke-width: 3; }
.milestone {
  position: absolute;
  width: 205px;
  padding: 15px 17px;
  background: rgba(242, 234, 220, .88);
  box-shadow: 0 7px 18px rgba(35, 31, 26, .09);
  transform: rotate(-.7deg);
}
.milestone:nth-of-type(even) { transform: rotate(.8deg); }
.milestone span {
  display: block;
  color: var(--ink-blue);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.milestone h3 {
  margin: 4px 0 5px;
  font-family: var(--serif);
  font-size: 1.3rem;
  line-height: 1;
}
.milestone p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .73rem;
  line-height: 1.45;
}
.milestone-1 { left: 2.5%; top: 7%; }
.milestone-2 { left: 27%; bottom: 5%; }
.milestone-3 { left: 56%; top: 4%; }
.milestone-4 { right: 2%; top: 27%; }

/* ---------------------------------------------------------
   CORE STACK + BLUEPRINT
   --------------------------------------------------------- */
.stack-section { padding: 124px 0 136px; }
.stack-shell {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
}
.stack-heading {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: end;
  margin-bottom: 44px;
}
.stack-heading .script-kicker {
  grid-column: 1;
  margin: 0 0 -12px;
  color: var(--gold-soft);
  font-size: 2.7rem;
  transform: rotate(-2deg);
}
.stack-heading h2 {
  grid-column: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 4.2rem;
  line-height: .85;
  font-weight: 600;
}
.stack-heading > p:not(.script-kicker) {
  grid-column: 2;
  margin: 0;
  color: var(--cream-muted);
  font-size: .9rem;
  justify-self: end;
}
.stack-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.stack-group {
  min-height: 130px;
  padding: 18px;
  border-top: 1px solid rgba(244, 238, 228, .30);
  border-bottom: 1px solid rgba(244, 238, 228, .11);
}
.stack-group h3 {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.stack-group div { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-group span {
  padding: 3px 6px;
  color: var(--cream-text);
  border: 1px solid rgba(244, 238, 228, .18);
  font-size: .8rem;
  line-height: 1.5;
}
.blueprint-paper {
  position: relative;
  margin-top: 42px;
  padding: 18px 22px 14px;
  color: var(--ink);
  background-color: #e8dfce;
  background-image:
    linear-gradient(rgba(63, 99, 128, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 99, 128, .13) 1px, transparent 1px),
    url("images/paper/paper-grain.svg");
  background-size: 22px 22px, 22px 22px, 280px 280px;
  box-shadow: var(--shadow-paper);
  clip-path: polygon(1% 3%, 16% 0, 32% 2%, 50% 0, 68% 2%, 84% 0, 99% 4%, 100% 94%, 83% 100%, 64% 97%, 47% 100%, 29% 97%, 12% 100%, 0 96%);
  transform: rotate(.2deg);
}
.blueprint-title {
  margin-bottom: 3px;
  color: var(--ink-blue);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .14em;
}

.blueprint-subtitle {
  margin: 4px 0 2px;
  color: rgba(16, 38, 58, .68);
  font-family: "Courier New", monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
}
.blueprint-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  overflow: visible;
}
.bp-connector {
  fill: none;
  stroke: var(--navy);
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bp-secondary {
  stroke-width: 1.8;
  stroke-dasharray: 7 6;
}
.bp-flow-dot {
  fill: var(--gold);
  stroke: var(--paper-soft);
  stroke-width: 2;
  opacity: 0;
  pointer-events: none;
}
.bp-arrowhead { fill: var(--navy); }
.bp-arrowhead-gold { fill: var(--gold); }
.bp-gold-start { stroke: var(--gold); }
.bp-connector-labels text,
.bp-tech-marks text,
.bp-group-label,
.bp-legend text {
  fill: rgba(16, 38, 58, .78);
  font-family: "Courier New", monospace;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .08em;
}
.bp-tech-marks path {
  fill: none;
  stroke: rgba(16, 38, 58, .55);
  stroke-width: 1.2;
}
.bp-node-shape,
.bp-inner-line,
.bp-corner,
.bp-db-top,
.bp-db-body,
.bp-db-ring,
.bp-group-bracket {
  fill: rgba(242, 234, 220, .62);
  stroke: var(--navy);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke-width .24s var(--ease-paper), stroke .24s var(--ease-paper), fill .24s var(--ease-paper);
}
.bp-inner-line,
.bp-corner,
.bp-db-ring,
.bp-group-bracket {
  fill: none;
  stroke-width: 1;
}
.bp-strong { stroke-width: 2.2; }
.bp-dashed { stroke-dasharray: 7 5; }
.bp-port {
  fill: var(--paper-soft);
  stroke: var(--navy);
  stroke-width: 1.6;
}
.bp-port-gold {
  fill: var(--gold);
  stroke: var(--paper-soft);
  stroke-width: 1.5;
}
.bp-node-title {
  fill: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-anchor: middle;
}
.bp-fastapi-title { font-size: 16px; }
.bp-small-title { font-size: 12.5px; }
.bp-node-index {
  fill: var(--ink-blue);
  font-family: "Courier New", monospace;
  font-size: 9.5px;
  font-weight: 700;
}
.bp-node-note {
  fill: var(--ink-blue);
  font-family: var(--script);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  text-anchor: middle;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity .24s var(--ease-paper), transform .24s var(--ease-paper);
}
.bp-gold-mark,
.bp-gold-star {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bp-gold-star { fill: var(--gold); stroke-width: 1; }
.bp-group-bracket {
  stroke-dasharray: 5 5;
  opacity: .58;
}
.bp-hand-notes text {
  fill: var(--navy);
  font-family: var(--script);
  font-size: 15px;
  font-weight: 600;
  opacity: .72;
}
.bp-legend circle { fill: var(--gold); }
@media (hover: hover) and (pointer: fine) {
  .bp-major:hover .bp-node-shape,
  .bp-major:hover .bp-db-top,
  .bp-major:hover .bp-db-body,
  .bp-major:hover .bp-db-ring {
    stroke-width: 2.35;
  }
  .bp-major:hover .bp-node-note {
    opacity: .86;
    transform: translateY(0);
  }
}

/* ---------------------------------------------------------
   CONTACT / FOOTER
   --------------------------------------------------------- */
.contact-section { padding: 126px 0 0; }
.contact-shell {
  width: min(var(--page), calc(100% - 2 * var(--gutter)));
  margin: 0 auto;
  padding-bottom: 90px;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: clamp(32px, 5vw, 70px);
  align-items: start;
}
.connect-note {
  width: 220px;
  min-height: 118px;
  display: grid;
  align-content: center;
  padding: 24px 26px 26px;
  background: #dcc49c;
  box-shadow: var(--shadow-paper);
  clip-path: polygon(3% 7%, 96% 1%, 100% 82%, 91% 100%, 5% 94%, 0 25%);
  transform: rotate(-2.2deg);
}
.script-contact {
  position: relative;
  display: inline-block;
  font-size: 2.65rem;
  line-height: .96;
}
.script-contact::after {
  content: "";
  position: absolute;
  left: 0;
  right: -4px;
  bottom: -5px;
  height: 5px;
  background: var(--ink);
  clip-path: polygon(0 54%, 17% 28%, 38% 48%, 59% 17%, 76% 43%, 100% 22%, 99% 63%, 79% 58%, 61% 76%, 38% 67%, 17% 81%, 0 72%);
}
.contact-copy h2 {
  max-width: 700px;
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.4vw, 3.6rem);
  font-weight: 600;
  line-height: .98;
}
.contact-copy > p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: .93rem;
}
.contact-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 20px;
  color: var(--ink-soft);
  font-size: .75rem;
}
.contact-lines a,
.contact-lines span { display: inline-flex; align-items: center; gap: 7px; }
.contact-lines i { color: var(--navy); }
.contact-action { min-width: 0; }
.contact-action-note { margin: 10px 8px 0; color: var(--ink-soft); font-size: .78rem; }
.paper-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px;
  color: var(--paper-soft);
  background: var(--navy);
  box-shadow: 0 14px 28px rgba(16, 38, 58, .18);
  clip-path: polygon(2% 7%, 96% 0, 100% 87%, 93% 100%, 5% 95%, 0 26%);
  transform: rotate(1.2deg);
  font-size: .88rem;
  font-weight: 800;
  transition: transform .28s var(--ease-paper), box-shadow .28s var(--ease-paper);
}
.paper-cta span { transition: transform .28s var(--ease-paper); }
.paper-cta:hover { transform: translateY(-4px) rotate(.2deg); box-shadow: 0 20px 38px rgba(16,38,58,.22); }
.paper-cta:hover span { transform: translate(5px, -4px); }
.contact-form-modern {
  margin-top: 18px;
  padding: 22px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-paper);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form-modern label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.contact-form-modern input,
.contact-form-modern textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(28,27,24,.30);
  border-radius: 0;
  outline: none;
  font-size: .82rem;
  text-transform: none;
}
.contact-form-modern textarea { min-height: 88px; resize: vertical; }
.contact-form-modern input:focus,
.contact-form-modern textarea:focus { border-bottom-color: var(--navy); }
.contact-form-modern textarea::placeholder { color: #756e64; opacity: 1; }
.form-status { min-height: 20px; margin-top: 10px; color: var(--ink-soft); font-size: .75rem; }
.form-status a { color: var(--navy); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.contact-submit { min-width: 170px; }
.contact-submit[disabled] {
  cursor: wait;
  opacity: .72;
  transform: none !important;
}
.contact-submit.is-sending .contact-submit-arrow {
  display: inline-block;
  animation: contactSendPulse .8s ease-in-out infinite alternate;
}
.contact-privacy-note {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: .66rem;
}
@keyframes contactSendPulse {
  from { transform: translate(0, 0); opacity: .55; }
  to { transform: translate(3px, -2px); opacity: 1; }
}

.contact-modal {
  width: min(760px, calc(100vw - 34px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.contact-modal::backdrop {
  background: rgba(12, 22, 34, .56);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.contact-modal[open] { display: grid; place-items: center; }
.contact-modal-backdrop {
  position: fixed;
  inset: 0;
}
.contact-modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 34px));
  max-height: 86vh;
  overflow: auto;
  padding: 24px;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(16, 38, 58, .25);
  clip-path: polygon(2% 2%, 14% 0, 33% 2%, 55% 0, 77% 2%, 97% 1%, 100% 14%, 98% 35%, 100% 60%, 98% 86%, 90% 100%, 67% 98%, 48% 100%, 25% 98%, 6% 100%, 0 88%, 2% 63%, 0 37%, 2% 14%);
}
.contact-modal-head {
  margin-bottom: 18px;
  padding-right: 48px;
}
.contact-modal-head::before {
  content: "Let's Connect";
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 18px 10px;
  color: var(--paper-soft);
  background: var(--navy);
  box-shadow: var(--shadow-paper);
  clip-path: polygon(5% 7%, 97% 0, 100% 87%, 91% 100%, 3% 97%, 0 28%);
  font-family: var(--script);
  font-size: 1.55rem;
  line-height: 1;
}
.contact-modal-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ink-blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.contact-modal-head h3 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  line-height: .95;
}
.contact-modal-head p {
  margin: 0;
  max-width: 48ch;
  color: var(--ink-soft);
}
.contact-direct-link {
  color: var(--navy);
  font-weight: 700;
  border-bottom: 1px solid rgba(16,38,58,.28);
}
.contact-direct-link:hover { border-bottom-color: var(--gold); }
.contact-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--navy);
  background: transparent;
  border: 1px solid rgba(16,38,58,.16);
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.contact-modal-close:hover { transform: translateY(-2px); }
.contact-form-modal {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.contact-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}
.contact-modal-actions .paper-button-secondary {
  color: var(--navy);
  background: transparent;
  border: 1px solid rgba(16,38,58,.24);
}
.contact-modal-actions .paper-button-secondary:hover {
  background: rgba(16,38,58,.05);
}
html.modal-open, body.modal-open { overflow: hidden; }

.paper-footer {
  min-height: 90px;
  padding: 24px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--cream-muted);
  background-color: var(--charcoal);
  background-image: url("images/paper/dark-grain.svg");
  background-size: 300px 300px;
  font-size: .68rem;
}
.footer-signature {
  color: var(--gold-soft);
  font-family: var(--script);
  font-size: 1.7rem;
}

/* ---------------------------------------------------------
   MOTION SUPPORT â€” progressive enhancement only
   --------------------------------------------------------- */
.parallax-layer { will-change: transform; }
.motion-enabled .project-paper-mask { display: none; }
body:not(.motion-enabled) .project-paper-mask { display: none; }

/* ---------------------------------------------------------
   RESPONSIVE DESIGN
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --gutter: clamp(22px, 3.5vw, 48px); }
  .hero-shell { grid-template-columns: minmax(0, .95fr) minmax(410px, 1.05fr); gap: 44px; }
  .hero-collage { min-height: 560px; }
  .portrait-paper { height: 525px; }
  .code-fragment { width: 330px; }
  .chart-fragment { right: -6px; width: 230px; }
  .project-paper-card { grid-template-columns: minmax(330px, 46%) 1fr; }
  .story-grid { grid-template-columns: minmax(250px, .85fr) 1fr minmax(260px, .9fr); gap: 34px; }
  .contact-shell { grid-template-columns: 220px 1fr 290px; gap: 34px; }
}

@media (max-width: 1024px) {
  .top-nav { gap: 24px; }
  .nav-link { font-size: .68rem; }
  .hero { min-height: auto; padding-top: 100px; }
  .hero-shell { grid-template-columns: 1fr 440px; }
  .hero-name { font-size: clamp(4.4rem, 7.6vw, 6.3rem); }
  .hero-role { font-size: 2rem; }
  .portrait-paper { width: 94%; }
  .work-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 36px; }
  .project-paper-card { grid-template-columns: 1fr; }
  .project-photo-reveal { min-height: 0; aspect-ratio: 16 / 9; padding: 22px; }
  .project-copy { padding: 30px; }
  .story-grid { grid-template-columns: minmax(280px, .9fr) 1.1fr; }
  .story-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
  .fact-row { border-right: 1px solid var(--line); padding: 20px; }
  .fact-row:last-child { border-right: 0; }
  .stack-groups { grid-template-columns: repeat(3, 1fr); }
  .contact-shell { grid-template-columns: 220px 1fr; }
  .contact-action { grid-column: 1 / -1; }
}

@media (max-width: 840px) {
  .site-header { position: sticky; }
  .nav-shell { height: 68px; }
  .signature-brand { min-width: 180px; width: auto; }
  .brand-text { font-size: 1.55rem; }
  .brand-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--paper-soft);
  background: var(--navy);
  border: 1px solid rgba(211, 164, 78, .52);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .18);
  clip-path: polygon(12% 6%, 88% 6%, 100% 22%, 100% 78%, 88% 94%, 12% 94%, 0 78%, 0 22%);
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.signature-svg { width: 175px; }
  .nav-toggle {
    position: relative;
    z-index: 1002;
    display: grid;
    place-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
  }
  .nav-toggle span {
    display: block;
    width: 23px;
    height: 2px;
    background: var(--gold-soft);
    transition: transform .3s var(--ease-paper);
  }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .top-nav {
    position: fixed;
    z-index: 1000;
    inset: 68px 0 auto;
    display: grid;
    gap: 0;
    padding: 20px var(--gutter) 26px;
    color: var(--cream-text);
    background-color: var(--charcoal);
    background-image: url("images/paper/dark-grain.svg");
    border-top: 1px solid rgba(244,238,228,.08);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .42s var(--ease-paper), opacity .28s ease;
  }
  .top-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 13px 2px; border-bottom: 1px solid rgba(244,238,228,.08); }
  .nav-ink-line { display: none; }

  .hero { padding: 94px 0 105px; }
  .hero-shell { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 650px; }
  .hero-collage { min-height: 650px; width: min(650px, 100%); justify-self: center; }
  .portrait-paper { width: 85%; right: 6%; height: 600px; }
  .code-fragment { left: 1%; bottom: 22px; }
  .chart-fragment { right: 0; bottom: 3px; }
  .annotation-build { position: static; margin: 20px 0 0 22px; display: inline-block; }

  .work-layout { grid-template-columns: 1fr; }
  .work-intro { position: relative; top: auto; max-width: 520px; padding-top: 0; margin-bottom: 10px; }
  .work-stack { gap: 30px; }
  .project-paper-card { grid-template-columns: 1fr; }
  .project-photo-reveal { min-height: 0; aspect-ratio: 16 / 9; padding: 20px; }

  .story-grid { grid-template-columns: 1fr 1fr; }
  .story-photo-stage { min-height: 500px; }
  .story-copy { align-self: center; }
  .story-facts { grid-template-columns: 1fr; }
  .fact-row { border-right: 0; padding-left: 0; padding-right: 0; }

  .journey-board { min-height: auto; padding: 26px 26px 26px 44px; }
  .journey-line { display: none; }
  .journey-board::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 38px;
    bottom: 38px;
    width: 2px;
    background: var(--navy);
  }
  .milestone,
  .milestone:nth-of-type(even) {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: auto;
    margin: 0 0 20px 0;
    transform: rotate(0deg);
  }
  .milestone:last-child { margin-bottom: 0; }
  .milestone::before {
    content: "";
    position: absolute;
    left: -31px;
    top: 20px;
    width: 10px;
    height: 10px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    background: var(--paper-soft);
  }

  .stack-heading { grid-template-columns: 140px 1fr; }
  .stack-groups { grid-template-columns: repeat(2, 1fr); }
  .contact-shell { grid-template-columns: 1fr 1.4fr; }
  .contact-action { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --gutter: 20px; --section-space: 84px; }
  .section-print { top: 28px; left: 20px; font-size: .6rem; }
  .paper-dark.torn-top::before,
  .paper-navy.torn-top::before,
  .paper-light.torn-top::before,
  .paper-graph.torn-top::before { top: -38px; height: 60px; background-size: 150% 60px; }

  .hero { padding: 82px 0 92px; }
  .hero-name { font-size: clamp(4rem, 17vw, 5.4rem); }
  .hero-role { font-size: clamp(1.65rem, 7vw, 2.2rem); }
  .hero-lede { font-size: .94rem; }
  .hero-actions { align-items: stretch; }
  .paper-button { min-height: 46px; }
  .hero-presence { margin-top: 16px; }
  .developer-note { margin-top: 28px; }
  .hero-collage { min-height: 545px; }
  .portrait-paper { top: 14px; width: 91%; right: 0; height: 500px; }
  .code-fragment { width: 67%; left: -2%; bottom: 8px; padding: 17px; }
  .chart-fragment { width: 39%; right: -4px; bottom: -18px; padding: 12px; }
  .chart-fragment .fragment-label { font-size: .48rem; }
  .annotation-coordinates { display: none; }
  .tape-small { display: none; }

  .work-section,
  .story-section,
  .journey-section,
  .stack-section,
  .contact-section { padding-top: 95px; }
  .work-section { padding-bottom: 105px; }
  .project-paper-card,
  .project-paper-card:nth-child(even) { grid-template-columns: 1fr; transform: rotate(0deg); }
  .project-photo-reveal { min-height: 0; aspect-ratio: auto; padding: 16px; }
  .project-copy { padding: 24px 22px 28px; }
  .project-copy h3 { font-size: 1.9rem; }

  .story-section { padding-bottom: 96px; }
  .story-grid { grid-template-columns: 1fr; gap: 38px; }
  .story-photo-stage { min-height: 550px; max-width: 500px; width: 100%; margin: 0 auto; }
  .story-copy { max-width: 600px; }
  .story-facts { grid-column: auto; }
  .fact-row { grid-template-columns: 36px 1fr; }

  .journey-section { padding-bottom: 110px; }
  .journey-heading { margin-bottom: 34px; }
  .journey-heading h2 { font-size: 3.25rem; }

  .stack-section { padding-bottom: 108px; }
  .stack-heading { display: block; margin-bottom: 30px; }
  .stack-heading .script-kicker { margin-bottom: -12px; }
  .stack-heading h2 { font-size: 3.9rem; }
  .stack-heading > p:not(.script-kicker) { margin-top: 18px; }
  .stack-groups { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stack-group { min-height: 115px; padding: 14px; }
  .blueprint-paper { margin-top: 32px; padding: 16px 18px 18px; overflow-x: auto; }
  .blueprint-svg { min-width: 760px; }

  .contact-section { padding-top: 94px; }
  .contact-shell { grid-template-columns: 1fr; gap: 30px; padding-bottom: 70px; }
  .connect-note { width: min(280px, 90%); }
  .contact-action { display: block; grid-column: auto; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .paper-footer { flex-direction: column; align-items: flex-start; gap: 6px; padding: 28px 20px; }
}

@media (max-width: 430px) {
  .nav-shell { width: calc(100% - 32px); }
  .signature-brand { min-width: 160px; width: auto; }
  .brand-text { font-size: 1.4rem; }
  .brand-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--paper-soft);
  background: var(--navy);
  border: 1px solid rgba(211, 164, 78, .52);
  box-shadow: 0 10px 18px rgba(16, 38, 58, .18);
  clip-path: polygon(12% 6%, 88% 6%, 100% 22%, 100% 78%, 88% 94%, 12% 94%, 0 78%, 0 22%);
  font-family: var(--sans);
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.signature-svg { width: 155px; }
  .hero-shell,
  .work-layout,
  .story-grid,
  .journey-shell,
  .stack-shell,
  .contact-shell { width: calc(100% - 32px); }
  .hero-name { font-size: clamp(3.15rem, 15vw, 4rem); }
  .hand-arrow { left: 91px; width: 95px; top: 13px; }
  .paper-note { font-size: 1.13rem; padding: 7px 14px 9px; }
  .hero-role { font-size: 1.6rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-presence { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero-monogram { width: 38px; height: 38px; }
  .paper-button { width: 100%; }
  .developer-note { width: 88%; font-size: .93rem; }
  .hero-collage { min-height: 470px; }
  .portrait-paper { height: 430px; width: 96%; }
  .code-fragment { width: 72%; font-size: .69rem; }
  .chart-fragment { width: 41%; }
  .work-intro .script-kicker { font-size: 2.7rem; }
  .paper-mask-heading { font-size: 4rem; }
  .work-stack { gap: 24px; }
  .project-copy { padding: 21px 18px 24px; }
  .project-copy h3 { font-size: 1.72rem; }
  .project-copy p { font-size: .86rem; }
  .story-photo-stage { min-height: 510px; }
  .paper-photo { left: 18px; width: 84%; }
  .hand-note { width: 160px; font-size: 1.05rem; }
  .story-copy .script-kicker { font-size: 2.5rem; }
  .story-copy h2 { font-size: 2.65rem; }
  .stack-groups { grid-template-columns: 1fr; }
  .stack-group { min-height: auto; }
  .script-contact { font-size: 3rem; line-height: 1.02; }
  .contact-copy h2 { font-size: 2.55rem; }
}

@media (max-width: 390px) {
  .hero-collage { min-height: 445px; }
  .portrait-paper { height: 405px; }
  .code-fragment { bottom: -4px; }
  .chart-fragment { bottom: -20px; }
  .story-photo-stage { min-height: 485px; }
}

@media (max-width: 350px) {
  :root { --gutter: 16px; }
  .hero-shell,
  .work-layout,
  .story-grid,
  .journey-shell,
  .stack-shell,
  .contact-shell { width: calc(100% - 28px); }
  .hero-name { font-size: 3rem; }
  .hero-role { font-size: 1.45rem; }
  .hero-collage { min-height: 410px; }
  .portrait-paper { height: 370px; }
  .code-fragment { width: 74%; padding: 13px; }
  .chart-fragment { width: 42%; right: -2px; }
  .project-copy h3 { font-size: 1.55rem; }
  .story-photo-stage { min-height: 455px; }
  .paper-photo { width: 86%; left: 10px; }
  .paper-photo img { object-position: center top; }
  .hand-note { left: -2px; }
  .contact-lines { display: grid; }
}

/* ---------------------------------------------------------
   ACCESSIBILITY / REDUCED MOTION
   --------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .parallax-layer,
  .paper-photo,
  .project-paper-card,
  .project-paper-card:nth-child(even),
  .tactile-paper { transform: none !important; }
  .project-paper-mask { display: none !important; }
}

/* Mobile blueprint keeps the same system architecture without squeezing the desktop drawing. */
.blueprint-mobile { display: none; }
@media (max-width: 680px) {
  .blueprint-paper {
    margin-top: 30px;
    padding: 14px 14px 18px;
    overflow: hidden;
  }
  .blueprint-svg { display: none; }
  .blueprint-title { margin: 4px 4px 10px; font-size: .74rem; }
  .blueprint-subtitle { margin: 0 4px 10px; font-size: .6rem; }
  .blueprint-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 7px 6px;
    color: var(--navy);
  }
  .bp-mobile-node {
    position: relative;
    width: min(250px, 88%);
    padding: 9px 14px 10px;
    text-align: center;
    background: rgba(242, 234, 220, .66);
    border: 1.4px solid var(--navy);
    clip-path: polygon(1% 4%, 97% 0, 100% 92%, 91% 100%, 2% 96%, 0 18%);
  }
  .bp-mobile-node strong {
    display: block;
    font-size: .78rem;
    letter-spacing: .09em;
  }
  .bp-mobile-node small {
    display: block;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    color: var(--ink-blue);
    font-family: var(--script);
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.1;
    opacity: 0;
    transition: max-height .25s var(--ease-paper), opacity .25s var(--ease-paper), margin .25s var(--ease-paper);
  }
  .bp-mobile-fastapi {
    border-width: 2px;
  }
  .bp-mobile-fastapi::after {
    content: "";
    position: absolute;
    right: 11px;
    top: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
  }
  .bp-mobile-db {
    border-radius: 50% / 12%;
    clip-path: none;
  }
  .bp-mobile-worker { border-style: dashed; }
  .bp-mobile-link {
    display: grid;
    justify-items: center;
    gap: 1px;
    min-height: 29px;
    color: var(--navy);
  }
  .bp-mobile-link span {
    margin-top: 2px;
    font-family: "Courier New", monospace;
    font-size: .56rem;
    font-weight: 700;
    letter-spacing: .08em;
    opacity: .68;
  }
  .bp-mobile-link i {
    font-style: normal;
    font-size: .95rem;
    line-height: 1;
  }
  .bp-mobile-dashed i { opacity: .6; }
  .bp-mobile-branch-label,
  .bp-mobile-note {
    width: min(250px, 88%);
    color: var(--gold);
    font-family: var(--script);
    font-size: .96rem;
    font-weight: 600;
  }
  .bp-mobile-branch-label {
    margin: 13px 0 7px;
    text-align: left;
    transform: rotate(-1deg);
  }
  .bp-mobile-note {
    margin-top: 8px;
    text-align: right;
    transform: rotate(1deg);
  }
  .bp-mobile-node:active small,
  .bp-mobile-node:focus-within small {
    max-height: 24px;
    margin-top: 3px;
    opacity: .82;
  }
}


@media (max-width: 840px) {
  .contact-modal-panel { padding: 20px; }
}
@media (max-width: 680px) {
  .contact-action-note { margin-left: 4px; }
  .contact-modal { width: calc(100vw - 18px); }
  .contact-modal-panel { width: calc(100vw - 18px); max-height: 90vh; padding: 18px 16px; }
  .contact-modal-head { margin-bottom: 14px; padding-right: 42px; }
  .contact-modal-head h3 { font-size: 2rem; }
  .contact-modal-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 680px) {
  .hero-role-block { margin: 22px 0 14px; }
  .hero-role-primary { font-size: clamp(1.65rem, 7vw, 2.15rem); }
  .role-paper { min-width: min(290px, 100%); padding: 9px 14px 10px; }
  .role-rotator { min-width: 205px; }
  .role-current { font-size: .7rem; letter-spacing: .1em; }
  .hero-role-support { font-size: clamp(1.4rem, 6.2vw, 1.9rem); }
}
@media (max-width: 390px) {
  .role-paper { min-width: 0; width: 100%; }
  .role-rotator { min-width: 0; flex: 1; }
  .role-current { font-size: .66rem; }
}

/* =========================================================
   RESPONSIVE CONSOLIDATION â€” MOBILE / TABLET QUALITY PASS
   Focused fixes only: navigation, hero density, project wrapping,
   story collage flow, journey/stack readability, blueprint and modal.
   Desktop art direction remains unchanged.
   ========================================================= */

@media (max-width: 840px) {
  /* Compact mobile/tablet navigation. The desktop height:100% was the
     root cause of the oversized full-screen menu spacing. */
  .top-nav {
    height: auto;
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    grid-auto-rows: min-content;
    align-content: start;
    padding-top: 10px;
    padding-bottom: 16px;
    box-shadow: 0 20px 38px rgba(0, 0, 0, .22);
  }
  .top-nav .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 11px 2px;
  }

  /* Never let animated/physical paper elements create horizontal scroll. */
  .hero-shell,
  .work-layout,
  .story-grid,
  .journey-shell,
  .stack-shell,
  .contact-shell,
  .project-paper-card,
  .project-copy,
  .story-copy,
  .story-facts,
  .stack-group,
  .blueprint-paper {
    min-width: 0;
  }

  .project-copy h3,
  .project-copy p,
  .story-copy h2,
  .journey-heading h2,
  .contact-copy h2 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 680px) {
  :root {
    --gutter: 18px;
    --section-space: 78px;
  }

  /* Header */
  .nav-shell {
    width: calc(100% - 28px);
    height: 66px;
  }
  .top-nav { inset: 66px 0 auto; }
  .signature-brand {
    min-width: 0;
    width: min(205px, calc(100vw - 86px));
  }

  /* Hero: keep the collage, remove the "stack of controls" feeling. */
  .hero {
    padding: 72px 0 78px;
  }
  .hero-shell {
    gap: 34px;
  }
  .hero-name {
    font-size: clamp(3.4rem, 15.5vw, 4.75rem);
    line-height: .86;
  }
  .hero-lede {
    font-size: .96rem;
    line-height: 1.65;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 24px;
  }
  .hero-actions .paper-button {
    width: 100%;
  }
  .hero-presence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    margin-top: 14px;
  }
  .hero-monogram {
    display: none;
  }
  .hero-presence-link {
    min-width: 0;
    justify-content: center;
    padding-inline: 9px;
  }
  .hero-location {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    font-size: .78rem;
    line-height: 1.35;
  }
  .developer-note {
    width: min(88%, 330px);
    margin-top: 26px;
  }
  .annotation-build {
    margin-left: 0;
  }

  /* Keep collage proportions predictable on every phone width. */
  .hero-collage {
    width: 100%;
    min-height: 0;
    height: clamp(455px, 121vw, 545px);
  }
  .portrait-paper {
    top: 12px;
    right: 1%;
    width: 92%;
    height: calc(100% - 42px);
  }
  .code-fragment {
    left: 0;
    bottom: 4px;
    width: min(70%, 320px);
  }
  .chart-fragment {
    right: 0;
    bottom: -12px;
    width: min(40%, 180px);
  }

  /* Selected work */
  .work-section {
    padding-bottom: 92px;
  }
  .work-intro {
    margin-bottom: 18px;
  }
  .paper-mask-heading {
    line-height: .82;
  }
  .work-stack {
    width: 100%;
    gap: 22px;
  }
  .project-paper-card,
  .project-paper-card:nth-child(even) {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    grid-template-columns: 1fr;
  }
  .project-photo-reveal {
    width: 100%;
    min-width: 0;
    aspect-ratio: 16 / 9;
  }
  .project-copy {
    width: 100%;
    padding: 22px 20px 25px;
  }
  .project-copy h3 {
    max-width: 100%;
    font-size: clamp(1.72rem, 8.7vw, 2rem);
    line-height: 1.02;
    hyphens: auto;
    overflow-wrap: anywhere;
  }
  .project-copy p {
    font-size: .91rem;
    line-height: 1.62;
  }
  .project-meta {
    font-size: .64rem;
    line-height: 1.45;
  }
  .paper-tags {
    max-width: 100%;
  }
  .paper-tags span {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Background / story.
     On mobile the portrait becomes part of normal document flow instead of
     remaining absolutely positioned inside a too-short fixed stage. */
  .story-grid {
    gap: 30px;
  }
  .story-photo-stage {
    position: relative;
    width: 100%;
    max-width: 470px;
    min-height: 0;
    height: auto;
    margin: 0 auto;
    padding: 24px 0 26px;
  }
  .story-grid-paper {
    inset: 12px 8px 14px 10px;
  }
  .paper-photo {
    position: relative;
    top: auto;
    left: auto;
    width: min(86%, 390px);
    margin: 0 auto;
    padding: 10px 10px 34px;
    transform: rotate(-1.6deg);
  }
  .paper-photo img {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center top;
  }
  .paperclip {
    top: -25px;
    left: 38px;
  }
  .photo-tape {
    top: -18px;
    right: 18px;
    width: 82px;
    height: 32px;
  }
  .hand-note {
    left: 0;
    bottom: 28px;
    width: min(165px, 46%);
    padding: 14px 14px 16px;
    font-size: 1rem;
  }
  .story-calculation {
    display: none;
  }
  .story-copy {
    width: 100%;
  }
  .story-copy h2 {
    font-size: clamp(2.45rem, 12vw, 3rem);
    line-height: .94;
  }
  .story-copy p:not(.script-kicker) {
    font-size: .94rem;
    line-height: 1.65;
  }
  .story-facts {
    width: 100%;
  }
  .fact-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }
  .fact-row h3 {
    font-size: 1.25rem;
    line-height: 1.05;
  }
  .fact-row p {
    font-size: .82rem;
  }

  /* Journey */
  .journey-heading h2 {
    font-size: clamp(2.65rem, 13vw, 3.25rem);
    line-height: .9;
  }
  .journey-heading > p:not(.script-kicker) {
    font-size: .92rem;
    line-height: 1.55;
  }
  .journey-board {
    padding: 22px 18px 22px 42px;
  }
  .journey-board::before {
    left: 20px;
  }
  .milestone,
  .milestone:nth-of-type(even) {
    padding: 14px 15px;
    margin-bottom: 16px;
  }
  .milestone::before {
    left: -29px;
  }
  .milestone h3 {
    font-size: 1.28rem;
  }
  .milestone p {
    font-size: .76rem;
  }

  /* Stack */
  .stack-section {
    padding-bottom: 94px;
  }
  .stack-heading {
    margin-bottom: 24px;
  }
  .stack-heading h2 {
    font-size: clamp(3.35rem, 16vw, 4rem);
  }
  .stack-heading > p:not(.script-kicker) {
    font-size: .9rem;
    line-height: 1.55;
  }
  .stack-groups {
    gap: 8px;
  }
  .stack-group {
    min-width: 0;
    padding: 14px 12px;
  }
  .stack-group h3 {
    font-size: 1.25rem;
  }
  .stack-group span {
    font-size: .78rem;
    overflow-wrap: anywhere;
  }

  /* Contact section */
  .contact-section {
    padding-top: 82px;
  }
  .contact-shell {
    gap: 24px;
    padding-bottom: 58px;
  }
  .connect-note {
    width: min(250px, 82%);
    min-height: 94px;
    padding: 20px 22px;
  }
  .script-contact {
    font-size: clamp(2.55rem, 13vw, 3rem);
  }
  .contact-copy h2 {
    font-size: clamp(2.35rem, 12vw, 2.8rem);
  }
  .contact-copy > p {
    margin-bottom: 22px;
    font-size: .92rem;
    line-height: 1.6;
  }
  .contact-lines {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    font-size: .76rem;
  }
  .contact-lines span {
    grid-column: 1 / -1;
  }
  .paper-cta {
    width: 100%;
    padding: 20px 22px;
  }

  /* Mobile contact sheet: scroll internally, never taller than the viewport. */
  .contact-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    overflow: hidden;
  }
  .contact-modal[open] {
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .contact-modal-panel {
    width: calc(100vw - 12px);
    max-width: 620px;
    max-height: calc(100dvh - 12px);
    padding: 18px 16px 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    clip-path: polygon(0 2%, 12% 0, 30% 1.5%, 50% 0, 71% 1.5%, 88% 0, 100% 2%, 100% 96%, 88% 100%, 67% 98%, 48% 100%, 27% 98%, 10% 100%, 0 96%);
  }
  .contact-modal-head {
    margin-bottom: 14px;
    padding-right: 42px;
  }
  .contact-modal-head::before {
    margin: 0 8px 10px 0;
    padding: 7px 14px 8px;
    font-size: 1.25rem;
  }
  .contact-modal-kicker {
    margin-bottom: 8px;
    font-size: .66rem;
  }
  .contact-modal-head h3 {
    font-size: clamp(2rem, 10.5vw, 2.4rem);
    line-height: .95;
  }
  .contact-modal-head p {
    font-size: .88rem;
    line-height: 1.48;
  }
  .contact-modal-close {
    top: 12px;
    right: 13px;
    width: 40px;
    height: 40px;
  }
  .contact-form-modern label {
    margin-bottom: 10px;
    font-size: .66rem;
  }
  .contact-form-modern input {
    min-height: 46px;
    padding: 8px 0;
    font-size: .92rem;
  }
  .contact-form-modern textarea {
    min-height: 105px;
    font-size: .9rem;
    line-height: 1.45;
  }
  .contact-form-modern textarea::placeholder {
    font-size: .82rem;
  }
  .contact-modal-actions {
    display: block;
    margin-top: 8px;
  }
  .contact-modal-actions .paper-button-primary {
    width: 100%;
  }
  /* The top-right X already closes the sheet; a second full-width Close
     button wastes valuable phone height. */
  .contact-modal-actions .paper-button-secondary {
    display: none;
  }
  .contact-privacy-note {
    margin-top: 8px;
    font-size: .64rem;
  }

  .paper-footer {
    padding: 24px 18px;
  }
}

@media (max-width: 430px) {
  .section-print {
    left: 16px;
  }
  .nav-shell,
  .hero-shell,
  .work-layout,
  .story-grid,
  .journey-shell,
  .stack-shell,
  .contact-shell {
    width: calc(100% - 28px);
  }
  .signature-brand {
    width: min(190px, calc(100vw - 80px));
  }
  .brand-text {
    font-size: 1.28rem;
  }
  .signature-svg {
    width: 145px;
  }
  .brand-stamp {
    width: 34px;
    height: 34px;
    font-size: .9rem;
  }
  .nav-toggle {
    width: 42px;
    height: 42px;
  }

  .hero-name {
    font-size: clamp(3.12rem, 15vw, 3.85rem);
  }
  .hello-wrap {
    margin-bottom: 14px;
  }
  .hand-arrow {
    left: 88px;
    width: 88px;
  }
  .hero-role-block {
    margin: 20px 0 14px;
  }
  .hero-role-primary {
    font-size: clamp(1.55rem, 7.5vw, 1.9rem);
  }
  .role-paper {
    width: 100%;
    min-width: 0;
  }
  .role-rotator {
    min-width: 0;
    flex: 1;
  }
  .role-current {
    font-size: .67rem;
    letter-spacing: .085em;
    white-space: normal;
    line-height: 1.2;
  }
  .hero-role-support {
    font-size: clamp(1.35rem, 6.5vw, 1.7rem);
  }
  .hero-presence-link {
    font-size: .78rem;
  }
  .hero-collage {
    height: clamp(430px, 124vw, 510px);
  }
  .code-fragment {
    width: 70%;
    padding: 14px;
    font-size: .67rem;
  }
  .chart-fragment {
    width: 40%;
    padding: 10px;
  }

  .work-intro .script-kicker {
    font-size: 2.55rem;
  }
  .paper-mask-heading {
    font-size: clamp(3.55rem, 18vw, 4rem);
  }
  .project-copy {
    padding-inline: 17px;
  }
  .project-copy h3 {
    font-size: clamp(1.6rem, 8.2vw, 1.82rem);
  }

  .story-photo-stage {
    padding-top: 20px;
  }
  .paper-photo {
    width: min(92%, 390px);
  }
  .hand-note {
    left: -2px;
    width: min(150px, 46%);
    font-size: .94rem;
  }

  .stack-groups {
    grid-template-columns: 1fr;
  }
  .stack-group {
    min-height: auto;
  }

  .contact-lines {
    grid-template-columns: 1fr;
  }
  .contact-lines span {
    grid-column: auto;
  }
}

@media (max-width: 350px) {
  :root { --gutter: 14px; }
  .nav-shell,
  .hero-shell,
  .work-layout,
  .story-grid,
  .journey-shell,
  .stack-shell,
  .contact-shell {
    width: calc(100% - 22px);
  }
  .brand-text { font-size: 1.12rem; }
  .signature-svg { width: 126px; }
  .brand-stamp { width: 32px; height: 32px; }
  .hero-name { font-size: 2.9rem; }
  .hand-arrow { width: 76px; left: 82px; }
  .hero-presence {
    grid-template-columns: 1fr;
  }
  .hero-location { grid-column: auto; }
  .hero-collage { height: 402px; }
  .project-copy h3 { font-size: 1.48rem; }
  .journey-heading h2 { font-size: 2.45rem; }
  .contact-modal-panel { width: calc(100vw - 8px); padding-inline: 13px; }
}