/* Theme styling */
:root {
  --bg-color: #fcf9f7;
  --wrapper-bg: #fefefe;
  --text-color: #333333;
  --link-color: #0366d6;
  --line-color: #dddddd;
  --header-color: #222222;
}

body.dark-mode {
  --bg-color: #121212;
  --wrapper-bg: #1e1e1e;
  --text-color: #e0e0e0;
  --link-color: #58a6ff;
  --line-color: #444444;
  --header-color: #f0f0f0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

#wrapper {
  background-color: var(--wrapper-bg);
  color: var(--text-color);
}

#wrapper a:link, #wrapper a:visited {
  color: var(--link-color);
}

#wrapper h1, #wrapper h2, #wrapper h3 {
  color: var(--header-color);
}

#wrapper hr {
  background-color: var(--line-color);
}

/* Theme toggle button */
#theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  background-color: var(--text-color);
  color: var(--bg-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  z-index: 1000;
  opacity: 0.7;
  transition: opacity 0.3s;
}

#theme-toggle:hover {
  opacity: 1;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
  #theme-toggle {
    top: 5px;
    right: 5px;
    padding: 6px 10px;
    font-size: 12px;
  }

  #wrapper {
    padding: 15px !important;
    margin: 0 !important;
    font-size: 1em !important;
  }

  #wrapper h1 {
    font-size: 1.8em !important;
    line-height: 1.2em !important;
    margin-top: 0.8em !important;
  }

  #wrapper h2 {
    font-size: 1.5em !important;
    line-height: 1.3em !important;
  }

  #wrapper h3 {
    font-size: 1.2em !important;
    line-height: 1.3em !important;
  }

  #wrapper p,
  #wrapper ul,
  #wrapper ol {
    margin-top: 1em !important;
    margin-bottom: 1em !important;
  }

  #wrapper ul,
  #wrapper ol {
    margin-left: 1.5rem !important;
  }

  #wrapper li {
    margin-bottom: 0.5em !important;
  }

  #wrapper p:nth-of-type(1) {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
  }

  #wrapper hr {
    margin: 1em 0 !important;
  }
}

/* Base typography and layout */
body {
  -webkit-font-smoothing: antialiased;
  padding: 0 20px;
  font-size: 15px;
  font-family: "Myriad Pro", "Arial", sans-serif;
}

#wrapper {
  font-size: 1.3125em;
  line-height: 1.52381em;
  padding: 50px;
  margin: 0 30px;
  box-shadow: rgba(178, 176, 174, 0.3) 0 0 2px inset;
  border: solid 1px var(--line-color);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

#wrapper h1 {
  font-size: 2.80952em;
  line-height: 1.08475em;
  margin-top: 1.08475em;
  margin-bottom: 0.54237em;
}

#wrapper h2 {
  font-size: 2em;
  line-height: 1.52381em;
  margin-top: 1.52381em;
  margin-bottom: 0.7619em;
}

#wrapper h3 {
  font-size: 1.42857em;
  line-height: 1.06667em;
  margin-top: 1.06667em;
  margin-bottom: 1.06667em;
}

#wrapper p {
  margin: 1em 0;
}

#wrapper ul,
#wrapper ol {
  margin: 1em 0;
  padding-left: 2em;
  list-style-position: outside;
}

#wrapper ul {
  list-style-type: disc;
}

#wrapper li {
  margin-bottom: 0.5em;
}

#wrapper li > p:first-of-type {
  margin: 0;
}

#wrapper strong {
  font-weight: bold;
}

#wrapper hr {
  border: 0;
  height: 1px;
  margin: 1.5em 0;
}

#wrapper a {
  text-decoration: none;
}

#wrapper a:hover {
  text-decoration: underline;
}

/* Print styles */
@media print {
  html, body {
    font-size: 11pt !important;
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #wrapper {
    font-size: 1em !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: white !important;
  }

  #wrapper h1 {
    font-size: 2em !important;
    margin-top: 0 !important;
  }

  #wrapper h2 {
    font-size: 1.4em !important;
    margin-top: 1em !important;
    margin-bottom: 0.4em !important;
  }

  #wrapper h3 {
    font-size: 1.1em !important;
    margin-top: 0.8em !important;
    margin-bottom: 0.3em !important;
  }

  #wrapper ul {
    margin-top: 0.3em !important;
    margin-bottom: 0.3em !important;
  }

  #wrapper li {
    margin-bottom: 0.2em !important;
  }

  #wrapper p {
    margin: 0.4em 0 !important;
  }

  #wrapper hr {
    margin: 0.8em 0 !important;
  }

  #theme-toggle {
    display: none !important;
  }

  a[href]::after {
    content: none !important;
  }

  a {
    color: #333 !important;
    text-decoration: none !important;
  }

  .contact-info a {
    color: #0366d6 !important;
  }
}
