/* ==========================================================================
   Animus Ghost Theme - screen.css
   Apple-inspired, dark-first design system
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Font Stack */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Colors - Base */
  --color-black: #000000;
  --color-pure-white: #ffffff;
  --color-white: #f5f5f7;

  /* Colors - Gray Scale (Apple-inspired) */
  --color-gray-01: #1d1d1f;
  --color-gray-02: #2d2d30;
  --color-gray-03: #424245;
  --color-gray-04: #6e6e73;
  --color-gray-05: #86868b;
  --color-gray-06: #a1a1a6;

  /* Colors - iOS Tokens */
  --color-ios-bg: #1C1C1E;
  --color-ios-hover: #242426;
  --color-ios-active: #2C2C2E;

  /* Colors - Text */
  --color-text-primary: #f5f5f7;
  --color-text-secondary: #86868b;
  --color-text-tertiary: #6e6e73;

  /* Colors - Brand */
  --color-accent: #7C3AED;
  --color-accent-hover: #6D28D9;

  /* Colors - Action Buttons */
  --color-action: #242426;
  --color-action-hover: #2C2C2E;
  --color-action-active: #363638;

  /* Borders */
  --color-border-subtle: rgba(255, 255, 255, 0.04);
  --color-border-light: rgba(255, 255, 255, 0.05);
  --color-border-default: rgba(255, 255, 255, 0.08);
  --color-border-medium: rgba(255, 255, 255, 0.12);
  --color-border-strong: rgba(255, 255, 255, 0.15);

  /* Overlays */
  --color-overlay-subtle: rgba(255, 255, 255, 0.02);
  --color-overlay-light: rgba(255, 255, 255, 0.03);
  --color-overlay-default: rgba(255, 255, 255, 0.08);
  --color-overlay-medium: rgba(255, 255, 255, 0.12);

  /* Timing */
  --timing-fast: 0.2s;
  --timing-normal: 0.3s;
  --timing-slow: 0.4s;
  --timing-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows - premium layered */
  --shadow-card:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.04),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 2px 2px 0 rgba(0, 0, 0, 0.15),
    0 4px 4px 0 rgba(0, 0, 0, 0.1),
    0 8px 8px 0 rgba(0, 0, 0, 0.05);
  --shadow-card-hover:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 4px 8px 0 rgba(0, 0, 0, 0.2),
    0 12px 24px 0 rgba(0, 0, 0, 0.15),
    0 24px 48px 0 rgba(0, 0, 0, 0.1);

  /* Layout */
  --max-width: 960px;
  --content-width: 680px;
  --nav-height: 72px;
}

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

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

@media (max-width: 1068px) {
  html { font-size: 15px; }
}

@media (max-width: 768px) {
  html { font-size: 14px; }
}

body {
  background-color: var(--color-black);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
  overflow-x: hidden;
}

::selection {
  background-color: rgba(124, 58, 237, 0.3);
  color: var(--color-pure-white);
}

::-moz-selection {
  background-color: rgba(124, 58, 237, 0.3);
  color: var(--color-pure-white);
}

a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--timing-fast) ease;
}

a:hover {
  color: var(--color-pure-white);
}

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

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-border-medium);
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-gray-03);
  border-radius: 6px;
  border: 3px solid var(--color-black);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-04);
}

/* --------------------------------------------------------------------------
   2. Layout
   -------------------------------------------------------------------------- */
.gh-viewport {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.gh-main {
  flex: 1;
  padding-top: calc(var(--nav-height) + 24px);
}

.gh-outer {
  padding: 0 24px;
}

.gh-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (max-width: 768px) {
  .gh-outer {
    padding: 0 16px;
  }
}

/* --------------------------------------------------------------------------
   3. Header / Navigation
   -------------------------------------------------------------------------- */
.gh-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 16px;
}

.gh-head-inner {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-radius: 16px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all var(--timing-normal) ease;
}

.gh-head.is-scrolled .gh-head-inner {
  background: rgba(0, 0, 0, 0.9);
  border-color: var(--color-border-default);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Logo */
.gh-head-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.gh-head-logo-icon {
  width: 36px;
  height: 36px;
}

.gh-head-logo-wordmark {
  height: 20px;
  width: auto;
}

/* Navigation */
.gh-head-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gh-head-menu a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 500;
  transition: color var(--timing-fast) ease;
}

.gh-head-menu a:hover {
  color: var(--color-pure-white);
}

.gh-head-menu a.nav-current {
  color: var(--color-pure-white);
}

/* CTA */
.gh-head-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--color-pure-white);
  color: var(--color-black) !important;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9999px;
  transition: all var(--timing-fast) ease;
}

.gh-head-cta:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-black) !important;
  transform: translateY(-1px);
}

/* Mobile menu toggle */
.gh-burger {
  display: none;
  background: none;
  border: none;
  color: var(--color-pure-white);
  padding: 8px;
  cursor: pointer;
}

.gh-burger svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .gh-head-menu {
    display: none;
  }

  .gh-head-cta-desktop {
    display: none;
  }

  .gh-burger {
    display: block;
  }

  /* Mobile menu open state */
  .gh-head.is-open .gh-head-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    transform: none;
    background: var(--color-black);
    border: 1px solid var(--color-border-default);
    border-radius: 16px;
    padding: 16px 24px;
    gap: 16px;
  }

  .gh-head.is-open .gh-head-menu a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
  }

  .gh-head.is-open .gh-head-menu a:hover {
    color: var(--color-pure-white);
  }

  .gh-head.is-open .gh-head-cta-mobile {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    margin-top: 12px;
    border-top: 1px solid var(--color-border-default);
    padding-top: 24px;
  }
}

/* --------------------------------------------------------------------------
   4. Footer
   -------------------------------------------------------------------------- */
.gh-foot {
  padding: 72px 0;
  border-top: 1px solid var(--color-border-subtle);
  background: var(--color-black);
}

.gh-foot-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.gh-foot-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gh-foot-brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gh-foot-brand-logo svg {
  width: 32px;
  height: 32px;
}

.gh-foot-brand-logo img {
  height: 20px;
  width: auto;
}

.gh-foot-tagline {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 280px;
}

.gh-foot-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray-05);
  margin-bottom: 16px;
}

.gh-foot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gh-foot-col a {
  font-size: 14px;
  color: var(--color-text-secondary);
  transition: color var(--timing-fast) ease;
}

.gh-foot-col a:hover {
  color: var(--color-text-primary);
}

.gh-foot-bottom {
  grid-column: 1 / -1;
  padding-top: 40px;
  border-top: 1px solid var(--color-border-default);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--color-gray-05);
}

@media (max-width: 768px) {
  .gh-foot-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
    padding: 0 16px;
  }

  .gh-foot-brand {
    align-items: center;
  }

  .gh-foot-brand-logo {
    justify-content: center;
  }

  .gh-foot-tagline {
    margin: 0 auto;
  }

  .gh-foot-bottom {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   5. Post Feed (Index / Tag / Author)
   -------------------------------------------------------------------------- */
/* Featured Posts - 2-column top section */
.gh-featured {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 28px;
  margin-bottom: 56px;
}

.gh-featured .gh-card-image {
  aspect-ratio: 3 / 2;
}

.gh-featured .gh-card-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

@media (max-width: 700px) {
  .gh-featured {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Section label */
.gh-feed-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* Post Grid */
.gh-feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 28px;
  padding-bottom: 80px;
}

@media (max-width: 900px) {
  .gh-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 580px) {
  .gh-feed {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* --------------------------------------------------------------------------
   6. Post Card - Resend-inspired minimal
   -------------------------------------------------------------------------- */
.gh-card {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.gh-card:hover .gh-card-image img {
  transform: scale(1.02);
}

.gh-card-link {
  display: block;
  color: inherit;
}

.gh-card-link:hover {
  color: inherit;
}

/* Card Image */
.gh-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--color-border-light);
  background: var(--color-gray-01);
  margin-bottom: 16px;
}

.gh-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--timing-smooth);
}

/* Card Content */
.gh-card-content {
  padding: 0;
}

.gh-card-tag {
  display: none;
}

.gh-card-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--color-pure-white);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-card-excerpt {
  display: none;
}

.gh-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  padding: 0;
  border: none;
}

.gh-card-meta-sep {
  display: inline-block;
  opacity: 0.4;
}



/* --------------------------------------------------------------------------
   7. Single Post
   -------------------------------------------------------------------------- */
.gh-article {
  padding: 80px 0;
}

.gh-article-header {
  max-width: var(--content-width);
  margin: 0 auto 56px;
  text-align: center;
}

.gh-article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.gh-article-tag a {
  color: var(--color-accent);
}

.gh-article-tag a:hover {
  color: var(--color-accent-hover);
}

.gh-article-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 24px;
}

/* Shimmer gradient text for article titles */
.gh-article-title .gradient-text,
.gh-article-title.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--color-gray-05) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear 1;
}

.gh-article-excerpt {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.gh-article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--color-text-tertiary);
}

.gh-article-meta-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gh-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border-default);
}

.gh-article-meta-author a {
  color: var(--color-text-primary);
  font-weight: 500;
}

.gh-article-meta-sep {
  color: var(--color-text-tertiary);
  opacity: 0.5;
}

/* Feature Image */
.gh-article-image {
  max-width: 1000px;
  margin: 0 auto 56px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border-subtle);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 12px 40px rgba(0, 0, 0, 0.15);
}

.gh-article-image img {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .gh-article {
    padding: 48px 0;
  }

  .gh-article-header {
    margin-bottom: 36px;
  }

  .gh-article-excerpt {
    margin-bottom: 28px;
  }
}

/* --------------------------------------------------------------------------
   8. Post Content (Ghost Editor output)
   -------------------------------------------------------------------------- */
.gh-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
}

/* Headings */
.gh-content h1,
.gh-content h2,
.gh-content h3,
.gh-content h4,
.gh-content h5,
.gh-content h6 {
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  margin-top: 2.5em;
  margin-bottom: 0.6em;
  line-height: 1.2;
}

.gh-content h2 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.gh-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

.gh-content h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

/* Paragraphs */
.gh-content p {
  margin-bottom: 1.5em;
}

/* Links */
.gh-content a {
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border-medium);
  transition: text-decoration-color var(--timing-fast) ease;
}

.gh-content a:hover {
  text-decoration-color: var(--color-text-primary);
}

/* Lists */
.gh-content ul,
.gh-content ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

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

.gh-content li::marker {
  color: var(--color-text-tertiary);
}

/* Blockquotes */
.gh-content blockquote {
  margin: 2.5em 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--color-border-medium);
  font-size: 1.15rem;
  color: var(--color-text-primary);
  font-style: italic;
  letter-spacing: -0.015em;
}

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

/* Code */
.gh-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--color-ios-bg);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--color-border-default);
}

.gh-content pre {
  margin: 2.5em 0;
  padding: 28px;
  background: rgba(28, 28, 30, 0.6);
  border: 1px solid var(--color-border-default);
  border-radius: 16px;
  overflow-x: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-primary);
}

/* Horizontal rules */
.gh-content hr {
  margin: 3em 0;
  border: none;
  height: 1px;
  background: var(--color-border-default);
}

/* Images */
.gh-content img {
  margin: 2em 0;
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
}

/* Figures / Captions */
.gh-content figure {
  margin: 2em 0;
}

.gh-content figcaption {
  margin-top: 12px;
  font-size: 13px;
  color: var(--color-text-tertiary);
  text-align: center;
}

/* Tables */
.gh-content table {
  width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
}

.gh-content th,
.gh-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-default);
}

.gh-content th {
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gh-content td {
  color: var(--color-text-secondary);
}

/* Wide & Full-width content */
.gh-content .kg-width-wide {
  max-width: 1000px;
  margin-left: calc(50% - 500px);
  margin-right: calc(50% - 500px);
}

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

@media (max-width: 1040px) {
  .gh-content .kg-width-wide {
    margin-left: -24px;
    margin-right: -24px;
  }
}

/* Ghost card styles */
.gh-content .kg-image-card img,
.gh-content .kg-gallery-image img {
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
}

.gh-content .kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2em 0;
}

.gh-content .kg-gallery-row {
  display: flex;
  gap: 8px;
}

.gh-content .kg-gallery-image {
  flex: 1;
}

/* Bookmark card */
.gh-content .kg-bookmark-card {
  margin: 2em 0;
}

.gh-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  background: var(--color-ios-bg);
  border: 1px solid var(--color-border-default);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--timing-normal) ease;
}

.gh-content .kg-bookmark-container:hover {
  border-color: var(--color-border-strong);
}

.gh-content .kg-bookmark-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gh-content .kg-bookmark-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.gh-content .kg-bookmark-description {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-content .kg-bookmark-author,
.gh-content .kg-bookmark-publisher {
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.gh-content .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.gh-content .kg-bookmark-icon {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

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

.gh-content .kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  border: none;
}

@media (max-width: 640px) {
  .gh-content .kg-bookmark-container {
    flex-direction: column-reverse;
  }

  .gh-content .kg-bookmark-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
  }
}

/* Callout card */
.gh-content .kg-callout-card {
  margin: 2em 0;
  padding: 20px 24px;
  border-radius: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--color-ios-bg);
  border: 1px solid var(--color-border-default);
}

.gh-content .kg-callout-emoji {
  font-size: 1.2em;
  line-height: 1.4;
}

.gh-content .kg-callout-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* Button card */
.gh-content .kg-button-card {
  margin: 2em 0;
  text-align: center;
}

.gh-content .kg-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 9999px;
  transition: all var(--timing-normal) var(--timing-smooth);
  text-decoration: none;
}

.gh-content .kg-btn-accent {
  background: var(--color-pure-white);
  color: var(--color-black);
}

.gh-content .kg-btn-accent:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

/* Toggle card */
.gh-content .kg-toggle-card {
  margin: 2em 0;
  background: var(--color-ios-bg);
  border: 1px solid var(--color-border-default);
  border-radius: 12px;
  overflow: hidden;
}

.gh-content .kg-toggle-heading {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  color: var(--color-text-primary);
}

.gh-content .kg-toggle-content {
  padding: 0 24px 20px;
  color: var(--color-text-secondary);
}

/* --------------------------------------------------------------------------
   9. Author Page
   -------------------------------------------------------------------------- */
.gh-author-header {
  padding: 80px 0 56px;
  text-align: center;
}

.gh-author-avatar-wrapper {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border-medium);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.gh-author-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-author-name {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--color-pure-white);
  margin-bottom: 12px;
  line-height: 1.1;
}

.gh-author-bio {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto 16px;
  line-height: 1.65;
}

.gh-author-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.gh-author-meta a {
  color: var(--color-accent);
}

/* --------------------------------------------------------------------------
   10. Tag Page
   -------------------------------------------------------------------------- */
.gh-tag-header {
  padding: 80px 0 56px;
  text-align: center;
}

.gh-tag-name {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 16px;
}

.gh-tag-name.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--color-gray-05) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear 1;
}

.gh-tag-description {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-text-secondary);
  max-width: 520px;
  margin: 0 auto 16px;
  line-height: 1.65;
}

.gh-tag-count {
  font-size: 12px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   11. Pagination
   -------------------------------------------------------------------------- */
.gh-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 0 80px;
  font-size: 14px;
}

.gh-pagination a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: transparent;
  color: var(--color-text-primary);
  border-radius: 9999px;
  border: 1px solid var(--color-border-default);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--timing-fast) ease;
}

.gh-pagination a:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--color-border-medium);
  transform: translateY(-1px);
}

.gh-pagination .gh-pagination-location {
  color: var(--color-text-tertiary);
}

/* --------------------------------------------------------------------------
   12. Error Pages
   -------------------------------------------------------------------------- */
.gh-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 200px);
  text-align: center;
  padding: 80px 24px;
}

.gh-error-code {
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--color-gray-02) 0%, rgba(45, 45, 48, 0.3) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gh-error-message {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.gh-error-description {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

.gh-error-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  background: var(--color-pure-white);
  color: var(--color-black);
  font-size: 14px;
  font-weight: 600;
  border-radius: 9999px;
  transition: all var(--timing-fast) ease;
}

.gh-error-link:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-black);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   13. Animations
   -------------------------------------------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.gh-animate {
  opacity: 0;
  animation: fadeInUp 0.8s var(--timing-smooth) forwards;
}

.gh-animate-delay-1 { animation-delay: 0.15s; }
.gh-animate-delay-2 { animation-delay: 0.25s; }
.gh-animate-delay-3 { animation-delay: 0.35s; }

/* Gradient shimmer text - matching landing page */
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--color-gray-05) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   14. Blog Index Hero
   -------------------------------------------------------------------------- */
.gh-blog-hero {
  padding: 24px 0 36px;
}

.gh-blog-hero-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-pure-white);
}

@media (max-width: 768px) {
  .gh-blog-hero {
    padding: 20px 0 28px;
  }

  .gh-blog-hero-title {
    font-size: 28px;
  }
}

/* --------------------------------------------------------------------------
   15. Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------------------------------
   16. Subscribe / Membership Form (Ghost Portal overrides)
   -------------------------------------------------------------------------- */
.gh-subscribe {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 56px 48px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  border: 1px solid var(--color-border-default);
  border-radius: 24px;
  text-align: center;
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gh-subscribe-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-pure-white);
  margin-bottom: 8px;
}

.gh-subscribe-description {
  font-size: 15px;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.gh-subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
}

.gh-subscribe-input {
  flex: 1;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border-default);
  border-radius: 9999px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: all var(--timing-fast) ease;
}

.gh-subscribe-input::placeholder {
  color: var(--color-text-tertiary);
}

.gh-subscribe-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-border-medium);
}

.gh-subscribe-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
  color: var(--color-black);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: all var(--timing-fast) ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.gh-subscribe-btn:hover {
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.15);
}

@media (max-width: 480px) {
  .gh-subscribe {
    padding: 32px 24px;
  }

  .gh-subscribe-form {
    flex-direction: column;
  }
}
