:root {
  --bg-canvas: #0b0b0d;
  --bg-surface: #19191c;
  --bg-surface-hover: #232328;
  --text-primary: #f5f5f4;
  --text-muted: #c0c4cc;
  --accent-primary: #dc2626;
  --accent-secondary: #991b1b;
  --border-subtle: rgba(192, 196, 204, 0.16);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 16px 36px -6px rgba(0, 0, 0, 0.65);
  --glow-accent: 0 0 24px -4px rgba(220, 38, 38, 0.45);
}

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

html {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.75;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  overflow-wrap: anywhere;
  hyphens: auto;
  font-size: 1.0625rem;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); margin-top: 2.5rem; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; }

p { margin-bottom: 1.35rem; color: var(--text-primary); }
a { color: var(--text-primary); text-decoration: underline; text-decoration-color: var(--accent-primary); text-underline-offset: 4px; transition: color 0.2s ease; }
a:hover { color: var(--accent-primary); }

.dot-grid-bg {
  background-image: radial-gradient(rgba(192, 196, 204, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
}

.site-header {
  position: relative;
  z-index: 30;
  width: 100%;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
}

.site-header.header-solid {
  background-color: var(--bg-surface);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-mark {
  width: 12px;
  height: 12px;
  background-color: var(--accent-primary);
  display: inline-block;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.65rem;
}

.desktop-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.desktop-nav a:hover, .desktop-nav a[aria-current="page"] {
  color: var(--text-primary);
}

.mobile-menu-btn {
  display: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.75rem;
  font-size: 1.25rem;
  cursor: pointer;
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
}

.mobile-nav-drawer.open {
  display: block;
}

.mobile-nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-nav-drawer a {
  text-decoration: none;
  font-weight: 600;
  display: block;
}

.btn-pill {
  display: inline-block;
  background-color: var(--accent-primary);
  color: #f5f5f4;
  border: none;
  border-radius: 9999px;
  padding: 0.78rem 1.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic);
}

.btn-pill:hover {
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevation), var(--glow-accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.essay-column {
  max-width: 70ch;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.hero-wrap {
  position: relative;
  padding: 2.5rem 0 4rem;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-figure {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.hero-figure img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.fig-caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.hero-facts-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  box-shadow: var(--shadow-elevation);
}

.fact-list {
  list-style: none;
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.fact-item {
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.9rem;
}

.fact-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.fact-item span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.section-block {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.breakout-media {
  max-width: 1040px;
  margin: 2.5rem auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.breakout-media img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  display: block;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin: 2.5rem 0;
}

.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s var(--ease-kinetic), box-shadow 0.3s var(--ease-kinetic);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-elevation);
}

.card-img-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.badge-pill {
  position: absolute;
  bottom: -13px;
  left: 1.25rem;
  background: var(--accent-primary);
  color: #f5f5f4;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.28rem 0.85rem;
  border-radius: 9999px;
}

.card-body {
  padding: 1.75rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-body h3 {
  margin-top: 0;
  font-size: 1.2rem;
}

.card-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

.pull-quote {
  margin: 2.5rem 0;
  padding: 1.65rem 2rem;
  background: var(--bg-surface);
  border-left: 4px solid var(--accent-primary);
}

.pull-quote blockquote {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.pull-quote cite {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: normal;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.cooling-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.75rem;
  margin: 2rem 0;
}

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

.diagram-node {
  border: 1px solid var(--border-subtle);
  padding: 1.1rem;
  background: var(--bg-canvas);
}

.diagram-node .step-tag {
  display: inline-block;
  background: var(--accent-primary);
  color: #f5f5f4;
  border-radius: 9999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.table-scroll {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  font-size: 0.94rem;
}

th, td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  font-weight: 800;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

td {
  color: var(--text-muted);
}

.faq-list {
  display: grid;
  gap: 1.25rem;
  margin: 2rem 0;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
}

.faq-item h3 {
  margin-top: 0;
  font-size: 1.12rem;
}

.contact-tool {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 2rem;
  margin: 2rem 0;
}

.form-row {
  margin-bottom: 1.25rem;
}

.form-row label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}

.draft-preview {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  font-family: monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
  color: var(--text-muted);
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 3.5rem 0 2.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.reveal-item {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-kinetic), transform 0.6s var(--ease-kinetic);
}

.js-enabled .reveal-item {
  opacity: 0;
  transform: translateY(18px);
}

.js-enabled .reveal-item.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-figure img, .breakout-media img {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-block;
  }
}

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