/* ============================================
   w0zro.com — a place for long thinking
   ============================================ */

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

:root {
  --bg: #faf9f6;
  --text: #2c2c2c;
  --text-secondary: #6b6b6b;
  --accent: #6b5291;
  --accent-light: #8a71b0;
  --accent-faint: rgba(107, 82, 145, 0.08);
  --border: #e0ddd7;
  --link: #6b5291;
  --link-hover: #4a3766;
  --code-bg: #f0eeea;
  --max-width: 640px;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: Georgia, 'Times New Roman', Times, serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  padding: 0 1.5rem;
}

/* --- Layout --- */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 0 6rem;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-weight: normal;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin-top: 2.8rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.1rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-style: italic;
}

p {
  margin-bottom: 1.4rem;
}

blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent-light);
  color: var(--text-secondary);
  font-style: italic;
}

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

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem auto;
  width: 30%;
}

/* --- Links --- */
a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--link-hover);
}

/* --- Site Header --- */
.site-header {
  margin-bottom: 4rem;
}

.site-name {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}

.site-name:hover {
  color: var(--text);
}

.site-name-zero {
  color: var(--accent);
  font-weight: 800;
}

/* --- Homepage --- */
.homepage-intro {
  margin-bottom: 4rem;
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.essay-list {
  list-style: none;
}

.essay-list li {
  margin-bottom: 2.5rem;
}

.essay-list a {
  text-decoration: none;
  color: var(--text);
  display: block;
}

.essay-list a:hover .essay-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent);
}

.essay-title {
  font-size: 1.25rem;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.essay-date {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.essay-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-top: 0.5rem;
}

/* --- Essay Page --- */
.essay-header {
  margin-bottom: 3rem;
}

.essay-header h1 {
  margin-bottom: 0.5rem;
}

.essay-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.essay-meta {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.essay-body {
  font-size: 1rem;
}

.essay-body p:first-child::first-letter {
  font-size: 3.2rem;
  float: left;
  line-height: 0.85;
  padding-right: 0.08em;
  margin-top: 0.05em;
  font-weight: normal;
  color: var(--accent);
}

.section-number {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 0.4rem;
  font-style: normal;
}

/* --- Footer --- */
.site-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.back-link {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

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

  .site-container {
    padding: 2.5rem 0 4rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  .site-header {
    margin-bottom: 3rem;
  }

  .homepage-intro {
    margin-bottom: 3rem;
  }
}
