/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  font-family: 'Georgia', 'Times New Roman', serif;
  background: #f5f5f5;
  overflow-x: hidden;
}

/* Landing Page Styles */
body.landing-page {
  background: linear-gradient(45deg, #1a1a2e, #16213e, #0f3460);
}

.landing-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ASCII background from public/ascii-art.txt */
.ascii-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  margin: 0;
  white-space: pre;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(0.25rem, 0.65vw, 0.55rem);
  line-height: 1.0;
  color: rgba(190, 190, 190, 0.18); /* subtle gray */
  pointer-events: none;
  user-select: none;
  z-index: 1; /* behind content */
  width: auto;
  max-width: 95vw;
  max-height: 90vh;
  overflow: hidden;

  /* Smoothly fade all edges (top, right, bottom, left) so ASCII blends into background */
  /* Using linear gradients in each direction, composited together */
  mask-image: 
    linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-composite: intersect;
  /* WebKit prefix for Chrome/Safari */
  -webkit-mask-image: 
    linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%),
    linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-composite: source-in;
}

.content-overlay {
  position: relative;
  z-index: 2; /* above ASCII background */
  text-align: center;
  color: #ffffff;
  max-width: 800px;
  padding: 2rem;
}

.main-quote {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .content-overlay {
    padding: 1rem;
  }
  
  .main-quote {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .main-quote {
    font-size: 2rem;
  }
}

/* Navigation Styles */
.main-nav {
  background-color: #1a1a2e;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}

.nav-brand a {
  color: #ffffff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #ffffff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 25px;
  height: 2px;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-toggle.active .hamburger {
  background-color: transparent;
}

.nav-toggle.active .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-link {
  color: #ffffff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  transition: color 0.3s, background-color 0.3s;
  border-radius: 4px;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e8e8e8;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 60px);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.container h1 {
  color: #1a1a2e;
  margin-bottom: 2rem;
  font-size: 2rem;
}

/* Members Grid */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.member-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.member-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.member-card h3 {
  margin: 0 0 1rem 0;
  color: #1a1a2e;
  font-size: 1.25rem;
}

.member-card p {
  margin: 0.5rem 0;
  color: #555;
  font-size: 0.95rem;
}

.no-data {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  padding: 2rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: #1a1a2e;
    padding: 1rem;
    gap: 0;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 1rem;
    border-radius: 0;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .container h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.5rem;
  }

  .member-card {
    padding: 1rem;
  }
}

/* Analyzed Badge */
.analyzed-badge {
  display: inline-block;
  background-color: #28a745;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

/* Print Detail Page */
.print-detail {
  background: #ffffff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.print-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 1.5rem;
}

.print-header h1 {
  color: #1a1a2e;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.print-metadata p {
  margin: 0.5rem 0;
  color: #555;
  font-size: 0.95rem;
}

.print-summary {
  margin-bottom: 2rem;
}

.print-summary h2 {
  color: #1a1a2e;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.not-analyzed {
  color: #888;
  font-style: italic;
}

.print-pdf {
  margin-bottom: 2rem;
}

.print-pdf h2 {
  color: #1a1a2e;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.pdf-link {
  display: inline-block;
  background-color: #1a1a2e;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.pdf-link:hover {
  background-color: #2a2a3e;
}

.print-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e0e0e0;
}

.back-link {
  color: #1a1a2e;
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: #0f3460;
}

/* Markdown Content Styling */
.markdown-content {
  line-height: 1.6;
  color: #333;
}

.markdown-content h1 {
  font-size: 1.75rem;
  margin: 1.5rem 0 1rem 0;
  color: #1a1a2e;
}

.markdown-content h2 {
  font-size: 1.5rem;
  margin: 1.5rem 0 1rem 0;
  color: #1a1a2e;
}

.markdown-content h3 {
  font-size: 1.25rem;
  margin: 1.25rem 0 0.75rem 0;
  color: #1a1a2e;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-size: 1.1rem;
  margin: 1rem 0 0.75rem 0;
  color: #1a1a2e;
}

.markdown-content p {
  margin: 0.75rem 0;
}

.markdown-content strong {
  font-weight: bold;
  color: #1a1a2e;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content ul,
.markdown-content ol {
  margin: 0.75rem 0;
  padding-left: 2rem;
}

.markdown-content li {
  margin: 0.5rem 0;
}

.markdown-content code {
  background-color: #f5f5f5;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
}

.markdown-content pre {
  background-color: #f5f5f5;
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1rem 0;
}

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

.markdown-content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #666;
  font-style: italic;
}

.markdown-content a {
  color: #0f3460;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #1a1a2e;
}
