/* heylumen Academy — Ghost Theme Styles */

:root {
  --bg: #0A0A0F;
  --bg-soft: #101019;
  --card: rgba(20, 20, 31, 0.82);
  --card-strong: rgba(24, 24, 38, 0.96);
  --line: rgba(212, 160, 74, 0.18);
  --line-strong: rgba(212, 160, 74, 0.34);
  --text: #FFFFFF;
  --muted: #B0B0B8;
  --gold: #D4A04A;
  --gold-soft: #F2C878;
  --gold-glow: rgba(212, 160, 74, 0.35);
  --radius: 24px;
  --radius-sm: 16px;
  --shadow: 0 20px 80px rgba(0,0,0,0.45);
  --max: 820px;
}

/* === Language Toggle === */
.lang-en .lang-es { display: none !important; }
.lang-es .lang-en { display: none !important; }

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(212,160,74,0.10), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255,255,255,0.05), transparent 24%),
    linear-gradient(180deg, #0A0A0F 0%, #09090D 100%);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; line-height: 1.1; letter-spacing: -0.03em; }

/* === Layout === */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.wide-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* === Header / Nav === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.brand-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
  vertical-align: middle;
}

.brand-sub {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.header-nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--gold);
}

/* === Language Switcher === */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-switch button.active {
  background: var(--gold);
  color: var(--bg);
}

.lang-switch button:hover:not(.active) {
  color: var(--text);
}

/* === Footer === */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--gold);
  transition: opacity 0.2s;
}

.site-footer a:hover {
  opacity: 0.8;
}

/* === Index: Post Feed === */
.feed-header {
  padding: 96px 0 48px;
  text-align: center;
}

.feed-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 12px;
}

.feed-header p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

.gold-word { color: var(--gold); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding-bottom: 80px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
}

.post-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
}

.post-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}

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

.post-card-body {
  padding: 24px;
}

.post-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 8px;
}

.post-card-body h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  line-height: 1.25;
}

.post-card-body p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 32px 0 80px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s;
}

.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* === Post Single === */
.post-header {
  padding: 96px 0 32px;
  text-align: center;
}

.post-header .tag-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 20px;
}

.post-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 720px;
  margin: 0 auto 16px;
}

.post-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.post-feature-image {
  max-width: 1000px;
  margin: 0 auto 48px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-feature-image img {
  width: 100%;
}

/* === Post Content === */
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.6rem;
  margin: 48px 0 16px;
}

.post-content h3 {
  font-size: 1.3rem;
  margin: 36px 0 12px;
}

.post-content p {
  margin-bottom: 20px;
}

.post-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-content a:hover {
  color: var(--gold-soft);
}

.post-content ul,
.post-content ol {
  margin: 0 0 20px 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-style: italic;
}

.post-content pre {
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.post-content code {
  background: var(--card);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

.post-content pre code {
  background: transparent;
  padding: 0;
}

.post-content img {
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.post-content th,
.post-content td {
  padding: 12px 16px;
  border: 1px solid var(--line);
  text-align: left;
}

.post-content th {
  background: var(--card);
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
}

/* === Koenig Editor Width Classes === */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 24px calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: 24px calc(50% - 50vw);
}

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

/* === Page === */
.page-header {
  padding: 96px 0 32px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.page-content {
  padding-bottom: 80px;
}

/* === Members CTA === */
.cta-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  margin: 64px 0;
}

.cta-box h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--muted);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--gold-glow);
}

/* === Responsive === */
@media (max-width: 640px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .header-nav {
    display: none;
  }

  .post-card-body {
    padding: 18px;
  }

  .cta-box {
    padding: 32px 20px;
  }
}
