:root {
  --max-width: 820px;
  --text-color: #111;
  --muted: #666;
  --border: #e5e5e5;
  --accent: #2b6cb0;
}

/* Base layout */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background: #fff;
  line-height: 1.6;
}

.hero {
  width: 100%;
  height: 60vh; /* adjust: 50–80vh depending on taste */
  background-image: url('assets/pkos-in-acceleration.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

header {
  border-bottom: 1px solid var(--border);
  padding: 1rem;
}

.nav-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

nav {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
}

.logo .tagline {
  font-weight: 300;
  font-size: 0.75rem;
  opacity: 0.6;
  margin-left: 0;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

nav a {
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.9;
  font-size: 0.9rem;
}

@media (hover: hover) {
  nav a {
    color: var(--muted);
    opacity: 0.85;
  }

  nav a:hover {
    color: var(--text-color);
  }
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem 4rem 1rem;
}

/* Typography */

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  margin-top: 3rem;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

h3 {
  margin-bottom: 0.4rem;
}

.lead {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Links */

a {
  color: var(--text-color);
}

a:hover {
  color: var(--text-color);
}

.full-image {
  width: 100%;
  margin: 2rem 0;
  border-radius: 6px;
}

.lexicon-intro {
  margin-bottom: 3rem;
}

.lexicon-intro hr {
  margin: 2rem 0;
  opacity: 0.2;
}

/* Concept preview */

.concept-preview {
  margin-top: 1.5rem;
}

.concept-preview h3 {
  margin-bottom: 0.3rem;
}

.muted-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  color: var(--muted);
}

.muted-link:hover {
  color: var(--text-color);
}

/* Disclaimers */

.disclaimer {
  background: #f9f9f9;
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Quotes */

blockquote {
  margin-top: 4rem;
  font-size: 1.2rem;
  text-align: center;
  padding: 2rem 1rem;
}

.essay-attribution {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.essay-closing-quote {
  margin: 3rem 0;
  padding-left: 1rem;
  border-left: 3px solid #ccc;
  font-style: italic;
}

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

.research li {
  margin-bottom: 1.2rem;
}
.essay-diagram {
  margin: 2rem 0;
  text-align: center;
}

.essay-diagram img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.cta-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 2px solid #ccc;
  font-size: 0.95rem;
}

.cta-box a {
  text-decoration: none;
  font-weight: 500;
}

.cta-inline {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.semantic-spine {
  margin: 3rem 0;
  text-align: center;
}

.spine-image {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 6px;
}

.caption {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Footer */

footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------------------- */
/* PKOS LEXICON STYLES */
/* ---------------------- */

.lexicon .concept {
  margin-top: 2rem;
}

.lexicon h3 {
  margin-top: 2rem;
  font-weight: 600;
}

.lexicon .definition {
  margin-top: 0.2rem;
  color: var(--muted);
}

/* internal concept links */

.lexicon a {
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

.lexicon a:hover {
  border-bottom: 1px solid var(--text-color);
}

/* concept expansion arrow */

.concept-page {
  font-size: 0.8em;
  margin-left: 6px;
  text-decoration: none;
  opacity: 1;
}

.concept-page:hover {
  opacity: 0.85;
}

/* highlight when arriving via anchor */

:target {
  background: #f7f7f7;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
}

/* ---------------------- */
/* Concept Page Styles */
/* ---------------------- */

.concept-figure {
  margin: 2rem 0;
  text-align: center;
}

.concept-figure img {
  width: 100%;
  max-width: 980px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0.25rem;
}

.concept-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.concept-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
}

.concept-table th,
.concept-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

.concept-table th {
  font-weight: 600;
}

.concept-lead {
  font-size: 1.08rem;
  line-height: 1.65;
}

.mechanism-block {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  font-style: italic;
}

.related-concepts li {
  margin: 0.35rem 0;
}

.concept-meta {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--recovery);
  background: rgba(255,255,255,0.02);
}

.closing {
  font-style: italic;
  opacity: 0.8;
}
/* ---------------------- */
/* Mobile Navigation */
/* ---------------------- */

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-color);
}

/* ---------------------- */
/* System Dynamics Colors */
/* ---------------------- */

:root {
  --pressure: #c0392b;     /* muted red */
  --recovery: #2e7d32;     /* muted green */
}

/* Section headers */

.pressure h2,
.pressure h3 {
  color: var(--pressure);
}

.recovery h2,
.recovery h3 {
  color: var(--recovery);
}

/* Lists */

.pressure a {
  color: var(--pressure);
}

.recovery a {
  color: var(--recovery);
}

/* subtle emphasis */
.pressure strong {
  color: var(--pressure);
}

.recovery strong {
  color: var(--recovery);
}

@media (max-width: 640px) {
  
  .hero {
    height: 50vh;
  }

  .mobile-toggle {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    z-index: 100;
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 0.5rem 1.2rem;
  }

}