/* Reset some default browser styles */
body, h1, h2, p, ul, li {
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    margin: 0;
    line-height: 1.6;
    background-color: #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Centered content for the home page */
.centered-content {
    display: flex;
    max-width: 1000px;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    text-align: center;
}

.left-aligned-content {
    padding: 1rem;
    max-width: 1000px;
    margin: 1rem auto;
    text-align: left;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: transparent;
}

ul {
    padding-left: 25px; 
}

header {
    background-color: #004d66;
    color: white;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    font-weight: bold;
}

nav {
    background-color: #004d66;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

nav li {
    margin: 0 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

nav a:hover {
    background-color: #008080;
    transform: scale(1.05);
}

.about {
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    text-align: center;
}

footer {
    background-color: #004d66;
    color: white;
    padding: 1rem 0;
    width: 100%;
    text-align: center;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

/* Sidebar styles */
.main-content {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 250px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    margin-bottom: 1rem;
    color: #004d66;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: #004d66;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.sidebar a:hover {
    background-color: #b3e6e6;
    transform: scale(1.05);
}

.content {
    flex: 1;
    padding: 15px;
}

/* Media Queries for Mobile */
@media (max-width: 800px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        box-shadow: none;
    }

    .sidebar h2, .sidebar ul {
        text-align: center;
    }

    .content {
        padding: 1rem;
    }

    .centered-content, .left-aligned-content {
        padding: 1rem;
        margin: 1rem;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        margin: 0.5rem 0;
    }
}

/* Container for the profile photo */
.photo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Profile photo styling */
.profile-photo {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Button styles */
button {
    background-color: #004d66;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #008080;
    transform: scale(1.1);
}

.collapsible {
    cursor: pointer;
    font-weight: bold;
    padding: 0.5rem 0;
}

.collapsible:hover {
    color: #004d66;
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #b3e6e6;
}

/* Impact list styling */
.impact-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.impact-list li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* DEFAULT (DARK MODE) - CSS Variables */
:root {
  --bg: #121212;
  --fg: #eeeeee;
  --accent: #80cbc4;
  --accent-light: #4db6ac;
  --text-muted: #aaaaaa;
  --border-color: #333333;
  --blockquote-bg: #1e1e1e;
  --table-header-bg: #1e1e1e;
  --table-even-bg: #1a1a1a;
}

/* LIGHT MODE OVERRIDE - CSS Variables */
[data-theme="light"] {
  --bg: #ffffff;
  --fg: #111111;
  --accent: #004d66;
  --accent-light: #008080;
  --text-muted: #666;
  --border-color: #ddd;
  --blockquote-bg: #f0fafa;
  --table-header-bg: #f5f5f5;
  --table-even-bg: #fafafa;
}

/* Base Body Styling (Applies to Default Dark Mode) */
body {
  background-color: var(--bg);
  color: var(--fg);
}

/* Explicit Light Mode Body Override */
html[data-theme="light"] body {
  background-color: var(--bg);
  color: var(--fg);
}

/* Element Styling using CSS Variables (Defaults to Dark Mode) */
a {
  color: var(--accent);
}

header,
footer {
  background-color: var(--blockquote-bg);
}

.sidebar h2,
.sidebar a {
  color: var(--accent);
}

.sidebar a:hover {
  background-color: var(--accent-light);
}

button {
  background-color: var(--accent);
  color: var(--bg);
}

button:hover {
  background-color: var(--accent-light);
}

h1,
h2,
h3,
.tagline,
p {
  color: var(--fg);
}

p[style*="color: #666"],
p[style*="color: #444"] {
  color: var(--text-muted) !important;
}

p[style*="color: #004d66"],
h2[style*="color: #004d66"] {
  color: var(--accent) !important;
}

hr {
  border-top-color: var(--border-color);
}

blockquote {
  background-color: var(--blockquote-bg);
  border-left-color: var(--accent-light);
  color: var(--fg);
}

/* Table styling (Defaults to Dark Mode via Variables) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  color: var(--fg);
}

th {
  background-color: var(--table-header-bg);
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding: 0.75rem;
  text-align: left;
}

td {
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem;
  text-align: left;
  background-color: transparent !important;
}

tr {
  background-color: transparent !important;
}

tr:nth-child(even) {
  background-color: var(--table-even-bg) !important;
}

/* Blockquote styling */
blockquote {
  border-left: 4px solid #008080;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  color: #444;
  font-style: italic;
  background-color: #f0fafa;
}

/* Horizontal rule styling */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1.5rem 0;
}

/* 2026 visual refresh — presentation only */
:root {
  --bg: #171b1a;
  --fg: #efeee8;
  --accent: #94cfbd;
  --accent-light: #b3e1d4;
  --text-muted: #a9b0ac;
  --border-color: #35403c;
  --blockquote-bg: #202623;
  --table-header-bg: #202623;
  --table-even-bg: #202623;
}

[data-theme="light"] {
  --bg: #f4f1e9;
  --fg: #202522;
  --accent: #176b5b;
  --accent-light: #0f5549;
  --text-muted: #68706c;
  --border-color: #d7d7cf;
  --blockquote-bg: #faf8f2;
  --table-header-bg: #faf8f2;
  --table-even-bg: #faf8f2;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-light); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

header {
  padding: 1.1rem clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg);
  box-shadow: none;
  text-align: left;
}

header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -.02em;
}

.main-content {
  display: grid;
  grid-template-columns: 220px minmax(0, 820px);
  gap: clamp(2.5rem, 6vw, 6rem);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem) 6rem;
}

.sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
  width: 100%;
  padding: 0;
  box-shadow: none;
}

.sidebar h2 {
  margin-bottom: 1.25rem;
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 500;
}

.sidebar ul { padding: 0; list-style: none; }
.sidebar li { margin: 0 0 .45rem; }

.sidebar a {
  display: inline-block;
  padding: .1rem 0;
  color: var(--text-muted);
  font-size: .82rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s ease;
}

.sidebar a:hover { background: transparent; color: var(--fg); transform: none; }

.collapsible,
.sidebar-label {
  margin-top: 1.35rem;
  padding: 0;
  color: var(--fg);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-label { cursor: default; }

.collapsible:hover { color: var(--accent); }
.collapsible-content { margin: .45rem 0 0 .95rem; }

.sidebar-subgroup { margin-bottom: .65rem !important; }

.sidebar-subgroup-toggle {
  width: auto;
  height: auto;
  padding: .1rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: .82rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.sidebar-subgroup-toggle:hover { background: transparent; color: var(--fg); }

.left-aligned-content {
  min-width: 0;
  max-width: 820px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.content { padding: 0; }

.centered-content {
  display: block;
  max-width: none;
  padding: 0;
  text-align: left;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

h1 { line-height: .98; letter-spacing: -.05em; }
h2 { margin-bottom: 1.25rem; font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; }
h3 { line-height: 1.25; }
p { margin-bottom: 1.1rem; }

.photo-container {
  float: right;
  display: block;
  width: 190px;
  margin: 0 0 2rem 2.5rem;
}

.profile-photo {
  display: block;
  width: 190px;
  height: 190px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  box-shadow: none;
  object-fit: cover;
  filter: saturate(.8) contrast(1.03);
}

.hero {
  min-height: 390px;
  padding: .5rem 0 3.5rem;
  border-bottom: 1px solid var(--border-color);
}

.hero h1 { max-width: 600px; font-size: clamp(4rem, 9vw, 6.4rem); }

.subtitle {
  max-width: 610px;
  margin: 1.2rem 0 1.8rem;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.55;
}

.tagline {
  max-width: 620px;
  margin-bottom: 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.4;
}

.centered-content > section:not(.hero) { clear: both; padding: 3.5rem 0; }
.centered-content > section:not(.hero) > p { max-width: 690px; }

.intro-copy {
  max-width: 690px;
  margin-top: 1rem;
}

.intro-copy p {
  margin: 0 0 1.35rem;
  line-height: 1.7;
}

.intro-copy p:last-child { margin-bottom: 0; }

.tldr-page {
  max-width: 760px;
}

.tldr-page > header,
.tldr-page > section {
  padding: 0 0 3.5rem;
}

.tldr-page > section {
  padding-top: 3.5rem;
  border-top: 1px solid var(--border-color);
}

.tldr-header h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(4rem, 9vw, 6.4rem);
}

.tldr-header p:first-of-type {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  line-height: 1.4;
}

.tldr-links {
  padding: 0;
  list-style: none;
}

.tldr-links li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.tldr-links li:first-child { padding-top: 0; }

.impact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--border-color);
}

.impact-list li {
  min-height: 132px;
  margin: 0;
  padding: 1.35rem;
  background: var(--blockquote-bg);
  line-height: 1.55;
}

.impact-list strong { display: block; margin-bottom: .35rem; color: var(--accent-light); }

.cta-box {
  margin-top: 1rem;
  padding: clamp(1.5rem, 4vw, 2.25rem) !important;
  border: 1px solid var(--border-color);
  background: var(--blockquote-bg);
}

.cta-box ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}

.nav-links { margin-top: 3rem; border-top: 1px solid var(--border-color); }
.nav-links h3 { margin-bottom: 1rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 500; }
.nav-links ul { display: flex; gap: 1.5rem; }

.writing-samples-page { max-width: 820px; }

.writing-samples-intro {
  padding: 0 0 clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--border-color);
}

.writing-samples-intro h1 {
  max-width: 720px;
  margin-bottom: 1.35rem;
  font-size: clamp(3.5rem, 8vw, 6rem);
}

.writing-samples-intro > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--text-muted);
}

.writing-samples-kicker {
  margin-bottom: 1rem;
  color: var(--accent-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.writing-sample {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  padding: clamp(2rem, 5vw, 3.25rem) 0;
  border-bottom: 1px solid var(--border-color);
}

.writing-sample-number {
  padding-top: .35rem;
  color: var(--accent-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
}

.writing-sample-body h2 {
  max-width: 610px;
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
}

.writing-sample-body p {
  max-width: 650px;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.writing-sample-link {
  display: inline-block;
  color: var(--fg);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration-color: var(--accent);
  text-transform: uppercase;
}

.writing-sample-link span {
  display: inline-block;
  margin-left: .25rem;
}

/* Prison Planet */
.prison-planet-page {
  --pp-accent: #d94b36;
  max-width: 760px;
}

.prison-planet-page > header,
.prison-planet-page > section {
  padding: 0;
}

.prison-planet-page > header {
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 0;
}

.prison-planet-page > section {
  padding: clamp(2rem, 4vw, 3rem) 0;
}

.prison-planet-hero h1 {
  max-width: 720px;
  margin: .6rem 0 1.25rem;
  font-size: clamp(3.3rem, 8vw, 6.2rem);
  line-height: .92;
}

.prison-planet-manifesto {
  max-width: 610px;
  margin-bottom: 2.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  line-height: 1.4;
}

.prison-planet-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.prison-planet-meta div { padding: .9rem 1rem .9rem 0; }
.prison-planet-meta dt { color: var(--text-muted); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.prison-planet-meta dd { margin: .15rem 0 0; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; }

.prison-planet-page h2 { margin-bottom: 1.75rem; }
.prison-planet-page h3 { margin: 2.5rem 0 1rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; font-weight: 500; }
.prison-planet-page p { max-width: 680px; }

.prison-planet-terminal {
  margin: 1.75rem 0 2.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--pp-accent);
  background: var(--blockquote-bg);
  color: var(--fg);
  font: .84rem/1.75 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.prison-planet-callout,
.prison-planet-closing {
  margin: 2rem 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 600;
  line-height: 1.4;
}

.prison-planet-status {
  display: inline-block;
  padding: .45rem .7rem;
  border: 1px solid var(--border-color);
  background: var(--blockquote-bg);
  color: var(--pp-accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .86rem;
}

.prison-planet-issues {
  margin: 0 0 2.5rem;
  padding-left: 1.25rem;
}

.prison-planet-issue { padding: .55rem 0 .55rem .25rem; }
.prison-planet-issue::marker { color: var(--pp-accent); }
.prison-planet-issue p { margin: 0; }
.prison-planet-issue p + p { margin-top: .6rem; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .76rem; }

.prison-planet-demands {
  margin: 1.5rem 0 2.5rem;
  padding-left: 1.25rem;
}

.prison-planet-demands li { padding: .35rem 0 .35rem .25rem; }
.prison-planet-demands li::marker { color: var(--pp-accent); }

.prison-planet-closing { margin-bottom: 0; }

button {
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--blockquote-bg);
  color: var(--fg);
  transform: none;
}

button:hover { background: var(--blockquote-bg); color: var(--accent); transform: none; }
#theme-toggle { width: 42px; height: 42px; padding: 0; }

blockquote {
  margin: 1.75rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--accent);
  background: var(--blockquote-bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  font-style: normal;
}

footer {
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--border-color);
  background: var(--bg);
  box-shadow: none;
  color: var(--text-muted);
  font-size: .78rem;
}

footer p { color: var(--text-muted); }
footer a { color: var(--accent); }

@media (max-width: 800px) {
  .main-content { display: block; padding-top: 2rem; }
  .sidebar { position: static; width: 100%; margin-bottom: 3.5rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-color); }
  .sidebar > ul { columns: 2; column-gap: 1.5rem; text-align: left; }
  .sidebar .collapsible, .sidebar .collapsible-content { break-inside: avoid; }
  .centered-content, .left-aligned-content { margin: 0; padding: 0; }
  .photo-container { width: 125px; margin: 0 0 1.5rem 1.5rem; }
  .profile-photo { width: 125px; height: 125px; }
  .hero { min-height: 0; }
  .impact-list, .cta-box ul { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  header { padding-right: 4.5rem; }
  .sidebar > ul { columns: 1; }
  .photo-container { float: none; margin: 0 0 2rem; }
  .hero h1 { font-size: 3.7rem; }
  .nav-links ul { display: block; }
  .writing-sample { grid-template-columns: 1fr; gap: .65rem; }
  .prison-planet-meta { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
