/* ==========================================================================
   Shared shell for the secondary pages: Projects, Uses, Now, Guestbook.

   These four are the same page shape — a header, a column of content, a
   footer — so the chrome lives here once rather than being copied into four
   HTML files that then drift apart.
   ========================================================================== */

* { scrollbar-width: thin; scrollbar-color: #30363d transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 3px; }

:root {
  --bg: #050508;
  --text: #c9d1d9;
  --card: rgba(15, 15, 24, 0.6);
  --border: rgba(255, 255, 255, 0.06);
  --cyan: #00f5d4;
  --purple: #9d4edd;
}
.light {
  --bg: #f6f8fa;
  --text: #1f2328;
  --card: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.08);
  --cyan: #0a6f66;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 245, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
.light .bg-grid { opacity: 0.4; }

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

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.light .nav { background: rgba(246, 248, 250, 0.85); }

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: inherit;
}
.brand img { width: 30px; height: 30px; }
.brand span { font-weight: 700; color: #fff; font-size: 15px; }
.light .brand span { color: #111; }
.brand em {
  font-style: normal;
  background: linear-gradient(135deg, #00f5d4, #00bbf9 50%, #9d4edd);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a {
  font-size: 13px; font-weight: 500;
  color: #8d99ae; text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-links a.active { color: var(--cyan); }
.light .nav-links a { color: #5b6672; }

.nav-cta {
  font-size: 13px; font-weight: 500;
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text); text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.nav-cta:hover { border-color: rgba(0, 245, 212, 0.4); color: var(--cyan); }

@media (max-width: 720px) {
  .nav-links a:not(.active) { display: none; }
  .nav-links { gap: 12px; }
}

/* ------------------------------------------------------------------ page */

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 120px 24px 96px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 14px;
}
.light h1 { color: #111; }

.lede {
  font-size: 16px;
  color: #8d99ae;
  max-width: 620px;
  margin: 0 0 44px;
}
.light .lede { color: #5b6672; }

h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 44px 0 18px;
}
h2:first-of-type { margin-top: 0; }

/* ----------------------------------------------------------------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  transition: border-color 0.22s, transform 0.22s;
}
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: rgba(0, 245, 212, 0.3); transform: translateY(-2px); }

.grid { display: grid; gap: 14px; }
/* start, not stretch: a card carrying a screenshot is taller than its text-only
   neighbours, and stretching them to match leaves a dead gap under their tags. */
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }

.card h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
}
.light .card h3 { color: #111; }

.card p {
  font-size: 13px;
  color: #8d99ae;
  margin: 0;
  line-height: 1.6;
}
.light .card p { color: #5b6672; }

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.25);
  background: rgba(0, 245, 212, 0.08);
  color: var(--cyan);
  white-space: nowrap;
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 10.5px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: #6b7280;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  color: var(--cyan);
  display: block;
  margin-top: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.light .mono { background: #eef2f6; }

/* ------------------------------------------------------------- empty/err */

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}
.empty .glyph { font-size: 34px; margin-bottom: 12px; opacity: 0.6; }
.empty h3 { font-size: 15px; color: #fff; margin: 0 0 6px; }
.light .empty h3 { color: #111; }
.empty p { font-size: 13px; margin: 0; }

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

footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 12.5px;
  color: #6b7280;
}
footer a { color: #8d99ae; text-decoration: none; }
footer a:hover { color: var(--cyan); }

/* ---------------------------------------------------------------- media grid
   Shared by the anime and games pages. Cards carry a 16:9 art slot on top and
   text below, so a missing cover degrades to a letter tile instead of a hole. */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.media-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}
.media-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 245, 212, 0.32);
}

.media-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #0d1117, #131a24);
  overflow: hidden;
}
.media-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback when there is no cover: a big letter on a gradient. Better than a
   broken image icon, and it keeps the grid rhythm. */
.media-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.13);
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.08), rgba(0, 187, 249, 0.05));
}

.media-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.media-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.media-body p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.media-meta {
  font-size: 11.5px;
  font-weight: 600;
  color: #00f5d4;
  letter-spacing: .02em;
}

.media-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #8d99ae;
  text-decoration: none;
}
.media-link:hover { color: #00f5d4; }

/* ------------------------------------------------------------- filter row */

.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.filter-row input[type="search"] {
  flex: 1 1 240px;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}
.filter-row input[type="search"]:focus {
  border-color: rgba(0, 245, 212, 0.45);
}
.filter-row .count {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
}

/* ------------------------------------------------- screenshot project card
   A project card that leads with a real capture of the running app.

   The image sits flush to the card edges, so the card padding is removed and
   re-applied to the text block instead; otherwise the shot floats in a border
   and the card reads as two unrelated halves. */

.card-shot {
  padding: 0;
  overflow: hidden;
}

.card-shot .shot-frame {
  display: block;
  position: relative;
  border-bottom: 1px solid var(--border);
  background: #0b0d10;
}

/* A viewport capture always ends mid-row, because a masonry feed has no clean
   bottom edge. Fading the last few pixels into the card makes that read as a
   deliberate crop instead of a cut-off image. */
.card-shot .shot-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34px;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(11, 13, 16, 0), rgba(11, 13, 16, 0.92));
}

.card-shot .shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 660;
  object-fit: cover;
  object-position: top center;
}

.card-shot .card-top { margin: 18px 20px 10px; }
.card-shot p { margin: 0 20px; }
.card-shot .tags { margin: 12px 20px 20px; }

