/* ABOUTME: Main stylesheet for RH Paper Ghost theme */
/* ABOUTME: Implements Remote Humans design system - paper/ink palette, editorial typography, grain texture */

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
  /* Colour palette */
  --paper: #F2F0E9;
  --ink: #0F0F0D;
  --accent: #E04F18;
  --subtle: #63635E;
  --border: #D6D4CC;
  --white: #FFFFFF;

  /* Typography */
  --font-serif: 'Libre Baskerville', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Layout */
  --max-width: 1800px;
  --content-width: 720px;
  --wide-width: 1100px;
  --gutter: clamp(1.5rem, 4vw, 3rem);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;
  --duration-slow: 0.6s;
}

/* ============================================
   RESET & BASE
   ============================================ */

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

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

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.7;
}

::selection {
  background-color: var(--accent);
  color: var(--paper);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   GRAIN TEXTURE OVERLAY
   ============================================ */

.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ============================================
   SITE HEADER / NAVIGATION
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--paper);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--duration) var(--ease-out);
}

.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color var(--duration);
}

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

.nav-brand-name {
  display: inline;
}

.nav-divider {
  width: 1px;
  height: 1.5rem;
  background-color: var(--border);
  flex-shrink: 0;
}

.nav-site-name {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
  transition: color var(--duration);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
  transition: color var(--duration);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease-out);
}

.nav-link:hover,
.nav-link--active {
  color: var(--accent);
}

.nav-link:hover::after,
.nav-link--active::after {
  transform: scaleX(1);
}

.nav-subscribe {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--paper);
  background-color: var(--ink);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ink);
  transition: all var(--duration) var(--ease-out);
  cursor: pointer;
}

.nav-subscribe:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  padding: var(--space-4xl) var(--gutter) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-inner {
  position: relative;
}

.hero-grid-line {
  position: absolute;
  top: calc(var(--space-4xl) * -1);
  bottom: calc(var(--space-3xl) * -1);
  width: 1px;
  background-color: var(--border);
  opacity: 0.5;
}

.hero-grid-line--left {
  left: 0;
}

.hero-grid-line--right {
  right: 0;
}

.hero-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  max-width: 14ch;
}

.hero-title--tag,
.hero-title--author {
  max-width: 20ch;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.hero-description {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--subtle);
  max-width: 50ch;
}

.hero-count {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
  margin-top: var(--space-md);
}

.author-image {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-lg);
  border: 2px solid var(--border);
}

.author-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-location {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
  margin-top: var(--space-sm);
  display: block;
}

/* ============================================
   CONTENT DIVIDER
   ============================================ */

.content-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 1px;
  position: relative;
}

.content-divider::after {
  content: '';
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background-color: var(--border);
}

/* ============================================
   POST FEED (INDEX / TAG / AUTHOR)
   ============================================ */

.post-feed-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--gutter);
}

.post-feed-inner {
  position: relative;
}

.card-divider {
  height: 1px;
  background-color: var(--border);
  margin: var(--space-2xl) 0;
}

/* ============================================
   POST CARD
   ============================================ */

.post-card {
  position: relative;
}

.post-card-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  text-decoration: none;
  color: inherit;
}

.post-card-image {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}

.post-card-link:hover .post-card-image img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.post-card-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.post-card-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  display: inline-block;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: color var(--duration);
}

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

.post-card-excerpt {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--subtle);
  max-width: 60ch;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
}

.post-card-reading-time::before {
  content: '/';
  margin-right: var(--space-sm);
  opacity: 0.4;
}

/* Two-column card layout on wider screens */
@media (min-width: 768px) {
  .post-card-link {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .post-card:nth-child(even) .post-card-link {
    direction: rtl;
  }

  .post-card:nth-child(even) .post-card-link > * {
    direction: ltr;
  }
}

/* ============================================
   SINGLE POST
   ============================================ */

.post-full {
  position: relative;
}

.post-header {
  padding: var(--space-4xl) var(--gutter) var(--space-3xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.post-header-inner {
  position: relative;
  max-width: var(--wide-width);
}

.post-header-grid-line {
  position: absolute;
  top: calc(var(--space-4xl) * -1);
  bottom: calc(var(--space-3xl) * -1);
  width: 1px;
  background-color: var(--border);
  opacity: 0.5;
  display: none;
}

@media (min-width: 1200px) {
  .post-header-grid-line {
    display: block;
  }

  .post-header-grid-line--left {
    left: -3rem;
  }

  .post-header-grid-line--right {
    right: -3rem;
  }
}

.post-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--accent);
  padding: 0.375rem 0.75rem;
  transition: all var(--duration);
}

.post-tag:hover {
  background-color: var(--accent);
  color: var(--white);
}

.post-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  max-width: 20ch;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
}

.post-meta-divider {
  opacity: 0.3;
}

/* Feature image */
.post-feature-image {
  max-width: var(--wide-width);
  margin: 0 auto var(--space-3xl);
  padding: 0 var(--gutter);
}

.post-feature-image img {
  width: 100%;
  filter: grayscale(100%);
  transition: filter var(--duration-slow) var(--ease-out);
}

.post-feature-image:hover img {
  filter: grayscale(0%);
}

.post-feature-image figcaption {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-top: var(--space-sm);
  text-align: right;
}

/* Post content area */
.post-content-wrapper {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-3xl);
  position: relative;
}

.post-content-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--border);
  opacity: 0.3;
  display: none;
}

@media (min-width: 1200px) {
  .post-content-grid-line {
    display: block;
  }

  .post-content-grid-line--left {
    left: -3rem;
  }

  .post-content-grid-line--right {
    right: -3rem;
  }
}

/* Post content typography */
.post-content {
  max-width: var(--content-width);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
}

.post-content > * + * {
  margin-top: var(--space-md);
}

.post-content h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-sm);
}

.post-content h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-xs);
}

.post-content h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-xs);
}

.post-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color var(--duration);
}

.post-content a:hover {
  text-decoration-color: transparent;
}

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

.post-content em {
  font-style: italic;
}

.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-lg);
  margin: var(--space-2xl) 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--subtle);
}

.post-content ul,
.post-content ol {
  padding-left: var(--space-lg);
}

.post-content li {
  margin-bottom: var(--space-xs);
}

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

.post-content pre {
  background-color: var(--ink);
  color: var(--paper);
  padding: var(--space-lg);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: var(--space-2xl) 0;
  border: 1px solid var(--border);
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: rgba(15, 15, 13, 0.06);
  padding: 0.125em 0.375em;
  border-radius: 2px;
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.post-content hr {
  border: none;
  height: 1px;
  background-color: var(--border);
  margin: var(--space-3xl) 0;
}

.post-content figure {
  margin: var(--space-2xl) 0;
}

.post-content figure img {
  filter: grayscale(100%);
  transition: filter var(--duration-slow) var(--ease-out);
}

.post-content figure:hover img {
  filter: grayscale(0%);
}

.post-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-top: var(--space-sm);
  text-align: right;
}

/* Ghost-specific content cards (bookmarks, galleries, etc.) */
.post-content .kg-card {
  margin: var(--space-2xl) 0;
}

.post-content .kg-width-wide {
  max-width: var(--wide-width);
  margin-left: calc(50% - var(--wide-width) / 2);
  margin-right: calc(50% - var(--wide-width) / 2);
}

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

.post-content .kg-bookmark-card {
  border: 1px solid var(--border);
  transition: border-color var(--duration);
}

.post-content .kg-bookmark-card:hover {
  border-color: var(--accent);
}

.post-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.post-content .kg-bookmark-content {
  padding: var(--space-md);
  flex: 1;
}

.post-content .kg-bookmark-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

.post-content .kg-bookmark-description {
  font-size: 0.875rem;
  color: var(--subtle);
  margin-top: var(--space-xs);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--subtle);
}

.post-content .kg-bookmark-icon {
  width: 1rem;
  height: 1rem;
}

.post-content .kg-bookmark-thumbnail {
  width: 200px;
  flex-shrink: 0;
}

.post-content .kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
}

/* Post tags footer */
.post-tags {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-2xl);
}

.post-tags-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  max-width: var(--content-width);
}

.post-tags-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--subtle);
  margin-right: var(--space-xs);
}

.post-tag-link {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  transition: color var(--duration);
}

.post-tag-link:hover {
  color: var(--accent);
}

.post-tag-separator {
  color: var(--border);
}

/* ============================================
   SUBSCRIBE SECTION (in-post CTA)
   ============================================ */

.post-subscribe {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--gutter);
  text-align: center;
}

.post-subscribe-inner {
  max-width: 32rem;
  margin: 0 auto;
}

.post-subscribe-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.post-subscribe-description {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 300;
  color: var(--subtle);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* ============================================
   SUBSCRIBE FORM (shared)
   ============================================ */

.subscribe-form {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  max-width: 28rem;
}

.subscribe-form--inline {
  margin: 0 auto;
}

.subscribe-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 300;
  color: inherit;
  padding: var(--space-xs) 0;
}

.subscribe-input::placeholder {
  color: var(--border);
}

.subscribe-button {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink);
  cursor: pointer;
  padding: var(--space-xs) 0;
  transition: color var(--duration);
  white-space: nowrap;
}

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

/* Ghost portal overrides for subscribe success */
.subscribe-form .message-success {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
}

/* ============================================
   READ NEXT
   ============================================ */

.read-next {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-3xl) var(--gutter);
}

.read-next-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--subtle);
  margin-bottom: var(--space-lg);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--gutter) var(--space-3xl);
}

.pagination-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
}

.pagination-link {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--subtle);
  transition: color var(--duration);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

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

.pagination-disabled {
  visibility: hidden;
}

.pagination-count {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--border);
}

.pagination-arrow {
  font-size: 1rem;
  line-height: 1;
}

/* ============================================
   SITE FOOTER
   ============================================ */

.site-footer {
  background-color: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

/* Structural vertical lines in footer */
.site-footer::before,
.site-footer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  display: none;
}

@media (min-width: 768px) {
  .site-footer::before,
  .site-footer::after {
    display: block;
  }

  .site-footer::before {
    left: 3rem;
  }

  .site-footer::after {
    right: 3rem;
  }
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4xl) var(--gutter);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr auto auto;
    gap: var(--space-4xl);
  }
}

.footer-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.footer-description {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 300;
  line-height: 1.7;
  max-width: 28rem;
  margin-bottom: var(--space-2xl);
}

.footer-subscribe .subscribe-form {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.footer-subscribe .subscribe-input {
  color: var(--paper);
}

.footer-subscribe .subscribe-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.footer-subscribe .subscribe-button {
  color: var(--paper);
}

.footer-subscribe .subscribe-button:hover {
  color: var(--accent);
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: var(--space-lg);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--paper);
  transition: color var(--duration);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
  margin-top: var(--space-4xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--duration);
}

.footer-bottom a:hover {
  color: var(--paper);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
  .nav-links {
    display: none;
  }

  .hero {
    padding: var(--space-3xl) var(--gutter) var(--space-2xl);
  }

  .hero-title {
    max-width: 100%;
  }

  .post-header {
    padding: var(--space-3xl) var(--gutter) var(--space-2xl);
  }

  .post-title {
    max-width: 100%;
  }

  .post-content .kg-bookmark-container {
    flex-direction: column;
  }

  .post-content .kg-bookmark-thumbnail {
    width: 100%;
    height: 200px;
  }
}

/* ============================================
   GHOST PORTAL & MEMBER OVERRIDES
   ============================================ */

/* Override Ghost's default portal button styling */
.gh-portal-triggerbtn-iframe {
  display: none !important;
}

/* Error states */
.error-template {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-4xl) var(--gutter);
  text-align: center;
}

.error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 500;
  color: var(--border);
  line-height: 1;
}

.error-description {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--subtle);
  margin-top: var(--space-lg);
}

.error-link {
  display: inline-block;
  margin-top: var(--space-2xl);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--paper);
  background-color: var(--ink);
  padding: 0.75rem 1.5rem;
  transition: all var(--duration);
}

.error-link:hover {
  background-color: var(--accent);
}
