/* ==========================================================================
   LUMINA — LAYOUT & NAVIGATION (Fixed Header & Graphic Logo)
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

.container-narrow {
  max-width: var(--max-width-article);
}

/* Header & Navigation Fix */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .header {
  background-color: rgba(9, 10, 12, 0.92);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--space-4);
}

/* Standalone Graphic Logo — NO BLACK BOX */
.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity var(--transition-fast);
}

.brand-logo-link:hover {
  opacity: 0.85;
}

.brand-logo-svg {
  height: 32px;
  width: auto;
  display: block;
}

/* Navigation Menu Fix — Single line, no wrapping, horizontal inline flex */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  display: inline-block;
  white-space: nowrap;
}

.nav-item a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-item a:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.nav-item a.active {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

/* Header Action Controls */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  white-space: nowrap;
}

.btn-author-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--accent-subtle);
  color: var(--accent-subtle-text);
  border: 1px solid var(--accent-subtle-text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.btn-editor-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background-color: var(--text-primary);
  color: var(--bg-canvas);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  transition: opacity var(--transition-fast);
}

.btn-editor-open:hover { opacity: 0.9; }

.command-trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-4);
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.command-trigger:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.command-kbd {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 6px;
  background-color: var(--bg-elevated);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

.btn-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background-color: var(--bg-surface-hover);
}

/* Main Layout Wrapper */
.main-wrapper {
  flex: 1;
  padding-top: var(--space-8);
  padding-bottom: var(--space-16);
}

.section-header {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.section-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer Layout */
.footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-16);
  padding-bottom: var(--space-12);
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .command-text { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}
