/* Machine Space — monospace pixel aesthetic (inspired by OpenCode) */
:root {
  /* Mascot-derived palette: warm cream + cool grays + near-black */
  --canvas: #fafafc;
  --surface-soft: #f2f2f5;
  --surface-card: #eaeaf0;
  --ink: #1a1c1b;
  --ink-deep: #010101;
  --body: #3a4040;
  --mute: #7c8886;
  --ash: #a7b1b0;
  --hairline: rgba(26, 28, 27, 0.15);
  --hairline-strong: #7c8886;

  /* Accent colors from mascot */
  --accent: #141716;
  --accent-hover: #010101;

  /* Terminal-inspired */
  --surface-dark: #141716;
  --surface-dark-elevated: #2a302e;
  --on-dark: #c8d0ce;
  --on-dark-mute: #7c8886;

  /* Misc */
  --highlight: rgba(20, 23, 22, 0.08);
  --warning: #cc7700;
  --success: #4a8c6f;

  /* Fonts */
  --mono: "Berkeley Mono", "JetBrains Mono", "Space Mono", "Fragment Mono", "SF Mono", "Menlo", monospace;
  --mono-pixel: "OpenCode", "Berkeley Mono", "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--body);
  background: var(--canvas);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== LAYOUT ===== */

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* ===== HEADER ===== */

header {
  border-bottom: 1px solid var(--hairline);
  padding: 1.5rem 0;
  margin-bottom: 0;
}

header .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header h1 {
  margin: 0;
  font-family: var(--mono-pixel);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-deep);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

header h1 a {
  color: var(--ink-deep);
  text-decoration: none;
}

header h1 a:hover {
  color: var(--mute);
}

header nav {
  display: flex;
  gap: 0.25rem;
  font-size: 0.85rem;
}

header nav a {
  color: var(--mute);
  text-decoration: none;
  padding: 0.15rem 0.5rem;
  border: 1px solid transparent;
}

header nav a:hover {
  color: var(--ink);
  border-color: var(--hairline);
  background: var(--highlight);
}

/* ===== HERO / MASCOT ===== */

.hero {
  border-bottom: 1px solid var(--hairline);
  padding: 3rem 0 2rem 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-text {
  flex: 1;
}

.hero-text h2 {
  font-family: var(--mono-pixel);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--mute);
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.1em;
}

.hero-text .tagline {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
}

.hero-mascot {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

/* ===== MAIN CONTENT ===== */

main {
  flex: 1;
  padding-top: 0;
}

/* ===== FEED ===== */

.feed {
  padding: 0;
}

.entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.entry:last-child {
  border-bottom: none;
}

.entry-title {
  margin: 0 0 0.15rem 0;
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink-deep);
  line-height: 1.4;
}

.entry-title a {
  color: var(--ink-deep);
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--mute);
  text-decoration: underline;
}

.entry-meta {
  font-size: 0.75rem;
  color: var(--mute);
  margin-bottom: 0.6rem;
}

.entry-meta time {
  font-family: var(--mono);
}

.entry-body {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--body);
  max-width: 100%;
}

.entry-body p {
  margin: 0 0 0.6rem 0;
}

.entry-body p:last-child {
  margin-bottom: 0;
}

.entry-tldr {
  background: var(--highlight);
  border-left: 2px solid var(--hairline-strong);
  padding: 0.5rem 0.75rem;
  margin: 0.5rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--body);
}

.entry-author {
  color: var(--ash);
}

.entry-updated {
  color: var(--ash);
  font-size: 0.75rem;
}

.entry-tweets {
  margin-top: 1rem;
}

.entry-links {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0 0;
  font-size: 0.85rem;
}

.entry-links li {
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.25rem;
  background: var(--surface-soft);
  border-left: 2px solid var(--hairline-strong);
}

.entry-links li:last-child {
  margin-bottom: 0;
}

.entry-links a {
  color: var(--ink-deep);
  font-weight: 500;
}

.entry-links a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Link bullet marker */
.entry-links li::before {
  content: "[+] ";
  color: var(--mute);
  font-family: var(--mono);
}

/* ===== SINGLE POST VIEW ===== */

.entry-single {
  padding-top: 1.5rem;
  border-bottom: none;
}

.entry-single .entry-title {
  font-size: 1.4rem;
}

/* ===== STATIC PAGES ===== */

.static-page {
  padding: 1.5rem 0;
  max-width: 640px;
}

.static-page h2 {
  font-family: var(--mono-pixel);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-deep);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.static-page h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-deep);
  margin: 1.2rem 0 0.5rem 0;
}

.static-page ul {
  padding-left: 1.2rem;
}

.static-page li {
  margin-bottom: 0.4rem;
}

/* ===== CODE ===== */

code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-soft);
  padding: 0.1rem 0.35rem;
  border: 1px solid var(--hairline);
}

pre {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface-dark);
  color: var(--on-dark);
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--surface-dark-elevated);
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ===== NAVIGATION LINKS (back to feed etc) ===== */

.back-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--mute);
  text-decoration: none;
  border: 1px solid transparent;
  padding: 0.2rem 0.5rem;
}

.back-link:hover {
  color: var(--ink);
  border-color: var(--hairline);
}

/* ===== FOOTER ===== */

footer {
  border-top: 1px solid var(--hairline);
  padding: 1.5rem 0;
  margin-top: 2rem;
  font-size: 0.78rem;
  color: var(--ash);
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

footer a {
  color: var(--mute);
  text-decoration: underline;
}

footer a:hover {
  color: var(--ink);
}

footer .social-links a {
  margin-left: 0.75rem;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-text .tagline {
    font-size: 1.1rem;
  }
  html { font-size: 15px; }
}