/* =============================================================================
   AKIN DAILY
   Clean, readable, balanced design
   ============================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --text: #1c1917;
  --text-secondary: #57534e;
  --text-muted: #a8a29e;
  --accent: #ea580c;
  --accent-light: #fed7aa;
  --border: #e7e5e4;
  --code-bg: #1c1917;
  --code-text: #fafaf9;
}

/* -----------------------------------------------------------------------------
   Base
   ----------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent-light);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* -----------------------------------------------------------------------------
   Layout
   ----------------------------------------------------------------------------- */
.page-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page {
  flex: 1;
  padding-bottom: 80px;
}

/* -----------------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------------- */
.site-header {
  padding: 48px 0 40px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.site-header--compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 24px 0;
  margin-bottom: 40px;
}

.site-header--compact .brand-title {
  margin-bottom: 0;
}

.ascii-banner {
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  line-height: 1.1;
  color: var(--text-muted);
  margin: 0 0 24px;
  white-space: pre;
}

.brand-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.brand-title:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-tagline {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 0.95rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.site-header--compact .site-nav {
  justify-content: flex-end;
}

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

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* -----------------------------------------------------------------------------
   Intro Section
   ----------------------------------------------------------------------------- */
.intro {
  margin-bottom: 56px;
}

.intro h1 {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.intro-lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin: 0;
}

/* -----------------------------------------------------------------------------
   Posts List
   ----------------------------------------------------------------------------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.section-heading h2 {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-list {
  display: flex;
  flex-direction: column;
}

.post-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.post-item time {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 4px;
}

.post-info h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.4;
}

.post-info h3 a {
  color: var(--text);
}

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

.summary {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0 0 8px;
  line-height: 1.5;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 3px;
}

.empty {
  color: var(--text-muted);
  text-align: center;
  padding: 48px 0;
}

/* -----------------------------------------------------------------------------
   Single Post
   ----------------------------------------------------------------------------- */
.post-single {
  max-width: 100%;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.post-header time {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
}

.post-header h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.post-header .tags {
  margin-top: 0;
}

/* Post Body */
.post-body {
  font-size: 1rem;
  line-height: 1.8;
}

.post-body h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.post-body p {
  margin: 0 0 24px;
}

.post-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body strong {
  font-weight: 600;
}

.post-body blockquote {
  margin: 28px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  background: #fef3c7;
  font-style: italic;
}

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

.post-body ul,
.post-body ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85em;
  background: #f5f5f4;
  padding: 2px 6px;
  border-radius: 4px;
}

.post-body pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 28px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.9rem;
}

.post-body th,
.post-body td {
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
}

.post-body th {
  background: #f5f5f4;
  font-weight: 600;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Post Footer */
.post-footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.back-link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

/* -----------------------------------------------------------------------------
   404 Page
   ----------------------------------------------------------------------------- */
.not-found {
  text-align: center;
  padding: 80px 0;
}

.not-found .ascii-art {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  margin: 0 0 32px;
  white-space: pre;
}

.not-found h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.not-found p {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* -----------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

  .page-shell {
    padding: 0 16px;
  }

  .ascii-banner {
    font-size: 6px;
  }

  .intro h1 {
    font-size: 1.5rem;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .post-item time {
    font-size: 0.75rem;
  }

  .post-header h1 {
    font-size: 1.5rem;
  }
}
