/* =========================================
   TRIXBULL — Additional CSS
   Print, accessibility, fine-tuning
========================================= */

/* ---- Skip to content ---- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-gold);
  color: var(--color-navy);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { top: 0; }

/* ---- Focus styles ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---- Smooth image loading ---- */
img {
  transition: opacity 0.3s ease;
}
img[loading="lazy"] { opacity: 0; }
img.loaded { opacity: 1; }

/* ---- Accessibility: reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-bar__inner { animation: none; }
}

/* ---- Comments ---- */
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment { padding: 1.25rem 0; border-bottom: 1px solid var(--color-border); }
.comment:last-child { border-bottom: none; }
.comment-author { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.comment-author img { border-radius: 50%; }
.comment-author .fn { font-weight: 600; font-size: 0.9rem; }
.comment-meta { font-size: 0.78rem; color: var(--color-muted); }
.comment-content p { font-size: 0.9375rem; color: #2a3a4a; }
.comment-reply-link {
  font-size: 0.78rem;
  color: var(--color-blue);
  font-weight: 600;
  border: none;
}
#respond { margin-top: 2rem; }
#respond h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 1.25rem; }
.comment-form label { font-size: 0.8rem; font-weight: 600; display: block; margin-bottom: 0.3rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-ink);
  background: var(--color-white);
  margin-bottom: 1rem;
  transition: border-color 0.15s;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-blue);
  outline: none;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit {
  background: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.comment-form .submit:hover { background: var(--color-blue); }

/* ---- No sidebar layout ---- */
.no-sidebar .site-layout { grid-template-columns: 1fr; }
.no-sidebar .entry-wrap { max-width: 780px; }

/* ---- Print styles ---- */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .ticker-bar,
  .newsletter-widget,
  .pagination,
  .post-nav,
  #reading-progress { display: none !important; }

  body { font-size: 12pt; color: #000; background: #fff; }
  .entry-wrap { max-width: 100%; padding: 0; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100%; }
  a { text-decoration: underline; }
  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #555; }
}

/* ---- Dark mode (optional, respects system preference) ---- */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable dark mode
  :root {
    --color-paper: #0D1117;
    --color-card:  #161B22;
    --color-ink:   #E6EDF3;
    --color-border: #30363D;
    --color-muted: #8B949E;
  }
  */
}
