/* Plain, solid styling. No frameworks. */
:root {
  --ink: #16181a;
  --muted: #6a6f75;
  --paper: #fcfcfc;
  --accent: #1a5f5a;
  --rule: #e6e6e4;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  position: relative;  /* anchor for the .flock layer, which spans the document */
  min-height: 100%;    /* so short pages still spread the flock down the screen */
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 Georgia, "Times New Roman", serif;
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
header { background: var(--surface); border-bottom: 1px solid var(--rule); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .55rem; font: 700 1.15rem/1 system-ui, sans-serif; color: var(--ink); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 1.1rem; font: 500 .95rem system-ui, sans-serif; }
nav a { color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
nav a:hover, nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Flock of crows, spread down the page as a faint silk-screen. The layer spans
   the whole document body and scrolls with it, so the birds belong to the page
   rather than hovering in the viewport. One element plus its two pseudo-
   elements, each carrying several background layers, gives ten birds in plain
   CSS: no markup of its own and no script. Decorative only (aria-hidden). */
.flock {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .1;
  background-image: url("crow.svg"), url("crow.svg"), url("crow.svg"), url("crow.svg");
  background-position: 5% 10%, 91% 38%, 12% 62%, 85% 88%;
  background-size: 136px auto, 112px auto, 92px auto, 128px auto;
  background-repeat: no-repeat;
}
/* two more layers of three birds each, smaller and lighter: the birds far back
   in the flock. The last layer is flipped, so a few of them fly the other way. */
.flock::before, .flock::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}
.flock::before {
  opacity: .78;
  background-image: url("crow.svg"), url("crow.svg"), url("crow.svg");
  background-position: 30% 22%, 66% 55%, 88% 72%;
  background-size: 64px auto, 72px auto, 84px auto;
}
.flock::after {
  opacity: .55;
  transform: scaleX(-1);
  background-image: url("crow.svg"), url("crow.svg"), url("crow.svg");
  background-position: 78% 14%, 22% 45%, 55% 80%;
  background-size: 56px auto, 60px auto, 50px auto;
}

@media (max-width: 640px) {
  .flock {
    background-position: 2% 8%, 94% 38%, 3% 62%, 90% 88%;
    background-size: 84px auto, 70px auto, 58px auto, 80px auto;
  }
  .flock::before {
    background-position: 26% 20%, 64% 52%, 92% 70%;
    background-size: 40px auto, 44px auto, 52px auto;
  }
  .flock::after {
    background-position: 76% 14%, 18% 44%, 52% 78%;
    background-size: 34px auto, 38px auto, 32px auto;
  }
}

/* page furniture paints above the flock */
header, main, footer { position: relative; z-index: 1; }

/* Content */
main { padding-top: 2rem; padding-bottom: 3rem; }
h1, h2, h3 { font-family: system-ui, sans-serif; line-height: 1.25; }
h1 { font-size: 2rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.05rem; margin-bottom: .3rem; }
a { color: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); }

/* Cards for services / work / team */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
/* force a 2x2 layout when 4 cards would otherwise flow 3+1 */
.cards.two { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 560px) { .cards.two { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: .4rem 1.1rem 1rem; }

/* Team photo */
figure { margin: 1.5rem 0; }
figure img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--rule); }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: system-ui, sans-serif; font-size: .9rem; color: var(--muted); }
/* key/value tables have empty markdown headers -- hide the row */
thead:has(th:empty) { display: none; }

/* Highlighted placeholders, so drafts are easy to spot. Remove when filled in. */
.todo { background: #fff3b0; padding: 0 .25em; border-radius: 3px; }

/* Team member cards */
.card .role {
  font: 600 .82rem system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--accent);
  margin: .15rem 0 .7rem;
}
.card h3 { margin-top: .8rem; margin-bottom: .15rem; }
.card p { margin: .3rem 0; }

/* Collapsible tree (model organisms, etc.) */
.tree details {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  margin: .5rem 0;
}
.tree summary {
  cursor: pointer;
  padding: .55rem 1rem;
  font: 600 1rem system-ui, sans-serif;
  color: var(--ink);
  list-style: none;
  position: relative;
}
/* custom marker, so the arrow is styled */
.tree summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-weight: 700;
}
.tree details[open] summary::after { content: "\2212"; }  /* minus sign */
.tree summary::-webkit-details-marker { display: none; }
.tree summary:hover { color: var(--accent); }
.tree details > ul { margin: 0; padding: .1rem 1rem .7rem 2rem; }
.tree details > ul li { margin: .2rem 0; }

/* Small home-page logo, floated left of the lead text */
.home-logo {
  float: left;
  width: 64px;
  height: 64px;
  margin: 0 1rem .25rem 0;
  border-radius: 10px;
}
.home-logo + .lead { overflow: hidden; }  /* keep the paragraph from wrapping under the float */

/* Callout: single emphasized statement */
.callout {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: .8rem 1.1rem;
  margin: 1.25rem 0;
  border-radius: 0 6px 6px 0;
  font-size: 1.05rem;
}

/* Call-to-action buttons */
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.25rem 0; }
.btn {
  display: inline-block;
  padding: .55rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font: 600 .95rem system-ui, sans-serif;
}
.btn:hover { background: #144d49; border-color: #144d49; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* Footer */
footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }
footer p { margin: 1rem 0 1.5rem; }
