/* engineering.calyxgo.com — shared by the index and every post.
   Everything here is lifted from the Patch page (/patch/), after the clouds: the same
   fonts, colors, frosted bar, gradient eyebrow, cards and Apple-style legal footer,
   so the section reads as part of the same site. These pages use no JavaScript. */

:root{
  --sky-top: #0a4fbf;
  --sky-mid: #1767d8;
  --sky-low: #5aa2ef;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: rgba(11,31,58,0.12);
  --paper: #ffffff;
  --soft: #f5f5f7;
  --glow: 23, 103, 216;
  --serif: "Bodoni 72", "Bodoni MT", Didot, "Libre Bodoni", Baskerville, Georgia, "Times New Roman", serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --text: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1120px;
}

*{ box-sizing: border-box; }
html{ background: var(--paper); }
body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern";
  overflow-x: hidden;
}
a{ color: inherit; text-decoration: none; }
:focus-visible{ outline: 2px solid currentColor; outline-offset: 4px; }

/* ---------- top bar: the Patch page's bar in its frosted state (there's no sky to sit over here) ---------- */

.bar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 52px;
  padding: 0 max(16px, 3vw);
  color: var(--ink);
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line);
}
.bar .home{ display: flex; align-items: center; gap: 9px; min-height: 44px; font-family: var(--serif); font-size: 19px; font-weight: 700; }
.bar .home svg{ width: 15px; height: auto; fill: currentColor; }
.bar nav{ display: flex; align-items: center; gap: 22px; }
.bar .link{ display: inline-flex; align-items: center; min-height: 44px; font: 500 13px/1 var(--text); letter-spacing: -0.005em; color: var(--ink-2); transition: color 0.3s ease; }
.bar .link:hover, .bar .link[aria-current]{ color: var(--ink); }
.pill{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--sky-top);
  color: #fff;
  transition: transform 0.25s var(--ease);
}
.pill:hover{ transform: scale(1.04); }

/* ---------- headings: the Patch page's gradient eyebrow and display heading ---------- */

.grad{
  background: linear-gradient(100deg, #0a3d9e 0%, #1767d8 38%, #2f8cff 68%, #66c6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow{ margin: 0 0 14px; font: 600 clamp(17px, 1.45vw, 21px)/1.2 var(--display); letter-spacing: -0.01em; }
.eyebrow a:hover{ text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #1767d8; }
.h{ margin: 0; font: 600 clamp(40px, 5.6vw, 84px)/1.04 var(--display); letter-spacing: -0.035em; color: var(--ink); text-wrap: balance; }
.sub{ max-width: 40ch; margin: 22px auto 0; font: 400 clamp(17px, 1.45vw, 21px)/1.5 var(--text); letter-spacing: -0.012em; color: var(--ink-2); text-wrap: pretty; }
.head{ text-align: center; max-width: 900px; margin: 0 auto; }

/* ---------- page ---------- */

main{ padding: calc(52px + 11vh) 7vw 12vh; }
figure{ margin: 0; }
figure img{ display: block; width: 100%; height: auto; border-radius: 32px; }
figure img.plain{ border-radius: 0; }      /* the transparent patch illustration needs no corners */
a.fig{ display: block; cursor: zoom-in; }   /* the technical drawings open full size, for phones */
figcaption{ margin-top: 12px; font: 400 11px/1.5 var(--text); color: var(--ink-2); text-align: center; }
.hero{ width: min(620px, 82vw); margin: 7vh auto 0; }
.hero img{ filter: drop-shadow(0 28px 34px rgba(4,30,80,0.22)); }

/* ---------- the list of posts: the Patch page's card grid ---------- */

.bento{ display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 22px); max-width: var(--wrap); margin: 9vh auto 0; }
.card{
  --mx: 85%; --my: 0%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.4vw, 48px);
  border-radius: 32px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 30px 60px -36px rgba(var(--glow), 0.28);
  transition: box-shadow 0.5s ease, transform 0.6s var(--ease);
}
.card:nth-child(2){ --mx: 8%;  --my: 12%; }
.card:nth-child(3){ --mx: 95%; --my: 100%; }
.card:nth-child(4){ --mx: 18%; --my: 96%; }
.card > *{ position: relative; z-index: 1; }
/* the soft light inside the card */
.card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(47,140,255,0.13), transparent 60%);
}
.card:hover{ transform: translateY(-3px); box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 40px 70px -36px rgba(var(--glow), 0.4); }
.card .ic{ display: block; width: 44px; height: 44px; margin-bottom: 26px; }
.card .ic *{ fill: none; stroke: #1767d8; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .tag{ margin: 0 0 10px; font: 600 12px/1.2 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: #1767d8; }
.card h2{ margin: 0; font: 600 clamp(24px, 2.2vw, 32px)/1.15 var(--display); letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.card p{ max-width: 34ch; margin: 12px 0 0; font: 400 clamp(16px, 1.25vw, 18px)/1.5 var(--text); letter-spacing: -0.01em; color: var(--ink-2); }
.card .more{ margin-top: auto; padding-top: 24px; font: 600 15px/1 var(--text); letter-spacing: -0.01em; color: #1767d8; }

/* ---------- a post ---------- */

.post{ width: min(680px, 86vw); margin: 0 auto; }
.post .head{ max-width: none; }
.post .h{ font-size: clamp(34px, 4.6vw, 64px); }
.post .sub{ max-width: 44ch; }
.meta{ margin: 18px 0 0; font: 400 13px/1.4 var(--text); letter-spacing: -0.005em; color: var(--ink-2); text-align: center; }
.post figure{ margin: 6vh 0 0; }
.body{ margin-top: 6vh; }
.body figure.inline{ margin: 2.4em 0 2.6em; }       /* a drawing between paragraphs */
.body p{ margin: 0 0 1.3em; font: 400 clamp(17px, 1.3vw, 19px)/1.6 var(--text); letter-spacing: -0.012em; color: var(--ink); text-wrap: pretty; }
.body h2{ margin: 2em 0 0.6em; font: 600 clamp(24px, 2.2vw, 32px)/1.15 var(--display); letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; }
.body a{ color: #1767d8; }
.body a:hover{ text-decoration: underline; text-underline-offset: 3px; }
.body strong{ font-weight: 600; color: var(--ink); }

/* the one thing to take away, on a card like the Patch page's captions */
.takeaway{
  margin: 3em 0 0;
  padding: 24px 28px 28px;
  border-radius: 28px;
  background: linear-gradient(#fff, #f3f8ff);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 30px 60px -30px rgba(var(--glow), 0.35);
}
.takeaway .eyebrow{ margin-bottom: 8px; font-size: 15px; }
.takeaway p{ margin: 0; font: 600 clamp(19px, 1.6vw, 24px)/1.35 var(--display); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }

.more-posts{ margin-top: 9vh; padding-top: 24px; border-top: 1px solid #d2d2d7; }
.more-posts h2{ margin: 0 0 6px; font: 600 clamp(17px, 1.45vw, 21px)/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.more-posts ul{ list-style: none; margin: 0; padding: 0; }
.more-posts a{ display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); font: 500 clamp(16px, 1.25vw, 18px)/1.4 var(--text); letter-spacing: -0.01em; color: var(--ink); transition: color 0.3s ease; }
.more-posts a span{ flex: none; color: #1767d8; }
.more-posts a:hover{ color: #1767d8; }

/* ---------- footer: the Patch page's legal notes and copyright row ---------- */

footer{ background: var(--soft); color: var(--ink-2); font: 400 12px/1.33337 var(--text); letter-spacing: -0.01em; }
.legal{ width: min(980px, 86vw); margin: 0 auto; padding: 34px 0 11px; scroll-margin-top: 60px; }
.legal p{ margin: 0 0 0.8em; }
.legal a{ color: #424245; text-decoration: underline; text-underline-offset: 2px; }
.foot{ display: flex; align-items: center; flex-wrap: wrap; gap: 14px; width: min(980px, 86vw); margin: 0 auto; padding: 20px 0 28px; border-top: 1px solid #d2d2d7; }
.foot svg{ display: block; width: 13px; height: auto; fill: #86868b; }
.foot p{ flex: 1 1 auto; margin: 0; }
.foot nav{ display: flex; gap: 20px; }
.foot nav a{ color: var(--ink); }
.foot nav a:hover{ text-decoration: underline; }

@media (max-width: 760px){
  main{ padding-top: calc(52px + 8vh); }
  .bar nav{ gap: 14px; }
  .bento{ grid-template-columns: 1fr; }
  .card{ border-radius: 26px; }
  figure img{ border-radius: 20px; }
  .takeaway{ padding: 18px 20px 20px; border-radius: 24px; }
  .foot{ justify-content: center; text-align: center; }
  .foot nav{ flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce){
  .card, .pill, .bar .link, .more-posts a{ transition: none; }
}
