/* Subsite theme: reverse side of the cat.d business card. */
:root {
  color-scheme: light;
  --paper: #fafaf7;
  --ink: #171a19;
  --muted: #66716b;
  --sage: #dcece3;
  --green: #176b4d;
  --border: #e0e2de;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* Page frame */
.shell {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) clamp(24px, 7vw, 104px) 26px;
}

/* Brand and navigation */
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-block { display: grid; justify-items: start; gap: 10px; flex-shrink: 0; }
.home-link {
  font: 600 42px/1 'IBM Plex Mono', monospace;
  letter-spacing: -.075em;
  text-decoration: none;
}
.dot { color: var(--green); }
.brand-descriptor {
  margin: 0;
  color: var(--muted);
  font: 500 10px/1.4 'IBM Plex Mono', monospace;
  letter-spacing: .035em;
}
.topbar nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px clamp(12px, 2vw, 28px); }
.topbar nav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: color .16s ease;
}
.topbar nav a[aria-current='page'] { color: var(--green); font-weight: 600;}
.topbar nav a:hover, .topbar nav a:focus-visible {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-color: var(--sage);
}
.menu-toggle { display: none; }

/* Main content */
.content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  padding: clamp(50px, 8vh, 100px) 0 115px;
}

.content h2 {
  max-width: 650px;
  margin: 0 0 32px;
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.025em;
}

.content p {
  max-width: 80ch;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}
h1 {
  margin: 0;
  font: 600 clamp(38px, 5.8vw, 78px)/1.12 'IBM Plex Sans', Arial, sans-serif;
  letter-spacing: -.045em;
}
.accent-rule { width: min(320px, 70%); height: 4px; margin: 30px 0; background: var(--sage); }
.lead {
  max-width: 630px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.65;
}
.links { display: flex; flex-wrap: wrap; gap: 16px 26px; max-width: 700px; }
.links a {
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}
.links a:hover, .links a:focus-visible { color: var(--green); border-color: var(--sage); }
.note { margin: 34px 0 0; color: var(--muted); font: 400 12px/1.6 'IBM Plex Mono', monospace; }
.brand-name {
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  letter-spacing: -.075em;
}
/* Watermark stays at the right edge, above the footer, at every breakpoint. */
.watermark {
  position: fixed;
  z-index: 0;
  right: 0;
  bottom: 30px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  color: var(--sage);
  font: 600 clamp(64px, 9vw, 132px)/1 'IBM Plex Mono', monospace;
  letter-spacing: -.085em;
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font: 400 11px/1.6 'IBM Plex Mono', monospace;
}

.footer > :last-child {
  justify-self: end;
}

.footer .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color .16s ease;
}

.footer .social-link:hover,
.footer .social-link:focus-visible {
  color: var(--green);
}
/* Compact dropdown on smaller screens */
@media (max-width: 750px) {
  .topbar { align-items: flex-start; padding-right: 92px; }
  .menu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--paper);
    color: var(--ink);
    font: 500 12px/1 'IBM Plex Sans', Arial, sans-serif;
    cursor: pointer;
  }
  .menu-toggle:hover, .menu-toggle:focus-visible, .menu-toggle[aria-expanded='true'] {
    border-color: var(--green);
    color: var(--green);
  }
  .menu-icon { display: flex; flex-direction: column; justify-content: space-between; width: 17px; height: 14px; }
  .menu-icon span { width: 100%; height: 1.5px; background: currentColor; transition: transform .18s, opacity .18s; }
  .menu-toggle[aria-expanded='true'] .menu-icon span:first-child { transform: translateY(6.25px) rotate(45deg); }
  .menu-toggle[aria-expanded='true'] .menu-icon span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded='true'] .menu-icon span:last-child { transform: translateY(-6.25px) rotate(-45deg); }
  .topbar nav {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--paper);
    box-shadow: 0 14px 32px rgb(23 26 25 / 10%);
  }
  .topbar nav.is-open { display: flex; }
  .topbar nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
    padding: 10px 3px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.35;
  }
  .topbar nav a:last-child { border-bottom: 0; }
  .topbar nav a::after { content: '↗'; padding-left: 18px; color: var(--muted); font-size: 15px; }
  .topbar nav a:hover::after, .topbar nav a:focus-visible::after { color: var(--green); }
  .content { padding: clamp(50px, 8vh, 85px) 0 115px; }
  .watermark { bottom: 20px; font-size: clamp(58px, 14vw, 95px); }
  .footer {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 75%;
    align-self: flex-start;
  }
  .footer .social-link {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin-bottom: 8px;
  }
  .footer > a:first-child {
    grid-column: 1;
    grid-row: 2;
  }
  .footer > :last-child {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }
}

@media (max-width: 440px) {
  .shell { padding: 22px 20px; }
  .content { padding: 52px 0 115px; }
  .links { flex-direction: column; align-items: flex-start; gap: 13px; }
  .watermark { bottom: 15px; font-size: clamp(52px, 15vw, 68px); }
}

@media (prefers-reduced-motion: reduce) {
  .topbar nav a, .links a, .menu-icon span { transition: none; }
}
