/* Shared light theme for blog pages */
:root {
  color-scheme: light;
  --page-bg: #f4f7fb;
  --surface: #ffffff;
  --text: #273449;
  --heading: #172b4d;
  --accent: #2454a6;
  --accent-hover: #193f82;
  --border: #e1e8f0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 100px 0 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.8;
}

nav {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 100px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

nav h1 {
  margin: 0;
  color: var(--heading);
  font-size: 28px;
  font-weight: 600;
}

.navul {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navlink {
  color: #34445c;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.navlink:hover,
.navlink:focus-visible {
  color: var(--accent);
}

.navlink:focus-visible,
.read-btn:focus-visible,
.menu-toggle:focus-visible {
  outline: 3px solid #8db7f4;
  outline-offset: 4px;
}

.menu-toggle {
  display: none;
}

/* Blog article */
.blog-page {
  width: min(90%, 900px);
  margin: 50px auto;
  padding: 42px 38px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(34, 54, 82, 0.07);
  color: var(--text);
}

.blog-page h1 {
  margin: 0 auto 32px;
  color: var(--heading);
  font-size: 32px;
  line-height: 1.35;
  text-align: center;
}

/* The article HTML has inline heading colors, so override them for contrast. */
.blog-page h1 strong,
.blog-page h2,
.blog-page h3 {
  color: var(--accent) !important;
}

.blog-content {
  max-width: 68ch;
  margin: 0 auto;
}

.blog-content p {
  margin: 0 0 22px;
  color: var(--text);
  font-size: 17px;
  text-align: left;
}

.blog-content h2,
.blog-content h3 {
  margin: 32px 0 12px;
  line-height: 1.4;
}

.blog-content h2 {
  font-size: 24px;
}

.blog-content h3 {
  font-size: 20px;
}

.blog-content strong {
  color: var(--accent);
  font-weight: 600;
}

.blog-content ol {
  margin: 20px 0 30px;
  padding-left: 24px;
}

.blog-content ol li {
  margin-bottom: 15px;
  font-size: 16px;
}

.read-btn {
  display: inline-block;
  margin-top: 25px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.read-btn:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  body {
    padding-top: 80px;
  }

  nav {
    height: 80px;
    padding: 0 20px;
  }

  .menu-toggle {
    display: flex;
    width: 30px;
    height: 25px;
    margin-left: auto;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    border-radius: 3px;
    background: var(--heading);
    transition: all 0.3s ease;
  }

  .menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }

  .menu-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .navul {
    position: fixed;
    top: 80px;
    right: -100%;
    display: flex;
    width: 100%;
    height: calc(100vh - 80px);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 25px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.99);
    transition: right 0.35s ease;
  }

  .navul.active {
    right: 0;
  }

  .navlink {
    font-size: 18px;
  }

  .blog-page {
    width: min(92%, 900px);
    margin: 32px auto;
    padding: 34px 28px;
  }
}

@media (max-width: 600px) {
  nav h1 {
    font-size: 22px;
  }

  .navul {
    justify-content: flex-start;
    gap: 18px;
    padding-top: 40px;
  }

  .navlink {
    font-size: 17px;
  }

  .blog-page {
    padding: 28px 20px;
  }

  .blog-page h1 {
    margin-bottom: 26px;
    font-size: 26px;
  }

  .blog-content p {
    font-size: 16px;
  }
}

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