/* ==========================================================================
   progresShip - Core Stylesheet
   Modern, accessible, responsive tech blog & document showcase
   ========================================================================== */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif: 'Newsreader', 'Georgia', serif;

  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-color: #e2e8f0;
  --border-highlight: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --accent-glow: rgba(79, 70, 229, 0.15);
  
  --badge-bg: #eef2ff;
  --badge-text: #4338ca;
}

html.dark {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: #131b2e;
  --bg-card-hover: #1a253c;
  --border-color: #1e293b;
  --border-highlight: #334155;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-primary-hover: #818cf8;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --badge-bg: rgba(99, 102, 241, 0.15);
  --badge-text: #a5b4fc;
}

/* Base resets & typography */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility focus outline */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Smooth custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-highlight);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Article & Prose Styling */
.prose-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 72ch;
}

.prose-content h1, .prose-content h2, .prose-content h3, .prose-content h4 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.prose-content h1 { font-size: 2.25rem; }
.prose-content h2 { font-size: 1.65rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.prose-content h3 { font-size: 1.35rem; }

.prose-content p {
  margin-bottom: 1.5rem;
}

.prose-content ul, .prose-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

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

.prose-content blockquote {
  border-left: 4px solid var(--accent-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background-color: var(--bg-secondary);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--text-primary);
}

.prose-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  color: var(--accent-primary);
}

.prose-content pre {
  font-family: var(--font-mono);
  background-color: #0d1117;
  color: #e6edf3;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid var(--border-color);
}

.prose-content pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: inherit;
  font-size: inherit;
}

.prose-content img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
}

.prose-content a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.15s ease;
}

.prose-content a:hover {
  color: var(--accent-primary-hover);
}

/* Banner Card Styling */
.banner-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.banner-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

html.dark .banner-card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 15px var(--accent-glow);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Button pulse on like */
@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.animate-pop {
  animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
