/* Blog article pages — styled to match the vCard theme */

:root {
  --jet: hsl(0, 0%, 22%);
  --onyx: hsl(240, 1%, 17%);
  --eerie-black-1: hsl(240, 2%, 12%);
  --eerie-black-2: hsl(240, 2%, 12%);
  --smoky-black: hsl(0, 0%, 7%);
  --white-1: hsl(0, 0%, 100%);
  --white-2: hsl(0, 0%, 98%);
  --orange-yellow-crayola: hsl(185, 95%, 66%);
  --orange-yellow-crayola-2: hsl(200, 100%, 56%);
  --accent: hsl(190, 100%, 60%);
  --accent-2: hsl(215, 100%, 62%);
  --text-gradient: linear-gradient(to right, hsl(185, 95%, 62%), hsl(195, 100%, 58%), hsl(215, 100%, 62%));
  --light-gray: hsl(0, 0%, 84%);
  --light-gray-70: hsla(0, 0%, 84%, 0.7);
  --fs-1: 34px;
  --fs-2: 24px;
  --fs-3: 20px;
  --fs-4: 18px;
  --fs-5: 16px;
  --fs-6: 15px;
  --fs-7: 14px;
  --fw-300: 300;
  --fw-400: 400;
  --fw-500: 500;
  --fw-600: 600;
  --fw-700: 700;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1100px 560px at 85% -10%, hsla(222, 100%, 65%, 0.10), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, hsla(252, 100%, 70%, 0.08), transparent 60%),
    var(--smoky-black);
  background-attachment: fixed;
  color: var(--light-gray);
  font-family: "Poppins", sans-serif;
  font-size: var(--fs-6);
  font-weight: var(--fw-300);
  line-height: 1.7;
}

a { text-decoration: none; }

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 6vw;
  background: hsla(240, 2%, 12%, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--jet);
}

.site-logo {
  color: var(--white-1);
  font-size: var(--fs-3);
  font-weight: var(--fw-700);
  letter-spacing: 1px;
}

.site-logo .accent {
  background: var(--text-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }

.site-nav a {
  color: var(--light-gray-70);
  font-size: var(--fs-7);
  font-weight: var(--fw-400);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.25s ease, background 0.25s ease;
}

.site-nav a:hover {
  color: var(--orange-yellow-crayola);
  background: hsla(222, 100%, 65%, 0.12);
}

/* layout */
.article-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 6vw 60px;
}

.article {
  background: var(--eerie-black-1);
  border: 1px solid var(--jet);
  border-radius: 16px;
  box-shadow: 0 24px 90px hsla(0, 0%, 0%, 0.4);
  padding: 30px 24px 40px;
  overflow: hidden;
}

.article-header {
  padding: 10px 0 24px;
  text-align: center;
}

.article-category {
  display: inline-block;
  color: var(--orange-yellow-crayola);
  font-size: 12px;
  font-weight: var(--fw-600);
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 1px solid var(--orange-yellow-crayola);
  border-radius: 30px;
  padding: 4px 14px;
  margin-bottom: 18px;
}

.article-header h1 {
  color: var(--white-1);
  font-size: var(--fs-1);
  font-weight: var(--fw-600);
  line-height: 1.3;
  margin-bottom: 14px;
}

.article-meta {
  color: var(--light-gray-70);
  font-size: var(--fs-7);
}

.article-meta strong { color: var(--orange-yellow-crayola); font-weight: var(--fw-500); }

.article-hero { margin: 0 0 28px; }

.article-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  border: 1px solid var(--jet);
}

.article-body { max-width: 720px; margin: 0 auto; }

.article-body p {
  color: var(--light-gray);
  font-size: var(--fs-6);
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-body h2 {
  color: var(--white-1);
  font-size: var(--fs-2);
  font-weight: var(--fw-600);
  line-height: 1.4;
  margin: 34px 0 14px;
}

.article-body h3 {
  color: var(--orange-yellow-crayola);
  font-size: var(--fs-3);
  font-weight: var(--fw-500);
  margin: 26px 0 10px;
}

.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article-body li {
  font-size: var(--fs-6);
  line-height: 1.8;
  margin-bottom: 8px;
}

.article-body strong { color: var(--white-1); font-weight: var(--fw-500); }

.article-body .highlight {
  background: var(--jet);
  border-left: 3px solid var(--orange-yellow-crayola);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}

.article-body blockquote {
  color: var(--light-gray-70);
  font-style: italic;
  border-left: 3px solid var(--orange-yellow-crayola);
  padding-left: 18px;
  margin: 20px 0;
}

/* CTA */
.article-cta {
  margin-top: 40px;
  padding: 28px 24px;
  border-radius: 14px;
  background: var(--jet);
  border: 1px solid hsla(45, 100%, 72%, 0.25);
  text-align: center;
}

.article-cta h3 {
  color: var(--white-1);
  font-size: var(--fs-2);
  font-weight: var(--fw-600);
  margin-bottom: 10px;
}

.article-cta p { color: var(--light-gray-70); font-size: var(--fs-6); margin-bottom: 20px; }

.cta-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-links a {
  position: relative;
  color: var(--orange-yellow-crayola);
  background: var(--eerie-black-1);
  border: 1px solid var(--jet);
  font-size: var(--fs-7);
  font-weight: var(--fw-500);
  padding: 12px 20px;
  border-radius: 12px;
  transition: border-color 0.25s ease, color 0.25s ease;
}

.cta-links a:hover {
  border-color: var(--orange-yellow-crayola);
  color: var(--orange-yellow-crayola-2);
}

/* footer */
.site-footer {
  border-top: 1px solid var(--jet);
  padding: 26px 6vw;
  text-align: center;
  color: var(--light-gray-70);
  font-size: var(--fs-7);
}

.site-footer p { margin: 0 0 8px; }

.site-footer .legal-links {
  display: inline;
  margin-left: 6px;
  white-space: nowrap;
}

.site-footer .legal-links a + a::before {
  content: " \00b7 ";
  color: var(--light-gray-70);
}

.site-footer a {
  display: inline;
  color: var(--orange-yellow-crayola);
}

.site-footer a:hover { text-decoration: underline; }

@media (max-width: 767px) {
  .site-footer .legal-links .mobile-hide-legal { display: none; }
}

@media (min-width: 580px) {
  .article { padding: 40px 40px 50px; }
}

@media (min-width: 768px) {
  .article-header h1 { font-size: 38px; }
}

/* ---------- UX enhancements ---------- */

/* links inside article body */
.article-body a {
  color: var(--orange-yellow-crayola);
  text-decoration: underline;
  text-decoration-color: hsla(222, 100%, 65%, 0.4);
  text-underline-offset: 3px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}
.article-body a:hover {
  color: var(--white-1);
  text-decoration-color: var(--orange-yellow-crayola);
}

/* CTA polish */
.article-cta {
  border-color: hsla(222, 100%, 70%, 0.3);
  background:
    radial-gradient(500px 200px at 50% 0%, hsla(222, 100%, 65%, 0.12), transparent 70%),
    var(--jet);
}
.cta-links a {
  transition: transform 0.25s ease, border-color 0.25s ease,
              color 0.25s ease, box-shadow 0.25s ease;
}
.cta-links a:hover {
  transform: translateY(-2px);
  border-color: var(--orange-yellow-crayola);
  box-shadow: 0 10px 24px hsla(222, 100%, 65%, 0.22);
}

/* article entrance animation */
.article {
  animation: rise 0.5s ease backwards;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* back to top */
.to-top-btn {
  position: fixed;
  right: 18px;
  bottom: 24px;
  z-index: 40;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 24px hsla(222, 100%, 65%, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.to-top-btn.show { opacity: 1; visibility: visible; transform: none; }
.to-top-btn:hover { transform: translateY(-3px); }
.to-top-btn ion-icon { font-size: 18px; --ionicon-stroke-width: 50px; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
