/* ============================================
   mono theme
   Dark, minimal, optimised for reading
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:        #0e0e10;
  --bg-raised: #16161a;
  --bg-hover:  #1c1c22;
  --text:      #c9c9d0;
  --text-dim:  #6e6e7a;
  --text-bright: #e4e4ea;
  --accent:    #7aa2f7;
  --accent-dim:#3d5a8a;
  --green:     #9ece6a;
  --orange:    #e0af68;
  --red:       #f7768e;
  --purple:    #bb9af7;
  --border:    #24242e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --content-width: 680px;
  --page-width: 780px;
}

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* --- Nav --- */
nav {
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-bright);
}

.nav-accent {
  color: var(--accent-dim);
  margin-right: 0.25rem;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-links a {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.footer-links a:hover {
  color: var(--text-bright);
}

.footer-sep {
  margin: 0 0.5rem;
  color: var(--border);
}

.footer-accent {
  color: var(--accent-dim);
  font-family: var(--font-mono);
}

/* --- Hero (Homepage) --- */
.hero {
  padding: 4rem 0 3rem;
}

.hero-name {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.5;
  max-width: var(--content-width);
  margin-bottom: 0.4rem;
}

.hero-desc {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* --- Section Headings --- */
.section-heading {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.heading-accent {
  color: var(--accent);
  margin-right: 0.35rem;
}

/* --- Article List --- */
.recent {
  padding-top: 1rem;
}

.article-list {
  padding-top: 0.5rem;
}

.article-item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.article-item a:hover {
  background: var(--bg-hover);
}

.article-title {
  color: var(--text-bright);
  font-weight: 500;
}

.article-item time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.view-all {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.view-all:hover {
  color: var(--accent);
}

.empty-state {
  color: var(--text-dim);
  font-style: italic;
  padding: 1rem 0;
}

/* --- Page Header (list pages) --- */
.page-header {
  padding: 2.5rem 0 0.5rem;
}

/* --- Single Post --- */
.post-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-dim);
}

.tag {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.15em 0.5em;
  border-radius: 3px;
  font-size: 0.78rem;
  margin-left: 0.25rem;
}

/* --- Post Content (long-form typography) --- */
.post-content {
  max-width: var(--content-width);
}

.post-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.post-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-bright);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-content li {
  margin-bottom: 0.35rem;
}

.post-content li::marker {
  color: var(--text-dim);
}

.post-content strong {
  color: var(--text-bright);
  font-weight: 600;
}

.post-content em {
  color: var(--text);
  font-style: italic;
}

.post-content blockquote {
  border-left: 3px solid var(--accent-dim);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-dim);
}

.post-content blockquote p {
  margin-bottom: 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Inline code */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--orange);
}

/* Code blocks */
.post-content pre {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  line-height: 1.55;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

/* Links inside content */
.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-dim);
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-color: var(--accent);
}

/* Images */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.post-content th,
.post-content td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.post-content th {
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  html {
    font-size: 16px;
  }

  .hero {
    padding: 2.5rem 0 2rem;
  }

  .hero-name {
    font-size: 1.8rem;
  }

  .post-title {
    font-size: 1.6rem;
  }

  .article-item a {
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-inner {
    padding: 1rem 1rem;
  }

  main {
    padding: 1.5rem 1rem;
  }
}
