/* "Blueprint" Theme — engineering drafting on cyanotype paper.
 *
 * The other four themes are eras of the *web* (GeoCities, newsprint comic, VT100,
 * modern editorial). This one is an era of *engineering drawing*, which is closer
 * to what the index actually contains: reactor siting, interconnection queues,
 * water draw, mineral supply. A drawing sheet is the native format for that work.
 *
 * Costs nothing to ship: Inter and JetBrains Mono are both already in the base
 * font request, and the drafting grid, dimension lines and corner ticks are all
 * CSS gradients and pseudo-elements — no image assets.
 *
 * Contrast: linework on the sheet is 12.4:1 and every secondary token clears 7:1,
 * so the whole theme is AAA at body size. --grid and --rule are geometry only and
 * are never used for text; --cyan and --flag both clear AA as text.
 *
 * Every rule is scoped under `body.theme-blueprint`.
 */

body.theme-blueprint {
  --sheet:  #0D2B45; /* cyanotype paper — the page                     */
  --ink:    #EAF4FF; /* linework: body text, the whole voice           */
  --cyan:   #7CD3F7; /* links, active geometry                         */
  --flag:   #FFC46B; /* revision amber — headings, active states       */
  --label:  #A9C6DE; /* secondary text & unit labels (7.9:1)           */
  --rule:   rgba(124, 211, 247, 0.30); /* hairlines, borders           */
  --grid:   rgba(124, 211, 247, 0.09); /* the drafting grid            */
  --panel:  #143755; /* filled blocks, a shade up from the sheet       */

  color: var(--ink);
  background-color: var(--sheet);
  /* Drafting grid: 8px minor, 64px major. Pure gradients, no asset. */
  background-image:
    repeating-linear-gradient(to right,  var(--grid) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to right,  var(--grid) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 8px);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  margin: 0;
  padding: 0;
}

body:not(.theme-blueprint) .blueprint-only { display: none !important; }

/* A link the page is deliberately withholding — a paused demo. Unhide by deleting
   the `hidden` attribute in index.html. Stated explicitly because a theme rule on
   `td.links a` would otherwise out-specify the UA's [hidden] default. */
body.theme-blueprint [hidden] { display: none !important; }

body.theme-blueprint .container {
  width: 92%;
  max-width: 1120px;
  margin: 32px auto;
  padding: 0 0 40px;
  background: transparent;
  border: none;
}

/* GeoCities furniture belongs to Retro; every other theme hides it. */
body.theme-blueprint .ticker,
body.theme-blueprint .retro-img,
body.theme-blueprint .hit-counter { display: none !important; }

/* ----------------------------------------------------------------- typography */
body.theme-blueprint h1,
body.theme-blueprint h2,
body.theme-blueprint h3 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
body.theme-blueprint h1 { font-size: 2.1rem; line-height: 1.18; margin: 0 0 6px; }
body.theme-blueprint h2 {
  font-size: 1.15rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--flag);
}
/* Dimension line: the rule that trails a heading, ticked at its far end. */
body.theme-blueprint h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
  box-shadow: 3px 0 0 -1px var(--cyan), 6px 0 0 -1px var(--cyan);
}
body.theme-blueprint h3 {
  font-size: 0.92rem;
  color: var(--cyan);
  margin: 0 0 12px;
}
body.theme-blueprint hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}
body.theme-blueprint code {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.88em;
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 1px 5px;
}
body.theme-blueprint .kicker {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 4px;
}
body.theme-blueprint .disclaimer {
  font-size: 0.84rem;
  color: var(--label);
  border-left: 2px solid var(--rule);
  padding-left: 12px;
  margin-top: 16px;
  max-width: none;
}
body.theme-blueprint .center { text-align: center; }

/* ---------------------------------------------------------------------- links */
body.theme-blueprint a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
body.theme-blueprint a:hover { color: var(--flag); }
body.theme-blueprint a:visited { color: #B9A7E8; }
body.theme-blueprint a:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------- sections */
body.theme-blueprint .projects-section {
  border: 1px solid var(--rule) !important;
  background: var(--panel);
  padding: 18px 20px;
  margin-bottom: 26px;
}
body.theme-blueprint .projects-section p,
body.theme-blueprint .projects-section ul { max-width: 74ch; }

/* ---------------------------------------------------------------------- lists */
body.theme-blueprint ul { list-style: none; padding: 0; }
body.theme-blueprint ul li {
  padding: 8px 0 8px 18px;
  position: relative;
  line-height: 1.55;
  border-bottom: 1px solid var(--rule);
}
body.theme-blueprint ul li:last-child { border-bottom: none; }
body.theme-blueprint ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.05em;
  width: 7px;
  height: 1px;
  background: var(--cyan);
}
body.theme-blueprint ul li i {
  color: var(--label);
  font-style: normal;
  font-size: 0.9em;
}
body.theme-blueprint .industry-note {
  display: block;
  margin-top: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--rule);
  font-size: 0.92em;
  color: var(--label);
  line-height: 1.45;
}
body.theme-blueprint .note-label { color: var(--flag); }

/* ---------------------------------------------------------- identity & socials */
body.theme-blueprint .hero { margin-bottom: 30px; }
body.theme-blueprint .identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
body.theme-blueprint .headshot {
  border: 1px solid var(--cyan);
  border-radius: 0;
  filter: grayscale(1) contrast(1.08);
}
body.theme-blueprint .identity-text h1 { color: var(--ink); }
/* No measure cap on the intro: 72ch wrapped the bio to six lines and broke the
   one-sentence disclaimer across two. The container already caps at 1120px. */
body.theme-blueprint .hero-main > p { max-width: none; }
body.theme-blueprint .social-links { margin: 14px 0 0; }
body.theme-blueprint .social-links a {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 5px 11px;
  margin-right: 8px;
  display: inline-block;
  text-decoration: none;
}
body.theme-blueprint .social-links a:hover {
  border-color: var(--flag);
  background: rgba(255, 196, 107, 0.10);
}

/* ----------------------------------------------------------------------- tabs */
body.theme-blueprint .tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
body.theme-blueprint .tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--label);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  margin-bottom: -1px;
}
body.theme-blueprint .tab:hover { color: var(--ink); }
body.theme-blueprint .tab[aria-selected="true"] {
  color: var(--flag);
  border-color: var(--rule);
  background: var(--panel);
}
body.theme-blueprint .tab:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: -2px;
}

/* ------------------------------------------------------------- filter "layers" */
body.theme-blueprint .filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
body.theme-blueprint .filter-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--label);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 8px 13px;
  cursor: pointer;
  min-height: 44px;
}
body.theme-blueprint .filter-btn::before {
  content: "\2610\00a0";              /* empty layer box */
  color: var(--cyan);
}
body.theme-blueprint .filter-btn:hover { color: var(--ink); border-color: var(--cyan); }
body.theme-blueprint .filter-btn.active {
  color: var(--sheet);
  background: var(--cyan);
  border-color: var(--cyan);
}
body.theme-blueprint .filter-btn.active::before {
  content: "\2611\00a0";              /* ticked layer box */
  color: var(--sheet);
}
body.theme-blueprint .filter-btn:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- featured panels */
body.theme-blueprint .feat-accordion { display: grid; gap: 12px; }
body.theme-blueprint .feat-item {
  border: 1px solid var(--rule);
  background: var(--panel);
}
body.theme-blueprint .feat-item[open] { border-color: var(--cyan); }
body.theme-blueprint .feat-item summary {
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
body.theme-blueprint .feat-item summary::-webkit-details-marker { display: none; }
body.theme-blueprint .feat-item summary::after {
  content: "+";
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color: var(--cyan);
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}
body.theme-blueprint .feat-item[open] summary::after { content: "\2212"; }
body.theme-blueprint .feat-item summary:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: -2px;
}
body.theme-blueprint .feat-heading { display: block; }
body.theme-blueprint .feat-name {
  display: block;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--flag);
  font-size: 0.98rem;
}
body.theme-blueprint .feat-q {
  display: block;
  color: var(--label);
  font-size: 0.9rem;
  margin-top: 4px;
  max-width: 68ch;
}
body.theme-blueprint .feat-panel { padding: 0 16px 16px; }
body.theme-blueprint .feat-shot { display: block; }
body.theme-blueprint .feat-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
body.theme-blueprint .feat-links {
  margin: 12px 0 0;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
}

/* ------------------------------------------------------------ projects listing */
body.theme-blueprint table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--rule);
}
body.theme-blueprint th {
  text-align: left;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--label);
  font-weight: 500;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  background: rgba(124, 211, 247, 0.06);
}
body.theme-blueprint td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
body.theme-blueprint tr.project-item:hover td { background: rgba(124, 211, 247, 0.06); }
body.theme-blueprint .proj-thumb {
  display: inline-block;
  vertical-align: middle;
  width: 72px;
  height: 50px;
  margin-right: 12px;
  border: 1px solid var(--rule);
  overflow: hidden;
  flex-shrink: 0;
}
body.theme-blueprint .proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Repo-only rows carry no screenshot: draw the initial into the same footprint. */
body.theme-blueprint .proj-thumb[data-initial]::before {
  content: attr(data-initial);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  color: var(--cyan);
  background: rgba(124, 211, 247, 0.08);
}
body.theme-blueprint .proj-text { display: inline-block; vertical-align: middle; }
body.theme-blueprint .proj-name {
  display: block;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
}
body.theme-blueprint .proj-name a { color: var(--ink); text-decoration-color: var(--rule); }
body.theme-blueprint .proj-name a:hover { color: var(--flag); }
body.theme-blueprint .proj-desc {
  display: block;
  color: var(--label);
  font-size: 0.87rem;
  max-width: 62ch;
  margin-top: 2px;
}
body.theme-blueprint td.links {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.8rem;
  white-space: nowrap;
}
body.theme-blueprint td:nth-child(3) {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--label);
}
body.theme-blueprint .blink { color: var(--flag); }
body.theme-blueprint .table-note {
  font-size: 0.82rem;
  color: var(--label);
  margin-top: 12px;
}

/* ----------------------------------------------------------------- accordions */
body.theme-blueprint details.accordion-section {
  border: 1px solid var(--rule);
  background: var(--panel);
  margin-bottom: 14px;
}
body.theme-blueprint details.accordion-section summary {
  cursor: pointer;
  padding: 12px 16px;
  list-style: none;
}
body.theme-blueprint details.accordion-section summary::-webkit-details-marker { display: none; }
body.theme-blueprint details.accordion-section summary h2 {
  display: inline-flex;
  margin: 0;
  font-size: 1rem;
}
body.theme-blueprint details.accordion-section summary::after {
  content: "+";
  float: right;
  color: var(--cyan);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
body.theme-blueprint details[open].accordion-section summary::after { content: "\2212"; }
body.theme-blueprint details.accordion-section summary:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: -2px;
}

/* ------------------------------------------------------------------- switcher */
body.theme-blueprint #theme-toggle {
  background: var(--panel);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  cursor: pointer;
  min-height: 44px;
}
body.theme-blueprint #theme-toggle:hover { color: var(--flag); border-color: var(--flag); }
body.theme-blueprint #theme-toggle:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 2px;
}
body.theme-blueprint .theme-menu {
  background: var(--panel);
  border: 1px solid var(--cyan);
  padding: 4px;
}
body.theme-blueprint .theme-menu[hidden] { display: none; }
body.theme-blueprint .theme-menu-item {
  background: transparent;
  border: none;
  color: var(--ink);
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  cursor: pointer;
}
body.theme-blueprint .theme-menu-item:hover,
body.theme-blueprint .theme-menu-item:focus-visible {
  background: rgba(124, 211, 247, 0.14);
  color: var(--flag);
  outline: none;
}

/* ---------------------------------------------------------------- case studies */
body.theme-blueprint .cs-kicker { margin: 8px 0 4px; }
body.theme-blueprint .cs-tagline {
  font-size: 1.05rem;
  color: var(--label);
  max-width: 62ch;
  margin: 4px 0 18px;
}
body.theme-blueprint .cs-question {
  font-size: 1.08rem;
  color: var(--flag);
  border-left: 2px solid var(--flag);
  padding-left: 14px;
  max-width: 64ch;
}
/* Title-block grid: the drawing sheet's spec table, two columns on desktop. */
body.theme-blueprint .cs-glance {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  border: 1px solid var(--rule);
  padding: 14px 16px;
  margin: 0 0 22px;
}
body.theme-blueprint .cs-glance > div { display: contents; }
body.theme-blueprint .cs-glance dt {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0;
}
body.theme-blueprint .cs-glance dd { margin: 0; color: var(--ink); font-size: 0.92rem; }
body.theme-blueprint .cs-shots { margin: 26px 0; }
body.theme-blueprint .cs-shots-title { font-size: 1.05rem; }
body.theme-blueprint .cs-shots-note { color: var(--label); font-size: 0.85rem; }
body.theme-blueprint .cs-shot-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
body.theme-blueprint .cs-shot { margin: 0 0 22px; }
body.theme-blueprint .cs-shot figcaption {
  color: var(--label);
  font-size: 0.86rem;
  margin-top: 8px;
  max-width: 70ch;
}
body.theme-blueprint .shot-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
body.theme-blueprint .shot-frame.desktop { flex: 1 1 460px; }
body.theme-blueprint .shot-frame.mobile  { width: 208px; flex: 0 0 auto; }
body.theme-blueprint .cs-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--rule);
  padding-top: 18px;
  margin-top: 26px;
}
body.theme-blueprint .cs-nav-link {
  text-decoration: none;
  border: 1px solid var(--rule);
  padding: 10px 14px;
  flex: 1 1 240px;
}
body.theme-blueprint .cs-nav-link:hover { border-color: var(--flag); }
body.theme-blueprint .cs-nav-next { text-align: right; }
body.theme-blueprint .cs-nav-dir {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--label);
}
body.theme-blueprint .cs-nav-title { display: block; color: var(--ink); margin-top: 3px; }
body.theme-blueprint .cs-related { color: var(--label); font-size: 0.9rem; }

/* --------------------------------------------------------------------- footer */
body.theme-blueprint .site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  padding-top: 18px;
}
body.theme-blueprint .footer-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  font-size: 0.76rem;
  color: var(--label);
}
body.theme-blueprint .footer-links a { margin-right: 14px; }
body.theme-blueprint .footer-thanks { color: var(--label); font-size: 0.86rem; }
body.theme-blueprint .colophon { color: var(--label); font-size: 0.8rem; }

/* --------------------------------------------------------- tablet and phone */
@media screen and (max-width: 1024px) {
  body.theme-blueprint .shot-frame.desktop { flex-basis: 100%; }
}

@media screen and (max-width: 768px) {
  body.theme-blueprint { font-size: 15px; }
  body.theme-blueprint .tabs { border-bottom: none; gap: 6px; }
  body.theme-blueprint .tab { border: 1px solid var(--rule); margin-bottom: 0; }
  body.theme-blueprint .tab[aria-selected="true"] { border-color: var(--flag); }
  body.theme-blueprint .container { width: 94%; margin: 20px auto; }
  body.theme-blueprint h1 { font-size: 1.6rem; }
  body.theme-blueprint .identity { gap: 12px; }
  body.theme-blueprint .footer-meta { flex-direction: column; }
  body.theme-blueprint .cs-nav-next { text-align: left; }
  /* Title block collapses to a single column so long values stop being squeezed. */
  body.theme-blueprint .cs-glance { grid-template-columns: 1fr; gap: 2px 0; }
  body.theme-blueprint .cs-glance dd { margin-bottom: 10px; }
  /* The table becomes a stack of cards: a 3-column grid cannot hold a thumbnail,
     a description and a link list inside 360px without truncating something. */
  body.theme-blueprint table,
  body.theme-blueprint tbody,
  body.theme-blueprint tr,
  body.theme-blueprint td { display: block; width: 100%; }
  body.theme-blueprint thead { display: none; }
  body.theme-blueprint tr.project-item {
    border: 1px solid var(--rule);
    margin-bottom: 12px;
    padding: 12px;
    background: var(--panel);
  }
  body.theme-blueprint td { border-bottom: none; padding: 3px 0; }
  body.theme-blueprint td.links { white-space: normal; }
  body.theme-blueprint .proj-desc { max-width: none; }
}

@media screen and (max-width: 560px) {
  body.theme-blueprint .shot-frame.mobile { width: 100%; }
  body.theme-blueprint .social-links a { margin-bottom: 8px; }
}

