@font-face {
  font-family: "Sniglet";
  src: url("../fonts/sniglet-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-var.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ground: #f6efe2;
  --ink: #2b0e06;
  --muted: #6a4a3a;
  --orange: #c9631a;
  --rust: #a44213;
  --mauve: #b98a6a;
  --paper: #fffcf6;
  --line: #2b0e06;
  --display: "Sniglet", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--orange) var(--ground); caret-color: var(--rust); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--body);
}
::selection { background: var(--orange); color: var(--paper); }
a { color: var(--rust); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: 0.5rem 1rem; z-index: 10; }

main, .site-header { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.brand { font: 800 1.6rem/1 var(--display); color: var(--orange); text-decoration: none; }
.site-header nav { display: flex; gap: 1.5rem; }
.site-header nav a { font-weight: 700; text-decoration: none; color: var(--ink); }
.site-header nav a:hover { color: var(--rust); text-decoration: underline; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; text-wrap: balance; }
h2 { font-size: 1.9rem; color: var(--rust); }

/* The sheet: art left, identity right. */
.sheet {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: start;
  padding: 1rem 0 4.5rem;
}
.art {
  margin: 0;
  background-color: var(--paper);
  border: 3px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 14px 28px -14px rgba(43, 14, 6, 0.4);
}
.art img { display: block; width: 100%; height: auto; }
.art figcaption { padding: 0.65rem 1rem; border-top: 3px solid var(--line); background: var(--paper); font-weight: 700; font-size: 0.85rem; }

.id h1 { font-size: clamp(3.75rem, 11vw, 6rem); letter-spacing: -0.02em; color: var(--orange); }
.alias { margin: 0.5rem 0 1.5rem; font-size: 1.0625rem; color: var(--muted); }
.alias b { color: var(--ink); }

.swatches { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 1rem; }
.swatches li { display: grid; gap: 0.15rem; justify-items: start; animation: pop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i) * 70ms); }
.chip { width: 4.25rem; height: 4.25rem; border-radius: 50%; border: 3px solid var(--line); margin-bottom: 0.35rem; }
.sw-name { font-weight: 800; line-height: 1.2; }
.sw-hex { font: 0.85rem/1.2 ui-monospace, "DejaVu Sans Mono", monospace; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes pop { from { transform: scale(0.82) translateY(8px); } to { transform: none; } }

.facts { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.facts li { font-weight: 800; border: 3px solid var(--line); background: var(--paper); border-radius: 999px; padding: 0.15rem 0.95rem; }
.bio { max-width: 65ch; margin: -0.5rem 0 2rem; font-size: 1.0625rem; }

/* Projects as insets on the sheet. */
.insets, .links, .photos { padding-bottom: 4rem; }
.insets h2, .links h2, .photos h2 { display: flex; align-items: flex-end; margin-bottom: 1.5rem; }
.insets h2::after, .links h2::after, .photos h2::after { content: ""; flex: 1; border-bottom: 3px solid var(--line); }
.insets h2 span, .links h2 span, .photos h2 span {
  background: var(--paper); border: 3px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
  padding: 0.45rem 1.2rem 0.35rem; margin-bottom: -3px; position: relative; z-index: 1;
}
.inset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
}
.inset h3 { font-size: 2rem; }
.inset p { margin: 0.5rem 0 0; max-width: 65ch; }
.inset .meta { color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.inset-side { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-end; }
.tags li { font-weight: 700; font-size: 0.85rem; border: 2px solid var(--mauve); color: var(--muted); border-radius: 999px; padding: 0.05rem 0.7rem; }
.go {
  display: inline-block; font-weight: 800; text-decoration: none; color: var(--paper); background: var(--rust);
  padding: 0.55rem 1.1rem; border-radius: 6px; transition: background 0.2s;
}
.go:hover { background: var(--ink); color: var(--paper); }

.shots {
  display: grid; gap: 1.25rem; align-items: stretch;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
}
.shot { margin: 0; overflow: hidden; aspect-ratio: 16 / 9; }
.shot.tall { grid-row: span 2; aspect-ratio: auto; }
.shot.wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
.shot a { display: block; height: 100%; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.shot a:hover img { transform: scale(1.03); }

.links ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.links a {
  display: grid; padding: 0.8rem 1.25rem; min-width: 14rem; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px; transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.links a:hover { transform: translateY(-3px); }
.links a span { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.links a b { font-size: 1.0625rem; }

/* Contact page: the form is a sheet, Moz looks on from the side. */
.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: start;
  padding: 1rem 0 4rem;
}
.contact-aside { position: relative; padding-top: 5.5rem; }
.bubble {
  position: absolute; top: 0; left: 0; right: 15%; margin: 0;
  background: var(--paper); border: 3px solid var(--line); border-radius: 1.25rem;
  padding: 0.9rem 1.2rem; font: 800 1.3rem/1.15 var(--display); color: var(--rust);
  transform: rotate(-2deg);
  animation: pop 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.bubble::before, .bubble::after {
  content: ""; position: absolute; left: 2.6rem; clip-path: polygon(0 0, 100% 0, 0 100%);
}
.bubble::after { bottom: -1.5rem; width: 1.9rem; height: 1.5rem; background: var(--line); }
.bubble::before { bottom: -1.15rem; left: calc(2.6rem + 3px); width: 1.4rem; height: 1.2rem; background: var(--paper); z-index: 1; }
.portrait img { display: block; width: 100%; height: auto; }
.contact-main h1 { font-size: clamp(3.75rem, 11vw, 6rem); letter-spacing: -0.02em; color: var(--orange); }
.lede { margin: 0.75rem 0 2rem; font-size: 1.0625rem; max-width: 42ch; color: var(--muted); }
.lede a { font-weight: 800; overflow-wrap: anywhere; }
.contact {
  display: grid; gap: 1.25rem; padding: 1.75rem;
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px;
  box-shadow: 0 14px 28px -14px rgba(43, 14, 6, 0.4);
}
.contact .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.contact label { display: grid; gap: 0.35rem; font-weight: 800; }
.contact input, .contact textarea {
  font: inherit; font-weight: 400; padding: 0.7rem 0.85rem; color: var(--ink); width: 100%;
  background: var(--paper); border: 3px solid var(--line); border-radius: 6px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.contact textarea { resize: vertical; min-height: 9rem; }
.contact input:focus-visible, .contact textarea:focus-visible {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(201, 99, 26, 0.25);
}
.contact button {
  font: 800 1.1rem var(--display); padding: 0.85rem 1.8rem; border: 3px solid var(--line); border-radius: 6px;
  background: var(--rust); color: var(--paper); cursor: pointer; justify-self: start;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
}
.contact button:hover { background: var(--ink); transform: translateY(-2px); }
.contact button:active { transform: none; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 0.7rem 1rem; border-radius: 6px; border: 3px solid var(--line); font-weight: 700; margin: 0 0 1.25rem; }
.notice.ok { background: #e3f1e4; }
.notice.err { background: #fbe3dc; }

main { padding-bottom: 3rem; }

@media (max-width: 52rem) {
  .sheet { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sheet .art { max-width: 16rem; }
  .contact-page { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .contact-aside { max-width: 18rem; padding-top: 0; }
  .bubble { position: relative; right: auto; margin-bottom: 1.4rem; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot.tall { grid-row: auto; aspect-ratio: 4 / 5; }
  .shot.wide { aspect-ratio: 16 / 9; }
  .inset { grid-template-columns: minmax(0, 1fr); }
  .inset-side { align-items: flex-start; }
  .tags { justify-content: flex-start; }
}
@media (max-width: 30rem) {
  .site-header nav { gap: 1rem; }
  .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact .row { grid-template-columns: minmax(0, 1fr); }
  .contact { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .swatches li, .bubble { animation: none; }
  .shot img { transition: none; }
  .links a, .go, .contact button, .contact input, .contact textarea { transition: none; }
}
