/* ============================================
   Hainsworth Institute — Dark Editorial Theme
   ============================================ */

:root {
  --bg-primary: #08080f;
  --bg-surface: #0f0f1a;
  --bg-elevated: #161624;
  --bg-card: #12121c;
  --bg-card-hover: #1a1a2c;
  --text-primary: #f0eef5;
  --text-secondary: #a8a3b8;
  --text-muted: #5a5570;
  --accent-purple: #b07cff;
  --accent-purple-light: #d4a5ff;
  --accent-purple-dark: #7b3fd1;
  --accent-glow: rgba(176, 124, 255, 0.12);
  --accent-glow-strong: rgba(176, 124, 255, 0.25);
  --border-subtle: rgba(176, 124, 255, 0.08);
  --border-medium: rgba(176, 124, 255, 0.15);
  --kernel-communal: #4ade80;
  --kernel-sacred: #f87171;
  --kernel-frontier: #60a5fa;
  --kernel-syncretic: #fbbf24;
  --kernel-formatted: #9ca3af;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-glow: 0 0 40px rgba(176, 124, 255, 0.08);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --max-width: 1100px;
  --font-serif: "Georgia", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Ambient Background ---- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(123, 63, 209, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(176, 124, 255, 0.04) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

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

a {
  color: var(--accent-purple);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover, a:focus { color: var(--accent-purple-light); text-decoration: underline; }
a:focus-visible {
  outline: 2px solid var(--accent-purple);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: 2.8rem; }
h2 { font-size: 1.9rem; margin-bottom: 1.2rem; }
h3 { font-size: 1.35rem; margin-bottom: 0.8rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.6rem; }

p { margin-bottom: 1.1rem; max-width: 70ch; }

.lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 65ch;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-purple);
  margin-bottom: 0.8rem;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.section { padding: 5rem 0; position: relative; }
.section-alt { background: var(--bg-surface); }

/* ---- Navigation ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 15, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.logo:hover { text-decoration: none; color: var(--accent-purple-light); }

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.6rem;
  align-items: center;
}
.nav-list a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.2s ease;
}
.nav-list a:hover,
.nav-list a[aria-current="page"] { color: var(--text-primary); }

.nav-list a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-purple-dark));
  border-radius: 1px;
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: #fff !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: var(--radius);
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  transition: all 0.2s ease;
  box-shadow: 0 0 16px rgba(176, 124, 255, 0.25);
}
.nav-cta:hover {
  box-shadow: 0 0 24px rgba(176, 124, 255, 0.4);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.25s;
}

/* ---- Hero ---- */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(176, 124, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: 3.4rem;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-purple-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .lead {
  margin: 0 auto 2.5rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-decoration: none;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(176, 124, 255, 0.25);
}
.btn-primary:hover {
  box-shadow: 0 0 32px rgba(176, 124, 255, 0.4);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--accent-purple);
  border-color: var(--accent-purple);
}
.btn-secondary:hover {
  background: rgba(176, 124, 255, 0.1);
  text-decoration: none;
  color: var(--accent-purple-light);
  border-color: var(--accent-purple-light);
}

.btn-small {
  padding: 0.5rem 1.2rem;
  font-size: 0.82rem;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }

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

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.2rem;
  color: var(--accent-purple);
}

/* ---- Pillars / Commitments ---- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  text-align: center;
}
.pillar {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple-dark), var(--accent-purple), var(--accent-purple-light));
}
.pillar h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
  color: var(--accent-purple-light);
}
.pillar p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin: 0 auto;
}

/* ---- Case Studies ---- */
.case-study {
  border-left: 3px solid var(--accent-purple);
  padding-left: 1.8rem;
  margin-bottom: 3.5rem;
  position: relative;
}
.case-study::before {
  content: '';
  position: absolute;
  left: -3px;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-purple), var(--accent-purple-dark));
  border-radius: 2px;
}
.case-study h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}
.case-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.case-section {
  margin-bottom: 1.4rem;
}
.case-section h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  margin-bottom: 0.3rem;
}
.case-section p {
  margin-bottom: 0;
  font-size: 0.96rem;
}
.confidence-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  margin-top: 0.6rem;
}

/* ---- ICOS Stack Visualization ---- */
.stack-section { margin: 3rem 0; }
.stack-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.stack-container::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--accent-purple), transparent);
  opacity: 0.3;
  transform: translateX(-50%);
  pointer-events: none;
}

.stack-layer {
  padding: 1rem 1.6rem;
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.stack-layer:hover {
  transform: translateX(6px);
  border-color: var(--accent-purple);
  box-shadow: 0 0 20px rgba(176, 124, 255, 0.1);
}
.stack-layer.active {
  border-color: var(--accent-purple);
  box-shadow: 0 0 30px rgba(176, 124, 255, 0.15);
  transform: translateX(8px);
  background: var(--bg-elevated);
}
.stack-layer .layer-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: #fff;
  border-radius: 50%;
  margin-right: 0.8rem;
}
.stack-layer .layer-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.stack-layer .layer-desc {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  margin-left: 2.8rem;
}

.stack-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin-top: 2rem;
  min-height: 120px;
  position: relative;
}
.stack-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple-dark), var(--accent-purple), var(--accent-purple-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stack-detail h4 {
  font-family: var(--font-serif);
  color: var(--accent-purple-light);
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

/* ---- Kernel Profiles ---- */
.kernel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.kernel-card {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all 0.25s ease;
}
.kernel-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow);
}
.kernel-card h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.kernel-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.kernel-communal { border-left: 3px solid var(--kernel-communal); }
.kernel-sacred { border-left: 3px solid var(--kernel-sacred); }
.kernel-frontier { border-left: 3px solid var(--kernel-frontier); }
.kernel-syncretic { border-left: 3px solid var(--kernel-syncretic); }
.kernel-formatted { border-left: 3px solid var(--kernel-formatted); }

/* ---- Method Steps ---- */
.method-steps {
  counter-reset: method-step;
  list-style: none;
  margin-top: 1.5rem;
}
.method-steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.method-steps li::before {
  counter-increment: method-step;
  content: counter(method-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(176, 124, 255, 0.3);
}

/* ---- Forms ---- */
.form-group { margin-bottom: 1.6rem; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.form-group label .required { color: var(--kernel-sacred); margin-left: 0.2rem; }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(176, 124, 255, 0.1), 0 0 20px rgba(176, 124, 255, 0.05);
}
.form-group input:invalid:not(:placeholder-shown) { border-color: var(--kernel-sacred); }
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.checkbox-group input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--accent-purple);
  width: 18px;
  height: 18px;
}
.checkbox-group label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

.form-success {
  display: none;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid var(--kernel-communal);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}
.form-success.visible { display: block; }

.form-error {
  display: none;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid var(--kernel-sacred);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 1rem;
  color: #fca5a5;
}
.form-error.visible { display: block; }

/* ---- Lists ---- */
.content-list {
  list-style: none;
  margin: 1rem 0 1.5rem;
}
.content-list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
}
.content-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(176, 124, 255, 0.4);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  margin-top: 5rem;
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), transparent);
  opacity: 0.3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 28ch;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--accent-purple-light); }

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Page Header ---- */
.page-header {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}
.page-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(176, 124, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-header h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  position: relative;
}
.page-header .lead { margin: 0 auto; position: relative; }

/* ---- Blockquote ---- */
.blockquote {
  border-left: 3px solid var(--accent-purple);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-secondary);
  max-width: 60ch;
  position: relative;
}
.blockquote::before {
  content: '"';
  position: absolute;
  left: -0.3rem;
  top: -0.8rem;
  font-size: 3rem;
  color: var(--accent-purple);
  opacity: 0.3;
  font-family: var(--font-serif);
}

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: 3.5rem 0;
  border: none;
}

/* ---- Service Items ---- */
.service-item {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-subtle);
}
.service-item:last-child { border-bottom: none; }
.service-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.6rem;
  color: var(--accent-purple-light);
}
.service-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 1.2rem;
}
.service-meta-block h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-purple);
  margin-bottom: 0.3rem;
}
.service-meta-block p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---- Talks List ---- */
.talks-list {
  list-style: none;
  margin-top: 1.5rem;
}
.talks-list li {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  transition: all 0.2s ease;
}
.talks-list li:hover {
  padding-left: 0.5rem;
}
.talks-list li::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-purple-light));
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(176, 124, 255, 0.4);
}
.talks-list h4 {
  font-size: 1.08rem;
  margin-bottom: 0.25rem;
}
.talks-list p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ---- Standards List ---- */
.standards-list {
  list-style: none;
  counter-reset: std;
  margin-top: 1.5rem;
}
.standards-list li {
  position: relative;
  padding: 1.4rem 0 1.4rem 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}
.standards-list li:hover {
  padding-left: 3.8rem;
}
.standards-list li::before {
  counter-increment: std;
  content: counter(std, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.4rem;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-purple);
  text-shadow: 0 0 12px rgba(176, 124, 255, 0.3);
}

/* ---- Book Page ---- */
.book-hero {
  text-align: center;
  padding: 4rem 0;
  position: relative;
}
.book-title {
  font-size: 3.2rem;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.book-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-style: italic;
  font-family: var(--font-serif);
}
.book-section { margin-bottom: 2.5rem; }

.excerpt {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}
.excerpt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-purple-dark), var(--accent-purple));
}
.excerpt blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}
.excerpt .attribution {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Decorative Grid Background ---- */
.grid-bg {
  position: relative;
}
.grid-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(176, 124, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 124, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ---- Orbit Decoration ---- */
.orbit-decoration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
}
.orbit-ring {
  width: 200px;
  height: 200px;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  position: relative;
  animation: orbit-spin 20s linear infinite;
}
.orbit-ring::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-purple);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent-purple);
  transform: translateX(-50%);
}
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  box-shadow: 0 0 30px rgba(176, 124, 255, 0.3);
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ---- Skip Link ---- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: linear-gradient(135deg, var(--accent-purple-dark), var(--accent-purple));
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
  font-size: 0.85rem;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  html { font-size: 16px; }
  .hero { padding: 5rem 0 3.5rem; }
  .hero h1 { font-size: 2.4rem; }
  .page-header h1 { font-size: 2rem; }
  .book-title { font-size: 2.4rem; }

  .nav-toggle { display: block; }
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 8, 15, 0.98);
    backdrop-filter: blur(16px);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-top: 1px solid var(--border-subtle);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-list {
    flex-direction: column;
    gap: 1.2rem;
    align-items: flex-start;
  }
  .nav-list a { font-size: 1.1rem; }

  .pillars { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  .hero-cta { flex-direction: column; align-items: center; }
  .card-grid { grid-template-columns: 1fr; }
  .kernel-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3rem 0; }
  .container { padding: 0 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
