/* ===== Global Typography ===== */
body {
    font-family: Verdana, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

article, .long-form, .main-content p {
    font-family: Verdana, sans-serif;
    font-size: 17px;
    line-height: 1.5;
}

h1, h2 {
    font-weight: normal;
    line-height: 1.2;
    font-family: 'Segoe UI', sans-serif;
}

h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Segoe UI', sans-serif;
}

h1 {
    font-size: 36px;
}

h2 {
    font-size: 26px;
}

h3 {
    font-size: 21px;
}

h4 {
    font-size: 17px;
}

small { font-size: 13px; }
pre, code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 14px; }

/* ===== Navbar ===== */
.nav-container {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.navbar {
  background: #282A35;
  display: flex;
  padding: 5px 15px;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  min-height: 50px;
}
.navbar .logo { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; font-weight: 400; text-decoration: none; }
.navbar .logo img { width: 36px; height: 36px; min-width: 36px; object-fit: contain; flex-shrink: 0; display: block; }
.navbar .logo:hover { text-decoration: none; }
.nav-menu { display: flex; align-items: center; flex: 1; }
.navbar ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.navbar ul li a { color: #fff; padding: 6px 12px; border-radius: 4px; font-family: Verdana, sans-serif; font-size: 14px; text-decoration: none; }
.navbar ul li a:hover { background: rgba(0,0,0,0.15); text-decoration: none; }

/* ===== Secondary Scroll Nav ===== */
.scroll-nav {
  background: #282A35; /* Dark gray to match standard IDE/W3 look */
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  display: flex;
  align-items: center;
}
.scroll-nav a {
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-family: Verdana, sans-serif;
  font-size: 14px;
}
.scroll-nav a:hover {
  background: #000;
}
.scroll-nav::-webkit-scrollbar { display: none; /* Chrome/Safari/Opera */ }
.scroll-nav { -ms-overflow-style: none; scrollbar-width: none; /* IE/Edge/Firefox */ }

/* Hamburger / 3 Dots Button */
.openbtn { font-size: 20px; cursor: pointer; background-color: #282A35; color: white; padding: 8px 16px; border: none; display: none; flex-shrink: 0; position: sticky; left: 0; z-index: 10; font-family: Verdana, sans-serif; }
.openbtn:hover { background-color: #000; }

/* Mobile Hamburger Navbar Toggle Base */
.nav-toggle { font-size: 16px; font-weight: 600; cursor: pointer; background: transparent; border: none; color: #1E3A5F; padding: 5px 10px; display: none; transition: opacity 0.2s; }
.nav-toggle:hover { opacity: 0.7; }

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .nav-container {
    position: sticky;
    z-index: 1005;
  }
  .navbar { position: relative; gap: 10px; padding: 10px 15px; height: auto; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: nowrap; }
  .navbar .logo { flex: 1; order: 1; }
  .nav-toggle { display: block; order: 2; margin-left: auto; }
  
  .nav-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 15px; 
    width: 220px; 
    background: #fff; 
    flex-direction: column; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    border-radius: 8px; 
    border: 1px solid #eee;
    padding: 10px;
    z-index: 1010;
  }
  .navbar.nav-open .nav-menu { display: flex; }
  
  .navbar ul { display: flex; flex-direction: column; width: 100%; gap: 5px; margin: 0; padding: 0; }
  .navbar ul li a { display: block; padding: 10px; border-bottom: 1px solid #eee; color: #1E3A5F !important; border-radius: 4px; font-size: 15px; }
  .navbar ul li a:hover { background: #f8fafc; }
  .openbtn { display: inline-block; }

  /* Reduce heading sizes on smaller screens */
  h1 { font-size: 25px; }
  h2 { font-size: 20px; }
  h3 { font-size: 16px; }
  h4 { font-size: 1px; }
}

/* Desktop explicit rules (Larger than tab size) */
@media (min-width: 1025px) {
  .nav-toggle { display: none !important; }
  .nav-menu { display: flex !important; }
  .navbar ul { display: flex !important; flex-direction: row; }
  .openbtn { display: none; }
}
