:root {
  color-scheme: light;
  --paper: #f8f6f1;
  --ink: #221f1d;
  --red: #d42b00;
  --secondary: #655e57;
  --edge: clamp(20px, 3.7vw, 64px);
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
[hidden] { display: none !important; }
.site-header {
  display: flex; justify-content: center; align-items: center; height: calc(clamp(74px, 11svh, 104px) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  position: relative; z-index: 3;
}
.site-header nav { display: inline-flex; align-items: center; gap: 15px; }
.site-header a {
  display: grid; position: relative; place-items: center; color: #5a544f;
  font-size: 14px; font-weight: 500; letter-spacing: -.015em; min-height: 48px; min-width: 48px; padding: 0 5px;
  transition: color .2s; -webkit-tap-highlight-color: transparent;
}
.site-header a[aria-current="page"] { color: var(--red); }
.site-header a:hover { color: var(--red); }
.divider { height: 12px; width: 1px; background: #b1aaa2; }
:root.home-document {
  --home-surround:#100a0e;
  --home-accent:#ff7399;
  min-height:100%;
  color-scheme:dark;
  background-color:var(--home-surround);
  background-image:
    linear-gradient(to right, var(--home-surround), transparent 14%, transparent 86%, var(--home-surround)),
    linear-gradient(to bottom, var(--home-surround), transparent 13%, transparent 87%, var(--home-surround)),
    radial-gradient(ellipse at 26% 22%, #441756 0%, transparent 55%),
    radial-gradient(ellipse at 76% 76%, #521632 0%, transparent 57%),
    radial-gradient(ellipse at 51% 55%, #25112e 0%, transparent 69%);
  background-repeat:no-repeat;
  overscroll-behavior:none;
}
.home {
  position:relative;
  height:100vh;
  height:100dvh;
  min-height:270px;
  overflow:hidden;
  color:#fceee6;
  background:transparent;
}
.home .site-header a { color:#dfb9d1; }
.home .site-header a[aria-current="page"], .home .site-header a:hover { color:#fceee6; }
.home .site-header a[aria-current="page"]::after {
  content:'';
  position:absolute;
  width:16px;
  height:1px;
  left:calc(50% - 8px);
  bottom:7px;
  background:var(--home-accent);
}
.home .divider { background:#986b87; }
.home a:focus-visible, .home button:focus-visible { outline-color:var(--home-accent); }
.studio {
  position:absolute;
  inset:0;
  isolation:isolate;
  overflow:hidden;
  touch-action:pinch-zoom;
  user-select:none;
  -webkit-user-select:none;
}
.studio:focus-visible { outline:1px solid #a4749d; outline-offset:-8px; }
.studio.is-dragging { cursor:grabbing; }
@media (hover:hover) { .studio:not(.is-dragging) { cursor:grab; } }
.artwork, .artwork canvas, .artwork .still { position:absolute; inset:0; width:100%; height:100%; }
.artwork {
  pointer-events:none;
  mask-image:
    linear-gradient(to right, transparent, #000 7%, #000 93%, transparent),
    linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  mask-composite:intersect;
}
.artwork .still { object-fit:contain; }
.artwork canvas { visibility:hidden; }
.artwork.active canvas { visibility:visible; }
.artwork.active .still { visibility:hidden; }
.signature {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:clamp(44px, 6.3vw, 89px);
  margin:0;
  pointer-events:none;
}
.signature img {
  width:100%;
  display:block;
  filter:brightness(0) invert(.96) sepia(.19) drop-shadow(0 0 16px #ff749a66);
}
.drawing-controls {
  position:absolute;
  z-index:2;
  inset:auto max(var(--edge), env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
  height:48px;
  display:flex;
  justify-content:center;
  align-items:center;
  pointer-events:none;
}
.hint {
  color:#dfbdd1;
  font-family:'IBM Plex Mono',ui-monospace,'SFMono-Regular',Consolas,monospace;
  font-size:11px;
  letter-spacing:.02em;
}
.motion-control {
  position:absolute;
  right:0;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
  padding:0;
  color:#eed2e4;
  background:#200d20a6;
  border:1px solid #986b87;
  border-radius:50%;
  cursor:pointer;
  pointer-events:auto;
  touch-action:manipulation;
}
.motion-control:hover { color:#fff1f7; border-color:var(--home-accent); }
.pause { width:7px; height:10px; border-left:2px solid currentColor; border-right:2px solid currentColor; }
.play { display:none; width:0; height:0; border-left:7px solid currentColor; border-top:5px solid transparent; border-bottom:5px solid transparent; margin-left:2px; }
.motion-control.paused .pause { display:none; }
.motion-control.paused .play { display:block; }
.projects { min-height:100svh; }
.project-index {
  width:min(100%, 730px);
  margin:clamp(18px, 5.6svh, 56px) auto 0;
  padding:0 max(var(--edge), env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(var(--edge), env(safe-area-inset-left));
}
.project-list { list-style:none; padding:0; margin:0; }
.project-list li { border-bottom:1px solid #ddd7ce; }
.project-list li:first-child { border-top:1px solid #ddd7ce; }
.project {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:clamp(63px, 8.6svh, 82px);
  padding:12px 1px;
  touch-action:manipulation;
}
.project-name {
  font-size:clamp(20px, 3vw, 25px);
  font-weight:600;
  line-height:1.2;
  letter-spacing:-.035em;
}
.visit {
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:var(--secondary);
  font-size:13px;
  line-height:1.4;
  white-space:nowrap;
}
.outbound-arrow { position:relative; color:var(--red); width:9px; height:9px; }
.outbound-arrow::before { content:''; position:absolute; top:0; right:0; width:6px; height:6px; border-top:1px solid; border-right:1px solid; }
.outbound-arrow::after { content:''; position:absolute; top:4px; left:0; height:1px; width:11px; background:currentColor; transform:rotate(-45deg); }
.project:focus-visible { outline-offset:2px; }
.project:focus-visible .visit { color:var(--red); }
@media (hover:hover) {
  .project:hover .visit { color:var(--red); }
}
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media (max-width:660px) and (orientation:portrait) {
  .signature { width:clamp(40px, 12.5vw, 68px); }
  .drawing-controls { justify-content:flex-start; }
}
@media (max-height:500px) and (orientation:landscape) {
  .site-header { height:calc(50px + env(safe-area-inset-top)); }
  .drawing-controls { bottom:max(5px, env(safe-area-inset-bottom)); }
  .signature { width:10svh; }
  .project-index { margin-top:12px; }
}
@media(prefers-reduced-motion:reduce) { *, *::before, *::after { transition:none !important; } }
