/* ===== Thinka Custom Theme ===== */

/* === IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* === VARIABLES === */
:root {
  --brand-indigo: #4F46E5;
  --brand-indigo-soft: #6366F1;
  --brand-obsidian: #0B0F1A;
  --brand-slate: #475569;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-nav: rgba(255, 255, 255, 0.8);
  --bg-footer: #FFFFFF;
  --bg-hero: #FFFFFF;
  --text-primary: #0B0F1A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-nav: #0B0F1A;
  --text-heading: #0B0F1A;
  --border-color: #F1F5F9;
  --border-hover: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --max-width: 1280px;
  --content-width: 720px;
}

/* No dark-mode styles - Always Light Theme */

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

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background .3s, color .3s;
}

a { color: var(--brand-indigo); text-decoration: none; }
a:hover { color: var(--brand-indigo-light); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

/* === LAYOUT === */
.gh-viewport {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

/* === FULL WIDTH SECTIONS === */
.gh-navigation,
.gh-footer {
  width: 100%;
}

.gh-navigation-inner,
.gh-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === NAVIGATION === */
.gh-navigation {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

/* Main Navbar */
.gh-navigation-main {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #f3f4f6;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.gh-navigation-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.gh-navigation-brand .gh-navigation-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.3s;
  text-decoration: none;
}

.gh-navigation-brand .gh-navigation-logo:hover {
  opacity: 0.8;
}

.gh-navigation-brand .gh-navigation-logo img {
  height: 40px;
  width: auto;
}

.gh-navigation-brand .gh-navigation-logo span {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--brand-obsidian);
  text-transform: uppercase;
}

.gh-navigation-menu ul {
  display: flex;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.gh-navigation-menu a {
  font-size: 0.875rem;
  font-weight: 700;
  color: #6b7280;
  transition: color 0.2s;
}

.gh-navigation-menu a:hover {
  color: var(--brand-indigo);
}

.gh-navigation-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gh-button-secondary {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
}

/* Responsive Helpers */
.gh-hide-mobile {
  display: none !important;
}

@media (min-width: 1024px) {
  .gh-hide-mobile {
    display: inline-flex !important;
  }
}

.gh-burger {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  color: var(--brand-obsidian);
}

@media (min-width: 1024px) {
  .gh-burger,
  .gh-navigation-menu {
    display: none;
  }
  
  .gh-navigation-menu {
    display: block;
  }
}

/* Mobile Menu Sidebar */
.gh-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.gh-mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

.gh-mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 26, 0.4);
  backdrop-filter: blur(4px);
}

.gh-mobile-menu-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 300px;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.gh-mobile-menu.is-open .gh-mobile-menu-panel {
  transform: translateX(0);
}

.gh-mobile-menu-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
}

.gh-mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
}

.gh-mobile-menu-nav {
  padding: 32px 24px;
  flex: 1;
  overflow-y: auto;
}

.gh-mobile-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.gh-mobile-menu-nav a {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--brand-obsidian);
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  transition: background 0.2s;
}

.gh-mobile-menu-nav a:hover {
  background: #f9fafb;
}

.gh-mobile-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 32px;
  border-top: 1px solid #f3f4f6;
}

.gh-mobile-menu-actions .gh-button {
  width: 100%;
  justify-content: center;
}

.gh-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-nav);
  border-radius: 6px;
  transition: all .2s;
}

.gh-button-primary {
  background: var(--brand-indigo);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 24px;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.gh-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
  color: #fff;
}

.gh-icon-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-nav);
  font-size: 1.1rem;
  border-radius: 6px;
}

.gh-icon-button:hover {
  background: rgba(99,102,241,.08);
}

/* === LANGUAGE TOGGLE === */
.gh-lang-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 8px;
  color: var(--text-nav);
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: all .3s;
  font-family: var(--font-heading);
}

.gh-lang-toggle:hover {
  border-color: var(--brand-indigo);
  background: rgba(99,102,241,.08);
}

/* Theme toggle removed */
.gh-theme-toggle {
  display: none !important;
}

/* === HERO (home page) === */
.gh-hero {
  background: var(--bg-hero);
  padding: 80px 0 60px;
  text-align: center;
  transition: background .3s;
  border-bottom: 1px solid var(--border-color);
}

.gh-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.gh-hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 16px;
  letter-spacing: -0.05em;
}

.gh-hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 600px;
  margin: 0 auto;
}

/* === POSTS LIST === */
.gh-container {
  padding: 32px 0;
}

.gh-container-header {
  margin-bottom: 24px;
}

.gh-container-title {
  font-size: 1.4rem;
  font-weight: 700;
}

.gh-posts-list {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

/* === CARD === */
.gh-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  transition: all .3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.gh-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
  border-color: var(--brand-indigo-soft);
}

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

.gh-card-image {
  display: block;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: 0;
}

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

.gh-card-content {
  padding: 24px;
}

.gh-card-tags {
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
}

.gh-card-tags a {
  color: var(--brand-indigo);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gh-card-title {
  font-size: 1.5rem;
  margin-bottom: 12px;
  line-height: 1.2;
}

.gh-card-title a {
  color: var(--text-heading);
}

.gh-card-title a:hover {
  color: var(--brand-indigo);
}

.gh-card-excerpt {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === LIST LAYOUT === */
.gh-posts-list {
  display: flex;
  flex-direction: column;
  gap: 60px;
  max-width: 900px;
  margin: 0 auto;
}

.gh-featured-section {
  margin-bottom: 80px;
}

.gh-card-featured {
  border: none !important;
  box-shadow: var(--shadow-premium) !important;
  padding-bottom: 0 !important;
  border-radius: 24px !important;
  background: #fff;
}

.gh-card-featured .gh-card-image {
  border-radius: 24px 24px 0 0 !important;
}

.gh-card-featured .gh-card-content {
  padding: 48px !important;
}

.gh-card-featured .gh-card-title {
  font-size: 3.5rem !important;
  margin-bottom: 24px;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.gh-card-featured .gh-card-excerpt {
  font-size: 1.35rem !important;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .gh-card:not(.gh-card-featured) {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .gh-posts-grid .gh-card {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .gh-posts-grid .gh-card .gh-card-image {
    width: 100% !important;
  }

  .gh-card:not(.gh-card-featured) .gh-card-image {
    width: 280px;
    flex-shrink: 0;
    margin-bottom: 0;
  }
}

/* Grid Layout */
.gh-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 32px;
}

@media (min-width: 768px) {
  .gh-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gh-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === SINGLE POST === */
.gh-article {
  padding: 80px 0;
}

.gh-article-header {
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.gh-article-image {
  margin-bottom: 48px;
  border-radius: 20px;
  overflow: hidden;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  max-width: var(--max-width);
}

@media (max-width: 1280px) {
  .gh-article-image {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    left: 0;
    right: 0;
  }
}

.gh-article-title {
  font-size: 4rem;
  margin-bottom: 24px;
  line-height: 1.1;
}

.gh-article-meta {
  color: var(--text-muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.gh-content {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 400;
}

.gh-content p { margin-bottom: 2rem; }
.gh-content h2 { font-size: 2.25rem; margin: 3.5rem 0 1.5rem; }
.gh-content h3 { font-size: 1.75rem; margin: 2.5rem 0 1.2rem; }

.gh-content blockquote {
  border-left: 4px solid var(--brand-indigo);
  background: var(--bg-secondary);
  padding: 32px 40px;
  border-radius: 16px;
  margin: 3rem 0;
}

.gh-content blockquote p {
  color: var(--text-primary);
  font-style: italic;
  font-size: 1.4rem;
  margin-bottom: 0;
}

.gh-content pre {
  background: var(--brand-obsidian);
  color: #fff;
  border-radius: 16px;
  padding: 32px;
  overflow-x: auto;
  margin: 3rem 0;
  font-size: 1rem;
}

.gh-content code {
  color: var(--brand-indigo);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}

.gh-content a {
  color: var(--brand-indigo);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: all .2s;
}

.gh-content a:hover {
  background: var(--brand-indigo);
  color: #fff;
  text-decoration: none;
}

/* === FOOTER === */
.gh-footer {
  background: #fff;
  border-top: 1px solid var(--border-color);
  padding: 80px 0 40px;
  margin-top: 100px;
}

.gh-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.gh-footer-logo {
  font-family: var(--font-heading);
  font-weight: 900;
  color: var(--text-heading);
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

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

.gh-footer-menu {
  display: flex;
  gap: 32px;
}

.gh-footer-menu a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
}

.gh-footer-menu a:hover {
  color: var(--brand-indigo);
}

.gh-footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  width: 100%;
  padding-top: 40px;
}

/* === PAGINATION === */
.gh-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 0;
}

.gh-pagination a {
  color: var(--brand-indigo);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: .9rem;
}

.gh-pagination a:hover {
  background: var(--brand-indigo);
  color: #fff;
}

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--brand-indigo); border-radius: 4px; }
.dark-mode ::-webkit-scrollbar-track { background: var(--brand-obsidian); }

/* === ERROR PAGE === */
.gh-error {
  text-align: center;
  padding: 80px 20px;
}

.gh-error-code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--brand-primary);
  font-family: var(--font-heading);
}

.gh-error-description {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 1.1rem;
}

/* === AUTHOR / TAG HEADERS === */
.gh-author-header,
.gh-tag-header {
  margin-bottom: 32px;
}

.gh-author-header h1,
.gh-tag-header h1 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.gh-author-header p,
.gh-tag-header p {
  color: var(--text-secondary);
  font-size: .95rem;
}

/* === GHOST PORTAL STYLING === */
:root {
  --ghost-accent-color: var(--brand-indigo);
}

/* Portal popup background and text */
.gh-portal-popup {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 16px !important;
}

.gh-portal-popup * {
  color: var(--text-primary) !important;
}

/* Headings inside Portal */
.gh-portal-popup h1,
.gh-portal-popup h2,
.gh-portal-popup h3 {
  font-family: var(--font-heading) !important;
}

/* Input fields inside Portal */
.gh-portal-popup input {
  background: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-family: var(--font-body) !important;
}

.gh-portal-popup input:focus {
  border-color: var(--brand-indigo) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.1) !important;
  outline: none !important;
}

/* Validation feedback - required fields */
.gh-portal-popup input:invalid:not(:placeholder-shown) {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1) !important;
}

.gh-portal-popup .gh-portal-input-error {
  color: #EF4444 !important;
  font-size: .82rem !important;
  margin-top: 4px !important;
}

/* Submit button inside Portal */
.gh-portal-popup button[type="submit"] {
  background: var(--brand-primary) !important;
  color: var(--brand-obsidian) !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
  padding: 12px 28px !important;
  border: none !important;
  font-family: var(--font-body) !important;
}

.gh-portal-popup button[type="submit"]:hover {
  box-shadow: 0 0 20px rgba(0,255,148,.3) !important;
}

/* Links inside Portal */
.gh-portal-popup a {
  color: var(--brand-indigo) !important;
}

/* Close button */
.gh-portal-popup .gh-portal-close {
  color: var(--text-muted) !important;
}

/* Dark mode overrides for Portal */
.dark-mode .gh-portal-popup {
  background: var(--bg-card) !important;
  border-color: rgba(99,102,241,.15) !important;
}

.dark-mode .gh-portal-popup input {
  background: var(--bg-input) !important;
  border-color: rgba(99,102,241,.2) !important;
  color: var(--text-primary) !important;
}

.dark-mode .gh-portal-popup input:invalid:not(:placeholder-shown) {
  border-color: #EF4444 !important;
}

/* === RESPONSIVE === */
/* === KOENIG CONTENT STYLES === */
.kg-card {
  margin: 3rem auto;
}

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

.kg-image-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kg-image-card figcaption {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.kg-width-wide .kg-image {
  max-width: 105%;
  width: 105%;
}

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

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.kg-gallery-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.kg-gallery-image img {
  display: block;
  margin: 0;
  width: 100%;
  height: 100%;
}

.kg-gallery-row:not(:first-of-type) {
  margin: 0.75rem 0 0;
}

.kg-gallery-image:not(:first-of-type) {
  margin: 0 0.75rem 0;
}

.kg-bookmark-card {
  width: 100%;
  margin: 3rem 0;
}

.kg-bookmark-container {
  display: flex;
  color: var(--text-primary);
  font-family: var(--font-body);
  text-decoration: none;
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.kg-bookmark-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 24px;
}

.kg-bookmark-title {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 8px;
}

.kg-bookmark-description {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-height: 4.5em;
  overflow: hidden;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.kg-bookmark-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.kg-bookmark-author:after,
.kg-bookmark-publisher:before {
  content: "•";
  margin: 0 6px;
}

.kg-bookmark-thumbnail {
  position: relative;
  min-width: 33%;
  max-height: 100%;
}

.kg-bookmark-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-embed-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.kg-embed-card figcaption {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.kg-callout-card {
  display: flex;
  padding: 24px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  margin: 2rem 0;
}

.kg-callout-emoji {
  font-size: 1.5rem;
  line-height: 1;
  margin-right: 16px;
}

.kg-callout-text {
  font-size: 1.1rem;
  line-height: 1.5;
}

.kg-blockquote-alt {
  font-size: 1.5rem;
  font-style: italic;
  text-align: center;
  margin: 4rem 0;
  padding: 0 40px;
  border: none;
}
