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

/* Base */
:root {
  --color-text: #1a1a1a;
  --color-text-subtle: #6b6b6b;
  --color-bg: #faf9f7;
  --color-link: #1a1a1a;
  --color-border: #e5e2dd;
  --color-button-bg: #1a1a1a;
  --color-button-text: #faf9f7;
  --font-body: "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --max-width: 600px;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

/* Site Header */
.site-header {
  text-align: center;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.author-name {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-subtle);
  margin-bottom: 0.75rem;
}

.bio {
  font-size: 0.88rem;
  color: var(--color-text-subtle);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.bio a {
  color: var(--color-text-subtle);
}

/* Newsletter */
.newsletter {
  margin-top: 1.5rem;
}

.newsletter-label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--color-text-subtle);
  margin-bottom: 0.6rem;
}

.newsletter-label a {
  color: var(--color-text-subtle);
}

/* ConvertKit form overrides */
.newsletter .formkit-form {
  max-width: 340px !important;
  margin: 0 auto !important;
  background: transparent !important;
  padding: 0 !important;
}

.newsletter .formkit-form [data-style="clean"] {
  padding: 0 !important;
}

.newsletter .formkit-fields {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0.4rem;
  justify-content: center;
}

.newsletter .formkit-field {
  flex: 1 1 auto !important;
  margin: 0 !important;
}

.newsletter .formkit-submit {
  flex: 0 0 auto !important;
  margin: 0 !important;
}

.newsletter .formkit-input {
  font-family: var(--font-sans) !important;
  font-size: 0.78rem !important;
  padding: 0.45rem 0.7rem !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 4px !important;
  background: white !important;
  color: var(--color-text) !important;
  line-height: 1.4 !important;
}

.newsletter .formkit-input:focus {
  border-color: var(--color-text-subtle) !important;
  outline: none !important;
}

.newsletter .formkit-submit {
  background-color: var(--color-button-bg) !important;
  color: var(--color-button-text) !important;
  border-radius: 4px !important;
  border: none !important;
  font-family: var(--font-sans) !important;
  font-size: 0.72rem !important;
  cursor: pointer;
}

.newsletter .formkit-submit:hover > span,
.newsletter .formkit-submit:focus > span {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.newsletter .formkit-submit > span {
  padding: 0.45rem 1rem !important;
}

.newsletter .formkit-powered-by-convertkit-container {
  justify-content: center;
  margin-top: 0.4rem !important;
}

.newsletter .formkit-powered-by-convertkit {
  opacity: 0.4 !important;
  transform: scale(0.75);
}

.newsletter .formkit-alert-success {
  font-family: var(--font-sans) !important;
  font-size: 0.78rem !important;
  background: #eef5ee !important;
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
  border-radius: 4px !important;
}

/* Post List */
.post-list {
  display: flex;
  flex-direction: column;
}

.post-card {
  text-align: center;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--color-border);
}

.post-card:first-child {
  padding-top: 0;
}

.post-date {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--color-text-subtle);
  display: block;
  margin-bottom: 0.3rem;
}

.post-card-title {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.post-card-title a {
  text-decoration: none;
}

.post-card-title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.post-card-excerpt {
  font-size: 0.88rem;
  color: var(--color-text-subtle);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}

.read-more {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: var(--color-text-subtle);
  text-decoration: none;
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.9rem;
  border-radius: 3px;
  display: inline-block;
}

.read-more:hover {
  border-color: var(--color-text-subtle);
}

/* Single Post */
.post-header {
  text-align: center;
  margin-bottom: 2rem;
}

.post-header .post-date {
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.25;
}

.post-content {
  margin-bottom: 3rem;
}

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

.post-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

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

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

.post-content blockquote {
  border-left: 3px solid var(--color-border);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: var(--color-text-subtle);
  font-style: italic;
}

.post-content code {
  font-size: 0.88rem;
  background: #f0eeea;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.post-content pre {
  background: #f0eeea;
  padding: 1rem 1.2rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1.3rem;
}

.post-content pre code {
  background: none;
  padding: 0;
}

/* Post Footer */
.post-footer {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.post-subscribe {
  text-align: center;
  margin-bottom: 2rem;
}

.post-subscribe .newsletter {
  margin-top: 0;
}

.back-link {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-subtle);
}

/* Page (About) */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 400;
}

.page-content p {
  margin-bottom: 1.3rem;
}

.page-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-sans);
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

.page-content a {
  color: var(--color-text-subtle);
}
