/* ----------------------------------
   Smooth scrolling
---------------------------------- */
html {
  scroll-behavior: smooth;
}

/* ----------------------------------
   General Styles
---------------------------------- */
body {
  background-color: #f9edc4;
  margin: 0;
  padding: 0 1rem; /* Exterior padding optimized for mobile */
  font-family: "Azeret Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

/* Increase horizontal padding on larger screens */
@media (min-width: 768px) {
  body {
    padding: 0 2rem;
  }
}

/* ----------------------------------
   CSS Variables (Consolidated)
---------------------------------- */
:root {
  --dropdown-bg-light: #f9edc4;
  --dropdown-bg-dark: #054745;
  --dropdown-border-light: black;
  --dropdown-border-dark: #2cb3be;
  --dropdown-border-dark-open: #53ffc9;
  --dropdown-box-shadow-light: 8px 8px 0 black;
  --dropdown-box-shadow-dark: 8px 8px 0 #2cb3be;
  --dropdown-box-shadow-dark-open: 8px 8px 0 #53ffc9;
}

/* ----------------------------------
   Header & Navigation
---------------------------------- */
header {
  padding: 20px;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: center;
}

nav ul li {
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: #333;
  text-transform: lowercase;
  font-weight: 600;
  padding: 5px 10px;
  border: 3px solid transparent;
  border-radius: 8px;
  transition: border-color 0.3s, color 0.3s;
}

nav ul li a:hover {
  color: #2cb3be;
}

nav ul li a.active {
  border-color: #2cb3be;
}

nav ul li a:hover {
  color: #2cb3be;
}

nav ul li a.active {
  border-color: #2cb3be;
}

/* ----------------------------------
   Main Content & Centered Containers
---------------------------------- */
.container {
  width: 90%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.centered {
  min-height: calc(50vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

main.centered{
  max-width: 700px;
  margin: 0 auto;        /* still perfectly centered in the viewport */
  padding: 20px 40px;    /* 40 px on both sides = left-edge breathing room  */
  text-align: left;      /* text starts at that 40 px mark                  */
}

.container .centered h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

/* ----------------------------------
   Dark Mode Toggle Button Container
---------------------------------- */
.dark-mode-toggle-container {
  text-align: center;
  margin: 10px 0;
}
/* ----------------------------------
   Writing Categories
---------------------------------- */
.writing-categories h2 {
  margin: 20px 0;
}

.plain-link {
  color: inherit;
  text-decoration: none;
}

.writing-categories .plain-link:hover {
  color: #2cb3be;
  transform: scale(1.05);
  transition: transform 0.3s, color 0.3s;
}

/* ----------------------------------
   Downloads List
---------------------------------- */
.downloads {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
}

.downloads li {
  margin-bottom: 30px;
}
/* ----------------------------------
   Profile Picture & Workbook Thumbnail
---------------------------------- */
.profile-pic {
  width: 150px;
  border-radius: 12%;
  display: block;
  margin: 40px auto 0;
  box-shadow: 8px 8px 0 black;
}

.workbook-thumbnail {
  display: block;
  margin: 20px auto 10px;
  width: 350px;
  border: 3px solid #333;
  border-radius: 12pt;
  box-shadow: 8px 8px 0 black;
  transition: border-color 0.3s;
}

body.dark-mode .workbook-thumbnail {
  border-color: #53ffc9;
}

/* ----------------------------------
   Dropdown Sections
---------------------------------- */
.dropdown-section,
.dropdown-section-two {
  width: 70%;
  max-width: 37.5rem;
  margin: 1.25rem auto;
  padding: 1.875rem; /* Corrected padding (was 875rem) */
  border: 3px solid var(--dropdown-border-light);
  border-radius: 0.75rem;
  text-align: center;
  background-color: var(--dropdown-bg-light);
  box-shadow: var(--dropdown-box-shadow-light);
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

body.dark-mode .dropdown-section,
body.dark-mode .dropdown-section-two {
  background-color: var(--dropdown-bg-dark);
  border-color: var(--dropdown-border-dark);
  box-shadow: var(--dropdown-box-shadow-dark);
}

body.dark-mode .dropdown-section[open],
body.dark-mode .dropdown-section-two[open] {
  border-color: var(--dropdown-border-dark-open);
  box-shadow: var(--dropdown-box-shadow-dark-open);
}

/* ----------------------------------
   Dropdown Summary & Content
---------------------------------- */
.dropdown-section summary,
.dropdown-section-two summary {
  text-align: left;
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dropdown-section summary {
  font-weight: bold;
  font-size: 1.5em;
}

.dropdown-section-two summary {
  font-weight: normal;
  font-size: 1.3em;
}

summary::-webkit-details-marker {
  display: none;
}

.dropdown-section .dropdown-content,
.dropdown-section-two .dropdown-content {
  text-align: left;
  margin: 10px auto 0;
  max-width: 90%;
}

/* ----------------------------------
   More Info Meme
---------------------------------- */
.more-info-meme summary {
  font-size: medium;
}

.more-info-meme img {
  max-width: 500px;
}

/* ----------------------------------
   Download Button
---------------------------------- */
.download-button {
  display: inline-block;
  padding: 10px 20px;
  text-decoration: none;
  color: #2cb3be;
  border: 3px solid #2cb3be;
  border-radius: 12pt;
  background-color: transparent;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

.download-button:hover {
  background-color: #2cb3be;
  color: #fff;
}

/* ----------------------------------
   Downloads List & Page Break
---------------------------------- */
.downloads li {
  padding-top: 20px;
}

.page-break {
  height: 100px;
}

/* ----------------------------------
   Dark Mode Toggle Button & Global Dark Mode Styles
---------------------------------- */
.dark-mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 100px;
  height: 40px;
  padding: 5px;
  border: 3px solid #2cb3be;
  border-radius: 12pt;
  background: transparent;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background-color 0.3s, color 0.3s;
}

.dark-mode-toggle .sun-icon,
.dark-mode-toggle .moon-icon {
  z-index: 2;
}

.dark-mode-toggle .slider {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 25px;
  height: 25px;
  background-color: #2cb3be;
  border-radius: 50%;
  transition: left 0.3s, background-color 0.3s;
  z-index: 1;
}

.dark-mode-toggle:hover .slider {
  background-color: #6935f4;
}

/* Adjust slider position in dark mode */
body.dark-mode .dark-mode-toggle .slider {
  left: calc(100% - 30px);
}

/* Global Dark Mode Styles */
body.dark-mode {
  background-color: #054745;
  color: #53ffc9;
}

body.dark-mode nav ul li a {
  color: #53ffc9;
}

body.dark-mode nav ul li a:hover,
body.dark-mode nav ul li a.active {
  border-color: #53ffc9;
  color: #53ffc9;
}

body.dark-mode .download-button {
  color: #53ffc9;
  border-color: #53ffc9;
}

body.dark-mode .download-button:hover {
  background-color: #53ffc9;
  color: #054745;
}

/* ----------------------------------
   Global Hyperlink Styles
---------------------------------- */
a {
  color: #333;
  transition: color 0.3s;
}

a:hover {
  color: #2cb3be;
}

body.dark-mode a {
  color: #53ffc9;
}

body.dark-mode a:hover {
  color: #fff;
}


/* ----------------------------------
   Mobile Adjustments (Max-width: 767px)
---------------------------------- */
@media (max-width: 767px) {
  header {
    padding: 20px 15px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  nav ul li a {
    padding: 5px 8px;
  }
  
  .dropdown-section,
  .dropdown-section-two {
    width: 90%;
    padding: 20px;
  }
}



/* ----------------------------------
   Back to Top Button (Floating)
---------------------------------- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3rem;
  height: 3rem;
  background: #2cb3be;
  color: #fff;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ----------------------------------
   Mobile Adjustments (Max-width: 767px)
---------------------------------- */
@media (max-width: 767px) {
  header {
    padding: 20px 15px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  nav ul li a {
    padding: 5px 8px;
  }
  
  .dropdown-section,
  .dropdown-section-two {
    width: 90%;
    padding: 20px;
  }

  /* Back to Top on mobile: smaller & closer to edge */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
}

/* =========================================================
   Newsletter layout (mobile-first, fully responsive)
   ========================================================= */

   main.centered{
    /* flex column keeps hero + article stacked and centered */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;                      /* space between hero & copy          */
  
    /* fluid inline padding: 1 rem on phones ➜ 2.5 rem on wide screens */
    padding-inline: clamp(1rem, 6vw, 2.5rem);
    padding-block: 1.5rem;            /* top/bottom breathing room          */
  
    max-width: 700px;                 /* caps line length on desktops       */
    margin-inline: auto;              /* keeps whole column in the center   */
    text-align: left;                 /* default for copy; hero overrides   */
  }
  
  /* ---------------------- HERO (title + logo) ---------------------- */
  .hero{
    text-align: center;               /* perfectly centers h1 + img         */
  }
  
  .hero .the-point-logo{
    display: block;
    margin: 0 auto 10px;              /* centers logo, adds tiny gap        */
    width: min(60%, 300px);           /* scales with screen; never >300 px  */
    border-radius: 12px;              /* keeps your existing rounded look   */
  }
  
  /* --------------------- ARTICLE (main copy) ----------------------- */
  .article{
    width: 100%;
    text-align: left;                 /* copy stays left-aligned            */
  
    /* “magazine” gutter grows on wider screens, collapses on phones */
    padding-left: clamp(0, 2.5vw, 40px);
  }

  /* extra room above & below section headers inside the article */
.article h2,
.article h3,
.article h4 {             /* include deeper levels if you ever need them */
  margin: 2rem 0 1rem;    /* top 2 rem, bottom 1 rem (adjust to taste) */
}

/* extra space between paragraphs inside newsletter copy */
.article p { margin-bottom: 1.25rem; }   /* tweak the 1.25rem to taste */

