/*
 * Roll Your Own Resource — Custom Styles
 * Complement to TailwindCSS CDN
 */

/* ---- Base ---- */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Hero parallax-like depth ---- */
.hero-overlay {
  background: linear-gradient(
    160deg,
    rgba(14, 116, 144, 0.82) 0%,
    rgba(8, 145, 178, 0.55) 40%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

/* ---- Prose (article content) ---- */
.prose {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1.125rem;
}

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

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

.prose blockquote {
  border-left: 3px solid;
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose table th,
.prose table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.prose table th {
  font-weight: 600;
}

/* ---- Line clamp ---- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Card image hover ---- */
.card-img-wrap img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card-img-wrap:hover img {
  transform: scale(1.04);
}

/* ---- Accessible focus ---- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* ---- Transitions ---- */
a,
button {
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* ---- Header scroll shadow (JS-driven) ---- */
.header-scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* ---- Section divider ---- */
.section-divider {
  width: 3rem;
  height: 2px;
  background-color: #0891b2;
  margin: 0 auto 1.5rem;
}

/* ---- Print ---- */
@media print {
  header,
  footer,
  nav {
    display: none !important;
  }
  .prose {
    max-width: 100%;
  }
}
