/* Mouhamad Mamane — "Giving form".
   The site is an exhibition in six rooms. Each room is its own page; you walk between them with the
   dock at the bottom of the screen, the arrow keys, or a swipe. Every object first appears as a
   construction drawing (a thought) and then resolves into glass (a thing that exists).
   Palette and type from Namu: warm paper, kola, ink, one touch of Sahel orange; DM Sans for words,
   Newsreader italic for the one flourish, Red Hat Mono for labels. Light by default. */

@font-face { font-family: "DM Sans Lab"; src: url(Assets/fonts/dmsans-lab.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans Lab"; src: url(Assets/fonts/namu-hz-sans.woff2) format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap;
  unicode-range: U+0181, U+018A, U+0198-0199, U+019D, U+01B3-01B4, U+0253, U+0257, U+0272, U+02BC, U+0300-036F, U+2009, U+202F; }
@font-face { font-family: "Red Hat Mono Lab"; src: url(Assets/fonts/redhatmono-lab.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }

@view-transition { navigation: auto; }

:root {
  --ground: #fff3e8; --paper: #fffaf1; --surface: #f7f0e3; --surface-2: #f3e7d1; --row: #fbf0dc;
  --ink: #1c1410; --text: #6b3e1e; --muted: #7a6352; --sahel: #e8935a;
  --rule: rgba(28, 20, 16, .12); --rule-soft: rgba(28, 20, 16, .07); --line: rgba(107, 62, 30, .34);
  --glass: rgba(255, 250, 241, .72); --glass-edge: rgba(255, 255, 255, .7); --focus: #6b3e1e;
  --shadow: 0 18px 50px -12px rgba(107, 62, 30, .28);
  --sans: "DM Sans Lab", "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader Lab", Newsreader, Georgia, "Times New Roman", serif;
  --mono: "Red Hat Mono Lab", "Red Hat Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.43, .195, .02, 1); --ui: cubic-bezier(.215, .61, .355, 1);
  --edge: clamp(20px, 4vw, 56px); --motion: 1;
  color-scheme: light;
}
@media (prefers-reduced-motion: reduce) { :root { --motion: 0; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; background: var(--ground); color: var(--text); font: 400 17.5px/1.55 var(--sans); letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
::selection { background: rgba(232, 147, 90, .3); }
.skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { color: var(--ink); font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0; }
.it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.mono, .label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .03em; color: var(--muted); }
.label { text-transform: uppercase; letter-spacing: .12em; font-size: 11px; }

/* ---------------------------------------------------------------- the room's atmosphere */
.haze { position: fixed; inset: 0; z-index: -1; background: var(--ground); view-transition-name: haze; }

/* ---------------------------------------------------------------- corners: where you are, and the time in Cleveland */
.corner { position: fixed; z-index: 20; top: 22px; display: flex; gap: 12px; align-items: baseline; font: 500 12.5px/1 var(--mono); letter-spacing: .03em; color: var(--muted); pointer-events: none; }
.corner.left { left: var(--edge); }
.corner.right { right: var(--edge); }
.corner b { color: var(--ink); font-weight: 500; }
.corner .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sahel); align-self: center; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 640px) { .corner.right .where { display: none; } }

/* ---------------------------------------------------------------- the room */
.room { min-height: 100svh; padding: 76px var(--edge) 128px; display: grid; align-content: center; view-transition-name: room; }
.room-inner { width: 100%; max-width: 1240px; margin-inline: auto; }
.title { font-size: clamp(26px, 2.5vw, 36px); font-weight: 400; line-height: 1.25; letter-spacing: -.015em; }
.col { max-width: 760px; display: grid; gap: 18px; justify-items: start; }
.col > .now, .col > .toc, .col > .email { width: 100%; }
.quote .thought { margin-top: 10px; color: var(--ink); }
.col.center { margin-inline: auto; justify-items: center; text-align: center; }
.col.center > .email { justify-content: center; }
.socials { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.socials a { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); transition: background-color .4s var(--ui), transform .5s var(--ease); }
.socials a:hover { background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge); transform: translateY(calc(-2px * var(--motion))); }
.socials svg { width: 21px; height: 21px; }
.lede { font-size: clamp(16.5px, 1.3vw, 19px); line-height: 1.55; max-width: 36em; }

/* ---------------------------------------------------------------- the dock (the floor plan) */
.dock { position: fixed; z-index: 40; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); view-transition-name: dock;
  display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: var(--glass); white-space: nowrap;
  backdrop-filter: saturate(170%) blur(22px); -webkit-backdrop-filter: saturate(170%) blur(22px);
  box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 1px var(--rule-soft), var(--shadow); }
.dock a, .dock button { position: relative; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer;
  border-radius: 999px; text-decoration: none; color: var(--muted); font: 500 13.5px/1 var(--mono); letter-spacing: .01em; transition: color .4s var(--ui), background-color .4s var(--ui); }
.dock .links { display: flex; gap: 2px; position: relative; }
.dock .links a { padding: 0 15px; z-index: 1; }
.dock .links a:hover { color: var(--ink); }
.dock .links a[aria-current="page"] { color: var(--ink); }
.dock .pill { position: absolute; z-index: 0; top: 0; left: 0; width: 0; height: 42px; border-radius: 999px; background: transparent; opacity: 0; }
.dock .pill.ready { opacity: 1; transition: left .6s var(--ease), width .6s var(--ease); }
.dock .pill::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--sahel); }
.dock .step { width: 42px; color: var(--ink); }
.dock .step:hover { background: var(--rule-soft); }
.dock .step[aria-disabled="true"] { opacity: .25; pointer-events: none; }
.dock svg { width: 18px; height: 18px; }
/* phones: every page stays in the bar, smaller and evenly spaced; swiping replaces the arrows */
@media (max-width: 760px) {
  .dock { left: 10px; right: 10px; transform: none; padding: 5px; gap: 2px; }
  .dock .step { display: none; }
  .dock .links { flex: 1; gap: 0; }
  .dock .links a { flex: 1 1 0; min-width: 0; padding: 0 2px; font: 500 clamp(11px, 3.4vw, 13.5px)/1 var(--sans); letter-spacing: 0; }
}

/* ---------------------------------------------------------------- 01 home: the manifesto */
.home { display: block; }
.home-col { max-width: 760px; }
.greet { font-size: clamp(16px, 1.5vw, 21px); font-weight: 500; line-height: 1.4; color: var(--ink); letter-spacing: -.01em; margin-bottom: 4px; }
.manifesto { font-size: clamp(16px, 1.5vw, 21px); font-weight: 500; line-height: 1.4; letter-spacing: -.01em; color: var(--ink); }
.manifesto .line { display: block; }
.thought { margin-top: clamp(18px, 2.2vw, 30px); font-size: clamp(16.5px, 1.3vw, 19px); line-height: 1.5; max-width: 34em; color: var(--text); }
.roles { margin-top: clamp(18px, 2.2vw, 28px); display: grid; gap: 6px; }
.role-line { font-size: 16.5px; color: var(--ink); }
.role-line a { font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--sahel); }
.role-line span { color: var(--text); }
.now { margin-top: clamp(14px, 2vw, 26px); max-width: 760px; width: 100%; }
.now > .mono { margin-bottom: 10px; }
.now ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.now a, .now .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 13px 4px; border-bottom: 1px solid var(--rule); text-decoration: none;
  border-radius: 12px; transition: background-color .5s var(--ui), padding .5s var(--ease); }
.now a:hover { background: var(--glass); padding-inline: 14px; }
.now .nm { color: var(--ink); font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.now .nm em { font-style: normal; font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 8px; }
.now .dom { display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px/1 var(--mono); color: var(--muted); justify-self: end; align-self: center; }
.now .dom svg { width: 13px; height: 13px; transition: transform .4s var(--ui); }
.now a:hover .dom { color: var(--ink); }
.now a:hover .dom svg { transform: translate(2px, -2px); }
.now .ds { grid-column: 1 / -1; font-size: 15px; line-height: 1.45; color: var(--muted); }
.js .home .roles, .js .home .now { animation: fade-up 1.1s var(--ease) both; }
.js .home .roles { animation-delay: 2.1s; } .js .home .now { animation-delay: 2.4s; }
/* other rooms: the column arrives as one calm block */
.js .col > * { animation: fade-up 1s var(--ease) both; }
.js .col > :nth-child(2) { animation-delay: .1s; } .js .col > :nth-child(3) { animation-delay: .2s; } .js .col > :nth-child(n+4) { animation-delay: .3s; }

/* words that arrive out of a blur */
.js .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.25em); animation: word 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * 75ms + 200ms); }
.js .thought .w { animation-duration: .9s; animation-delay: calc(var(--i) * 20ms + 1300ms); }
@keyframes fade { to { opacity: 1; } }
@keyframes word { to { opacity: 1; filter: none; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .js .w { animation: fade .5s linear forwards; filter: none; transform: none; } }

/* ---------------------------------------------------------------- 05 entries */
.toc { list-style: none; margin: clamp(26px, 3.2vw, 42px) 0 0; padding: 0; border-top: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 15px 4px; border-bottom: 1px solid var(--rule); text-decoration: none;
  border-radius: 14px; transition: background-color .5s var(--ui), padding .5s var(--ease); }
.toc a:hover { background: var(--glass); padding-inline: 16px; }
.toc .n { font: 500 12.5px/1 var(--mono); color: var(--muted); }
.toc .t { font-size: 18px; color: var(--ink); letter-spacing: -.01em; }
.entry { max-width: 760px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; text-decoration: none; color: var(--muted); font: 500 13px/1 var(--mono); }
.back:hover { color: var(--ink); }
.back svg { width: 15px; height: 15px; }
.entry .title { margin: 10px 0 18px; }

/* ---------------------------------------------------------------- 06 contact */
.email { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 4px; }
.email a { font-size: clamp(20px, 2vw, 26px); font-weight: 400; letter-spacing: -.015em; color: var(--ink); text-decoration: none; background: linear-gradient(var(--sahel), var(--sahel)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 4px; transition: background-size .6s var(--ease); }
.email a:hover { background-size: 0 2px; background-position: 100% 100%; }
.copy { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--ink); cursor: pointer; font: 500 13px/1 var(--mono); display: inline-flex; gap: 8px; align-items: center;
  transition: background-color .4s var(--ui), color .4s var(--ui); }
.copy:hover { background: var(--sahel); color: #1c1410; }
/* ---------------------------------------------------------------- 10000+ (off the floor plan) */
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: clamp(26px, 3.2vw, 42px); }
@media (max-width: 980px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .videos { grid-template-columns: minmax(0, 1fr); } }
.video-frame { position: relative; aspect-ratio: 16 / 10; border-radius: 22px; overflow: hidden; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 1px var(--rule-soft); cursor: pointer; isolation: isolate; }
.video-frame.is-placeholder { cursor: default; }
.video-media, .video-poster { position: absolute; inset: 0; }
.video-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 1; }
.video-overlay { position: absolute; inset: auto 12px 12px; z-index: 2; display: flex; justify-content: space-between; gap: 8px; pointer-events: none; }
.video-badge, .video-action { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 11.5px/1 var(--mono); }
.video-frame.is-playing .video-overlay, .video-frame.is-previewing .video-badge { opacity: 0; }
.video-card h3 { margin-top: 14px; font-size: 18px; letter-spacing: -.015em; }
.video-card p { margin-top: 4px; font-size: 14.5px; color: var(--muted); }

/* ---------------------------------------------------------------- walking between rooms */
::view-transition-old(room) { animation: room-out .5s var(--ease) both; }
::view-transition-new(room) { animation: room-in .8s var(--ease) both; }
html[data-dir="back"]::view-transition-old(room) { animation-name: room-out-back; }
html[data-dir="back"]::view-transition-new(room) { animation-name: room-in-back; }
::view-transition-group(haze), ::view-transition-old(haze), ::view-transition-new(haze) { animation: none; }
@keyframes room-out { to { opacity: 0; transform: translateX(-8vw); filter: blur(10px); } }
@keyframes room-in { from { opacity: 0; transform: translateX(8vw); filter: blur(10px); } }
@keyframes room-out-back { to { opacity: 0; transform: translateX(8vw); filter: blur(10px); } }
@keyframes room-in-back { from { opacity: 0; transform: translateX(-8vw); filter: blur(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(room), ::view-transition-new(room) { animation: none; }
  ::view-transition-group(*) { animation-duration: .2s; }
}


/* ---------------------------------------------------------------- Momo the penguin, right after "(momo)" in the greeting */
.penguin { position: relative; display: inline-block; width: 1.5em; height: 1.72em; margin-left: .05em; vertical-align: -.42em; padding: 0; border: 0; background: none; cursor: pointer; }
.penguin svg { width: 100%; height: 100%; overflow: visible; }
.penguin .body { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 5s ease-in-out infinite alternate; }
.penguin .eyes { transform-box: fill-box; transform-origin: 50% 50%; animation: blink 6s infinite; }
.penguin .pupils { transition: transform .25s var(--ui); }
.penguin:focus-visible { outline-offset: 4px; }
.penguin.hop .body { animation: hop .7s var(--ease); }
.penguin .say { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 4px); padding: 5px 9px; border-radius: 999px; background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--glass-edge), 0 0 0 1px var(--rule-soft); font: 500 12px/1 var(--mono); color: var(--ink); opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ui), transform .3s var(--ui); white-space: nowrap; }
.penguin.hop .say { opacity: 1; transform: translate(-50%, 0); }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 18% { transform: translateY(0) scale(1.08, .9); } 45% { transform: translateY(-12px) scale(.95, 1.06); }
  75% { transform: translateY(0) scale(1.06, .94); } 100% { transform: translateY(0) scale(1, 1); } }
.js .greet .penguin { animation: pop .8s var(--ease) .75s both; }
/* on arrival: crouch, jump, backflip, land with a squash, then say hi */
.penguin svg { transform-box: view-box; transform-origin: 50% 62%; }
.js .greet .penguin svg { animation: backflip 1.15s cubic-bezier(.3, .1, .3, 1) 1.55s; }
.js .greet .penguin .say { animation: say-hi 1.9s ease 2.65s; }
@keyframes backflip {
  0%   { transform: translateY(0) rotate(0) scale(1, 1); }
  14%  { transform: translateY(2px) rotate(0) scale(1.14, .82); }
  30%  { transform: translateY(-22px) rotate(-60deg) scale(.94, 1.08); }
  52%  { transform: translateY(-30px) rotate(-200deg) scale(1, 1); }
  72%  { transform: translateY(-12px) rotate(-340deg) scale(1, 1); }
  84%  { transform: translateY(0) rotate(-360deg) scale(1.16, .8); }
  93%  { transform: translateY(-2px) rotate(-360deg) scale(.96, 1.05); }
  100% { transform: translateY(0) rotate(-360deg) scale(1, 1); } }
@keyframes say-hi { 0% { opacity: 0; transform: translate(-50%, 4px); } 12%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.6); } }
@media (prefers-reduced-motion: reduce) { .penguin .body, .penguin .eyes, .js .greet .penguin, .js .greet .penguin svg, .js .greet .penguin .say { animation: none; } .penguin.hop .body { animation: none; } }
