/* robertseitzberg.com — Thermostat x Nameplate
   Light = Thermostat. Dark = Invert. The set point tints the accent everywhere. */

:root {
  --bg: #F4F2EE;
  --ink: #161616;
  --soft: #57544E;
  --line: #161616;
  --temp: rgb(158, 99, 141);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(18px, 4vw, 44px);
  --heat: #E2480F;
  --cool: #2F6BFF;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0D0D0D;
  --ink: #EFEDE8;
  --soft: #A9A69F;
  --line: #EFEDE8;
  --heat: #FF6B35;
  --cool: #6390FF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s ease, color .3s ease;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 14px; font: 500 12px/1 var(--mono); text-decoration: none; }
.skip:focus { left: 8px; }

.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 14px var(--pad);
}
.brand {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.bar-right { display: flex; align-items: center; gap: 18px; }
.nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.nav a {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-shadow: inset 0 -2px 0 transparent;
  transition: box-shadow .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.readout {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}
.deg { color: var(--temp); transition: color .2s ease; }

/* Mode switch (light / dark) */
.mode { display: inline-flex; border: 1.5px solid var(--line); }
.mode button {
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--ink);
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 12px;
  min-height: 36px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.mode button + button { border-left: 1.5px solid var(--line); }
.mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
@media (pointer: coarse) { .mode button { min-height: 44px; padding: 0 14px; } }

/* Set point readout, with small ▼▲ buttons on touch screens */
.set-group { display: inline-flex; align-items: center; gap: 8px; }
.step { display: none; gap: 3px; }
.step button {
  position: relative;
  width: 26px; height: 26px; padding: 0;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 9px/1 var(--mono);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.step button::before { content: ''; position: absolute; inset: -10px -2px; } /* taller tap area */
.step button:active { background: var(--ink); color: var(--bg); }
@media (hover: none) { .step { display: inline-flex; } }

/* One-button mode switch (phones) */
.mode-flip {
  display: none;
  align-items: center; justify-content: center;
  position: relative;
  width: 36px; height: 36px; padding: 0;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mode-flip::before { content: ''; position: absolute; inset: -5px; } /* 44px tap area */
.mode-flip:active { background: var(--ink); color: var(--bg); }
[data-theme="dark"] .mode-flip .i-moon, :root:not([data-theme="dark"]) .mode-flip .i-sun { display: none; }

/* Tablets, phones held sideways and small laptops: name, set point and mode on row 1; pages on row 2 */
@media (max-width: 1099px) {
  .bar .brand { order: 1; }
  .bar .bar-right { order: 2; margin-left: auto; }
  .bar .nav { order: 3; flex-basis: 100%; }
}
/* Phones: just the set point up top (the outside temperature lives in the footer) */
@media (max-width: 599px) {
  .bar { column-gap: 14px; }
  .bar .bar-right { gap: 12px; }
  .bar .set-label, .has-out .bar .out { display: none; }
  .bar .mode { display: none; }
  .bar .mode-flip { display: inline-flex; }
  .bar .readout { gap: 9px; }
  .bar .set-group { gap: 5px; }
  .bar .step button { width: 24px; }
  .bar .hvac { gap: 4px; }
  .bar .hvac svg { width: 15px; height: 15px; }
  .nav { gap: 0 16px; }
}
@media (max-width: 345px) { .bar .step { display: none; } }

/* Outside temperature where the visitor is (filled in by site.js) */
.out { display: none; }
.has-out .out { display: inline; }
.out-label { display: none; }
.no-city .out .city { display: none; }
.no-city .out .out-label { display: inline; }
.no-label .out .out-label { display: none; }

/* ---------- Home (fits one screen) ---------- */
.home .screen { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.home main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 var(--pad); }
.dial { width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: clamp(14px, 2.8vh, 28px); }
/* Fixed-width number column so the buttons don't move as the digits change (widest value, 80°, is ~1.23em) */
.setpoint { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 12px 18px; }
.setpoint .num {
  display: block;
  width: 1.26em;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(84px, 18vh, 176px);
  line-height: .8;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.setpoint .meta { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.hint { font-family: var(--sans); font-size: 13px; color: var(--soft); }
.hint-touch { display: none; }
.nudge { display: none; gap: 8px; }
.nudge button {
  width: 44px; height: 44px;
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--mono);
  cursor: pointer;
}
.nudge button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.nudge button:active { background: var(--ink); color: var(--bg); }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
  .nudge { display: flex; }
}
.intro { margin: 0; font-family: var(--serif); font-size: clamp(21px, 3.2vh, 30px); line-height: 1.15; }

.links { display: flex; flex-direction: column; border-bottom: 2px solid var(--line); }
.links a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(48px, 7vh, 60px);
  border-top: 2px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  font-stretch: 112%;
  font-size: clamp(18px, 2.6vh, 22px);
  text-transform: uppercase;
  transition: padding .2s ease;
}
.links a .n { font-family: var(--mono); font-size: 12px; font-weight: 500; margin-right: 16px; }
.links a .arr { font-family: var(--mono); font-weight: 400; transition: transform .2s ease; }
.links a:hover { padding-left: 10px; }
.links a:hover .arr { transform: translateX(4px); }

.social { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--line); }
.social a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.social a + a { border-left: 2px solid var(--line); }
.social a:hover { background: var(--ink); color: var(--bg); }

.home-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 12px var(--pad) 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.home-foot a { text-decoration: none; }
.home-foot a:hover { text-decoration: underline; }

/* ---------- Inner pages ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--pad); }
.page-head { padding-top: 32px; display: flex; flex-direction: column; gap: 20px; }
.page-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 11vw, 150px);
  line-height: .85;
  letter-spacing: -.03em;
  text-transform: uppercase;
}
.sub { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.8vw, 32px); line-height: 1.2; max-width: 760px; }

/* Nameplate */
.plate { border: 2px solid var(--line); margin-top: 28px; }
.plate-strip {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--line);
}
.plate-strip a { text-decoration: none; text-transform: none; letter-spacing: .02em; }
.plate-strip a:hover { text-decoration: underline; }
.plate-name {
  margin: 0;
  padding: 26px 16px 22px;
  border-bottom: 2px solid var(--line);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 7.6vw, 98px);
  line-height: .88;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.spec { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.spec > div {
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}
.spec > div:nth-child(4n) { border-right: 0; }
.spec > div:nth-last-child(-n+4) { border-bottom: 0; }
.spec dt { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.spec dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; flex: none; background: var(--temp); border: 2px solid var(--line); display: inline-block; transition: background-color .2s ease; }
@media (max-width: 760px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec > div:nth-child(4n) { border-right: 2px solid var(--line); }
  .spec > div:nth-child(2n) { border-right: 0; }
  .spec > div:nth-last-child(-n+4) { border-bottom: 2px solid var(--line); }
  .spec > div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* Scrolling headline */
.marquee {
  margin-top: 56px;
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
}
.marquee-track { display: inline-flex; animation: marq 48s linear infinite; }
.marquee-group {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 18px .55em 18px 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(28px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.marquee-group .sq { width: .3em; height: .3em; flex: none; background: var(--temp); transition: background-color .2s ease; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { white-space: normal; }
}

/* Sections */
.sec { padding-top: 64px; }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}
.sec-head h2 { margin: 0; font-weight: 800; font-stretch: 112%; font-size: clamp(22px, 2.6vw, 30px); text-transform: uppercase; letter-spacing: -.005em; }
.lede { margin: 0; padding-top: 28px; font-family: var(--serif); font-size: clamp(24px, 3vw, 38px); line-height: 1.18; max-width: 920px; }

/* Experience timeline */
.job {
  display: grid;
  grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
  gap: 10px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.job .yr {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(44px, 5.2vw, 70px);
  line-height: .82;
  letter-spacing: -.03em;
}
.job.now .yr { color: var(--temp); transition: color .2s ease; }
.job h3 { margin: 0; font-weight: 700; font-size: clamp(21px, 2.3vw, 28px); line-height: 1.15; }
.job .org { margin: 6px 0 0; font-family: var(--mono); font-size: 13px; color: var(--soft); }
.job ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; max-width: 760px; }
.job li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.5; }
.job li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--temp); transition: background-color .2s ease; }
.era { padding: 34px 0 12px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) { .job { grid-template-columns: 1fr; } }

/* Certifications */
.certs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 36px; }
.cert {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 2px 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.cert .tag { font-family: var(--mono); font-size: 12px; font-weight: 500; padding-top: 3px; }
.cert .name { font-weight: 700; font-size: 17px; line-height: 1.3; }
.cert .by { grid-column: 2; font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
@media (max-width: 760px) { .certs { grid-template-columns: 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 20px; }
.chip { border: 1.5px solid var(--line); padding: 7px 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.3; }

/* Contact block */
.contact { padding-top: 88px; display: flex; flex-direction: column; gap: 14px; }
.big-link {
  align-self: flex-start;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 7vw, 96px);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: inset 0 -.09em 0 var(--temp);
  transition: box-shadow .2s ease;
}
.big-link:hover { box-shadow: inset 0 -.22em 0 var(--temp); }
.contact .addr { font-family: var(--mono); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.contact .addr a { text-decoration: none; }
.contact .addr a:hover { text-decoration: underline; }

/* Projects */
.proj-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-top: 32px; }
.proj { border: 2px solid var(--line); display: flex; flex-direction: column; text-decoration: none; }
.proj h2 {
  margin: 0;
  padding: 22px 16px 8px;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: .95;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.proj p { margin: 0; padding: 0 16px 24px; font-family: var(--serif); font-size: 22px; line-height: 1.2; flex: 1; }
.proj .go {
  border-top: 2px solid var(--line);
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  transition: background-color .15s ease, color .15s ease;
}
.proj:hover .go { background: var(--ink); color: var(--bg); }
.status { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) { .proj-grid { grid-template-columns: 1fr; } }

/* Field Notes */
.notes { border-top: 2px solid var(--line); margin-top: 32px; }
.note {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: baseline;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: padding .2s ease;
}
.note:hover { padding-left: 10px; }
.note .date { font-family: var(--mono); font-size: 12.5px; }
.note .title { font-weight: 700; font-size: clamp(21px, 2.4vw, 28px); line-height: 1.15; }
.note .tag { border: 1.5px solid var(--line); padding: 4px 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 640px) {
  .note { grid-template-columns: minmax(0, 1fr) auto; }
  .note .date { grid-column: 1 / -1; }
}

/* Inner footer */
.site-foot { margin-top: 88px; border-top: 2px solid var(--line); }
.site-foot .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding-top: 16px;
  padding-bottom: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.site-foot a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.site-foot a:hover { text-decoration: underline; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 18px; }

/* 404 */
.offline { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.offline main { flex: 1; display: flex; align-items: center; padding: 0 var(--pad); }

/* ---------- Custom cursor (mouse only) ---------- */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  pointer-events: none;
  mix-blend-mode: multiply;
  will-change: transform;
}
[data-theme="dark"] .cursor { mix-blend-mode: difference; }
.cursor i {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--temp);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width .3s cubic-bezier(.2, .8, .2, 1), height .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, background-color .15s linear;
}
.cursor.is-on i { opacity: 1; }
.cursor.is-big i { width: 76px; height: 76px; }

/* Field Note (single post) */
.back { display: inline-flex; align-items: center; min-height: 40px; margin-top: 20px; text-decoration: none; }
.back:hover { text-decoration: underline; }
.post .plate { margin-top: 8px; }
.post-title {
  margin: 0;
  padding: 24px 16px 22px;
  border-bottom: 2px solid var(--line);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(34px, 6.2vw, 80px);
  line-height: .9;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.prose { max-width: 700px; }
.prose .dek { margin: 0; padding-top: 32px; font-family: var(--serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.prose h2 {
  margin: 56px 0 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  font-weight: 800;
  font-stretch: 112%;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.15;
  text-transform: uppercase;
}
.prose p { margin: 18px 0 0; font-size: 18px; line-height: 1.65; }
.prose ul { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prose li { position: relative; padding: 14px 0 14px 26px; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 1.55; }
.prose li::before { content: ''; position: absolute; left: 2px; top: 23px; width: 9px; height: 9px; background: var(--temp); transition: background-color .2s ease; }
.prose strong { font-weight: 700; }
.prose a { text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.post-end { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 56px; padding-top: 14px; border-top: 2px solid var(--line); }
.post-end a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.post-end a:hover { text-decoration: underline; }
.proj:only-child { grid-column: 1 / -1; }
/* Keep the footer at the bottom on short inner pages */
body:not(.home):not(.offline) { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
body:not(.home):not(.offline) > main { flex: 1 0 auto; }

/* Embedded video (Field Notes) */
.video { margin: 28px 0 0; border: 2px solid var(--line); }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.video figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; border-top: 2px solid var(--line); }

/* Home: thermostat-style outside reading beside the set point */
.outside { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1.5px solid var(--line); }
.out-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.out-num { font-family: var(--serif); font-size: clamp(34px, 5.6vh, 52px); line-height: .9; letter-spacing: -.02em; font-variant-numeric: tabular-nums; flex: none; }
.out-city { font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* Short phones: the arrows explain themselves, so drop the hint to keep the home page on one screen */
@media (hover: none) and (max-height: 700px) { .hint-touch { display: none; } }

/* Contact page (home-page layout) */
.reach { display: flex; flex-direction: column; gap: 10px; }
.reach h1 { margin: 0; }
.email-big {
  width: fit-content;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(24px, 7.2vw, 46px);
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: inset 0 -.12em 0 var(--temp);
  transition: box-shadow .2s ease;
}
.email-big:hover { box-shadow: inset 0 -.5em 0 var(--temp); }
.links a .handle { font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: none; margin-right: 10px; }
@media (max-width: 359px) { .links a .handle { display: none; } }

/* Phones held sideways: two columns that line up with the header */
.dial-a, .dial-b { display: contents; }
@media (orientation: landscape) and (max-height: 540px) {
  .home main { padding-top: 6px; padding-bottom: 6px; }
  .dial {
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(28px, 6vw, 72px);
    align-items: center;
  }
  .dial-a, .dial-b { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .setpoint .num { font-size: clamp(84px, 29vh, 140px); }
  .intro { font-size: clamp(18px, 4.6vh, 22px); }
  .links a { min-height: 44px; font-size: 17px; }
  .social a { min-height: 44px; font-size: 11px; letter-spacing: .04em; }
  .email-big { font-size: clamp(20px, 4.2vw, 34px); }
  .home .bar { padding-top: 8px; padding-bottom: 8px; }
  .home-foot { padding-top: 8px; padding-bottom: 10px; }
}
/* Smallest phones: keep the page links on one row */
@media (max-width: 345px) { .nav { gap: 0 12px; } .nav a { letter-spacing: .05em; } }

/* HVAC status: heating when the set point is above the outside temperature, cooling when below.
   The fan spins while heating or cooling and stops when they match. */
.hvac { display: inline-flex; align-items: center; gap: 5px; }
.fan, .h-mode { display: inline-flex; align-items: center; }
.fan svg, .h-mode svg { width: 16px; height: 16px; display: block; }
.fan svg { animation: fan-spin .9s linear infinite paused; }
[data-hvac="heat"] .fan svg, [data-hvac="cool"] .fan svg { animation-play-state: running; }
@keyframes fan-spin { to { transform: rotate(360deg); } }
.h-mode .i-heat, .h-mode .i-cool { display: none; color: var(--heat); }
.h-mode .i-cool { color: var(--cool); }
[data-hvac-icon="heat"] .h-mode .i-heat, [data-hvac-icon="cool"] .h-mode .i-cool { display: block; }
:root:not([data-hvac]) .h-mode { visibility: hidden; }
.fan, .h-mode { transition: opacity .25s ease; }
:root:not([data-hvac]) .fan, [data-hvac="idle"] .fan, [data-hvac="idle"] .h-mode { opacity: .4; }
@media (prefers-reduced-motion: reduce) { .fan svg { animation: none; } }
/* No room for both in the header: keep the fan and tint it */
.hvac-tight .hvac .h-mode { display: none; }
[data-hvac="heat"] .hvac-tight .hvac .fan { color: var(--heat); }
[data-hvac="cool"] .hvac-tight .hvac .fan { color: var(--cool); }

/* Home display: fan (left) and heat/cool (right) in a row under the set point number */
.num-col { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; }
.hvac-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; height: 44px; }
.hvac-row .h-mode { justify-self: end; }
.fan-lg svg, .h-mode-lg svg { width: 28px; height: 28px; }
.h-mode-lg { gap: 8px; }
.h-word { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--soft); }
[data-hvac="heat"] .h-word { color: var(--heat); }
[data-hvac="cool"] .h-word { color: var(--cool); }
