@font-face {
  font-family: 'Mahl Text';
  src: url('/blog-fonts/MahlTextv40VF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mahl Text';
  src: url('/blog-fonts/MahlTextv41ItalicVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Mahl Short';
  src: url('/blog-fonts/MahlShortv88-ItalicVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Mahl Tall';
  src: url('/blog-fonts/MahlTallV93-ItalicVF.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --font-main: 'Mahl Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Mahl Short', 'Mahl Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --color-bg: #FAFAF9;
  --color-text: #1A1A1A;
  --color-accent: #272c52;
  --color-accent-hover: #3a4070;
  --color-border: rgba(0, 0, 0, 0.08);
  --color-muted: rgba(0, 0, 0, 0.45);
  --max-width: 720px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

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

.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Navigation */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.site-nav a:hover {
  opacity: 1;
}

/* Site header */
.site-header {
  margin-bottom: 3rem;
  padding-top: 3rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1.2;
  color: var(--color-text);
}

.site-title a {
  text-decoration: none;
  color: var(--color-text);
}

.site-title a:hover {
  color: var(--color-accent);
}

.site-description {
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-muted);
  margin-top: 0.5rem;
}

/* Post list (index) */
.post-feed {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.post-card {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 2.5rem;
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.post-card-title a {
  text-decoration: none;
  color: var(--color-text);
}

.post-card-title a:hover {
  color: var(--color-accent);
}

.post-card-excerpt {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.post-card-meta {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.post-full-header {
  margin-bottom: 2.5rem;
  padding-top: 3rem;
}

.post-full-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.post-full-meta {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Post content */
.gh-content {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.7;
}

.gh-content p {
  margin-bottom: 1.5rem;
}

.gh-content h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  font-style: italic;
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.3;
  color: var(--color-text);
}

.gh-content h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  font-style: italic;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  color: var(--color-text);
}

.gh-content strong {
  font-weight: 600;
}

/* Standard blockquote */
.gh-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-muted);
}

/* Pull quote (Ghost aside blockquote) */
.gh-content blockquote.kg-blockquote-alt,
.gh-content .kg-blockquote-alt {
  border-left: none;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.4;
  color: var(--color-text);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  position: relative;
}

.gh-content blockquote.kg-blockquote-alt::before,
.gh-content .kg-blockquote-alt::before {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 0 auto 1.5rem;
}

.gh-content blockquote.kg-blockquote-alt::after,
.gh-content .kg-blockquote-alt::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-accent);
  margin: 1.5rem auto 0;
}

/* Italic emphasis */
.gh-content em {
  font-style: italic;
}

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

.gh-content li {
  margin-bottom: 0.5rem;
}

/* Images */
.gh-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 2rem 0;
  display: block;
}

.gh-content figure {
  margin: 2.5rem 0;
}

.gh-content figure img {
  margin: 0 0 0.75rem;
}

/* Ghost image card sizes */
.kg-image-card,
.kg-gallery-card {
  margin: 2.5rem 0;
}

.kg-image-card img {
  margin: 0;
}

/* Captions */
.gh-content figcaption,
.kg-card figcaption {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
  font-style: italic;
}

/* Ghost gallery */
.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.kg-gallery-row {
  display: flex;
  gap: 0.75rem;
}

.kg-gallery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

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

.gh-content pre {
  background: #f0eeeb;
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.9rem;
}

.gh-content code {
  background: #f0eeeb;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
}

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

/* Ghost card widths */
.kg-width-wide {
  max-width: 100%;
}

.kg-width-full {
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.kg-width-full img {
  max-width: 100%;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.pagination a {
  color: var(--color-accent);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8rem;
  color: var(--color-muted);
}

.site-footer a {
  color: var(--color-muted);
}

.site-footer a:hover {
  color: var(--color-accent);
}

/* Subscribe form */
.subscribe-form {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.subscribe-form h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  font-style: italic;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.subscribe-form p {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.subscribe-input-wrapper {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
}

.subscribe-input-wrapper input[type="email"] {
  flex: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 0.75rem 1rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 300;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s ease;
}

.subscribe-input-wrapper input[type="email"]:focus {
  border-color: var(--color-accent);
}

.subscribe-input-wrapper input[type="email"]::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.subscribe-input-wrapper button {
  background: var(--color-accent);
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 400;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.subscribe-input-wrapper button:hover {
  background: var(--color-accent-hover);
}

/* Responsive */
@media (max-width: 768px) {
  .site-wrapper {
    padding: 1.5rem 1.25rem 3rem;
  }

  .site-nav {
    padding: 1.25rem 1rem;
  }

  .site-title {
    font-size: 2.2rem;
  }

  .post-card-title {
    font-size: 1.4rem;
  }

  .post-full-title {
    font-size: 2rem;
  }

  .gh-content {
    font-size: 1.05rem;
  }

  .gh-content h2 {
    font-size: 1.4rem;
  }

  .subscribe-input-wrapper {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .site-wrapper {
    padding: 2rem 1.5rem 3rem;
  }

  .site-nav {
    padding: 1.5rem 2rem;
  }

  .site-title {
    font-size: 2.5rem;
  }

  .post-full-title {
    font-size: 2.4rem;
  }

  .gh-content {
    font-size: 1.1rem;
  }
}
