/* Tailwind CSS - Include via CDN for now, will optimize later */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css');

/* Custom fonts */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Source+Sans+Pro:wght@300;400;600&display=swap');

/* Custom CSS variables and overrides */
:root {
  --color-primary: #d97706; /* amber-600 */
  --color-primary-dark: #b45309; /* amber-700 */
  --color-primary-light: #fef3c7; /* amber-50 */
  --font-serif: 'Crimson Text', serif;
  --font-sans: 'Source Sans Pro', sans-serif;
}

/* Base typography */
body {
  font-family: var(--font-sans);
  line-height: 1.6;
}

.font-serif {
  font-family: var(--font-serif);
}

/* Custom prose styles for article content */
.prose {
  color: #374151; /* gray-700 */
  /* readable measure with comfortable insets */
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.prose p {
  margin-bottom: 1.25rem;
  text-align: left; /* ragged-right */
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1f2937; /* gray-800 */
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }
.prose h4 { font-size: 1.25rem; }

.prose blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #6b7280; /* gray-500 */
}

.prose ul, .prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Search functionality styles */
#search-input {
  transition: all 0.2s ease;
}

#search-input:focus {
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

#search-results {
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
}

.search-result-item:hover {
  background-color: #f9fafb;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-highlight {
  background-color: #fef3c7; /* amber-50 */
  font-weight: 600;
  padding: 0 2px;
}

/* Archive-specific styling */
.archive-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Publication timeline styles */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid #e5e7eb;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
}

.timeline-item:last-child {
  border-left: none;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .prose h1 { font-size: 1.875rem; }
  .prose h2 { font-size: 1.5rem; }
  .prose h3 { font-size: 1.25rem; }
  
  /* Mobile navigation adjustments */
  nav ul {
    flex-direction: column;
    space-y: 1rem;
    text-align: center;
  }
  
  nav li {
    margin: 0.5rem 0;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .prose {
    max-width: 100%;
  }
  
  .prose p {
    text-align: left;
    margin-bottom: 0.5rem;
  }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Loading animation for search */
.loading {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dark mode support (optional future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles would go here */
}