* { box-sizing: border-box; }
html, body { height: 100%; }

:root,
html[data-theme="light"] {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --card: #ffffff;
  --border: #e5e5e5;
  --edge: #e6e6e6;
  --accent: #5a5aff;
  --accent-2: #7272ff;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0b0b0e;
  --text: #e9e9f1;
  --muted: #b1b1c7;
  --card: #121218;
  --border: #232334;
  --edge: #1a1a26;
  --accent: #b38aff;
  --accent-2: #c1a7ff;
  color-scheme: dark;
}

html, body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  font-family: 'Silkscreen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: var(--text); text-decoration: none; }
a:hover { text-decoration: underline; }

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 5%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 2px solid var(--edge);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 5%;
}

.logo { font-weight: 700; font-size: 20px; letter-spacing: 0.5px; }

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.nav-links a { padding: 8px 4px; border-bottom: 2px solid transparent; }
.nav-links a:hover { border-bottom-color: var(--accent); text-decoration: none; }

button, .btn {
  font-family: 'Silkscreen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.5px;
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid var(--text);
  border-radius: 0;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: var(--card);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: var(--card); }
.btn-toggle { justify-self: end; min-width: 80px; }

.input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--text);
  background: var(--card);
  color: var(--text);
  font-family: 'Silkscreen', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 5%;
  border-bottom: 2px solid var(--edge);
}

.hero-text h1 { font-size: 34px; margin: 0 0 12px 0; line-height: 1.2; }
.hero-text p { margin: 0 0 20px 0; color: var(--muted); max-width: 52ch; }

.filter-bar { display: grid; gap: 10px; max-width: 680px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 12px;
  border: 2px solid var(--text);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.hero-art img { background: var(--bg); border: 2px solid var(--text); }

h2 { font-size: 24px; margin: 0 0 20px 0; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card { background: var(--card); border: 2px solid var(--border); padding: 18px; }
.card h3 { margin: 10px 0 8px 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.projects-grid .project .thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border: 2px solid var(--text);
  background: var(--bg);
  overflow: hidden;
}
.projects-grid .project .thumb img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

.tags { display: flex; gap: 8px; margin: 12px 0; }
.tags span {
  font-size: 12px;
  border: 2px solid var(--text);
  padding: 4px 8px;
  background: var(--card);
}

.row { display: flex; gap: 10px; margin-top: 10px; }

.muted { color: var(--muted); }

.site-footer { border-top: 2px solid var(--edge); background: var(--bg); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 5%;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}
.footer-logo { width: 24px; height: 24px; image-rendering: pixelated; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 40px 5%; }
  .hero-text h1 { font-size: 28px; }
}

@media (max-width: 640px) {
  .nav { grid-template-columns: auto auto 1fr; gap: 12px; }
  .nav-links { order: 2; grid-column: 1 / span 2; }
  .btn-toggle { order: 3; justify-self: end; }
  .section { padding: 36px 5%; }
  .hero-text p { max-width: none; }
  .grid { grid-template-columns: 1fr; }
}
