:root {
  --bg: #f5f5f0;
  /* fg/muted/accent are deepened/saturated versions of the bg-blob palette
     (#FA8FAD/#D6D6D6/#FFF8E7/#99D9EA/#CCCCFF) — not arbitrary neutrals —
     so the text reads as part of the same color family as the background,
     not a generic UI stapled on top of it. */
  --fg: #2e2438;
  --muted: #8a7a94;
  --accent: #d1548e;
  --border: #ccc;
  --mono: "SF Mono", "JetBrains Mono", Consolas, monospace;
  --font-body: "Inter", "Frex Sans GB", var(--mono);
  --font-heading: "Inter", "Frex Sans GB", var(--mono);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d10;
    --fg: #eee;
    --muted: #999;
    --accent: #b794f6;
    --border: #333;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 2rem 1rem 4rem;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  max-width: 42rem;
  margin-inline: auto;
  position: relative;
}

/* Felipe Pantone-style color-blob background: canvas-driven in
   /shared/bg-blob.js (mouse-reactive, drifting, multiply-blended), this
   is just the layer's positioning. */
.bg-blob { position: fixed; inset: 0; z-index: -2; display: block; }

a { color: var(--accent); }
a:hover { text-decoration: none; }

/* Frosted-glass panels so text sits ON the blurred background color instead
   of floating disconnected above it. Light mode only — dark mode has no
   color-blob background behind it, so the panels fall back to plain flat
   sections (see the dark-mode override below). */
nav, main, footer {
  background: linear-gradient(135deg, rgba(255, 225, 237, 0.4), rgba(204, 204, 255, 0.32));
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 235, 245, 0.55);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(180, 70, 140, 0.1);
}

nav {
  display: flex;
  gap: 1.2rem;
  font-size: 0.95rem;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
}

main { padding: 1.75rem 1.5rem; }

nav a { text-decoration: none; }
nav a:hover { text-decoration: underline; }
nav .lang-switch { margin-left: auto; }

h1, h2, h3 { font-family: var(--font-heading); line-height: 1.25; }

.bg-canvas { position: fixed; inset: 0; z-index: -1; display: block; }

/* icon + bold title + description, giving the bio actual visual hierarchy
   instead of a wall of same-weight paragraphs — no per-item background box,
   just spacing and type weight, so it doesn't read as cards nested inside
   the main frosted-glass card */
.interests {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0;
}

.interest-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.interest-icon {
  font-size: 1.3rem;
  line-height: 1.3;
  flex-shrink: 0;
}

.interest-item h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}

.interest-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.widgets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 1.5rem;
  margin: 1.5rem 0 0.75rem;
}

.widget { min-width: 0; }

.widget .row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.widget img {
  flex-shrink: 0;
  border-radius: 4px;
}

.widget .row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Status is a small glowing terminal-style button by default; clicking it
   opens the full "server status" panel as a centered popup. Always a dark
   TTY box regardless of the page's own light/dark theme — it's meant to
   look like a real terminal, not a themed UI element. */
.status-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  background: #060a06;
  color: #cfe8d4;
  font-family: "Web437 IBM VGA 8x16", var(--mono);
  font-size: 16px;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  margin: 0.5rem 0 1.5rem;
  cursor: pointer;
}

.status-trigger:hover { filter: brightness(1.25); }

.status-dots {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}

.status-dots .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
  background: #4dff7f;
  box-shadow: 0 0 4px #4dff7f, 0 0 8px rgba(77, 255, 127, 0.6);
}

.status-dots .status-dot.fail {
  background: #ff5c5c;
  box-shadow: 0 0 4px #ff5c5c, 0 0 8px rgba(255, 92, 92, 0.6);
}

.status-modal-backdrop {
  position: fixed;
  inset: 0;
  /* no color tint — just a plain black wash to dim the blur, letting the
     blurred background blobs behind it keep their own pink/purple hue */
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
}

@media (prefers-color-scheme: dark) {
  .status-modal-backdrop { background: rgba(0, 0, 0, 0.5); }
}

/* `display: flex` above overrides the browser's default [hidden]{display:none}
   behavior (author styles beat the UA stylesheet at equal specificity) — this
   restores it explicitly so the `hidden` attribute actually hides the modal. */
.status-modal-backdrop[hidden] { display: none; }

.status-modal {
  position: relative;
  background: #060a06;
  color: #cfe8d4;
  /* the actual Linux console font, not a lookalike — see fonts.css. sized to
     its native 16px grid since it's a pixel bitmap, not an outline font. */
  font-family: "Web437 IBM VGA 8x16", var(--mono);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  width: 100%;
  max-width: 30rem;
  max-height: 80vh;
  overflow: auto;
}

.status-modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  color: #cfe8d4;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.status-modal-close:hover { color: #4dff7f; }

.status-header { margin: 0 0 0.75rem; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 1.5rem;
  margin: 0;
}

.status-grid p { margin: 0; white-space: nowrap; }

.status-modal .ok {
  color: #4dff7f;
  text-shadow: 0 0 5px #4dff7f, 0 0 10px rgba(77, 255, 127, 0.6);
}

.status-modal .fail {
  color: #ff5c5c;
  text-shadow: 0 0 5px #ff5c5c, 0 0 10px rgba(255, 92, 92, 0.6);
}

/* original pixel-bunny cursor companion (see shared/companion.js) */
.pixel-companion {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  image-rendering: pixelated;
}

.identity {
  margin: 1.5rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.identity-item {
  display: flex;
  align-items: center;
  gap: 2px;
}

.flag-chip {
  display: inline-block;
  width: 22px;
  height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* diagonal-split combo badge (community convention for compound identities) */
.flag-combo {
  position: relative;
  overflow: hidden;
}

.flag-combo .half {
  position: absolute;
  inset: 0;
}

.flag-combo .half-a {
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.flag-combo .half-b {
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.flag-transfeminine {
  background: linear-gradient(to bottom,
    #75DFFF 0 14.3%, #FFE2ED 14.3% 28.6%, #FFB7D7 28.6% 42.9%, #FE8DC0 42.9% 57.1%,
    #FFB7D7 57.1% 71.4%, #FFE2ED 71.4% 85.7%, #75DFFF 85.7% 100%);
}

.flag-nonbinary {
  background: linear-gradient(to bottom,
    #FCF434 0 25%, #FFFFFF 25% 50%, #9C59D1 50% 75%, #2C2C2C 75% 100%);
}

.flag-finsexual {
  background: linear-gradient(to bottom,
    #B08EDF 0 20%, #D8B3E3 20% 40%, #F7CEEA 40% 60%, #F3A0CF 60% 80%, #EB7CB5 80% 100%);
}

.flag-sapphic {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Crect width='22' height='4.5' y='0' fill='%23FD8CA9'/%3E%3Crect width='22' height='5' y='4.5' fill='%23FBF2FF'/%3E%3Crect width='22' height='4.5' y='9.5' fill='%23FD8CA9'/%3E%3Cg transform='translate(11,7)'%3E%3Ccircle cx='0' cy='-2' r='1.6' fill='%23C86BC6'/%3E%3Ccircle cx='1.9' cy='-0.6' r='1.6' fill='%23C86BC6'/%3E%3Ccircle cx='1.2' cy='1.6' r='1.6' fill='%23C86BC6'/%3E%3Ccircle cx='-1.2' cy='1.6' r='1.6' fill='%23C86BC6'/%3E%3Ccircle cx='-1.9' cy='-0.6' r='1.6' fill='%23C86BC6'/%3E%3Ccircle cx='0' cy='0' r='1' fill='%23F0D7F2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

.flag-ambiamorous {
  background: linear-gradient(to bottom, #4848C2, #1a1a2e 45%, #000 50%, #3a1414 55%, #C14A4A);
}

footer {
  margin-top: 1.5rem;
  padding: 1rem;
}

@media (prefers-color-scheme: dark) {
  nav, main, footer {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  nav { padding: 0; margin-bottom: 2.5rem; }
  main { padding: 0; }
  footer { padding: 0; padding-top: 1.5rem; border-top: 1px solid var(--border); margin-top: 3rem; }
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  /* match footer's own padding so "Badages!" sits the same distance from
     the badge row as it does from the card border above/beside it */
  margin-top: 1rem;
}

.buttons img {
  display: block;
  width: 88px;
  height: 31px;
  box-sizing: border-box;
  /* the source gifs are inconsistent — some ship their own white border,
     some none — this unifies them into one consistent tile edge */
  border: 1px solid rgba(46, 36, 56, 0.35);
  image-rendering: pixelated;
}

.muted { color: var(--muted); font-size: 0.9rem; }

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--border);
}

code { font-family: var(--mono); }
