/* =========================================
   BRUTALIST MINIMAL — Megan Snaith Portfolio
   ========================================= */

/* ========== THEME VARIABLES ========== */

:root {
  --bg:             #fff;
  --text:           #000;
  --border:         #000;
  --border-subtle:  #ccc;
  --muted:          #777;
  --hover:          #555;
}

html.dark {
  --bg:             #000;
  --text:           #fff;
  --border:         #fff;
  --border-subtle:  #333;
  --muted:          #888;
  --hover:          #aaa;
}

/* ========== RESET ========== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* ========== THEME TOGGLE ========== */

#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  border-radius: 2rem;
  border: 1px solid var(--text);
  background: none;
  color: var(--text);
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 100;
  padding: 0.45rem 0.85rem;
}

#theme-toggle:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

#sparkle-toggle {
  position: fixed;
  top: 3.5rem;
  right: 1rem;
  border-radius: 2rem;
  border: 1px solid var(--text);
  background: none;
  color: var(--text);
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 0.4rem;
  z-index: 100;
  padding: 0.45rem 0.85rem;
}

html.dark #sparkle-toggle {
  display: flex;
}

#sparkle-toggle:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

/* ========== WRAPPER ========== */

.wrapper {
  width: 100%;
  max-width: 640px;
  padding: 4rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========== HEADER ========== */

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

header h1 {
  font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
  font-size: 1.5rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: capitalize;
}

header p {
  font-size: 0.8rem;
  color: var(--text);
  letter-spacing: 0.08em;
  margin-top: 0.25rem;
  text-transform: capitalize;
}

.header-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 0.6rem;
}

.header-links a {
  font-size: 0.8rem;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.header-links a:hover {
  color: var(--hover);
}

/* ========== ACCORDION ========== */

.accordion {
  width: 100%;
  list-style: none;
}

.acc-item {
  width: 100%;
  border-top: 1px solid var(--border);
}

.acc-item:last-child {
  border-bottom: 1px solid var(--border);
}

/* Toggle button */
.acc-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  font-family: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  font-size: 1rem;
  text-align: left;
  padding: 0.85rem 0;
  cursor: pointer;
  letter-spacing: 0.03em;
  position: relative;
  outline: none;
}

.acc-toggle::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  line-height: 1;
}

.acc-toggle[aria-expanded="true"]::after {
  content: '\2212';
}

.acc-toggle:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

/* Collapsible content */
.acc-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.acc-inner {
  padding: 0.5rem 0 1.25rem;
}

/* ========== ARTICLE LIST ========== */

.article-list {
  list-style: none;
  width: 100%;
}

.article-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.9rem;
  flex: 1;
}

.article-list a:hover {
  color: var(--hover);
}

.article-plain {
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
}

.article-date {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========== TV & PODCASTS ========== */

.media-section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
}

.media-section-label:first-child {
  margin-top: 0;
}

/* ========== CONTACT ========== */

.contact-list {
  list-style: none;
  text-align: left;
}

.contact-list li {
  padding: 0.3rem 0;
  font-size: 0.9rem;
}

.contact-list a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-list a:hover {
  color: var(--hover);
}

.contact-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ========== ABOUT PARAGRAPHS ========== */

.acc-inner p {
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.acc-inner p:last-child {
  margin-bottom: 0;
}


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

@media (max-width: 480px) {
  .wrapper {
    padding: 2.5rem 1.25rem 2.5rem;
  }

  header h1 {
    font-size: 1.25rem;
  }

  .article-list li {
    flex-direction: column;
    gap: 0.1rem;
  }

  .article-date {
    color: var(--muted);
  }
}
