@font-face {
  font-family: Space Grotesk;
  src: url("assets/fonts/space-grotesk-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Hanken;
  src: url("assets/fonts/hanken.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("assets/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color: #101713;
  --paper: #f4e9da;
  --forest: #10251b;
  --forest-fold: #234131;
  background: var(--paper);
  font-synthesis: none;
  --signature-tracking: .105rem;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 0; min-height: 100%; }
::selection { color: #f8efe5; background: #174132; }

.composition {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(100svh, 650px);
  padding: clamp(28px, 4vw, 70px) clamp(30px, 6vw, 100px) clamp(35px, 8vh, 80px);
  display: grid;
  grid-template-rows: minmax(260px, 1fr) minmax(370px, 1.15fr);
  background: var(--paper);
}
.artwork {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}
.hero-graphic { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.hero-graphic-narrow { visibility: hidden; }
.hero-motion {
  transform: translate3d(var(--pointer-x, 0px), calc(var(--art-shift, 0px) + var(--pointer-y, 0px)), 0);
}
.hero-base { fill: var(--forest); }
.hero-fold { fill: var(--forest-fold); }
.hero-line { fill: none; stroke: #b85d37; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.touch-echo {
  position: absolute;
  z-index: 1;
  width: 64px;
  height: 64px;
  border: 1px solid #c04d22;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.identity { align-self: start; min-width: 0; }
.name {
  margin: 0;
  align-self: start;
  font: 700 clamp(5rem, 9.4vw, 9rem)/.88 "Space Grotesk", sans-serif;
  letter-spacing: -.035em;
}
.name span { display: block; }
.projects {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(90px, 1fr));
  column-gap: clamp(50px, 10vw, 160px);
  align-items: end;
  transform: translateY(-40px);
}
.project {
  position: relative;
  min-width: 0;
  min-height: 64px;
  height: clamp(64px, calc(5.3vw + 12px), 92px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35em;
  padding: 0 0 12px;
  color: #101713;
  text-decoration: none;
  line-height: 1;
}
.project::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
}
.project::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: auto 0 0;
  height: 2px;
  background: #c77951;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(.16, 1, .3, 1);
}
.project:focus-visible { outline: 3px solid #c04d22; outline-offset: 7px; }
.project:focus-visible::before, .project:active::before { transform: scaleX(1); }
.project:active .arrow { transform: translateX(.12em) scale(.92); }
.wordmark { min-width: 0; white-space: nowrap; }
.arrow {
  flex: 0 0 clamp(24px, 2.5vw, 36px);
  width: clamp(24px, 2.5vw, 36px);
  height: clamp(24px, 2.5vw, 36px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease-out;
}
@media (hover: hover) {
  .project:hover .arrow { transform: translateX(.12em); }
  .project:hover::before { transform: scaleX(1); }
}
.project-webtouch { font: 700 clamp(1.8rem, 3.8vw, 3.7rem)/1 Hanken, sans-serif; letter-spacing: -.015em; }
.webtouch-touch { font: italic 500 1em/1 Newsreader, Georgia, serif; }
.webtouch-dot { color: #d8281c; }
.project-cloud { color: #f8efe5; font: 700 clamp(1.8rem, 3.8vw, 3.7rem)/1 Hanken, sans-serif; letter-spacing: -.015em; }
.cloud-light { font-weight: 450; }
.project-luero { font: 800 clamp(2.7rem, 5.3vw, 5rem)/1 Hanken, sans-serif; letter-spacing: -.015em; }
.project-william { font: 700 clamp(1rem, 2.2vw, 2.2rem)/1 Montserrat, sans-serif; letter-spacing: var(--signature-tracking); text-transform: uppercase; }
.project-authentify { grid-column: 1 / -1; width: min(57%, 660px); justify-self: center; font: 700 clamp(2.5rem, 5vw, 4.7rem)/1 Inter, sans-serif; letter-spacing: -.04em; }

.scroll-cue {
  position: absolute;
  bottom: clamp(8px, 2vh, 20px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: .85em;
  width: max-content;
  min-height: 48px;
  padding: 4px 8px;
  color: #26382e;
  font: 700 .85rem/1 Hanken, sans-serif;
  letter-spacing: .1em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: visibility 0s;
}
.scroll-cue-label { padding: 6px 0; white-space: nowrap; }
.scroll-cue svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 200ms ease-out; }
.scroll-cue:not(:focus-visible) .scroll-cue-label, .scroll-cue:not(:focus-visible) svg { opacity: var(--cue-opacity, 1); }
.composition.has-scrolled .scroll-cue:not(:focus-visible) { visibility: hidden; pointer-events: none; }
.scroll-cue:active svg { transform: translateY(3px); }
@media (hover: hover) {
  .scroll-cue:hover svg { transform: translateY(3px); }
}
.scroll-cue:focus-visible { outline: 3px solid #a44320; outline-offset: 5px; }
.social-links a:focus-visible { outline: 3px solid #e79a71; outline-offset: 5px; }

.social-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 145svh;
  padding: 0 clamp(30px, 7vw, 110px) 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #f5eadd;
  /* The first pixels share the hero color, even at fractional scroll positions. */
  background: linear-gradient(var(--paper) 0 2px, var(--forest) 2px);
}
.transition-wave {
  position: absolute;
  z-index: -2;
  top: 0;
  left: 0;
  width: 100%;
  height: clamp(200px, 36svh, 400px);
  pointer-events: none;
}
.transition-fold {
  fill: var(--forest-fold);
  transform: translate3d(var(--fold-x, 0px), calc(var(--fold-shift, 0px) + var(--fold-y, 0px)), 0);
}
.transition-paper {
  fill: var(--paper);
  transform: translate3d(var(--paper-x, 0px), var(--paper-shift, 0px), 0);
}
.copper-thread {
  position: absolute;
  z-index: -1;
  top: 10svh;
  left: 0;
  width: 100%;
  height: clamp(90px, 13vw, 160px);
  pointer-events: none;
  transform: translate3d(0, var(--thread-shift, 0px), 0);
}
.thread-base, .thread-trace { vector-effect: non-scaling-stroke; }
.thread-base { stroke: #bb6841; stroke-width: 1; opacity: .3; }
.thread-trace {
  stroke: #d78354;
  stroke-width: 2;
  clip-path: inset(0 calc((1 - var(--thread-progress, 1)) * 100%) 0 0);
}
.social-orbit {
  position: absolute;
  z-index: -1;
  right: -12%;
  top: clamp(70px, 13svh, 140px);
  width: min(78vw, 900px);
  color: #bc6b45;
  opacity: .55;
  pointer-events: none;
  transform: translate3d(var(--orbit-x, 0px), calc(var(--orbit-shift, 0px) + var(--orbit-y, 0px)), 0);
}
.social-content {
  display: grid;
  grid-template-columns: 1fr minmax(250px, .65fr);
  gap: clamp(50px, 8vw, 150px);
  align-items: end;
  /* Keep the entire moving thread above the title throughout its journey. */
  padding-top: calc(65svh + clamp(90px, 13vw, 160px));
}
.social-content h2 {
  margin: 0;
  font: 700 clamp(3.5rem, 7.6vw, 7.8rem)/.96 "Space Grotesk", sans-serif;
  letter-spacing: -.04em;
  clip-path: inset(-.2em);
}
.social-content h2 span { color: #c87952; }
.social-links { display: grid; }
.social-links a {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  border-bottom: 1px solid rgba(245, 234, 221, .5);
  color: inherit;
  font: 500 clamp(1.2rem, 2vw, 1.7rem)/1 Hanken, sans-serif;
  text-decoration: none;
}
.social-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: #d99872;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms cubic-bezier(.16, 1, .3, 1);
}
.social-links a:focus-visible::after, .social-links a:active::after { transform: scaleX(1); }
.social-links a:active svg { transform: translateX(5px) scale(.92); }
.social-links svg { width: 25px; height: 25px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; transition: transform 180ms ease-out; }
@media (hover: hover) {
  .social-links a:hover svg { transform: translateX(5px); }
  .social-links a:hover::after { transform: scaleX(1); }
}
.social-signature {
  margin: 60px 0 0;
  color: #c1cabe;
  font: 700 .75rem/1 Montserrat, sans-serif;
  letter-spacing: var(--signature-tracking);
  text-transform: uppercase;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-base { animation: shape-arrive 320ms ease-out both; }
  .hero-fold { animation: shape-arrive 750ms cubic-bezier(.16, 1, .3, 1) 120ms both; }
  .hero-line { animation: line-arrive 1000ms cubic-bezier(.16, 1, .3, 1) 180ms both; }
  .name { animation: title-arrive 700ms cubic-bezier(.16, 1, .3, 1) both; }
  .project { animation: project-arrive 900ms cubic-bezier(.16, 1, .3, 1) both; }
  .project:nth-child(1) { animation-delay: 220ms; }
  .project:nth-child(2) { animation-delay: 330ms; }
  .project:nth-child(3) { animation-delay: 440ms; }
  .project:nth-child(4) { animation-delay: 550ms; }
  .project:nth-child(5) { animation-delay: 660ms; }
  .project::after { animation: rule-arrive 900ms cubic-bezier(.16, 1, .3, 1) both; animation-delay: inherit; }
  .scroll-cue { animation: cue-arrive 450ms cubic-bezier(.16, 1, .3, 1) 1150ms both; }
  .composition:focus-within .hero-base, .composition:focus-within .project, .composition:focus-within .project::after, .scroll-cue:focus-visible { animation: none; }
  .social-content h2, .social-links a { transition: opacity 850ms ease-out, transform 850ms cubic-bezier(.16, 1, .3, 1), clip-path 850ms cubic-bezier(.16, 1, .3, 1); }
  .social-links a:nth-child(1) { transition-delay: 100ms; }
  .social-links a:nth-child(2) { transition-delay: 180ms; }
  .social-links a:nth-child(3) { transition-delay: 260ms; }
  .social-content.is-awaiting h2 { opacity: 0; transform: translateY(20px); clip-path: inset(0 0 100% 0); }
  .social-content.is-awaiting .social-links a { opacity: 0; transform: translateY(18px); }
  .social-content.is-awaiting:focus-within h2, .social-content.is-awaiting:focus-within .social-links a { opacity: 1; transform: none; clip-path: none; transition: none; }
  .social-links a:focus-visible { opacity: 1; transform: none; transition: none; }
}
@keyframes shape-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes line-arrive { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes title-arrive { from { opacity: 0; clip-path: inset(-.25em 0 100% 0); transform: translateY(12px); } to { opacity: 1; clip-path: inset(-.25em 0 -.25em 0); transform: none; } }
@keyframes project-arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rule-arrive { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes cue-arrive { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 700px) {
  .composition {
    min-height: max(100svh, 600px);
    padding: clamp(30px, 5vh, 46px) clamp(25px, 8vw, 40px) 70px;
    grid-template-rows: minmax(175px, 1fr) minmax(350px, 2fr);
  }
  .hero-graphic-wide { visibility: hidden; }
  .hero-graphic-narrow { visibility: visible; }
  .name { font-size: clamp(3.2rem, 14vw, 5.2rem); line-height: .9; }
  .projects { display: flex; flex-direction: column; align-items: stretch; justify-content: space-evenly; transform: none; }
  .project { flex: 0 0 auto; height: auto; min-height: 48px; padding-bottom: 12px; }
  .arrow { flex-basis: 22px; width: 22px; height: 22px; }
  .project-webtouch { font-size: clamp(1.7rem, 7vw, 2.65rem); }
  .project-cloud { color: #101713; font-size: clamp(1.8rem, 7vw, 2.65rem); }
  .project-luero { font-size: clamp(2.2rem, 9vw, 3.3rem); }
  .project-william { font-size: clamp(.9rem, 4.8vw, 1.5rem); }
  .project-authentify { width: 100%; font-size: clamp(1.9rem, 8vw, 3rem); }
  .social-section { padding: 0 clamp(25px, 8vw, 40px) 30px; }
  .social-content { grid-template-columns: 1fr; gap: 45px; }
  .social-content h2 { font-size: clamp(3.3rem, 12vw, 5rem); }
  .social-orbit { width: 115vw; top: 18svh; right: -45%; }
}
@media (max-width: 340px) {
  .project-william { font-size: clamp(.82rem, 4.6vw, .98rem); }
}
@media (max-width: 700px) and (max-height: 650px) {
  .composition { min-height: 660px; padding-bottom: 65px; }
}
@media (max-width: 300px) {
  .composition { display: block; }
  .name { font-size: clamp(2.25rem, 16vw, 3.2rem); }
  .identity { margin-bottom: 3rem; }
  .projects { gap: 1.5rem; }
  .wordmark { white-space: normal; overflow-wrap: anywhere; }
  .scroll-cue { max-width: calc(100% - 20px); font-size: .72rem; }
  .scroll-cue-label { white-space: normal; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .arrow, .social-links svg, .project::before, .social-links a::after, .scroll-cue, .scroll-cue-label, .scroll-cue svg, .composition.has-scrolled .scroll-cue:not(:focus-visible) { transition: none; }
  .project:hover .arrow, .project:active .arrow, .social-links a:hover svg, .social-links a:active svg, .scroll-cue:hover svg, .scroll-cue:active svg { transform: none; }
  .composition.has-scrolled .scroll-cue:not(:focus-visible) .scroll-cue-label, .composition.has-scrolled .scroll-cue:not(:focus-visible) svg { transform: none; }
  .artwork, .hero-motion, .social-orbit, .transition-fold, .transition-paper, .copper-thread { transform: none; }
  .thread-trace { clip-path: none; }
}
