/* Footer (docs-plan-revision-dec2.md 1.9): two quiet rows and one hairline, after the Pargus footer.
   Row 1: lockup, then About, Work, Careers, Contact. Row 2: copyright and place, then the email and the theme button. */

.site-footer { border-top: 1px solid var(--line); background: var(--ink-0); color: var(--paper); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-5); padding-block: 24px; }

.foot-wm .wm { height: 20px; }
.foot-nav ul { display: flex; flex-wrap: wrap; column-gap: 20px; }
.foot-nav a, .foot-mail { display: inline-flex; align-items: center; min-height: 44px; color: var(--mist); text-decoration: none;
  transition: color var(--t-fast) var(--ease); }
.foot-nav a { font-size: .875rem; }
.foot-nav a:hover, .foot-nav a[aria-current="page"], .foot-mail:hover { color: var(--paper); }

/* the rule spans the content, not the gutters */
.foot-base { border-top: 1px solid var(--line); padding: 20px 0 calc(32px + env(safe-area-inset-bottom, 0px)); font-size: .8125rem; }
.foot-copy { color: var(--dim); }
.foot-copy span { margin-inline: 8px; }
.foot-end { display: flex; align-items: center; gap: 16px; }

/* Theme button: theme.js unhides it. Sun while dark is in effect, moon while light is */
.theme-btn { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: transparent; color: var(--mist);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.theme-btn::before { content: ""; position: absolute; inset: -5px; }   /* 44 px touch target */
.theme-btn[hidden] { display: none; }
.theme-btn:hover { background-color: var(--ink-3); color: var(--paper); }
.theme-btn svg { width: 16px; height: 16px; }
.theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .i-moon { display: block; }
}
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }

@media (max-width: 47.99rem) {
  .foot-row { flex-direction: column; align-items: flex-start; }
  .foot-nav { margin-top: -6px; }
  .foot-base { gap: 4px; }
  .foot-end { align-self: stretch; justify-content: space-between; }
}

@media (forced-colors: active) { .theme-btn { border-color: ButtonText; } }
