:root { --night: #07090c; --ember: #ff9a3c; --flame: #ffcf7a; --flesh: #f3c98b; --ink: #f6e7cf; --muted: #c9a982; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); overflow: hidden; overscroll-behavior: none; }
body { color: var(--ink); font: 400 16px/1.55 Karla, system-ui, sans-serif; -webkit-font-smoothing: antialiased; touch-action: none; }
#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; outline: none; cursor: grab; touch-action: none; }
#gl.point { cursor: pointer; }
#gl.drag { cursor: grabbing; }

/* the project list, for keyboards and screen readers only */
#steps { position: fixed; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#steps button:focus { position: fixed; left: 12px; bottom: 12px; width: auto; height: auto; clip-path: none; padding: 6px 10px; background: #120c07; color: var(--flame); border: 1px solid #6b3d16; font: 500 14px Karla, sans-serif; z-index: 30; }
#steps:focus-within { width: auto; height: auto; overflow: visible; clip-path: none; }

/* sound */
#snd { position: fixed; z-index: 6; top: max(10px, env(safe-area-inset-top)); right: max(10px, env(safe-area-inset-right)); width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 50%; background: rgba(8, 7, 6, .38); color: #e7c79c; cursor: pointer; opacity: .62; transition: opacity .3s; }
#snd:hover, #snd:focus-visible { opacity: 1; }
#snd:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
#snd svg { width: 24px; height: 24px; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#snd .spk { fill: currentColor; stroke: none; }
#snd .x { display: none; }
#snd[aria-pressed="false"] .w1, #snd[aria-pressed="false"] .w2 { display: none; }
#snd[aria-pressed="false"] .x { display: inline; }

/* loading: the porch light comes on */
#loader { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: #050608; transition: opacity .7s ease; cursor: pointer; }
#loader.gone { opacity: 0; pointer-events: none; }
#loader .sconce { width: min(26vw, 120px); height: auto; overflow: visible; }
#loader .glass { fill: #2a1d10; transition: fill .25s; }
#loader .fil { fill: #ff7a2a; opacity: .15; transition: opacity .25s; }
#loader .halo { opacity: 0; transition: opacity .25s; }

/* the case study: the lid comes off and the work is inside */
#case { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
#case::backdrop { background: transparent; }
#case[open] { display: flex; align-items: flex-end; justify-content: center; }
#case .sheet { position: relative; width: min(980px, 100%); height: min(92vh, 100%); height: min(92dvh, 100%); margin: 0 auto; display: flex; flex-direction: column;
  background: radial-gradient(120% 60% at 50% 0%, rgba(78, 34, 8, .55), rgba(20, 11, 6, 0) 70%), rgba(13, 9, 7, .94);
  border-radius: 18px 18px 0 0; box-shadow: 0 -10px 60px rgba(255, 128, 30, .18), inset 0 1px 0 rgba(255, 190, 110, .22);
  transform: translateY(0); opacity: 1; transition: transform .55s cubic-bezier(.2, .8, .2, 1), opacity .35s ease; }
#case.in .sheet { transform: translateY(0); opacity: 1; }
#case.pre .sheet { transform: translateY(60px); opacity: 0; }
#case .scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 34px clamp(16px, 5vw, 56px) 64px; touch-action: pan-y; }
#case .lid { position: absolute; z-index: 2; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 170, 80, .1); color: var(--flame); cursor: pointer; display: grid; place-items: center; }
#case .lid svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#case .lid:hover { background: rgba(255, 170, 80, .2); }
#case .lid:focus-visible { outline: 2px solid var(--flame); outline-offset: 2px; }
.case-head { margin: 0 52px 22px 0; }
.case-client { margin: 0 0 4px; font: 600 12px/1.3 Karla, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--ember); }
.case-title { margin: 0; font: 600 clamp(28px, 4.4vw, 46px)/1.05 Fraunces, Georgia, serif; color: #ffe2b4; text-shadow: 0 0 24px rgba(255, 140, 40, .35); }
#work { --ab-fg: var(--ink); --ab-muted: var(--muted); --ab-accent: var(--flame); --ab-chrome: 140px; }
#work .ab-lede { font-size: 1.08em; color: #f2dcbc; max-width: 62ch; }
#work .ab-text { max-width: 64ch; color: #e6cfae; }
#work .ab-heading { font: 600 1.15em/1.2 Fraunces, Georgia, serif; color: #ffd59a; }
#work .ab-credits { color: #b8946c; }
#work .ab-frame { border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 170, 80, .14), 0 10px 40px rgba(0, 0, 0, .5); }
#work .ab-image img { border-radius: 4px; }
#work audio { filter: sepia(.4) saturate(1.3) hue-rotate(-10deg); }
#work a { color: var(--flame); }

/* about: the front door */
#work.about { display: grid; gap: 18px; max-width: 64ch; }
.about-title { margin: 0; font: 600 1.2em/1.3 Fraunces, Georgia, serif; color: #ffd59a; }
.about-bio { margin: 0; color: #f0dbbd; }
.about-jobs { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: #e0c7a3; }
.about-jobs b { color: #ffe2b4; font-weight: 600; }
.about-contact { margin: 0; color: #e0c7a3; }
.about-contact a { color: var(--flame); }

@media (max-width: 700px) {
  #case .sheet { width: 100%; height: 100%; border-radius: 0; }
  #case .scroll { padding: 64px 16px 48px; }
  .case-head { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #case .sheet, #loader { transition: none; }
}
