/* Wingman Ghost Theme - Matches bobgerace.com */

:root {
  --bg-primary: hsl(220, 15%, 7%);
  --bg-secondary: hsl(220, 15%, 9%);
  --bg-card: hsl(220, 15%, 10%);
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1; /* slate-300 */
  --text-muted: #94a3b8; /* slate-400 */
  --text-faint: #64748b; /* slate-500 */
  --accent: #3b82f6; /* blue-500 */
  --accent-hover: #2563eb; /* blue-600 */
  --border: rgba(255, 255, 255, 0.05);
  --border-card: rgba(100, 116, 139, 0.5); /* slate-700/50 */
}

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

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

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 1rem 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1.5rem 0;
}

/* Navigation */
.gh-head {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.gh-head-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gh-head-brand {
  display: flex;
  align-items: center;
}

.gh-head-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.gh-head-logo img {
  max-height: 40px;
}

.gh-head-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-head-menu a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.gh-head-menu a:hover {
  color: var(--text-primary);
}

/* Main Content */
.gh-main {
  min-height: 100vh;
}

.gh-container {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Index / Post List */
.gh-postfeed {
  padding: 4rem 0;
}

.gh-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s ease;
}

.gh-card:hover {
  border-color: var(--text-muted);
}

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

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

.gh-card-image {
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.gh-card-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.gh-card-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.gh-card-excerpt {
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-card-meta {
  font-size: 0.875rem;
  color: var(--text-faint);
}

/* Single Post */
.gh-article {
  padding: 4rem 0;
}

.gh-article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gh-article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .gh-article-title {
    font-size: 3rem;
  }
}

.gh-article-meta {
  color: var(--text-faint);
  font-size: 0.875rem;
}

.gh-article-image {
  margin: 2rem 0 3rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

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

/* Post Content */
.gh-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.gh-content h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.gh-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

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

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

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

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

.gh-content pre {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.gh-content code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.875em;
}

.gh-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

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

.gh-content img {
  border-radius: 0.5rem;
  margin: 2rem 0;
}

/* Author Section */
.gh-author-card {
  background-color: var(--bg-secondary);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-top: 4rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.gh-author-image {
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

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

.gh-author-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.gh-author-bio {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Footer */
.gh-foot {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 4rem;
}

.gh-foot-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .gh-foot-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.gh-foot-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.gh-foot-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-foot-menu a {
  font-size: 0.875rem;
  color: var(--text-faint);
  transition: color 0.2s ease;
}

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

/* Buttons */
.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.gh-btn-primary {
  background-color: var(--accent);
  color: white;
}

.gh-btn-primary:hover {
  background-color: var(--accent-hover);
  color: white;
}

.gh-btn-secondary {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
}

.gh-btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Pagination */
.gh-pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}

.gh-pagination a {
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.gh-pagination a:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Tag Pages */
.gh-tag-header {
  text-align: center;
  padding: 4rem 0 2rem;
}

.gh-tag-name {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.gh-tag-description {
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto;
}

/* 404 Page */
.gh-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 4rem 1.5rem;
}

.gh-error-code {
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-faint);
  line-height: 1;
  margin-bottom: 1rem;
}

.gh-error-description {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Subscribe Form (if using) */
.gh-subscribe {
  background-color: var(--bg-secondary);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  margin: 4rem 0;
}

.gh-subscribe-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.gh-subscribe-description {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.gh-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 24rem;
  margin: 0 auto;
}

@media (min-width: 480px) {
  .gh-subscribe-form {
    flex-direction: row;
  }
}

.gh-subscribe-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 1rem;
}

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

.gh-subscribe-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .gh-article-title {
    font-size: 2rem;
  }
  
  .gh-card {
    padding: 1.5rem;
  }
  
  .gh-author-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* Ghost Koenig Editor - Wide/Full Width Images */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 2rem calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

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

/* Ghost Card Styles */
.kg-card {
  margin: 2rem 0;
}

.kg-image-card img {
  border-radius: 0.5rem;
}

.kg-gallery-card {
  margin: 2rem 0;
}

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

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

.kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
}

.kg-bookmark-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  overflow: hidden;
}

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

.kg-bookmark-content {
  flex: 1;
  padding: 1.25rem;
}

.kg-bookmark-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.kg-bookmark-description {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.kg-bookmark-thumbnail {
  width: 140px;
  flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Embed cards */
.kg-embed-card {
  margin: 2rem 0;
}

.kg-embed-card iframe {
  width: 100%;
  border-radius: 0.5rem;
}

/* Callout card */
.kg-callout-card {
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
}

.kg-callout-emoji {
  font-size: 1.25rem;
}

.kg-callout-text {
  margin: 0;
}

/* Button card */
.kg-button-card {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.kg-button-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent);
  color: white;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.kg-button-card a:hover {
  background-color: var(--accent-hover);
  color: white;
}

/* Toggle/Accordion card */
.kg-toggle-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.kg-toggle-heading {
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kg-toggle-heading h4 {
  margin: 0;
  font-size: 1rem;
}

.kg-toggle-content {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
}

/* File card */
.kg-file-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.kg-file-card-title {
  font-weight: 600;
  color: var(--text-primary);
}

.kg-file-card-caption {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Audio card */
.kg-audio-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.5rem;
  padding: 1rem;
}

/* Video card */
.kg-video-card {
  border-radius: 0.5rem;
  overflow: hidden;
}

.kg-video-card video {
  width: 100%;
}

/* Product card */
.kg-product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.kg-product-card-image {
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.kg-product-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.kg-product-card-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Header card */
.kg-header-card {
  padding: 4rem 2rem;
  text-align: center;
  background-color: var(--bg-secondary);
  border-radius: 0.75rem;
  margin: 2rem 0;
}

.kg-header-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Tag Navigation */
.gh-tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.gh-tag-link {
  padding: 0.5rem 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.gh-tag-link:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.gh-tag-link.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
}

.gh-card-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background-color: var(--accent);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: white;
}
