/* Page-level styles for jvm-energy-software.com.
   Link colors_and_type.css (tokens) before this file on every page. */

* { box-sizing: border-box; }

body.jvm {
  background: var(--paper);
  color: var(--fg1);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.site-header .brand .slash { color: var(--voltage); }
.site-header nav {
  display: flex;
  gap: 32px;
}
.site-header nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 150ms var(--ease-decisive);
}
.site-header nav a:hover { color: var(--ink); }
.site-header nav a.active { color: var(--ink); border-bottom-color: var(--voltage); }

.btn { font-family: var(--font-body); font-weight: 500; font-size: 14px; padding: 9px 16px; border-radius: 6px; cursor: pointer; border: 1.5px solid var(--ink); transition: all 150ms var(--ease-decisive); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-press); }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-voltage { background: var(--voltage); color: var(--ink); }
.btn-voltage:hover { background: var(--voltage-deep); }
/* secondary variant for ink backgrounds (contact panel) */
.btn-on-ink { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-on-ink:hover { background: var(--paper); color: var(--ink); }
.btn-sm { font-size: 12px; padding: 6px 12px; }

/* ----- Layout helpers ----- */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.wrap-prose { max-width: 740px; margin: 0 auto; padding: 0 48px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: 0 0 96px;
  background: var(--paper);
}
.hero-banner img { width: 100%; display: block; border-bottom: 1.5px solid var(--ink); }
.hero-intro { padding: 64px 0 0; max-width: 760px; }
.hero-intro .eyebrow { margin-bottom: 16px; }
.hero-intro h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 64px;
  line-height: 1.05; letter-spacing: -0.015em; color: var(--ink);
  margin: 0 0 24px;
}
.hero-intro h1 .accent { color: var(--voltage); }
.hero-intro p {
  font-family: var(--font-body); font-size: 20px; line-height: 1.6;
  color: var(--steel); margin: 0;
  max-width: 620px;
}
.hero-intro .actions { display: flex; gap: 12px; margin-top: 32px; }

/* ----- Section structure ----- */
.section {
  padding: 80px 0;
  border-top: 1.5px solid var(--ink);
}
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 48px; gap: 32px; flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 44px;
  line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); margin: 8px 0 0;
}
.section-head .aside { margin: 0; max-width: 360px; color: var(--steel); font-size: 16px; }
.section.inverse { background: var(--ink); color: var(--paper); padding: 0; border: none; }
.section.inverse h2, .section.inverse .eyebrow { color: var(--paper); }
.section.inverse .eyebrow { color: var(--voltage); }

/* ----- Services grid ----- */
.services {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-left: 1.5px solid var(--ink); border-top: 1.5px solid var(--ink);
}
.service {
  padding: 32px 28px 36px;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  background: var(--paper);
}
.service .num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--graphite);
}
.service h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 24px;
  margin: 16px 0 12px; color: var(--ink); line-height: 1.2;
}
.service p { font-size: 16px; line-height: 1.55; color: var(--steel); margin: 0; }
.service .stack {
  display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap;
}
.service .stack span {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 8px; border: 1.5px solid var(--ink); color: var(--ink);
}

/* ----- Blog cards ----- */
.posts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.posts.two-up { grid-template-columns: repeat(2, 1fr); }
.post-card {
  display: flex; flex-direction: column;
  border: 1.5px solid var(--ink); background: var(--paper-bright);
  text-decoration: none; color: var(--ink);
  cursor: pointer;
  transition: box-shadow 200ms var(--ease-decisive), transform 200ms var(--ease-decisive);
}
.post-card:hover { box-shadow: 0 4px 0 0 var(--ink); transform: translateY(-2px); }
.post-card .thumb { border-bottom: 1.5px solid var(--ink); }
.post-card .thumb img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.post-card .body { padding: 20px 22px 24px; }
.post-card .meta {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--graphite);
  margin-bottom: 10px;
}
.post-card h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  line-height: 1.2; margin: 0 0 10px; color: var(--ink);
}
.post-card p {
  font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  color: var(--steel); margin: 0;
}

/* ----- Contact panel (email-only, no form) ----- */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  padding: 64px 48px;
  background: var(--ink); color: var(--paper);
}
.contact h2 { font-family: var(--font-display); font-weight: 700; font-size: 44px; margin: 12px 0 16px; line-height: 1.1; }
.contact p { font-size: 17px; line-height: 1.6; color: var(--smoke); }
.contact .mono-contact {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  color: var(--smoke); margin-top: 24px; line-height: 1.8;
}
.contact .mono-contact a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--voltage); text-underline-offset: 4px; }
.contact .actions {
  display: flex; flex-direction: column; gap: 14px;
  align-items: flex-start; justify-content: center;
}

/* ----- Footer ----- */
.site-footer {
  background: var(--ink); color: var(--paper);
  padding: 64px 48px 32px;
  border-top: 1.5px solid var(--ink);
}
.site-footer .cols {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
}
.site-footer .footer-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.site-footer .footer-brand span {
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
.site-footer .footer-brand .slash { color: var(--voltage); }
.site-footer .footer-blurb {
  margin: 0; font-size: 14px; color: var(--smoke); line-height: 1.6; max-width: 320px;
}
.site-footer h4 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--voltage);
  margin: 0 0 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer li { font-family: var(--font-body); font-size: 14px; color: var(--paper); }
.site-footer a {
  font-family: var(--font-body); font-size: 14px; color: var(--paper); text-decoration: none;
  cursor: pointer;
}
.site-footer a:hover { color: var(--voltage); }
.site-footer .tz {
  color: var(--smoke); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
}
.site-footer .bottom {
  max-width: 1200px; margin: 48px auto 0; padding-top: 24px;
  border-top: 1px solid var(--steel);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; color: var(--smoke); letter-spacing: 0.08em;
}

/* ----- Blog index ----- */
.blog-index {
  padding: 64px 0 96px;
}
.blog-index h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 64px;
  letter-spacing: -0.015em; margin: 16px 0 12px; line-height: 1.05;
}
.blog-index .intro {
  max-width: 620px; color: var(--steel); font-size: 19px; line-height: 1.55;
  margin: 0 0 48px;
}

/* ----- Post screen ----- */
.post-hero {
  background: var(--paper); padding: 48px 0 24px;
}
.post-hero .back { margin-bottom: 32px; }
.post-hero .meta-row {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite);
  margin-bottom: 18px;
}
.post-hero h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 56px;
  letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 24px;
  max-width: 900px;
}
.post-hero .lede {
  font-family: var(--font-body); font-size: 20px; line-height: 1.6;
  color: var(--steel); margin: 0 0 48px;
  max-width: 720px;
}
.post-hero .illustration-wrap { max-width: 1080px; }
.post-hero .illustration { border: 1.5px solid var(--ink); }
.post-hero .illustration img { width: 100%; display: block; }

.post-body { padding: 64px 0 96px; }
.post-body p { font-family: var(--font-body); font-size: 18px; line-height: 1.7; color: var(--ink); margin: 0 0 20px; }
.post-body h2 { font-family: var(--font-display); font-weight: 700; font-size: 32px; line-height: 1.2; margin: 48px 0 16px; color: var(--ink); }
.post-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.25; margin: 40px 0 14px; color: var(--ink); }
.post-body a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-thickness var(--dur-fast) var(--ease-decisive);
}
.post-body a:hover { text-decoration-thickness: 2px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 28px; }
.post-body li { font-size: 18px; line-height: 1.7; color: var(--ink); margin: 0 0 8px; }
.post-body code { font-family: var(--font-mono); font-size: 15px; background: var(--paper-2); padding: 1px 6px; border-radius: 3px; }
.post-body pre {
  font-family: var(--font-mono); font-size: 14px; line-height: 1.6;
  color: var(--paper); background: var(--ink);
  padding: 24px; border-radius: 8px; overflow-x: auto;
  margin: 24px 0;
}
.post-body pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; }
/* Syntax tokens — pre-rendered by bin/highlight.py, no client JS.
   Restrained palette: keywords get the brand voltage, everything else
   stays quiet against the ink background. */
.post-body pre .tok-k { color: var(--voltage); }
.post-body pre .tok-s { color: #6CC9A3; }
.post-body pre .tok-c { color: var(--smoke); font-style: italic; }
.post-body pre .tok-n { color: #6FC2BE; }
.post-body pre .tok-f { color: #FFFFFF; }
.post-body blockquote {
  border-left: 3px solid var(--voltage);
  padding: 4px 0 4px 20px;
  margin: 32px 0;
  font-family: var(--font-display); font-size: 20px; font-style: italic;
  color: var(--steel);
}
.post-body img {
  max-width: 100%; height: auto; display: block;
  border: 1.5px solid var(--ink);
  margin: 24px 0;
}
.post-body figure.code-figure { margin: 24px 0; }
.post-body figure.code-figure pre { margin: 0 0 6px; }
.post-body figure.code-figure figcaption {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--graphite); text-align: right;
}
.post-body figure.code-figure figcaption a { color: var(--graphite); }
.post-body hr {
  border: none; border-top: 1.5px solid var(--paper-2);
  margin: 40px 0;
}
.post-body table {
  border-collapse: collapse;
  margin: 24px 0;
  width: 100%;
}
.post-body td {
  border: 1.5px solid var(--ink);
  padding: 12px 16px;
  font-size: 16px;
  vertical-align: middle;
}
.post-body td img {
  border: none; margin: 0;
  max-height: 72px; width: auto;
}
.post-body td ul, .post-body td ol { margin: 0; padding-left: 20px; }
.post-body td li { font-size: 15px; }

/* ----- Timeline ----- */
.timeline { padding: 48px 0 96px; }
.timeline h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 64px;
  letter-spacing: -0.015em; margin: 12px 0; line-height: 1.05;
}
.timeline .intro { font-size: 18px; color: var(--steel); margin: 0 0 48px; max-width: 620px; }
.timeline .row {
  display: grid; grid-template-columns: 200px 1fr; gap: 32px;
  padding: 32px 0;
  border-top: 1.5px solid var(--ink);
}
.timeline .row:last-child { border-bottom: 1.5px solid var(--ink); }
.timeline .yr {
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; color: var(--ink);
}
.timeline .yr .client {
  display: block; margin-top: 6px; font-size: 18px;
  font-family: var(--font-display); letter-spacing: -0.005em; color: var(--ink);
}
.timeline .work h3 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  margin: 0 0 8px; color: var(--ink);
}
.timeline .work p { font-size: 16px; color: var(--steel); margin: 0 0 12px; }
.timeline .work ul { margin: 0 0 12px; padding-left: 18px; }
.timeline .work li { font-size: 16px; color: var(--steel); line-height: 1.55; margin: 0 0 6px; }
.timeline .work .stack {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px;
}
.timeline .work .stack span {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--ink); color: var(--ink);
}

/* ----- About ----- */
.about { padding: 64px 0 96px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 56px;
  letter-spacing: -0.015em; line-height: 1.05; margin: 24px 0;
}
.about p { font-size: 19px; line-height: 1.65; color: var(--steel); margin: 0 0 18px; }
.about .actions { margin-top: 32px; display: flex; gap: 12px; }
.about .photo {
  width: 100%;
  border: 1.5px solid var(--ink); background: var(--paper-2);
}
.about .photo img { width: 100%; display: block; }

/* ----- 404 ----- */
.not-found { padding: 96px 0 128px; }
.not-found h1 {
  font-family: var(--font-display); font-weight: 700; font-size: 64px;
  letter-spacing: -0.015em; margin: 16px 0 24px; line-height: 1.05;
}
.not-found p { font-size: 19px; color: var(--steel); max-width: 560px; margin: 0 0 32px; }
.not-found .actions { display: flex; gap: 12px; }

/* ----- Mobile breakpoint (basic) ----- */
@media (max-width: 880px) {
  .site-header { padding: 14px 24px; gap: 16px; flex-wrap: wrap; }
  .site-header nav { gap: 16px; }
  .wrap, .wrap-prose { padding: 0 24px; }
  .services, .posts, .posts.two-up { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero-intro h1 { font-size: 40px; }
  .post-hero h1 { font-size: 36px; }
  .timeline .row { grid-template-columns: 1fr; gap: 12px; }
  .about-grid { grid-template-columns: 1fr; }
  .post-body td { padding: 8px; font-size: 14px; }
  .post-body td img { max-height: 48px; }
}
