:root {
  --paper: #f6f1e9;
  --paper-deep: #f0e9de;
  --ink: #2b2620;
  --ink-soft: #6b6258;
  --accent: #c8553d;
  --sand: #f2cc8f;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--paper-deep); }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 50% 0;
  background: #000;
  z-index: -1;
}

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
figure { margin: 0; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--sand); color: var(--ink); }

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.section-title.centered { text-align: center; }

@media (min-width: 640px) {
  .section-title { font-size: 2.25rem; }
}

.credit {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.6);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}
.credit a { color: var(--sand); text-decoration: none; }
.credit a:hover { text-decoration: underline; }

.artwork:hover .credit, .artwork:focus-within .credit,
.avatar:hover .credit, .avatar:focus-within .credit,
.refsheet:hover .credit, .refsheet:focus-within .credit {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .credit { opacity: 1; transform: none; }
}

.links-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #000;
  color: #fff;
  overflow: hidden;
}

.links-layout {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 1.5rem;
  align-items: start;
}
.contacts-panel { grid-column: 1 / -1; order: -1; }
.art-column { display: flex; flex-direction: column; gap: 1.5rem; }
.art-column--right { margin-top: 4rem; }

@media (min-width: 1024px) {
  .links-layout {
    grid-template-columns: 1fr minmax(0, 26rem) 1fr;
    gap: 2.5rem;
    align-items: center;
  }
  .contacts-panel { grid-column: auto; order: 0; }
  .art-column--left  { transform: translateY(4rem); }
  .art-column--right { margin-top: 0; transform: translateY(-2rem); }

  .artwork--narrow      { width: 80%; align-self: flex-end; }
  .artwork--small       { width: 60%; }
  .artwork--nudge-left  { transform: translateX(-1rem); }
  .artwork--nudge-right { transform: translateX(1rem); }
}

.links-intro {
  margin: 0.75rem 0 0;
  text-align: center;
  color: rgb(255 255 255 / 0.5);
}

.contacts {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.contact {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border: 1px solid rgb(255 255 255 / 0.1);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.03);
  color: inherit;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.contact:hover {
  background: rgb(255 255 255 / 0.07);
  border-color: rgb(242 204 143 / 0.6);
}

.contact-logo { width: 1.75rem; height: 1.75rem; flex-shrink: 0; display: block; }
.logo-tile { border-radius: 0.375rem; }
span.logo-tile { display: grid; place-items: center; }
span.logo-tile svg { width: 1.25rem; height: 1.25rem; }
.pixelated { object-fit: contain; image-rendering: pixelated; }

.contact-text { flex: 1; }
.contact-name { display: block; font-weight: 500; }
.contact-sub  { display: block; font-size: 0.875rem; color: rgb(255 255 255 / 0.5); }

.contact-arrow { color: var(--sand); transition: transform 0.2s; }
.contact:hover .contact-arrow { transform: translateX(0.25rem); }

.artwork img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 25px 50px -12px #000;
}

.about-section,
.ref-section { background: var(--paper-deep); }

.about-section .credit,
.ref-section .credit { color: var(--ink-soft); }
.about-section .credit a,
.ref-section .credit a { color: var(--accent); }

.about-layout {
  max-width: 64rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  display: grid;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 768px) {
  .about-layout { grid-template-columns: 220px 1fr; }
}

.avatar { width: 12rem; margin: 0 auto; }
@media (min-width: 768px) {
  .avatar { margin: 0; }
}
.avatar img {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 8px var(--paper), 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.avatar .credit { margin-top: 0.75rem; text-align: center; }

.bio {
  max-width: 42rem;
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--ink-soft);
}
.bio p { margin: 0 0 1rem; }
.bio strong { color: var(--ink); font-weight: 500; }

.tags {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.tags li {
  padding: 0.375rem 1rem;
  border: 1px solid rgb(43 38 32 / 0.1);
  border-radius: 999px;
  background: var(--paper);
}

.ref-layout {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem 6rem;
}

.refsheet { margin-top: 2rem; }

.refsheet-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(43 38 32 / 0.1), 0 10px 15px -3px rgb(0 0 0 / 0.1);
}
.refsheet-frame img { width: 100%; }

.refsheet-caption {
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.refsheet-caption .credit { margin-top: 0; }
.refsheet-caption > a { color: inherit; text-decoration: none; }
.refsheet-caption > a:hover { color: var(--accent); }

.ref-gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.3);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity 0.3s;
}
.refsheet:hover .ref-gate,
.refsheet:focus-within .ref-gate { opacity: 1; }
.refsheet[data-unlocked] .ref-gate { display: none; }

@media (hover: none) {
  .ref-gate {
    opacity: 1;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    place-items: end center;
    padding-bottom: 1rem;
  }
}

.pill-button {
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.8);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2);
  transition: background 0.2s;
}
.pill-button:hover { background: var(--accent); }

.ref-arrow,
.ref-label { display: none; position: absolute; color: #fff; background: rgb(0 0 0 / 0.6); }

.ref-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  font-size: 1.25rem;
  transition: background 0.2s;
}
.ref-arrow:hover { background: var(--accent); }
.ref-arrow--prev { left: 0.75rem; }
.ref-arrow--next { right: 0.75rem; }

.ref-label {
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.refsheet[data-unlocked] .ref-arrow { display: grid; }
.refsheet[data-unlocked] .ref-label { display: block; }
