/* squarenothing.com — hand-written theme, no framework, no JS.
   Dark palette is the base; light values swap in via prefers-color-scheme.
   System monospace type, CSS-grid project hub, a handful of KB total. */

:root {
  --bg:      #0f1012;
  --surface: #17181b;
  --fg:      #e8e8ea;
  --muted:   #9aa0a6;
  --border:  color-mix(in srgb, var(--fg) 14%, transparent);
  --accent:  #7cc4ff;
  --accent-fg: #06121f;
  --ok:      #7ee0a4;   /* released     */
  --wip:     #ffcf6b;   /* in-development */
  --idea:    #b39dff;   /* concept      */
  --maxw:    52rem;
  --radius:  10px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:      #fbfbfa;
    --surface: #ffffff;
    --fg:      #17181a;
    --muted:   #5f6368;
    --accent:  #0b66c3;
    --accent-fg: #ffffff;
    --ok:      #1a7f4b;
    --wip:     #9a6a00;
    --idea:    #5b3fd0;
  }
}

* { box-sizing: border-box; }

html { color-scheme: dark light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.site-header,
.site-main,
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}

a { color: var(--accent); }

/* --- header / nav --- */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg);
}
.site-title::before { content: "□ "; color: var(--accent); }

.site-nav a {
  margin-left: 1rem;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--accent); }

/* --- landing: the logo, centered, and nothing else ---
   The hub template drops the header/footer chrome and adds body.landing, so
   the lockup owns the viewport. The SVG is inlined; fill=currentColor inherits
   --fg, so it themes for free in both prefers-color-scheme modes. */
body.landing {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}
.logo-landing {
  display: flex;
  justify-content: center;
  width: 100%;
}
.site-logo {
  width: min(72vw, 26rem);
  max-height: 80dvh;
  height: auto;
  display: block;
}

/* --- project grid --- */
.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.project-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.project-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.project-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
}
.project-name { font-weight: 700; }

/* --- status badges --- */
.badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-released       { color: var(--ok); }
.badge-in-development { color: var(--wip); }
.badge-concept        { color: var(--idea); }

/* --- project page --- */
.crumb { margin: 0 0 1.5rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.project-header,
.log-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.project-header h1 { margin: 0; }

.project-hero {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.actions { margin: 1.5rem 0; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-fg);
  text-decoration: none;
  font-weight: 700;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
}
.button:hover { filter: brightness(1.08); }

.project-links {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
}
.pill:hover { color: var(--accent); border-color: var(--accent); }

/* --- devlog --- */
.log-header time { color: var(--muted); font-size: 0.9rem; }
.log-content, .project-content { margin-top: 1.5rem; }

img { max-width: 100%; height: auto; }

pre, code {
  font-family: inherit;
  background: var(--surface);
  border-radius: 6px;
}
code { padding: 0.1rem 0.35rem; }
pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
}
pre code { background: none; padding: 0; }

/* --- footer --- */
.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}
.site-footer .mark { color: var(--accent); }
