@font-face {
  font-family: 'Overused Grotesk';
  src: url('/fonts/OverusedGrotesk-VF.woff2') format('woff2-variations');
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #232530;
  --panel: #2e3140;
  --accent: #ECBA39;
  --text: #f4f1e8;
  --font-body: 'Overused Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
  --pixel: 4px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}
.page { max-width: 640px; margin: 0 auto; padding: 2rem 1rem 4rem; }
.mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }

/* Pixel chrome utilities (used by later tasks) */
.panel {
  background: var(--panel);
  border: var(--pixel) solid var(--accent);
  box-shadow: var(--pixel) var(--pixel) 0 0 #00000066;
  padding: 1rem;
  margin: 1rem 0;
}
.portrait { image-rendering: pixelated; display: block; margin: 0 auto; }

.collection-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pixel-btn {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--accent);
  border: var(--pixel) solid var(--accent);
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  box-shadow: var(--pixel) var(--pixel) 0 0 #00000066;
}
.pixel-btn:active { transform: translate(var(--pixel), var(--pixel)); box-shadow: none; }
.collection-btn.is-active { background: var(--accent); color: var(--bg); }
.record { border-top: 2px solid var(--accent); padding: 0.75rem 0; }
.record-link { color: var(--accent); }
.record-json { overflow-x: auto; font-size: 0.8rem; background: #00000033; padding: 0.5rem; }
.error { color: #ff6b6b; }

.cards { display: flex; flex-direction: column; gap: 0.75rem; }
.card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--panel);
  border: var(--pixel) solid var(--accent);
  box-shadow: var(--pixel) var(--pixel) 0 0 #00000066;
  padding: 0.7rem 0.85rem;
}
.card-top { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.card-icon { image-rendering: pixelated; flex: none; }
.card-emoji { font-size: 1.6rem; line-height: 1; flex: none; }
.card-text { overflow-wrap: anywhere; font-size: 0.92rem; }
.card-cta { flex: none; text-decoration: none; }
.copy-status { color: var(--accent); font-size: 0.8rem; }

.handle-input {
  display: block; width: 100%; margin: 0.5rem 0;
  background: var(--bg); color: var(--text);
  border: var(--pixel) solid var(--accent); padding: 0.5rem;
}
.follow-btn { font-size: 1rem; }
.scope-note { font-size: 0.75rem; opacity: 0.8; margin-top: 0.75rem; }
.follow-status { color: #ff6b6b; }

.hero { text-align: center; margin-bottom: 1.5rem; }
.portrait {
  width: 200px; height: 200px;
  border: var(--pixel) solid var(--accent);
  box-shadow: calc(var(--pixel) * 2) calc(var(--pixel) * 2) 0 0 #00000066;
}
.title { font-size: 2rem; font-weight: 800; margin: 1rem 0 0.25rem; letter-spacing: 0.02em; }
.tagline { margin: 0.5rem 0 0; opacity: 0.85; }
.bio { margin: 1rem 0; padding: 0.85rem 1rem; background: var(--panel); font-size: 0.95rem; }
.records-identity { display: flex; flex-direction: column; gap: 0.25rem; align-items: center; margin: 0 0 1rem; font-size: 0.85rem; }
.records-identity .did { font-size: 0.75rem; opacity: 0.7; overflow-wrap: anywhere; }
.tabs { display: flex; gap: 0.5rem; justify-content: center; margin: 1rem 0; }
.tab {
  font-family: var(--font-mono); text-decoration: none; color: var(--accent);
  border: var(--pixel) solid var(--accent); padding: 0.4rem 1rem; background: var(--bg);
}
.tab.is-active { background: var(--accent); color: var(--bg); }
@media (max-width: 480px) {
  .title { font-size: 1.5rem; }
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: #000000aa;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal { max-width: 420px; width: 100%; max-height: 90vh; overflow: auto; margin: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.modal-title { font-size: 1.1rem; margin: 0; }
.modal-close { padding: 0.2rem 0.55rem; }
.modal-hint { font-size: 0.8rem; opacity: 0.8; }
.modal-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.fedi-handle { font-size: 1.1rem; word-break: break-all; }

/* Posts */
.posts { display: flex; flex-direction: column; }
.post { border-top: 2px solid var(--accent); padding: 1rem 0; }
.post:first-child { border-top: none; padding-top: 0; }
.post-title { margin: 0 0 0.25rem; font-size: 1.05rem; }
.post-title a { color: var(--accent); text-decoration: none; }
.post-title a:hover { text-decoration: underline; }
.post-meta { font-size: 0.75rem; opacity: 0.7; margin: 0 0 0.5rem; }
.post-desc { margin: 0 0 0.5rem; }
.post-tags { font-size: 0.72rem; opacity: 0.6; margin: 0; }
