/* Darkroom (templates/designs/darkroom.html): her on a line, the name, the socials as icons and
   the projects in a list. Calm and near black, with Ficelle's warm red.
   Phone first, the computer layout starts at 700px like synaOS. */

/* Darkroom uses the Ficelle palette and its type (synaelle-styles, ficelle/), only on its page */
.darkroom {
  --dr-bg: #0e0d0d;
  --dr-surface: #161414;
  --dr-surface-2: #1f1c1b;
  --dr-border: #2e2a28;
  --dr-border-strong: #423b38;
  --dr-text: #e6dfd8;
  --dr-muted: #9a918a;
  --dr-accent: #e44c3e;
  --dr-font: "Hanken Grotesk", "Ubuntu", sans-serif;
  --dr-font-label: "Ubuntu", sans-serif;
  --dr-ease-out: cubic-bezier(.2, .7, .2, 1);
  /* a little overshoot, for the head tilt of the socials */
  --dr-ease-pop: cubic-bezier(.3, 1.6, .5, 1);
}

.darkroom {
  background: var(--dr-bg);
  color: var(--dr-text);
  font: 16px/1.5 var(--dr-font);
}
.darkroom :focus-visible { outline: 2px solid var(--dr-accent); outline-offset: 1px; }
/* the hidden "copied" announcement must not make the page scroll */
.darkroom #live { top: 0; margin: 0; }

.dr {
  width: min(1120px, 100% - 32px);
  margin: 0 auto;
  padding-bottom: 32px;
}

/* ---- her, the name, the socials ---- */
.dr-head {
  display: grid; justify-items: center;
  padding: 24px 0 16px;
  text-align: center;
}
/* she is cut flat at the bottom, the line is what she sits on */
.dr-head .logo {
  display: flex; justify-content: center;
  width: 230px; margin: 0;
  border-bottom: 1px solid var(--dr-border-strong);
}
.dr-head .pet { width: 140px; }
.dr-head .pet img { display: block; width: 100%; height: auto; }
.dr-head .pet:focus-visible { outline-color: var(--dr-accent); }
.dr-head h1 {
  margin: 12px 0 0;
  font-size: 44px; line-height: 1.05; font-weight: 700; letter-spacing: -.01em;
  overflow-wrap: anywhere;
}

.dr-socials {
  display: flex; flex-wrap: wrap; justify-content: center;
  margin-top: 12px; padding-bottom: 24px;
}
.soc {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 52px; padding: 0;
  border: 0; border-radius: 2px; background: none;
  color: inherit; text-decoration: none; cursor: pointer;
  transition: color 140ms var(--dr-ease-out);
}
.soc svg {
  width: 28px; height: 28px;
  transition: transform 260ms var(--dr-ease-pop);
}
/* a little head tilt, like a cat that heard its name */
.soc:hover, .soc:focus-visible { color: var(--dr-accent); }
.soc:hover svg, .soc:focus-visible svg { transform: rotate(-12deg) scale(1.15); }
.soc:active svg { transform: rotate(-12deg) scale(.92); transition-duration: 90ms; }
/* the name under the icon, or "click to copy" then "copied!" (clipboard.js) */
.tip {
  position: absolute; top: calc(100% + 2px); left: 50%;
  translate: -50% -3px;
  font: 500 12px/1.2 var(--dr-font-label); color: var(--dr-muted); white-space: nowrap;
  pointer-events: none; opacity: 0;
  transition: opacity 140ms var(--dr-ease-out), translate 220ms var(--dr-ease-out);
}
.soc:hover .tip, .soc:focus-visible .tip, .soc.is-copied .tip { opacity: 1; translate: -50% 0; }

/* ---- projects ---- */
.dr-projects h2 {
  margin: 0 0 8px; padding: 0 10px;
  font-size: 13px; font-weight: 400; color: var(--dr-muted);
}
.dr-projects ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
/* the project, then its code button when it has a code link */
.dr-projects li { display: flex; align-items: flex-start; gap: 2px; }
.dr-project {
  flex: 1; min-width: 0;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 8px 10px; border-radius: 2px;
  color: inherit; text-decoration: none;
  transition: background-color 140ms var(--dr-ease-out);
}
a.dr-project:hover { background: var(--dr-surface); }
.dr-icon {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 36px; height: 36px; margin-top: 2px;
  border: 1px solid var(--dr-border); border-radius: 9px;
  background: var(--dr-surface-2); color: var(--dr-accent);
}
.dr-icon svg { width: 20px; height: 20px; }
/* a project's own icon image, shown whole: a wide logo is never cut to fill the square */
img.dr-icon { object-fit: contain; border: 0; background: none; }
.dr-text { min-width: 0; }
.dr-name { display: block; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dr-blurb { display: block; font-size: 14px; line-height: 1.45; color: var(--dr-muted); }
.dr-source {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 40px; height: 40px; margin-top: 8px; border-radius: 2px;
  color: var(--dr-muted);
  transition: color 140ms var(--dr-ease-out), background-color 140ms var(--dr-ease-out);
}
.dr-source svg { width: 20px; height: 20px; transition: transform 160ms var(--dr-ease-out); }
.dr-source:hover, .dr-source:focus-visible { color: var(--dr-accent); background: var(--dr-surface); }
.dr-source:hover svg { transform: rotate(-12deg) scale(1.1); }

/* ---- the art credit ---- */
.dr-foot { display: flex; justify-content: center; margin-top: 32px; font-size: 13px; }
.dr-foot a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--dr-muted); text-decoration: none;
}
.dr-foot svg { width: 12px; height: 12px; }
.dr-foot a:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* ---- a computer: bigger, centred in the window, the projects in a narrow column ---- */
@media (min-width: 700px) {
  .dr {
    display: flex; flex-direction: column; justify-content: center;
    min-height: 100vh;
  }
  .dr-head { padding-top: 40px; }
  .dr-head .logo { width: 300px; }
  .dr-head .pet { width: 180px; }
  .dr-head h1 { font-size: 60px; }
  .dr-socials { gap: 6px; }
  .soc { width: 52px; height: 56px; }
  .soc svg { width: 32px; height: 32px; }
  .tip { font-size: 13px; }
  .dr-projects { width: 100%; max-width: 520px; margin: 0 auto; }
}
