/* Cayuga Research Corporation */

@font-face {
  font-family: "CMU Concrete";
  src: url("../fonts/cmu-concrete-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CMU Concrete";
  src: url("../fonts/cmu-concrete-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "CMU Concrete";
  src: url("../fonts/cmu-concrete-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "CMU Concrete";
  src: url("../fonts/cmu-concrete-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #fff;
  --fg: #111;
  --muted: #5e5e5e;
  --rule: #a3a3a3;
  --art: #161616;
  --serif: "CMU Concrete", "Iowan Old Style", Georgia, serif;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 34rem;
}

/* Dark follows the system unless the footer toggle has set data-theme. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000;
    --fg: #ececec;
    --muted: #9a9a9a;
    --rule: #575757;
    --art: #e2e2e2;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --fg: #ececec;
  --muted: #9a9a9a;
  --rule: #575757;
  --art: #e2e2e2;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-style: dotted;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.25rem 0.5rem;
  background: var(--bg);
  font-size: 0.875rem;
}

.skip:focus {
  top: 1rem;
}

/* Header ------------------------------------------------------------ */

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem var(--gutter);
}

.brand,
.nav a {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand svg {
  display: block;
  width: 1.1rem;
  height: auto;
  aspect-ratio: 495 / 630;
}

.nav {
  display: flex;
  gap: 2.25rem;
  margin-left: auto;
}

.nav a {
  padding: 0.3rem 0 0.15rem;
  border-bottom: 1px dotted transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

/* Main -------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  padding: 0 var(--gutter);
}

h1,
h2 {
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

/* Landing */

.home main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem;
  padding-bottom: 9vh;
}

.mark {
  display: block;
  align-self: flex-start;
  height: clamp(5.5rem, 4rem + 4vw, 8.5rem);
  width: auto;
  aspect-ratio: 495 / 630;
  margin: 0 0 2.25rem;
}

.home h1 {
  font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  margin: 0 0 1.75rem;
  max-width: 10em;
}

.lede {
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.55;
  max-width: 31em;
  margin: 0;
}

/* Inner pages */

.page main {
  padding-top: clamp(2.5rem, 9vh, 6.5rem);
  padding-bottom: 5rem;
}

.page-title {
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(2.25rem, 6vh, 3.75rem);
}

.person {
  padding: 1.9rem 0 2.1rem;
  border-top: 1px dotted var(--rule);
}

.person h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0;
}

.role {
  font-style: italic;
  color: var(--muted);
  margin: 0.3rem 0 1.1rem;
}

.person p:last-child {
  margin-bottom: 0;
}

/* Footer ------------------------------------------------------------ */

.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2.5rem;
  padding: 1.5rem var(--gutter) 1.75rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
  max-width: 44rem;
}

.site-footer a {
  color: var(--fg);
}

.footer-links {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.theme {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
}

.theme[hidden] {
  display: none;
}

.theme button {
  padding: 0 0 0.1rem;
  border: 0;
  border-bottom: 1px dotted transparent;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.theme button:hover,
.theme button[aria-pressed="true"] {
  color: var(--fg);
}

.theme button[aria-pressed="true"] {
  border-bottom-color: currentColor;
}

/* Background art ---------------------------------------------------- */

.art {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: min(64vw, 72rem);
  overflow: hidden;
  pointer-events: none;
  color: var(--art);
}

.art canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

@media (max-width: 899px) {
  .art {
    position: relative;
    inset: auto;
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-top: 2rem;
  }

  .home main {
    justify-content: flex-start;
    padding-top: 1.5rem;
    padding-bottom: 0;
  }

  .page main {
    padding-bottom: 1rem;
  }
}

@media (max-width: 660px) {
  .brand span {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav {
    gap: 1.5rem;
  }
}

@media print {
  .art,
  .nav,
  .skip {
    display: none;
  }
}
