:root {
  color-scheme: light dark;
  --bg: #0c0e12;
  --bg-accent: #12151c;
  --surface: #171b24;
  --surface-raised: #1e2430;
  --text: #eceef2;
  --muted: #9aa3b2;
  --accent: #d4a574;
  --accent-dim: #a8845a;
  --accent-glow: rgba(212, 165, 116, 0.15);
  --border: #2a3140;
  --layout-max: 72rem;
  --content-max: 54rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, var(--accent-glow), transparent 55%),
    var(--bg);
  color: var(--text);
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.header-inner,
.content,
.footer-inner {
  width: min(var(--layout-max), 100% - 2.5rem);
  margin-inline: auto;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-lockup:hover .brand {
  color: var(--accent);
}

.brand-logo {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg-accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
  transition: color 0.15s ease;
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  max-width: 22rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.search-form {
  display: flex;
  margin-left: 0.25rem;
}

.search-form input {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 0.4rem;
  padding: 0.4rem 0.65rem;
  min-width: 10rem;
  font-size: 0.9rem;
}

.search-form input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent-dim);
}

.content {
  flex: 1;
  max-width: var(--content-max);
  padding: 2rem 0 3rem;
}

.content h1 {
  line-height: 1.15;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.content > section > h1:first-child,
.entry-detail > h1 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.entry-card {
  padding: 1.15rem 1.1rem;
  margin-bottom: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.entry-card:hover {
  border-color: var(--accent-dim);
  background: var(--surface-raised);
}

.entry-card h2,
.entry-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.entry-card h2 a,
.entry-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.entry-card h2 a:hover,
.entry-card h3 a:hover {
  color: var(--accent);
}

.meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.project-link {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.project-link a {
  text-decoration: none;
  font-weight: 500;
}

.project-link a::before {
  content: "↗ ";
  opacity: 0.7;
}

.project-link--list {
  margin-top: 0.25rem;
}

.progress-block {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.35rem 0.75rem;
  align-items: center;
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
}

.progress-label {
  grid-column: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-value {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  align-self: center;
}

.progress-track {
  grid-column: 1;
}

.progress-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--accent);
  cursor: default;
}

.progress-slider:disabled {
  opacity: 1;
}

.project-lists {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

@media (min-width: 36rem) {
  .project-lists {
    grid-template-columns: 1fr 1fr;
  }
}

.project-list {
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
}

.project-list h2 {
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.project-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.project-list li:last-child {
  border-bottom: none;
}

.project-list--finished li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.project-list--todo li::before {
  content: "○";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.related {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.related h2 {
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.related h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.related .entry-card {
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.tags li {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--muted);
}

.gallery {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

@media (min-width: 40rem) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gallery img {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.prose {
  font-size: 1.05rem;
}

.prose p {
  margin: 0.85rem 0;
}

.prose code {
  font-size: 0.9em;
  padding: 0.12em 0.35em;
  border-radius: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.back a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--muted);
}

.back a:hover {
  color: var(--accent);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 0;
}

.footer-logo {
  opacity: 0.85;
  border-radius: 0.35rem;
}

.footer-inner p {
  margin: 0;
}

.search-form--page {
  display: flex;
  margin: 0 0 1.25rem;
  gap: 0.5rem;
}

.search-form--page input {
  flex: 1;
  max-width: 20rem;
}

.search-form--page button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 0.4rem;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

.search-form--page button:hover {
  filter: brightness(1.08);
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--text);
}

.contact p {
  max-width: 36em;
}

.contact-cta {
  margin-top: 1.25rem;
}

.contact-discord {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.45rem;
  transition: filter 0.15s ease;
}

.contact-discord:hover {
  filter: brightness(1.08);
  color: var(--bg);
}

/* Home */
.home-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.home-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.home-hero h1 {
  max-width: 22ch;
  margin-bottom: 0.85rem;
}

.home-lead {
  margin: 0;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 42em;
}

.home-panels {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 40rem) {
  .home-panels {
    grid-template-columns: repeat(3, 1fr);
  }
}

.home-panel {
  margin: 0;
  padding: 1.1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
}

.home-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--text);
}

.home-panel p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.home-featured,
.home-cta {
  margin-bottom: 1.75rem;
  padding: 1.15rem 1.25rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.home-featured h2,
.home-cta h2 {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.home-featured p,
.home-cta p {
  margin: 0 0 0.65rem;
}

.home-featured p:last-child,
.home-cta p:last-child {
  margin-bottom: 0;
}

.home-links {
  font-size: 0.95rem;
}

.home-links span {
  margin: 0 0.35rem;
  color: var(--border);
}

.home-cta {
  border-color: var(--accent-dim);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-accent) 100%);
}

@media (max-width: 40rem) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    width: 100%;
  }

  .search-form {
    margin-left: 0;
    width: 100%;
  }

  .search-form input {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 56rem) {
  .header-inner {
    padding: 1.15rem 0;
  }

  .brand {
    font-size: 1.35rem;
  }
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef0f4;
    --bg-accent: #e4e7ed;
    --surface: #ffffff;
    --surface-raised: #f8f9fb;
    --text: #141820;
    --muted: #5c6573;
    --border: #d4dae3;
    --accent-glow: rgba(168, 132, 90, 0.12);
  }

  .site-header {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }
}
