@font-face {
  font-family: 'Compagnon';
  src: url('/fonts/Compagnon.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'EBGaramond';
  src: url('/fonts/Garamond.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Nunito';
  src: url('/fonts/Nunito.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Instrument';
  src: url('/fonts/Instrument.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Source';
  src: url('/fonts/Source.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Instrument', serif;
  background-color: #f8f7f5;
  color: #1b2833;
  letter-spacing: 0.00em;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 100px;
}

/* Typography - Global */
h1 {
  font-family: 'Compagnon';
  font-size: 16px;
  font-weight: 500;
  color: #1b2833;
  margin-bottom: 30px;
}

h2 {
  font-family: 'Compagnon';
  font-size: 16px;
  font-weight: 600;
  color: #1b2833;
  margin-bottom: 20px;
}

h3 {
  font-size: 12px;
  letter-spacing: 0.0em;
  color: #1b2833;
  margin-top: 20px;
  text-align: left;
  font-family: 'Compagnon';
  font-weight: 400;
}

h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  line-height: 1.2em;
  color: #1b2833;
  margin-top: 50px;
  font-weight: 550;
  letter-spacing: 0.02em;
}

p {
  font-family: 'Nunito';
  font-size: 16px;
  line-height: 1.8em;
  font-weight: 400;
  margin-bottom: 10px;
}

p a {
  color: #1b2833;
  text-decoration: none;
  border-bottom: 1px solid #5a7a93;
}

p a:hover {
  color: #ffab6b;
  border-bottom: 1px solid #ffab6b;
}

p strong {
  font-family: 'Compagnon';
}

/* Global Image & Caption Styles */
figure {
  margin: 0;
}

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

figcaption {
  font-size: 12px;
  letter-spacing: 0.0em;
  color: #1b2833;
  margin-top: 12px;
  text-align: left;
  font-family: 'Compagnon';
}

/* Footer */
footer {
  background-color: #f8f7f5;
  padding: 20px 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  gap: 30px;
  align-items: center;
}

footer p {
  font-size: 16px;
  letter-spacing: 0.02em;
  margin: 0;
  font-family: 'Compagnon';
}

footer a {
  font-family: 'Compagnon';
  font-size: 15px;
  letter-spacing: 0.05em;
  text-decoration: none;
  border-bottom: 1px solid #1b2833;
  color: #1b2833;
}

footer a:hover {
  border-bottom: none;
}

/* ===================================
   UNIFIED LAYOUT SYSTEM
   =================================== */

/* Main container - used by ALL pages */
.page-container {
  display: flex;
  gap: 10%;
  align-items: flex-start;
}

/* Sidebar - always 3 columns */
.sidebar {
  flex: 3;
}

/* Content area - always 7 columns */
.content {
  flex: 7;
}

/* ===================================
   SIDEBAR NAVIGATION
   =================================== */

.site-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1b2833;
  text-decoration: none;
  font-family: 'Compagnon';
  font-size: 25px;
  font-weight: 400;
  margin-bottom: 30px;
}

.site-title a {
  color: #1b2833;
  text-decoration: none;
  font-family: 'Compagnon';
  font-size: 25px;
  line-height: 1.7em;
  font-weight: 400;
}

.menu-section {
  margin-bottom: 30px;
}

.menu-section h3 {
  font-family: 'Compagnon', serif;
  font-size: 16px;
  font-weight: 400;
  color: #1b2833;
  margin-bottom: 10px;
}

.menu-section h3 a {
  font-family: 'Compagnon';
  font-size: 16px;
  color: #1b2833;
  text-decoration: none;
  border-bottom: none;
}

.menu-section h3 a:hover {
  color: #ffab6b;
}

.menu-section h3.current-page a {
  border-bottom: 1px solid #1b2833;
  padding-bottom: 3px;
}

.menu-section h3.current-page a:hover {
  border-bottom: none;
}

.menu-section a {
  display: block;
  font-family: 'Instrument', sans-serif;
  font-size: 14px;
  color: #0719dd;
  text-decoration: none;
  border-bottom: 1px solid #5a7a93;
  margin-bottom: 8px;
  padding-bottom: 2px;
  width: fit-content;
}

.menu-section a:hover {
  color: #ffab6b;
  border-bottom-color: #ffab6b;
}

/* ===================================
   HOME PAGE SPECIFIC
   =================================== */
.home-content {
  margin-top: 10px;
}

figure {
  float: left;
  width: 100%;
  margin-bottom: 10px;
}

.toggle-image {
  display: none;
}

.image-toggle {
  cursor: pointer;
  color: #0719dd;
  border-bottom: 1px solid #5a7a93;
}

/* ===================================
   LEGAL PAGES - Smaller text
   =================================== */

.legal-content p {
  font-size: 16px;
  margin-bottom: 20px;
}

/* ===================================
   NEWSLETTER PAGE SPECIFIC
   =================================== */

/* Newsletter image - narrow width */
.newsletter-image {
  max-width: 400px;
  margin: 40px 0;
}

/* ===================================
   SECTION LABELS
   =================================== */

.section-label {
  font-family: 'Instrument', sans-serif;
  font-size: 14px;
  font-variant: none;
  line-height: 1.2em;
  letter-spacing: 0.1em;
  margin-bottom: 15px;
  margin-top: 10px;
  color: #0719dd;
  font-weight: 400;
}

/* ===================================
   POEMS PAGES
   =================================== */

/* Poems Grid - Overview */
.poems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.poem-tile {
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

.poem-tile:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.poem-tile img {
  width: 100%;
  height: auto;
  border: 1px solid #e0e0e0;
  margin-bottom: 10px;
}

.poem-tile h3 {
  display: none;
}

/* Individual Poem Page */
.content > img {
  max-width: 450px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: 1px solid #e0e0e0;
}



/* About Page Layout */
.about {
  display: flex;
  gap: 10%;
  align-items: flex-start;
}

.about-text {
  flex: 55;
}

.about-image {
  flex: 45;
  display: flex;
  justify-content: flex-end;
}

.home-image figure {
  width: 100%;
}

.resources-body footer a {
  border-bottom: 1px solid #1b2833;
}

/* Resources Index Container */
.resources-container {
  max-width: 700px;
  margin: 0 auto;
}

.resources-container p {
  margin-bottom: 50px;
  color: #1b2833;
}

/* Individual Resource Items */
.resource-item {
  margin-bottom: 50px;
  margin-top: 8px;
}

.resource-item h2 {
  font-family: 'Questrial';
  font-size: 17px;
  letter-spacing: 0.02em;
  font-weight: 550;
  margin-bottom: 8px;
}

.resource-item h2 a {
  color: #1b2833;
  text-decoration: none;
  border-bottom: 2px solid #0719dd;
}

.resource-item h2 a:hover {
  border-bottom: 2px solid #ffab6b;
}

/* Article Body Background */
.article-body {
  background-color: #f8f7f5;
  color: #1b2833;
}

/* Article page header */
.article-body header {
  background-color: #f8f7f5;
  color: #1b2833;
}

/* Article page footer */
.article-body footer {
  background-color: #f8f7f5;
}

.article-body footer p {
  color: #1b2833;
}

.article-body footer a {
  color: #1b2833;
  border-bottom: 1px solid #1b2833;
}

/* Article page navigation */
.article-body .site-title {
  color: #1b2833;
}

.article-body nav a {
  color: #1b2833;
}

/* Article Grid Layout */
.article-content {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 700px 200px;
  gap: 100px;
  color: #1b2833;
  font-family: 'Questrial';
  font-weight: 500;
  line-height: 1.8em;
}

.article-main {
  grid-column: 1;
}

.article-margin {
  grid-column: 2;
}

/* Article Typography */
.article-content h1 {
  font-family: 'Instrument';
  font-weight: 700;
  font-size: 36px;
  margin-bottom: 20px; 
  color: #1b2833;
} 

.article-subtitle {
  font-family: 'Instrument', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(27, 40, 51, 0.7);
  margin-top: -10px;
  margin-bottom: 30px;
}

.article-content p {
  font-size: 17px;
  letter-spacing: 0.02em;
  font-weight: 550;
}

.article-date {
  display: block;
  font-size: 14px;
  color: #1b2833;
  margin-bottom: 20px;
  font-family: 'Questrial', sans-serif; 
}

.article-content figure {
  margin-bottom: 20px;
}

/* Margin Notes */
.margin-note {
  font-family: 'Instrument', sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #1b2833;
  margin-bottom: 20px;
}

.article-margin {
  position: relative;
}

.margin-note a {
  color: #0719dd;
  text-decoration: none;
  border-bottom: 2px solid #0719dd;
}

.margin-note a:hover {
  color: #ffab6b;
  border-bottom: 2px solid #ffab6b;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 900px) {
  
  /* Mobile header with hamburger */
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Hamburger menu button */
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
  }
  
  .menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #1b2833;
    margin: 5px 0;
    transition: 0.3s;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  /* Mobile navigation */
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background-color: #f8f7f5;
    flex-direction: column;
    padding: 80px 40px 40px 40px;
    gap: 30px;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
  }
  
  nav.active {
    right: 0;
  }
  
  nav a {
    font-size: 20px;
  }
  
  /* Reduce side padding on all pages */
  main,
  .footer-container {
    padding: 0 40px;
  }
  
  /* Stack homepage layout */
  .home {
    flex-direction: column;
    gap: 40px;
  }
  
  .home-image {
    width: 100%;
    justify-content: center;
  }
  
  .home-image figure {
    width: 100%;
    max-width: 400px;
  }
  
  /* Stack about page layout */
  .about {
    flex-direction: column;
    gap: 40px;
  }
  
  .about-image {
    width: 100%;
    justify-content: center;
  }
  
  .about-image figure {
    width: 100%;
    max-width: 400px;
  }
  
  /* Stack newsletter layout */
  .newsletter-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .newsletter-image {
    max-width: 500px;
    margin: 0 auto;
  }
  
  /* Stack article layout (margin notes handled separately) */
  .article-content {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 700px;
  }
  
  .article-margin {
    display: none; /* We'll handle margin notes separately */
  }
  
  /* Adjust typography sizes */
  h1 {
    font-size: 30px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  .site-title {
    font-size: 24px;
  }
  
  main {
    padding: 40px 40px;
  }
  
  .article-content h1 {
    font-size: 30px;
  }
}

@media (max-width: 600px) {
  
  /* Further reduce padding on mobile */
  .header-container,
  main,
  .footer-container {
    padding: 0 20px;
  }
  
  main {
    padding: 30px 20px;
  }
  
  nav {
    width: 80%;
    padding: 80px 30px 30px 30px;
  }
  
  /* Smaller typography */
  h1 {
    font-size: 26px;
  }
  
  .site-title {
    font-size: 22px;
  }
  
  p {
    font-size: 16px;
  }
  
  .article-content p {
    font-size: 16px;
  }
  
  .article-content h1 {
    font-size: 26px;
  }
}

/* Hide hamburger on desktop */
@media (min-width: 901px) {
  .menu-toggle {
    display: none;
  }
}