/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #222;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

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

/* LAYOUT */
header, main, footer {
  padding: 2rem;
  max-width: 1200px;
  margin: auto;
}

/* NAVIGATION */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 1rem 2rem;
  border-bottom: 2px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background-color 0.3s, border-color 0.3s;
}

body.dark-mode nav {
  background-color: #1f1f1f;
  border-bottom: 2px solid #333;
}

nav h1 {
  font-size: 1.5rem;
  color: #d95f02;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  font-weight: 500;
  color: #222;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: #d95f02;
}

body.dark-mode .nav-links li a {
  color: #f0f0f0;
}

/* HERO SECTION FIX */
#hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 6rem 0 4rem;
  padding: 0 1rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-align: center;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  color: #666;
  min-height: 2rem;
  height: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

body.dark-mode .hero-title {
  color: #ccc;
}

body.dark-mode .hero-subtitle {
  color: #ccc;
}

/* DARK MODE TOGGLE */
#darkModeToggle {
  background-color: #d95f02;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

#darkModeToggle:hover {
  background-color: #b94e01;
}

/* HAMBURGER MENU */
#hamburger {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: #d95f02;
  z-index: 10000;
}

/* MOBILE NAV SLIDEOUT */
#navSlideout {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 250px;
  height: 100vh;
  background-color: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 9999;
  padding: 2rem 1rem;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

#navSlideout.show {
  transform: translateX(0%);
}

#navSlideout ul {
  list-style: none;
  padding: 0;
}

#navSlideout li {
  margin-bottom: 1rem;
}

#navSlideout a {
  text-decoration: none;
  color: #111;
  font-weight: bold;
}

body.dark-mode #navSlideout {
  background-color: #181818;
}

body.dark-mode #navSlideout a {
  color: #f0f0f0;
}

/* RESPONSIVE RULES */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  #hamburger {
    display: block;
  }

  #navSlideout {
    display: block;
  }

  #darkModeToggle {
    margin-left: 0;
  }

  header, main, footer {
    padding: 1rem;
  }

  #hero h2 {
    font-size: 1.5rem;
    text-align: center;
  }

  #hero p {
    font-size: 1rem;
    text-align: center;
    margin: 0 auto;
    color: #666
  }
}

@media (min-width: 769px) {
  #navSlideout {
    display: none !important;
    transform: translateX(100%) !important;
  }

  #hamburger {
    display: none !important;
  }
}

/* STATS BAR */
#stats-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem auto;
  font-size: 1rem;
  text-align: center;
  color: #444;
}

#stats-bar .stat {
  background: #f3f3f3;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
  flex: 1 1 150px;
  max-width: 200px;
}

#stats-bar .stat:hover {
  transform: scale(1.05);
}

body.dark-mode #stats-bar .stat {
  background: #1e1e1e;
  color: #f0f0f0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* CURRENTLY WORKING ON */
#currently {
  margin: 4rem auto;
  max-width: 1000px;
}

#currently h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #d95f02;
}

.currently-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.currently-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.currently-card:hover {
  transform: translateY(-5px);
}

.currently-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: #d95f02;
}

.currently-card p {
  font-size: 0.95rem;
  color: #555;
}

body.dark-mode .currently-card {
  background: #1e1e1e;
  border-color: #333;
}

body.dark-mode .currently-card p {
  color: #ccc;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

form label {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

form input,
form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #fff;
  color: #222;
}

form textarea {
  resize: vertical;
  min-height: 150px;
}

body.dark-mode form input,
body.dark-mode form textarea {
  background-color: #1f1f1f;
  color: #f0f0f0;
  border-color: #444;
}

form button {
  background-color: #d95f02;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s;
}

form button:hover {
  background-color: #b94e01;
}

.contact-info {
  max-width: 600px;
  margin: 2rem auto 0;
  text-align: left;
  line-height: 1.6;
}

footer {
  width: 100%;
  text-align: center;
  border-top: 2px solid #ddd;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #777;
  margin-top: 3rem;
}

body.dark-mode footer {
  border-top: 2px solid #333;
  color: #aaa;
}

audio {
  display: block;
  margin: 1rem auto;
  width: 100%;
  max-width: 500px;
}

.cv-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cv-button {
  padding: 0.75rem 1.5rem;
  background-color: #eaf4fc;
  color: black;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: inline-block;
}

.cv-button:hover {
  background-color: #b94e01;
  transform: translateY(-2px);
}


.poem-series {
  margin-bottom: 2rem;
}

.poem-series summary {
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  color: #d95f02;
}

.poem-series ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.poem-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.poem-card:hover {
  transform: translateY(-4px);
}

.poem-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #d95f02;
}

.poem-card p {
  font-size: 0.95rem;
  color: #555;
}

.poem-card a {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: bold;
  color: #d95f02;
}

body.dark-mode .poem-card {
  background: #1f1f1f;
  color: #f0f0f0;
}

body.dark-mode .poem-card p {
  color: #ccc;
}

.story-series {
  margin-bottom: 2rem;
}

.story-series summary {
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  color: #d95f02;
}

.story-series ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

/* --- Grouped Poem Series --- */
.styled-series {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.styled-series[open] {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.styled-series summary {
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
  color: #d95f02;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.styled-series summary::marker {
  display: none;
}

.styled-series summary::after {
  content: '▼';
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.styled-series[open] summary::after {
  transform: rotate(180deg);
}

.styled-series ul {
  margin-top: 1rem;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.styled-series ul li {
  margin: 0.4rem 0;
}

.styled-series a {
  color: #d95f02;
  font-weight: 500;
  text-decoration: none;
}

.styled-series a:hover {
  text-decoration: underline;
}

/* --- Dark Mode Support --- */
body.dark-mode .styled-series {
  background: #1f1f1f;
  border-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .styled-series ul li {
  color: #ccc;
}

body.dark-mode .styled-series summary {
  color: #f0f0f0;
}

body.dark-mode .styled-series a {
  color: #f4c542;
}

.grouped-poems {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 0;
  margin-top: 1rem;
}

.grouped-poems li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #fdfdfd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  list-style: none;
  flex-wrap: wrap;
}

.poem-title {
  font-weight: 600;
  font-size: 1rem;
  color: #222;
  margin-right: 1rem;
  max-width: calc(100% - 140px);
}

.poem-title em {
  font-style: italic;
  font-weight: 400;
  color: #555;
}

.grouped-poems a {
  white-space: nowrap;
  color: #d95f02;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.grouped-poems a:hover {
  text-decoration: underline;
}

/* Dark mode */
body.dark-mode .grouped-poems li {
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .poem-title {
  color: #eee;
}

body.dark-mode .poem-title em {
  color: #aaa;
}

body.dark-mode .grouped-poems a {
  color: #f4c542;
}

.poem-series {
  margin-top: 1rem;
}

.section-summary {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: .5rem;
  cursor: pointer;
  color: #222;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dark-mode .section-summary {
  color: #f0f0f0;
}

/* ============================
   MOBILE-FRIENDLY POETRY STYLES
   ============================ */

/* Responsive layout for poem grid */
.poem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Mobile-specific adjustments */
@media (max-width: 600px) {
  body {
    padding: 1rem;
  }

  .section-card,
  .accent {
    padding: 1.5rem 1rem;
  }

  .carousel-wrapper {
    margin-top: 1rem;
  }

  .section-summary {
    font-size: 1.2rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .grouped-poems li {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    font-size: 0.95rem;
  }

  .poem-title {
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .grouped-poems a {
    font-size: 0.9rem;
  }

  .poem-card h3 {
    font-size: 1rem;
  }

  .poem-card p {
    font-size: 0.9rem;
  }
}

#social-preview .social-embeds {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  #social-preview .social-embeds {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  #social-preview .instagram-media,
  #social-preview .bluesky-embed {
    flex: 1;
    max-width: 49%;
  }
}

.bluesky-embed {
  width: 100%;
  max-width: 540px;
  margin: auto;
  box-sizing: border-box;
  display: block;
}

.story-meta {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 1.5rem;
  text-align: left;
  font-style: italic;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.section-card-item:hover {
  transform: translateY(-4px);
}

.section-card-item h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #d95f02;
}

.section-card-item p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.4;
}

.section-card-item a {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: bold;
  color: #d95f02;
}

/* Dark-mode support */
body.dark-mode .section-card-item {
  background: #1f1f1f;
  color: #f0f0f0;
}
body.dark-mode .section-card-item p {
  color: #ccc;
}

details.section-card.accent .section-card-item {
  background: #fff4e6;
}

details.section-card.accent .section-card-item h3 {
  color: #d95f02;
}

details.section-card.accent .section-card-item a {
  color: #d95f02;
}

/* Dark-mode tweak */
body.dark-mode details.section-card.accent .section-card-item {
  background: #2a1f18;
}
body.dark-mode details.section-card.accent .section-card-item h3,
body.dark-mode details.section-card.accent .section-card-item a {
  color: #ffbcaf;
}

/* ─────────────────────────────────────────
   SWAP CARD BACKGROUNDS BETWEEN SECTIONS
   ───────────────────────────────────────── */

/* 1) Non-accent sections (Articles & Essays) get the “accent” look */
details.section-card:not(.accent) .section-card-item {
  background: #eaf4fc;          /* same as your .accent wrapper */
}
details.section-card:not(.accent) .section-card-item h3,
details.section-card:not(.accent) .section-card-item a {
  color: #d95f02;               /* match your accent heading/link */
}

/* dark-mode for non-accent (now accent-style) cards */
body.dark-mode details.section-card:not(.accent) .section-card-item {
  background: #1a2a33;
}
body.dark-mode details.section-card:not(.accent) .section-card-item h3,
body.dark-mode details.section-card:not(.accent) .section-card-item a {
  color: #ffbcaf;
}

/* 2) True accent sections (Poetry & Worldbuilding) revert to default cards */
details.section-card.accent .section-card-item {
  background: #fff;             /* original default card bg */
}
details.section-card.accent .section-card-item h3,
details.section-card.accent .section-card-item a {
  color: #d95f02;               /* match your default .section-card-item styling */
}

/* dark-mode for true accent (now default-style) cards */
body.dark-mode details.section-card.accent .section-card-item {
  background: #1f1f1f;
}
body.dark-mode details.section-card.accent .section-card-item p {
  color: #ccc;
}

.section-card-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease,
              border-color     0.3s ease,
              transform        0.2s ease;
}
.section-card-item:hover {
  transform: translateY(-4px);
}

/* ─────────────────────────────────────────
   2. Background swap for “Articles & Essays”
      (i.e. non‐.accent sections get the cream-blue)
   ───────────────────────────────────────── */
details.section-card:not(.accent) .section-card-item {
  background: #eaf4fc;
  border-color: transparent; /* hide the default border */
}
details.section-card:not(.accent) .section-card-item h3,
details.section-card:not(.accent) .section-card-item a {
  color: #d95f02;
}

/* Dark-mode tweak for non-accent cards */
body.dark-mode details.section-card:not(.accent) .section-card-item {
  background: #1a2a33;
}
body.dark-mode details.section-card:not(.accent) .section-card-item h3,
body.dark-mode details.section-card:not(.accent) .section-card-item a {
  color: #ffbcaf;
}

/* ─────────────────────────────────────────
   3. Revert true “.accent” sections
      back to the white cards
   ───────────────────────────────────────── */
details.section-card.accent .section-card-item {
  background: #fff;
  border-color: #ddd;
}
details.section-card.accent .section-card-item h3,
details.section-card.accent .section-card-item a {
  color: #d95f02;
}

/* Dark-mode tweak for real accent cards */
body.dark-mode details.section-card.accent .section-card-item {
  background: #1f1f1f;
}
body.dark-mode details.section-card.accent .section-card-item p {
  color: #ccc;
}

/* STORY-SERIES (mimics poem-series) */
.story-series {
  margin-bottom: 2rem;
}

.story-series summary {
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  color: #d95f02;
}

/* Use same list styling as grouped-poems */
.grouped-stories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 0;
  margin-top: 1rem;
}

.grouped-stories li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: #fdfdfd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  list-style: none;
  flex-wrap: wrap;
}

.story-title {
  font-weight: 600;
  font-size: 1rem;
  color: #222;
  margin-right: 1rem;
  max-width: calc(100% - 140px);
}

.grouped-stories a {
  white-space: nowrap;
  color: #d95f02;
  font-weight: bold;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.grouped-stories a:hover {
  text-decoration: underline;
}

/* Dark-mode for story-series */
body.dark-mode .grouped-stories li {
  background: #1e1e1e;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .story-title {
  color: #eee;
}

body.dark-mode .grouped-stories a {
  color: #f4c542;
}

/* ART STUFF */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;

  padding: 0 2rem 4rem 2rem;
  margin-left: 0;
  margin-right: auto;

  justify-content: start;
  align-items: start;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 80%;
  height: auto;
  display: block;

  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item img:hover {
  transform: scale(1.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0,25);
}

.gallery-item figcaption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #333;
}

body.dark-mode .gallery-item figcaption {
  color: #ddd;
}

.gallery-item figcaption strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.15rem;
}