@import "home.css";

/* Root variables */
:root {
  --color-primary: #00B5C8;
  --color-text: #1E252B;
  --color-text-secondary: #6B7280;
  --color-border: #D9D2C2;
  --color-bg: #F7F4EC;
  --color-bg-light: #FFFFFF;
}

html.dark-mode {
  --color-text: #F7F4EC;
  --color-text-secondary: #B8C2CC;
  --color-bg: #1E252B;
  --color-bg-light: #2A303A;
}

/* Base styles */
html, body {
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

/* Navigation */
.gh-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg-light);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gh-brand {
  font-weight: 600;
  color: var(--color-text);
}

.gh-nav a {
  margin-left: 2rem;
  color: var(--color-text-secondary);
}

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

/* Main content */
.gh-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.gh-main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Article header */
.gh-article-header {
  margin-bottom: 2rem;
}

.gh-article-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.gh-article-title {
  margin: 1rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.gh-excerpt {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-top: 1rem;
  line-height: 1.7;
}

/* Article content */
.gh-content {
  line-height: 1.8;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.gh-content h2 { font-size: 1.75rem; }
.gh-content h3 { font-size: 1.5rem; }
.gh-content h4 { font-size: 1.25rem; }

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

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

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

.gh-content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--color-primary);
  background-color: rgba(0, 181, 200, 0.05);
  font-style: italic;
}

.gh-content code {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.2em 0.4em;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
}

.gh-content pre {
  background-color: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

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

/* Feature image */
.gh-feature-image {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.gh-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.gh-feature-image figcaption {
  margin-top: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

/* Post card (for feed views) */
.gh-post-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--color-bg-light);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gh-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.gh-post-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.gh-post-card-content {
  padding: 0;
}

.gh-post-card-content a {
  color: inherit;
}

.gh-post-title {
  margin: 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.gh-post-title a:hover {
  color: var(--color-primary);
}

.gh-post-excerpt {
  margin: 0.75rem 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.gh-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gh-post-tag {
  background-color: rgba(0, 181, 200, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.gh-post-tag a {
  color: var(--color-primary);
  font-weight: 600;
}

/* Author info */
.gh-article-authors {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.gh-author-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.gh-author-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.gh-author-name {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.gh-author-bio {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Tags */
.gh-article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.gh-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 181, 200, 0.1);
  border-radius: 4px;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.gh-tag:hover {
  background-color: rgba(0, 181, 200, 0.2);
}

/* Pagination */
.gh-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--color-border);
}

.gh-pagination-prev,
.gh-pagination-next {
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.gh-pagination-prev:hover,
.gh-pagination-next:hover {
  opacity: 0.9;
}

.gh-pagination-info {
  color: var(--color-text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
}

/* Error pages */
.gh-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.gh-error-code {
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.gh-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.gh-button:hover {
  background-color: #0092A3;
}

/* Footer */
.gh-footer {
  padding: 2rem;
  background-color: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* Ghost editor content width support — required by Ghost theme validation */
.kg-width-wide {
  width: min(1100px, 100%);
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

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

.kg-width-full img,
.kg-width-wide img {
  width: 100%;
  height: auto;
}

.kg-card {
  margin: 2.5rem 0;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

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

.kg-gallery-row {
  flex-direction: row;
}

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

.kg-bookmark-card,
.kg-toggle-card,
.kg-callout-card,
.kg-product-card,
.kg-file-card {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg-light);
}

.kg-card figcaption,
.gh-feature-image figcaption {
  margin-top: 0.75rem;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .gh-nav {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .gh-nav a {
    margin-left: 0;
  }

  .gh-main {
    padding: 2rem 1rem;
  }

  .gh-article-title {
    font-size: 1.75rem;
  }

  .gh-post-card {
    grid-template-columns: 1fr;
  }

  .gh-pagination {
    flex-direction: column;
    gap: 1rem;
  }

  .gh-error-code {
    font-size: 3rem;
  }
}
