html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #f7f8fa;
  color: #23293a;
  transition: background 0.2s, color 0.2s;
}
.container {
  max-width: 730px;
  margin: 0 auto;
  padding: 2.2em 1.2em 0 1.2em;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(37, 38, 94, 0.08);
  flex: 1 0 auto;
  transition: background 0.2s, color 0.2s;
}

#main-container {
  background-color: #f6f7fa;
}

/* mobile 750px */
@media (max-width: 750px) {
  .container {
    border-radius: 0;
    box-shadow: none;
    padding: 1.1em 0.5em 0 0.5em;
  }

  #main-container {
  background-color: #f6f7fa;
}

}

/* Navbar Styles */
.navbar {
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  padding: 0.8em 0;
  margin-bottom: 2.2em;
  box-shadow: 0 2px 8px rgba(19, 26, 63, 0.05);
  position: relative;
  z-index: 2;
  transition: background 0.2s, color 0.2s;
}
.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#nav-list {
  display: flex;
  gap: 1.6em;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
#nav-list li a {
  color: #1836a1;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
#nav-list li a:hover {
  color: #ffd140;
}
.theme-toggle-btn {
  background: none;
  border: none;
  font-size: 1.35em;
  cursor: pointer;
  margin-left: 1em;
  opacity: 0.84;
  color: #ffd140;
  padding: 0.2em 0.5em;
}
.theme-toggle-btn:focus {
  outline: 2px solid #ffd140;
}

/* Responsive Nav */
#nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #1836a1;
  font-size: 2em;
  padding: 0.15em 0.5em;
  cursor: pointer;
}

/* mobile 600px */
@media (max-width: 600px) {
  .nav-flex {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5em 0;
    position: relative;
  }
  #nav-list {
    flex-direction: column;
    gap: 0.3em;
    width: 100%;
    margin: 0;
    margin-top: 0.8em;
    display: none;
    background: #f7fafc;
    border-radius: 0 0 12px 12px;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(16, 20, 28, 0.22);
    padding: 0.5em 0;
    transition: background 0.2s, color 0.2s;
  }
  #nav-list.open {
    display: flex;
  }
  #nav-toggle {
    display: block;
    margin-left: auto;
  }
  #nav-list li a, #nav-list li button {
    color: #1836a1 !important;
    padding: 0.7em 1.3em;
    text-align: left;
    width: 100%;
    background: none;
    border: none;
    display: block;
    font-size: 1.14em;
  }
   #main-container {
  background-color: #f6f7fa;
}
}

/* Blog Title */
h1 {
  text-align: center;
  font-weight: 800;
  font-size: 2.25em;
  letter-spacing: -0.03em;
  margin-bottom: 0.35em;
  color: #1b2142;
  transition: color 0.2s;
}
.blog-meta {
  text-align: center;
  color: #8091a5;
  font-size: 1.08em;
  margin-bottom: 2.2em;
  transition: color 0.2s;
}
.blog-card .blog-meta {
  text-align: left;
  color: #8091a5;
  font-size: 1em;
  margin-bottom: 0.5em;
  margin-top: 0.3em;
  transition: color 0.2s;
}

/* Blog Content Styles */
#blog-content {
  font-size: 1.15em;
  line-height: 1.72;
  color: #2e354d;
  padding-bottom: 1.6em;
  word-break: break-word;
  transition: color 0.2s;
}
#blog-content h2, #blog-content h3, #blog-content h4 {
  color: #1841b1;
  margin-top: 1.5em;
  margin-bottom: 0.65em;
  font-weight: 700;
  transition: color 0.2s;
}
#blog-content p {
  margin-bottom: 1.3em;
}
#blog-content ul, #blog-content ol {
  margin-bottom: 1.2em;
  margin-left: 1.5em;
}
#blog-content pre, #blog-content code {
  background: #f2f4fb;
  color: #274173;
  border-radius: 8px;
  font-size: 1em;
  padding: 0.25em 0.45em;
}
#blog-content blockquote {
  border-left: 4px solid #ffcf4b;
  background: #f7f5e8;
  padding: 1em 1.4em;
  color: #6d6e7a;
  font-style: italic;
  margin: 1.2em 0;
  border-radius: 8px;
}

/* Blog Card Styles (Listing) */
.blog-card {
  background: #f7fafc;
  border-radius: 13px;
  box-shadow: 0 2px 18px rgba(36,40,51,0.10);
  padding: 1.4em 1.2em;
  margin-bottom: 2em;
  transition: box-shadow 0.15s, transform 0.15s, background 0.2s, color 0.2s;
  border: 1px solid #e3e8ef;
  position: relative;
}
.blog-card:hover {
  box-shadow: 0 4px 22px rgba(31, 38, 135, 0.12);
  transform: translateY(-2px) scale(1.012);
}
.blog-card h3 {
  margin-top: 0;
  font-size: 1.3em;
  color: #192263;
  font-weight: 700;
  margin-bottom: 0.2em;
  transition: color 0.2s;
}
.primary-btn {
  background: #1836a1;
  color: #fff;
  border-radius: 22px;
  padding: 0.5em 1.2em;
  border: none;
  font-weight: 600;
  font-size: 1.05em;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
  margin-top: 0.2em;
  display: inline-block;
}
.primary-btn:hover {
  background: #ffd140;
  color: #23293a;
}

/* Footer Styles - sticky, centered */
footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: 2.2em;
  padding-bottom: 1.5em;
}
footer .container {
  text-align: center;
  color: #788193;
  font-size: 1.02em;
  padding: 1.4em 0 0.4em 0;
  background: none;
  box-shadow: none;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
  transition: color 0.2s;
}

/* ---------- DARK MODE OVERRIDES ---------- */
body.dark-mode, body.dark-mode .container {
  background: #161925 !important;
  color: #e4e6ec !important;
}

body.dark-mode #main-container {
  background-color: #1a232e;
}

body.dark-mode .navbar {
  background: #131627 !important;
}
body.dark-mode .brand {
  color: #fff !important;
}
body.dark-mode #nav-list {
  background: #23263a !important;
}
body.dark-mode #nav-list li a,
body.dark-mode #nav-list li button {
  color: #e3e3e3 !important;
}
body.dark-mode h1 {
  color: #e6edfa !important;
}
body.dark-mode .blog-meta,
body.dark-mode .blog-card .blog-meta {
  color: #8ca2c3 !important;
}
body.dark-mode .blog-card {
  background: #23263a !important;
  color: #e4e6ec !important;
  border: 1px solid #232a38 !important;
}
body.dark-mode .blog-card h3 {
  color: #c5d8ff !important;
}
body.dark-mode .primary-btn {
  background: #ffb600 !important;
  color: #20292c !important;
}
body.dark-mode #blog-content {
  color: #e4e6ec !important;
}
body.dark-mode #blog-content h2,
body.dark-mode #blog-content h3,
body.dark-mode #blog-content h4 {
  color: #7fc4fa !important;
}
body.dark-mode #blog-content pre,
body.dark-mode #blog-content code {
  background: #192135 !important;
  color: #aad0ff !important;
}
body.dark-mode #blog-content blockquote {
  border-left: 4px solid #ffb600 !important;
  background: #1c202d !important;
  color: #b8c7e0 !important;
}
body.dark-mode footer .container {
  color: #7685a1 !important;
}
