* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --bg-card: #111;
  --bg-hover: #1a1a1a;
  --bg-input: #151515;
  --border: #2a2a2a;
  --text: #ccc;
  --text-dim: #777;
  --text-muted: #444;
  --accent: #f5d84e;
  --accent-dim: #c4a82e;
  --tag-pixels: #5bc0de;
  --tag-ideas: #f5d84e;
  --tag-work: #ff6b6b;
  --tag-links: #b576f0;
  --tag-words: #5bf5a0;
}

body {
  font-family: 'Silkscreen', cursive;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #222 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.app {
  max-width: 620px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Top bar */
.topbar {
  border-bottom: 2px solid var(--accent);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  text-decoration: none;
}

.logo-icon {
  width: 24px;
  height: 24px;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Press Start 2P', cursive;
  font-size: 10px;
  color: var(--accent);
}

.logo-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 22px;
  color: var(--accent);
  text-transform: lowercase;
}

.nav {
  display: flex;
  gap: 6px;
}

.nav-item {
  padding: 3px 7px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  transition: all 0.1s;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.nav-item:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nav-item.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* Main */
.main {
  flex: 1;
  padding: 14px;
}

/* Header */
.header {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Stats Cards */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-bottom: 12px;
  border: 2px solid var(--border);
}

.stat-card {
  padding: 10px 8px;
  text-align: center;
}

.stat-card:first-child {
  border-right: 1px solid var(--border);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.stat-value {
  font-family: 'Press Start 2P', cursive;
  font-size: 15px;
  font-weight: 400;
  color: var(--accent);
  text-transform: uppercase;
}

/* Feed */
.feed {
  display: flex;
  flex-direction: column;
}

.post {
  display: grid;
  grid-template-columns: 67px 1fr auto;
  gap: 0;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.post:first-child {
  border-top: 2px solid var(--border);
}

.post:hover {
  background: var(--bg-hover);
}

.post-tag {
  font-size: 11px;
  padding: 8px 6px 8px 9px;
  text-transform: uppercase;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  text-align: center;
  letter-spacing: 0.5px;
}

.post-tag.pixels { color: var(--tag-pixels); }
.post-tag.ideas { color: var(--tag-ideas); }
.post-tag.work { color: var(--tag-work); }
.post-tag.links { color: var(--tag-links); }
.post-tag.words { color: var(--tag-words); }

/* Default tag color for any new category */
.post-tag { color: var(--accent); }

.post-body {
  padding: 6px 10px;
}

.post-link {
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  display: block;
}

.post-link:hover {
  color: var(--accent);
}

.post-excerpt {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 6px 8px;
  border-left: 1px solid var(--border);
}

/* Single post */
.post-single-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.post-single-meta .post-tag {
  padding: 2px 6px;
  border-right: none;
}

.post-date {
  font-size: 12px;
  color: var(--text-muted);
}

.post-single {
  font-size: 14px;
  line-height: 1.8;
}

.post-single h1,
.post-single h2,
.post-single h3 {
  font-family: 'Press Start 2P', cursive;
  font-size: 14px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 16px 0 8px;
  color: var(--accent);
}

.post-single h1 { font-size: 16px; }
.post-single h2 { font-size: 14px; }
.post-single h3 { font-size: 13px; }

.post-single p {
  margin-bottom: 10px;
}

.post-single a {
  color: var(--accent);
  text-decoration: none;
}

.post-single a:hover {
  text-decoration: underline;
}

.post-single code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1px 4px;
  font-family: inherit;
  font-size: 13px;
}

.post-single pre {
  background: var(--bg-card);
  border: 2px solid var(--border);
  padding: 10px;
  margin: 10px 0;
  overflow-x: auto;
  font-size: 13px;
}

.post-single pre code {
  background: none;
  border: none;
  padding: 0;
}

.post-single blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  margin: 10px 0;
  color: var(--text-dim);
}

.post-single ul,
.post-single ol {
  margin: 8px 0 8px 18px;
}

.post-single img {
  max-width: 100%;
  border: 2px solid var(--border);
}

/* Post nav */
.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
}

.post-nav-link {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
}

.post-nav-link:hover {
  text-decoration: underline;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 14px;
  color: var(--text-muted);
  border: 2px solid var(--border);
}

.empty-state .empty-icon {
  font-family: 'Press Start 2P', cursive;
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--accent);
}

.empty-state p {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
.site-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

.footer-link {
  color: var(--accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.social-icon {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
}

.social-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding: 10px 0;
  border-top: 2px solid var(--border);
}

.pagination-link {
  font-size: 11px;
  color: var(--accent);
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid var(--accent);
  padding: 3px 8px;
}

.pagination-link:hover {
  background: var(--accent);
  color: var(--bg);
}

.pagination-info {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Spotify */
#spotify-recent {
  display: none;
  margin-top: 24px;
}

.spotify-header {
  font-size: 16px;
  color: #1db954;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.spotify-track {
  display: flex;
  border: 2px solid #033a16;
  text-decoration: none;
  color: #000;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 84' width='80' height='80'%3E%3Cpath fill='%23000' d='M84 0C37.6 0 0 37.6 0 84s37.6 84 84 84 84-37.6 84-84S130.4 0 84 0zm38.5 121.2c-1.5 2.5-4.7 3.2-7.1 1.7-19.5-11.9-44-14.6-72.9-8-2.8.6-5.6-1.1-6.2-3.9-.6-2.8 1.1-5.6 3.9-6.2 31.6-7.2 58.7-4.1 80.6 9.3 2.5 1.5 3.2 4.7 1.7 7.1zm10.3-22.8c-1.9 3.1-5.9 4-9 2.1-22.3-13.7-56.3-17.7-82.7-9.7-3.4 1-7.1-.9-8.1-4.3-1-3.4.9-7.1 4.3-8.1 30.1-9.1 67.5-4.7 93.3 11 3.1 1.9 4.1 5.9 2.2 9zm.9-23.8c-26.8-15.9-71-17.4-96.6-9.6-4.1 1.3-8.5-1.1-9.7-5.2-1.3-4.1 1.1-8.5 5.2-9.7 29.4-8.9 78.3-7.2 109.2 11.1 3.7 2.2 4.9 7 2.7 10.7-2.2 3.6-7 4.9-10.8 2.7z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right bottom;
  background-color: #1db95420;
}

.spotify-track:hover {
  opacity: 0.95;
}

.spotify-album-art {
  width: 77px;
  height: 77px;
  object-fit: cover;
  flex-shrink: 0;
  margin: 8px;
  border: 1px solid #000;
}

.spotify-track-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 2px;
  min-width: 0;
}

.spotify-track-name {
  font-size: 17px;
  font-weight: 485;
  color: #f5d84e;
}

.spotify-track-artist {
  font-size: 16px;
  color: #ffffff;
}

.spotify-track-album {
  font-size: 13px;
  color: white;
}

@media (max-width: 480px) {
  .spotify-album-art {
    width: 120px;
    height: 120px;
  }
  .spotify-track-info {
    padding: 12px;
    gap: 4px;
  }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Responsive */
@media (max-width: 480px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .nav { flex-wrap: wrap; }
}

/* YouTube embed responsive */
.grav-youtube {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}

.grav-youtube iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Pixel Duck */
.header {
  position: relative;
}

.duck-lane {
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 20px;
  overflow: hidden;
}

.pixel-duck {
  position: absolute;
  animation: duck-walk 14s linear infinite, duck-waddle 0.4s ease-in-out infinite;
}

@keyframes duck-walk {
  0%   { left: calc(100% - 24px); transform: scaleX(-1); }
  49%  { left: 75px; transform: scaleX(-1); }
  50%  { left: 75px; transform: scaleX(1); }
  99%  { left: calc(100% - 24px); transform: scaleX(1); }
  100% { left: calc(100% - 24px); transform: scaleX(-1); }
}

@keyframes duck-waddle {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(-5deg); }
  75%  { transform: rotate(5deg); }
  100% { transform: rotate(0deg); }
}

.duck-body {
  width: 20px;
  height: 16px;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Crect x='1' y='0' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='2' y='0' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='5' y='0' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='6' y='0' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='0' y='1' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='3' y='1' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='4' y='1' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='5' y='1' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='6' y='1' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='0' y='2' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='1' y='2' width='1' height='1' fill='%2300ff00'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23111'/%3E%3Crect x='3' y='2' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='4' y='2' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='5' y='2' width='1' height='1' fill='%2300ff00'/%3E%3Crect x='6' y='2' width='1' height='1' fill='%23111'/%3E%3Crect x='7' y='2' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='1' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='2' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='4' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='5' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='1' y='4' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='2' y='4' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='3' y='4' width='1' height='1' fill='%236c3483'/%3E%3Crect x='4' y='4' width='1' height='1' fill='%236c3483'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='6' y='4' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='1' y='5' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='2' y='5' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='3' y='5' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='5' y='5' width='1' height='1' fill='%23c39bd3'/%3E%3Crect x='6' y='5' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='3' y='6' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='4' y='6' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='5' y='6' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='5' y='7' width='1' height='1' fill='%239b59b6'/%3E%3Crect x='1' y='8' width='1' height='1' fill='%236c3483'/%3E%3Crect x='2' y='8' width='1' height='1' fill='%236c3483'/%3E%3Crect x='5' y='8' width='1' height='1' fill='%236c3483'/%3E%3Crect x='6' y='8' width='1' height='1' fill='%236c3483'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
