/* ===========================================
   Coyote's Lair - Clean Documentation Style
   Inspired by Red Hat documentation
   Black text on white, clear and readable
   =========================================== */

/* === Red Hat Fonts === */
@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@400;500;600;700&family=Red+Hat+Mono:wght@400;500&family=Red+Hat+Text:wght@400;500;600&display=swap');

/* === Design Tokens === */
:root {
  /* Clean white/black color scheme */
  --color-bg: #ffffff;
  --color-bg-secondary: #f5f5f5;
  --color-bg-code: #1e1e1e;
  
  --color-text: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted: #6a6a6a;
  --color-text-code: #d4d4d4;
  
  /* Accent - subtle red like Red Hat */
  --color-accent: #c00;
  --color-accent-hover: #a00;
  --color-link: #06c;
  --color-link-visited: #639;
  
  --color-border: #ddd;
  --color-border-dark: #ccc;
  
  /* Typography - Red Hat fonts */
  --font-sans: "Red Hat Text", "Liberation Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Red Hat Display", "Liberation Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Red Hat Mono", "Liberation Mono", "Consolas", "DejaVu Sans Mono", monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  
  /* Layout */
  --max-width: 900px;
}

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: var(--space-lg);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.3;
  margin: var(--space-xl) 0 var(--space-md);
}

h1 { font-size: 2rem; border-bottom: 2px solid var(--color-accent); padding-bottom: var(--space-sm); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin: var(--space-md) 0;
}

/* === Links === */
a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: var(--color-link-visited);
}

/* === Horizontal Rules === */
hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) 0;
}

/* === Images === */
img {
  max-width: 100%;
  height: auto;
}

/* === Pre-formatted Text & Terminal Blocks === */
pre, code {
  font-family: var(--font-mono);
}

code {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

pre {
  background: var(--color-bg-code);
  color: var(--color-text-code);
  padding: var(--space-md);
  border-radius: 4px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: var(--space-md) 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Terminal output blocks */
pre.terminal {
  background: #0d1117;
  color: #c9d1d9;
  border-left: 3px solid var(--color-accent);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* === Lists === */
ul, ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

li {
  margin: var(--space-xs) 0;
}

/* === Blockquotes === */
blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--color-accent);
  background: var(--color-bg-secondary);
  color: var(--color-text-secondary);
}

/* === Tables === */
table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

th, td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 600;
  background: var(--color-bg-secondary);
}

/* === Address/Footer === */
address {
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  padding: var(--space-md);
  margin: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

/* === Navigation Icons === */
img[src*="icon"] {
  border: 2px solid var(--color-border-dark) !important;
  vertical-align: middle;
  margin: 2px;
}

img[src*="icon"]:hover {
  border-color: var(--color-accent) !important;
}

/* Disabled icons */
img[src*="icox"] {
  opacity: 0.4;
}

/* === Blog Post Styling === */
.blog-post {
  margin: var(--space-lg) 0;
}

.post-meta {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.post-content {
  line-height: 1.7;
}

.post-source {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

/* Blog images */
.blog-image {
  margin: var(--space-md) 0;
  text-align: center;
}

.blog-image img {
  max-width: 100%;
  height: auto;
}

/* === Legacy Blogger code blocks === */
ol.dp-c {
  list-style: none !important;
  background: var(--color-bg-code);
  color: var(--color-text-code);
  padding: var(--space-md);
  margin: var(--space-md) 0;
  border-left: 3px solid var(--color-accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-x: auto;
}

ol.dp-c li {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

ol.dp-c li::before {
  content: none !important;
}

.bar {
  display: none;
}

/* === Legacy font tags === */
font[color] {
  color: var(--color-accent) !important;
}

/* === Center elements === */
center {
  text-align: center;
  margin: var(--space-lg) 0;
}

/* === Gallery Page (drawings, images) === */
body.gallery-page {
  /* Warm parchment gradient - makes white paper drawings stand out */
  background: linear-gradient(145deg, #d4c4a8 0%, #e8dcc8 30%, #f0e6d6 60%, #d8c8b0 100%);
  background-attachment: fixed;
}

body.gallery-page img {
  /* Frame effect for mounted artwork look */
  background: #fff;
  padding: 8px;
  border: 1px solid #a89880;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  body {
    padding: var(--space-md);
    font-size: 15px;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }
  
  pre {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: var(--space-sm);
  }
  
  img[src*="icon"] {
    width: 28px;
    height: auto;
  }
}

/* === Print Styles === */
@media print {
  body {
    max-width: none;
    padding: 0;
  }
  
  pre {
    white-space: pre-wrap;
    word-wrap: break-word;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: var(--color-text-muted);
  }
}
