
/* =========================================================
   ZLT Co. — article.css
   Compatible With Existing Article HTML
   ========================================================= */

/* ---------- VARIABLES ---------- */

:root {
  --font:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;

  --bg: #0f1117;
  --bg-secondary: #161b22;

  --text: #f3f4f6;
  --text-muted: #a1aab8;
  --text-dim: #6b7280;

  --accent: #ff1e56;
  --accent-light: #ff5f85;

  --border: rgba(255,255,255,0.08);

  --glass:
    rgba(20,24,31,0.74);

  --shadow:
    0 24px 60px rgba(0,0,0,0.32);

  --radius: 26px;

  --transition:
    240ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- LIGHT MODE ---------- */

[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-secondary: #ffffff;

  --text: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;

  --border: rgba(0,0,0,0.08);

  --glass:
    rgba(255,255,255,0.82);

  --shadow:
    0 18px 42px rgba(0,0,0,0.08);
}

/* ---------- RESET ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;

  min-height: 100vh;

  font-family: var(--font);

  color: var(--text);

  background:
    radial-gradient(
      circle at top left,
      rgba(255,30,86,0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(59,130,246,0.10),
      transparent 35%
    ),
    var(--bg);

  line-height: 1.8;

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
}

/* ---------- NAVBAR ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 1000;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 18px 40px;

  background:
    rgba(15,17,23,0.72);

  border-bottom:
    1px solid var(--border);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

[data-theme="light"] nav {
  background:
    rgba(255,255,255,0.75);
}

nav h1 {
  margin: 0;

  font-size: 1.3rem;
  font-weight: 850;

  letter-spacing: -0.04em;

  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 16px;

  border-radius: 12px;

  text-decoration: none;

  color: var(--text-muted);

  font-size: 0.95rem;
  font-weight: 600;

  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.nav-links a:hover {
  background:
    linear-gradient(
      135deg,
      var(--accent),
      var(--accent-light)
    );

  color: white;

  transform: translateY(-1px);
}

/* ---------- ARTICLE CONTAINER ---------- */

.article-container {
  position: relative;

  width:
    min(
      calc(100% - 32px),
      880px
    );

  margin:
    clamp(24px, 5vw, 72px)
    auto;

  padding:
    clamp(26px, 5vw, 58px);

  border-radius: var(--radius);

  background: var(--glass);

  border:
    1px solid var(--border);

  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);

  box-shadow: var(--shadow);

  overflow: hidden;
}

/* ---------- TOP ACCENT ---------- */

.article-container::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;
  right: 0;

  height: 3px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--accent),
      transparent
    );
}

/* ---------- ARTICLE TITLE ---------- */

.article-container h1 {
  margin:
    0
    0
    18px;

  font-size:
    clamp(
      2.5rem,
      6vw,
      4.2rem
    );

  line-height: 0.96;

  letter-spacing: -0.06em;

  font-weight: 900;

  max-width: 11ch;

  text-wrap: balance;

  color: var(--text);
}

/* ---------- META ---------- */

.article-meta {
  margin-bottom: 42px;
  padding-bottom: 24px;

  border-bottom:
    1px solid var(--border);

  color: var(--text-dim);

  font-size: 0.96rem;
  font-weight: 500;
}

/* ---------- BODY TEXT ---------- */

.article-container p {
  margin:
    0
    0
    26px;

  color: var(--text-muted);

  font-size:
    clamp(
      1.04rem,
      1.3vw,
      1.14rem
    );

  line-height: 1.95;

  text-wrap: pretty;
}

/* ---------- DROP CAP ---------- */

.article-container p:first-of-type::first-letter {
  float: left;

  margin:
    8px
    12px
    0
    0;

  font-size: 4.6rem;

  line-height: 0.9;

  font-weight: 900;

  color: var(--accent);
}

/* ---------- HEADINGS ---------- */

.article-container h2 {
  position: relative;

  margin:
    70px
    0
    18px;

  font-size:
    clamp(
      1.6rem,
      3vw,
      2.1rem
    );

  line-height: 1.1;

  letter-spacing: -0.04em;

  font-weight: 850;

  color: var(--text);
}

.article-container h2::after {
  content: "";

  display: block;

  width: 74px;
  height: 3px;

  margin-top: 14px;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      var(--accent),
      transparent
    );
}

/* ---------- LINKS ---------- */

.article-container a:not(.back-btn) {
  color: var(--accent);

  text-decoration: none;

  font-weight: 700;
}

/* ---------- BACK BUTTON ---------- */


.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: 24px;

  padding: 14px 22px;

  border-radius: 14px;

  text-decoration: none;

  font-size: 0.96rem;
  font-weight: 700;

  color: #ffffff;

  background:
    linear-gradient(
      135deg,
      #e11d48,
      #fb7185
    );

  border:
    1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 10px 28px rgba(225,29,72,0.22);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

/* ---------- HOVER ---------- */

.back-btn:hover {
  transform: translateY(-2px);

  filter: brightness(1.04);

  box-shadow:
    0 18px 42px rgba(225,29,72,0.30);
}

/* ---------- ACTIVE ---------- */

.back-btn:active {
  transform: translateY(0);
}

/* ---------- LIGHT MODE ---------- */

[data-theme="light"] .back-btn {
  color: white;

  border:
    1px solid rgba(0,0,0,0.06);

  box-shadow:
    0 12px 30px rgba(225,29,72,0.16);
}

/* ---------- MOBILE ---------- */

@media (max-width: 760px) {

  .back-btn {
    width: 100%;
  }
}



/* ---------- FOOTER ---------- */

footer {
  margin-top: 70px;

  padding: 28px 20px;

  text-align: center;

  border-top:
    1px solid var(--border);

  color: var(--text-dim);

  background:
    rgba(255,255,255,0.02);
}

/* ---------- SCROLLBAR ---------- */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background:
    rgba(255,255,255,0.10);

  border-radius: 999px;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background:
    rgba(0,0,0,0.14);
}

/* ---------- FOCUS ---------- */

:focus-visible {
  outline:
    2px solid var(--accent);

  outline-offset: 3px;
}

/* ---------- MOBILE ---------- */

@media (max-width: 760px) {

  nav {
    padding: 16px 18px;
  }

  nav h1 {
    font-size: 1.05rem;
  }

  .nav-links a {
    padding: 8px 12px;

    font-size: 0.9rem;
  }

  .article-container {
    width:
      calc(100% - 16px);

    padding: 24px 20px;

    border-radius: 22px;

    margin-top: 18px;
  }

  .article-container h1 {
    max-width: 100%;
  }

  .article-container p:first-of-type::first-letter {
    font-size: 3.3rem;
  }

  .back-btn {
    width: 100%;
  }
}

/* ---------- REDUCED MOTION ---------- */

@media (prefers-reduced-motion: reduce) {

  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;
  }
}