/* whois.danii.io — flat, monochrome, dithered UI chrome.
   Dithering is decorative only: fills, dividers, widget chrome, heading text.
   Media (pfp, video, stream) is always shown clean. */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --border: 2px solid var(--fg);
  /* 4x4 Bayer-style dither tile (50% coverage), crisp at 4px */
  --dither-checker: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="white"/><rect x="0" y="0" width="1" height="1" fill="black"/><rect x="2" y="2" width="1" height="1" fill="black"/><rect x="2" y="0" width="1" height="1" fill="black"/><rect x="0" y="2" width="1" height="1" fill="black"/></svg>');
  /* sparser tile (25% coverage) for large fills */
  --dither-sparse: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><rect width="8" height="8" fill="white"/><rect x="0" y="0" width="2" height="2" fill="black"/><rect x="4" y="4" width="2" height="2" fill="black"/></svg>');
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "Cascadia Mono",
               Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.55;
}

main {
  max-width: 840px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

/* ---------- dither helpers ---------- */

.dither-fill {
  background-image: var(--dither-checker);
  background-size: 4px 4px;
  image-rendering: pixelated;
}

.rule {
  height: 10px;
  border: var(--border);
  margin: 40px 0;
}

/* ---------- top nav ---------- */

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: var(--border);
  padding: 6px 12px;
  color: var(--fg);
  background: var(--bg);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.top-nav a:hover {
  background: var(--fg);
  color: var(--bg);
}

.top-nav .nav-contact {
  margin-left: auto;
  background: var(--fg);
  color: var(--bg);
}

.top-nav .nav-contact:hover {
  background: var(--bg);
  color: var(--fg);
}

.mail-icon { display: block; }

/* ---------- profile ---------- */

.profile {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.pfp-frame {
  border: var(--border);
  padding: 6px;
  background-image: var(--dither-sparse);
  background-size: 8px 8px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.pfp {
  display: block;
  width: 160px;
  height: 160px;
  object-fit: cover;
  border: var(--border);
  background: var(--bg);
  image-rendering: auto; /* media stays clean */
}

.profile-text { min-width: 240px; }

.name {
  margin: 0 0 10px;
  font-size: clamp(3rem, 9vw, 4.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
}

/* dithered text fill on the big heading */
.dither-text {
  background-color: var(--fg);
  background-image: var(--dither-sparse);
  background-size: 6px 6px;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px var(--fg);
}

.titles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.titles li {
  border: var(--border);
  padding: 4px 10px;
  width: fit-content;
  text-transform: lowercase;
  font-size: 0.9rem;
}

/* ---------- sections ---------- */

.section-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin: 0 0 18px;
  padding: 4px 10px;
  border: var(--border);
  width: fit-content;
  background: var(--fg);
  color: var(--bg);
}

.description {
  margin: 0 0 18px;
  max-width: 64ch;
}

.focus-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.focus-tags li {
  border: var(--border);
  padding: 14px 22px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  position: relative;
  isolation: isolate;
}

/* dither sits behind the text (negative z-index) so the larger type
   stays crisp against the same 8px dither scale */
.focus-tags li::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--dither-sparse);
  background-size: 8px 8px;
  image-rendering: pixelated;
  opacity: 0.35;
  pointer-events: none;
}

/* ---------- showcase ---------- */

.showcase { text-align: center; }
.showcase .section-label { margin-left: auto; margin-right: auto; }

.video-frame {
  border: var(--border);
  padding: 8px;
  background-image: var(--dither-checker);
  background-size: 4px 4px;
  image-rendering: pixelated;
  display: inline-block;
  max-width: 100%;
}

.video-frame video {
  display: block;
  width: 100%;
  max-width: 760px;
  border: var(--border);
  background: var(--fg);
  image-rendering: auto; /* media stays clean */
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-pad {
  flex: 1;
  height: 8px;
  border: 1px solid var(--fg);
}

/* ---------- now playing widget ---------- */

.now-playing {
  position: fixed;
  bottom: 16px;
  left: 16px;
  width: min(320px, calc(100vw - 32px));
  border: var(--border);
  background: var(--bg);
  z-index: 40;
}

.np-chrome {
  height: 8px;
  border-bottom: var(--border);
}

.np-body {
  display: flex;
  gap: 10px;
  padding: 10px;
  align-items: center;
}

.np-art {
  width: 48px;
  height: 48px;
  border: var(--border);
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(1) contrast(1.1); /* desaturated to fit the palette */
}

.np-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.np-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.np-track {
  color: var(--fg);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-track:hover { text-decoration: underline; }

.np-artist {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-progress {
  margin-top: 5px;
  height: 6px;
  border: 1px solid var(--fg);
  background: var(--bg);
}

.np-progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--fg);
  background-image: var(--dither-checker);
  background-size: 4px 4px;
  image-rendering: pixelated;
}

/* ---------- go-live popup ---------- */

/* author display:flex would otherwise override the UA [hidden] rule,
   leaving the popup visible while the publisher is offline */
.live-popup[hidden] { display: none; }

.live-popup {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 40;
}

.live-popup:hover {
  background: var(--fg);
  color: var(--bg);
}

.live-dot {
  width: 10px;
  height: 10px;
  background: var(--fg);
  animation: blink 1.2s steps(2, start) infinite;
}

.live-popup:hover .live-dot { background: var(--bg); }

@keyframes blink {
  to { visibility: hidden; }
}

/* ---------- stream overlay ---------- */

.stream-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--fg);
  background-image: var(--dither-checker);
  background-size: 4px 4px;
  image-rendering: pixelated;
  display: flex;
  flex-direction: column;
}

.stream-overlay[hidden] { display: none; }

.stream-close {
  align-self: flex-end;
  margin: 10px;
  padding: 8px 14px;
  border: 2px solid var(--bg);
  background: var(--fg);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.stream-close:hover {
  background: var(--bg);
  color: var(--fg);
}

.stream-overlay iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: #000;
}

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  .profile { justify-content: center; text-align: center; }
  .titles li { margin: 0 auto; }
  .now-playing { bottom: 76px; } /* keep clear of the live popup */
}
