/* ========== Base Reset & Typography ========== */
body {
  background-color: #fff;
  font: 14px/1.5 'Montserrat', sans-serif;
  font-weight: 400;
  color: #000;
  margin-top: 60px;
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 20px;
  line-height: 1.1;
  color: #222;
}

h1 {
  font-size: 28px;
}

h2 {
  color: #393939;
}

h3,
h4,
h5,
h6 {
  color: #494949;
}

/* Paragraph & Lists */
p,
ul,
ol,
table,
pre,
dl {
  margin: 0 0 20px;
}

ul {
  padding-left: 20px;
}

/* Links */
a {
  color: #267CB9;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: rgb(0, 32, 47);
}

body.dark-mode a {
  color: #7ecbff;
}

/* Navbar */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background-color: #323232;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode #navbar {
  background-color: #1e1e1e;
}

#navbar ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#navbar a {
  color: #fff;
  font-weight: bold;
}

#navbar a:hover {
  color: #2599ff;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-center h3 {
  margin: 0;
  padding: 0;
  font-size: 20px;
  color: white;
  font-weight: 700;
  line-height: 1;
}

.nav-center a {
  text-decoration: none;
  color: inherit;
}

/* Theme Toggle Button */
#theme-toggle {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: inherit;
  transition: color 0.3s ease;
}

#theme-toggle:hover,
#theme-toggle:focus {
  color: #267CB9;
  transform: scale(1.2);
  transition: transform 0.2s;
}

#theme-toggle span {
  pointer-events: none;
}

/* Layout */
.wrapper {
  width: 860px;
  margin: 0 auto;
}

header {
  width: 270px;
  float: left;
  position: fixed;
}

section {
  width: 500px;
  float: right;
  padding-bottom: 50px;
}

footer {
  width: 270px;
  float: left;
  position: fixed;
  bottom: 50px;
}

/* Media Queries */
@media screen and (max-width: 960px) {
  .wrapper {
    width: auto;
  }

  header,
  section,
  footer {
    float: none;
    position: static;
    width: auto;
  }

  section {
    border: 1px solid #e5e5e5;
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 0 20px;
  }
}

@media screen and (max-width: 720px) {
  body {
    word-wrap: break-word;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 15px;
  }
}

/* Misc */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

strong {
  color: #222;
  font-weight: 700;
}

code,
pre {
  font-family: Consolas, monospace;
  color: #333;
}

pre {
  padding: 8px 15px;
  background: #f8f8f8;
  border-radius: 5px;
  border: 1px solid #e5e5e5;
  overflow-x: auto;
}

blockquote {
  border-left: 1px solid #e5e5e5;
  padding-left: 20px;
  font-style: italic;
}