/* Arthur Renard — set in Archivo (after Balto), Newsreader (after Harriet), IBM Plex Mono */

/* Archivo is served (and preloaded) from here, so the name is set in it from the first frame */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/psyche/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #070707;
  --bone: #ece6d9;
  --dim: #8c8679;
  --rule: rgba(236, 230, 217, .16);
  --paper: #e7e0cf;
  --paper-ink: #161410;
  --paper-dim: #6d6657;
  --mark: rgba(214, 186, 82, .38);
  --display: 'Archivo', 'Arial Narrow', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --gut: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }
html { background: var(--ink); color: var(--bone); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.2vw, 20px);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--bone); color: var(--ink); }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* ——— layers ——— */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.grain {
  position: fixed; inset: -100px; z-index: 6; pointer-events: none;
  opacity: .085; mix-blend-mode: overlay;
  animation: grain .5s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-37px, 22px); }
  50% { transform: translate(19px, -41px); }
  75% { transform: translate(-12px, 33px); }
}

/* media handed to WebGL stays in the DOM (layout, alt text, video decoding) but is not painted */
html.gl [data-gl] > img,
html.gl [data-gl] > video { opacity: 0; }
[data-gl] { position: relative; }
[data-gl] > img, [data-gl] > video { width: 100%; height: 100%; object-fit: cover; }
html:not(.gl) [data-gl="print"] > img { mix-blend-mode: multiply; }
html:not(.gl) [data-gl="negative"] > img,
html:not(.gl) [data-gl="cheshire"] > img { filter: invert(1) sepia(.15); mix-blend-mode: screen; }
html:not(.gl) .iris { border-radius: 50%; overflow: hidden; }

/* ——— cursor ——— */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.gl body, html.gl a, html.gl button { cursor: none; }
  .cursor {
    display: block;
    position: fixed; left: 0; top: 0; z-index: 30; pointer-events: none;
    width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border-radius: 50%; background: var(--bone); mix-blend-mode: difference;
    transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
  }
  .cursor.on-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ——— type ——— */
.display, .sec-head h2 {
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 800;
  text-transform: uppercase;
  line-height: .8;
  letter-spacing: -.012em;
  margin: 0;
}
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(30px, 4.2vw, 70px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
}
.quote em { font-style: normal; }
.kicker, .venue, .small-caps, .hero-meta, .nav, .titlecard {
  font-family: var(--display);
  font-stretch: 100%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .085em;
  font-size: 12px;
  line-height: 1.5;
}
.source {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .01em;
  color: var(--dim);
  margin: 12px 0 0;
}
mark { background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%); color: inherit; padding: 0 .08em; }
.dim { color: var(--dim); }

.rise { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.rise.in { opacity: 1; transform: none; }

/* ——— nav ——— */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 18px var(--gut);
  mix-blend-mode: difference; color: var(--bone);
}
.nav a { text-decoration: none; }
.nav nav { display: flex; gap: clamp(14px, 2.4vw, 36px); }
.nav nav a { position: relative; }
.nav nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav nav a:hover::after, .nav nav a.is-on::after { transform: scaleX(1); transform-origin: left; }

/* ——— hero: the eye ——— */
.hero { position: relative; height: 230vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.iris {
  position: absolute; left: 50%; top: 50%;
  width: min(92vh, 80vw); aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(var(--zoom, 1));
  will-change: transform;
}
/* the name lives outside the sticky stage: a sticky box is an isolated group and would stop the difference blend reaching the eye */
.hero-name {
  position: fixed; left: 0; right: 0; top: 50%; z-index: 3;
  display: flex; justify-content: space-between;
  padding: 0 calc(var(--gut) * .6);
  margin: 0; transform: translateY(-50%);
  font-family: var(--display); font-stretch: 62%; font-weight: 800;
  font-size: clamp(64px, 15.6vw, 330px); line-height: .8; letter-spacing: -.015em;
  text-transform: uppercase; color: var(--bone); mix-blend-mode: difference;
  pointer-events: none;
  transition: opacity 1.4s var(--ease), filter 1.4s var(--ease);
}
html.name-wait .hero-name { opacity: 0; filter: blur(14px); }
.hero-name span { display: block; }
.hero-name.gone { visibility: hidden; }
.hero-name span:first-child { transform: translateX(calc(var(--p, 0) * -60vw)); }
.hero-name span:last-child { transform: translateX(calc(var(--p, 0) * 60vw)); }
.hero-meta, .hero-intro { position: absolute; z-index: 3; opacity: calc(1 - var(--p, 0) * 4); }
.hero-meta { left: var(--gut); bottom: 30px; margin: 0; }
.hero-intro {
  right: var(--gut); bottom: 26px; margin: 0; max-width: 21em;
  font-style: italic; font-weight: 300; font-size: clamp(17px, 1.35vw, 22px); line-height: 1.35; text-align: right;
}

/* ——— screens (4:3 found footage) ——— */
.screen { position: relative; margin: 0; aspect-ratio: 4 / 3; }
.screen-media { position: absolute; inset: 0; }
.reel { display: grid; justify-items: center; padding: 16vh var(--gut) 20vh; }
.screen-reel { width: min(100%, 1180px, 124vh); }
.reel .source { width: min(100%, 1180px, 124vh); }
.titlecard {
  position: absolute; left: 5%; bottom: 6.5%; z-index: 3; margin: 0;
  font-size: clamp(11px, 1.45vw, 19px); font-weight: 500; letter-spacing: .02em; line-height: 1.18;
  color: #fff; text-shadow: 0 0 10px rgba(0, 0, 0, .35);
}

/* ——— who are you ——— */
.who {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(28px, 6vw, 120px); align-items: start;
  padding: 10vh var(--gut) 22vh;
}
.who-art { position: sticky; top: 10vh; margin: 0; }
.who-media { aspect-ratio: 1100 / 1470; }
.who-text { padding-top: 6vh; }
.who-text .quote { margin-bottom: .9em; }
.who-text p { max-width: 33em; margin: 0 0 1.1em; }
.lede { font-size: clamp(22px, 2vw, 32px); line-height: 1.28; font-weight: 400; letter-spacing: -.01em; }
.schools { margin: 3.2em 0 2.6em; border-top: 1px solid var(--rule); }
.schools div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.schools dt { font-family: var(--mono); font-size: 12px; color: var(--dim); padding-top: .3em; }
.schools dd { margin: 0; }
.schools b { font-weight: 600; }
.small-caps { max-width: 40em; }

/* ——— paper sections ——— */
.paper { background: var(--paper); color: var(--paper-ink); }
.paper .source { color: var(--paper-dim); }
.paper ::selection { background: var(--paper-ink); color: var(--paper); }
.sec-head { margin-bottom: 9vh; }
.sec-head h2 { font-size: clamp(88px, 18vw, 340px); margin-left: -.03em; }
.sec-head .quote { margin-top: .25em; max-width: 16em; }

.research { padding: 16vh var(--gut) 10vh; }
.paper-row {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(24px, 6vw, 110px); padding: 7vh 0 9vh; border-top: 1px solid rgba(22, 20, 16, .28);
}
.plate { margin: 0; }
.plate-media { aspect-ratio: var(--ar); }
.paper-body { align-self: center; max-width: 36em; }
.no { font-family: var(--display); font-stretch: 62%; font-weight: 300; font-size: clamp(40px, 4vw, 64px); line-height: 1; margin: 0 0 .5em; }
.paper-body .venue { margin: 0 0 1.1em; }
.paper-body h3, .proj-body h3, .exp h3 {
  font-family: var(--display); font-stretch: 62%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(44px, 5.6vw, 100px); line-height: .86; letter-spacing: -.01em; margin: 0 0 .32em;
}
.paper-body p { margin: 0 0 1em; }
.tags { font-style: italic; color: var(--paper-dim); }
.links { display: flex; gap: 22px; margin-top: 1.6em !important; }
.links a {
  font-family: var(--display); font-stretch: 100%; font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid currentColor;
}
/* the arrow is drawn, not typed: none of the page's fonts has ↗, and phones swap it for the emoji */
.links a::after {
  content: ""; display: inline-block; width: 1em; height: 1em; margin-left: .32em; vertical-align: -.06em;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cpath d='M.6 10.4 10.4.6M6.2.6h4.2v4.2' fill='none' stroke='black' stroke-width='.8'/%3E%3C/svg%3E");
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.links a:hover { border-bottom-width: 3px; }

/* ——— games ——— */
.games { position: relative; height: 112vh; min-height: 640px; background: #000; overflow: hidden; }
.games-media { position: absolute; inset: 0; }
.games-words {
  position: absolute; inset: 0; z-index: 3; margin: 0; display: grid; place-items: center;
  mix-blend-mode: difference; color: var(--bone); pointer-events: none;
}
.games-words span {
  grid-area: 1 / 1; font-family: var(--display); font-stretch: 62%; font-weight: 800; text-transform: uppercase;
  font-size: clamp(64px, 15vw, 290px); line-height: .8; letter-spacing: -.015em; opacity: 0;
}
.games-words span.on { opacity: 1; }
.games-text { position: absolute; left: var(--gut); bottom: 9vh; z-index: 3; max-width: 30em; }
.games-text .kicker { margin: 0 0 .8em; }
.games-text p:last-child { margin: 0; font-size: clamp(18px, 1.5vw, 23px); line-height: 1.38; text-shadow: 0 1px 14px rgba(0, 0, 0, .7); }
.games-source { position: absolute; right: var(--gut); bottom: 9vh; z-index: 3; margin: 0; }

/* ——— projects ——— */
.projects { padding: 18vh var(--gut) 16vh; }
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13vh clamp(24px, 4vw, 72px); }
.proj:nth-child(even) { margin-top: 16vh; }
.proj .screen { width: 100%; }
.proj-body { margin-top: 26px; max-width: 30em; }
.proj-body .venue { margin: 0 0 1em; color: var(--dim); }
.proj-body h3 { font-size: clamp(40px, 4.4vw, 78px); }
.proj-body p { margin: 0; }

/* ——— experience ——— */
.experience { position: relative; padding: 16vh var(--gut) 18vh; }
.exp-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: clamp(24px, 5vw, 90px); align-items: end; margin-bottom: 9vh; }
.exp-head .sec-head { margin: 0; }
.exp-head .sec-head h2 { font-size: clamp(76px, 12.6vw, 250px); }
.exp-plate { margin: 0; }
.exp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(22, 20, 16, .35); }
.exp {
  display: grid; grid-template-columns: 11em minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(16px, 3vw, 56px); align-items: baseline;
  padding: 34px 0 38px; border-bottom: 1px solid rgba(22, 20, 16, .35);
  transition: padding-left .6s var(--ease);
}
.exp:hover { padding-left: 18px; }
.exp-years { font-family: var(--mono); font-size: 12px; margin: 0; }
.exp h3 { font-size: clamp(40px, 4.6vw, 84px); margin: 0 0 .2em; }
.exp .venue { margin: 0; color: var(--paper-dim); }
.exp > p:last-child { margin: 0; }
.exp-float {
  position: fixed; left: 0; top: 0; z-index: 4; width: clamp(180px, 18vw, 300px); height: auto;
  pointer-events: none; opacity: 0; mix-blend-mode: multiply; filter: grayscale(.2) contrast(1.05);
  transition: opacity .4s var(--ease);
}
.exp-float.show { opacity: 1; }

/* ——— contact ——— */
.contact { padding: 18vh var(--gut) 16vh; text-align: center; }
.cat { width: min(560px, 80vw); aspect-ratio: 1; margin: 0 auto 4vh; }
.contact h2 {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(54px, 10vw, 180px); line-height: .92; letter-spacing: -.035em; margin: 0;
}
.quote-small { font-style: italic; font-weight: 300; color: var(--dim); margin: .9em 0 2.4em; font-size: clamp(18px, 1.5vw, 24px); }
.mail {
  display: inline-block; text-decoration: none;
  font-family: var(--display); font-stretch: 62%; font-weight: 700;
  font-size: clamp(34px, 6.6vw, 118px); line-height: 1; letter-spacing: -.01em;
  border-bottom: 2px solid currentColor; padding-bottom: .06em;
  transition: letter-spacing .7s var(--ease);
}
.mail:hover { letter-spacing: .02em; }
.socials { list-style: none; margin: 3.4em 0 0; padding: 0; display: flex; gap: clamp(18px, 4vw, 54px); justify-content: center; flex-wrap: wrap; }
.socials a { font-family: var(--display); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--rule); padding-bottom: 4px; }
.socials a:hover { border-color: currentColor; }
.contact .source { margin-top: 9vh; }

/* ——— colophon ——— */
.colophon {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 110px);
  padding: 12vh var(--gut) 10vh; border-top: 1px solid var(--rule); align-items: start;
}
.redon { margin: 0; max-width: 420px; }
.credits { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--dim); }
.credits .kicker { color: var(--bone); margin: 0 0 1.2em; font-family: var(--display); }
.credits p { margin: 0 0 1.4em; max-width: 46em; }
.credits ul { list-style: none; padding: 0; margin: 0 0 2.4em; columns: 2; column-gap: 40px; }
.credits li { break-inside: avoid; margin-bottom: .2em; }
.credits a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--rule); }
.credits a:hover { border-color: var(--bone); }
.copy { color: var(--bone); }

/* ——— responsive ——— */
@media (max-width: 900px) {
  .nav nav a:not(:last-child) { display: none; }
  .who, .paper-row, .exp-head { grid-template-columns: 1fr; }
  .who-art { position: relative; top: 0; max-width: 520px; }
  .who-text { padding-top: 0; }
  .paper-row .plate { max-width: 460px; }
  .exp-plate { max-width: 260px; }
  .proj-grid { grid-template-columns: 1fr; }
  .proj:nth-child(even) { margin-top: 0; }
  .exp { grid-template-columns: 1fr; gap: 6px; }
  .colophon { grid-template-columns: 1fr; }
  .credits ul { columns: 1; }
  .games-source { left: var(--gut); right: auto; bottom: 3vh; }
}
@media (max-width: 640px) {
  .hero-name { flex-direction: column; justify-content: center; align-items: center; gap: 46vw; font-size: 24vw; }
  .hero-intro { left: var(--gut); right: auto; bottom: 120px; text-align: left; }
  .hero-meta { bottom: 22px; }
  .iris { width: 118vw; }
  .schools div { grid-template-columns: 1fr; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: 100vh; }
  .grain { animation: none; }
  .rise { opacity: 1; transform: none; transition: none; }
}
