/* ==========================================================================
   FLYING LINUX - BESPOKE STYLESHEET
   Aesthetics: Sleek Tech Dark Mode, Glassmorphism, Micro-animations, Neon Accents
   ========================================================================== */

/* Custom properties / Design System */
:root {
  --bg-main: #0b0f19;
  --bg-card: #151d30;
  --bg-card-hover: #1b263f;
  --border-color: #24314f;
  --border-glow: rgba(20, 184, 166, 0.15);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #0f172a;
  
  --accent-primary: #14b8a6; /* Neon Teal */
  --accent-secondary: #6366f1; /* Electric Indigo */
  --accent-glow: rgba(20, 184, 166, 0.4);
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  --header-height: 70px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1200;
  background-color: var(--accent-primary);
  color: var(--text-dark);
  padding: 0.65rem 0.9rem;
  border-radius: 0.5rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout Containers */
.main-content {
  flex-grow: 1;
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

/* Navigation Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.logo-accent {
  color: var(--accent-primary);
}

.logo-cursor {
  color: var(--accent-secondary);
  animation: blink 1s infinite step-end;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: #fff;
}

.nav-link.active {
  color: var(--accent-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
  color: #fff;
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.btn-outline:hover {
  background-color: rgba(20, 184, 166, 0.08);
  transform: translateY(-1px);
}

/* Homepage Hero Section */
.hero-section {
  padding: 3rem 0;
  margin: 0 auto;
  max-width: 1200px;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--accent-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: 3.25rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* Terminal Mockup */
.terminal-mockup {
  background-color: #030712;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(20, 184, 166, 0.05);
  overflow: hidden;
}

.terminal-header {
  background-color: #0f172a;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dot.red { background-color: #ef4444; }
.terminal-dot.yellow { background-color: #f59e0b; }
.terminal-dot.green { background-color: #10b981; }

.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.6;
}

.term-line {
  margin-bottom: 0.5rem;
}

.term-prompt {
  color: var(--accent-primary);
}

.term-output {
  color: var(--text-muted);
  padding-left: 0.5rem;
}

.term-cursor {
  color: var(--accent-secondary);
}

/* Heritage Intro Section */
.heritage-intro {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.heritage-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  align-items: center;
}

.section-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.heritage-info h2 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

.heritage-info p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.text-link {
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.text-link:hover {
  gap: 0.5rem;
}

.heritage-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-box {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Featured & General Guides Grid */
.featured-guides-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  margin-bottom: 0;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.guide-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.guide-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: 0 10px 20px rgba(20, 184, 166, 0.08);
}

.guide-card-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.guide-card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.guide-card-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.guide-card-title a {
  color: #fff;
}

.guide-card-title a:hover {
  color: var(--accent-primary);
}

.guide-card-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.guide-card-footer {
  margin-top: auto;
}

.read-more-link {
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-primary);
}

.read-more-link:hover {
  color: var(--accent-secondary);
}

.arrow-icon {
  width: 16px;
  height: 16px;
  transition: var(--transition-fast);
}

.read-more-link:hover .arrow-icon {
  transform: translateX(4px);
}

/* Philosophy Section */
.philosophy-section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.philosophy-card {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem;
}

.icon-wrapper {
  width: 48px;
  height: 48px;
  background-color: rgba(20, 184, 166, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.icon-wrapper svg {
  width: 24px;
  height: 24px;
}

.philosophy-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.philosophy-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Single Article Layout */
.single-article {
  padding: 2rem 0;
}

.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.article-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background-color: rgba(20, 184, 166, 0.1);
  color: var(--accent-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.article-title {
  font-size: 3rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.article-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meta-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.article-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.article-body p {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.article-body h2 {
  font-size: 1.75rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body ul, .article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  border-left: 4px solid var(--accent-primary);
  background-color: rgba(255, 255, 255, 0.02);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
  margin-bottom: 0;
  font-style: italic;
}

.article-body pre {
  background-color: #030712;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-primary);
  background-color: rgba(20, 184, 166, 0.05);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.article-body pre code {
  color: #e2e8f0;
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

.article-footer-nav {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.back-to-guides {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.back-to-guides:hover {
  color: var(--accent-primary);
}

.back-icon {
  width: 18px;
  height: 18px;
  transition: var(--transition-fast);
}

.back-to-guides:hover .back-icon {
  transform: translateX(-4px);
}

/* List / Guides Index Layout */
.list-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.list-header {
  text-align: center;
  margin-bottom: 4rem;
}

.list-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  background-color: rgba(20, 184, 166, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.list-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.list-description {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Static Contact Page */
.contact-container {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.contact-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  margin-top: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-channels {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.channel-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.channel-icon {
  width: 24px;
  height: 24px;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.channel-info h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.channel-info p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-color);
  background-color: #080b13;
  padding: 4rem 0 0 0;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
}

.footer-brand .footer-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  gap: 4rem;
}

.footer-group h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.footer-group a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.footer-group a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 0;
  background-color: #05070c;
}

.footer-bottom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-meta {
  font-family: var(--font-mono);
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-text-content {
    text-align: center;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .heritage-card {
    grid-template-columns: 1fr;
    padding: 2rem;
  }
  
  .heritage-stats {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .site-header {
    height: auto;
    padding: 0.85rem 0;
  }

  .header-container {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0 1rem;
  }

  .site-logo {
    font-size: 1.05rem;
  }

  .heritage-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .site-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .main-content {
    padding-top: 8.75rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  
  .footer-bottom-container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
