/* Sustainable Systems Laboratory — minimal stylesheet
   Inspired by clean, text-first academic sites.
   Single column, generous whitespace, restrained palette. */

:root {
  --ink:        #1a1a1a;
  --ink-soft:   #444;
  --ink-faint:  #777;
  --rule:       #e6e6e6;
  --bg:         #fdfdfc;
  --accent:     #1a2a4a;   /* deep navy, matches the knotwork logo */
  --accent-hover: #324b80;
  --card-bg:    #f6f5f1;   /* tint for teaser/project cards */
  --max-width:  720px;
  --serif:      "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans:       -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 28px 96px;
}

/* ---------- Header ---------- */
header.site {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

header.site .logo {
  flex: 0 0 auto;
}

header.site .logo img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
}

header.site .titles {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

header.site .titles a {
  color: var(--ink);
  text-decoration: none;
}

header.site .titles .name {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

header.site .titles .tagline {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 2px;
  letter-spacing: 0.02em;
}

/* ---------- Navigation ---------- */
nav.primary {
  font-family: var(--sans);
  font-size: 0.92rem;
  margin-bottom: 56px;
}

nav.primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

nav.primary a {
  color: var(--ink-soft);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

nav.primary a:hover,
nav.primary a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin: 2.4em 0 0.6em;
}

h1 {
  font-size: 1.9rem;
  margin-top: 0;
  letter-spacing: -0.005em;
}

h2 {
  font-size: 1.3rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-soft);
}

p {
  margin: 0 0 1.1em;
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 42, 74, 0.25);
  transition: border-color 0.15s ease, color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

hr.section {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 56px 0;
}

/* ---------- Lists of items (projects, essays, pubs) ---------- */
ul.entries {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.entries li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}

ul.entries li:first-child { border-top: 1px solid var(--rule); }

.person-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.person-body {
  flex: 1 1 auto;
  min-width: 0;
}

ul.entries .title {
  font-weight: 600;
  font-size: 1.02rem;
}

ul.entries .meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 4px;
  letter-spacing: 0.01em;
}

ul.entries .summary {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ---------- Teaser cards (home page) ---------- */
/* Two columns, not three: at this site's --max-width (720px), a 3-up grid
   leaves each card under 210px wide, too cramped for a heading + sentence.
   Two columns keeps cards a comfortable ~320px; a third card wraps to its
   own row, which reads fine given each card has its own border/tint. */
.teasers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 8px 0 8px;
}

.teaser-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 20px 22px;
}

.teaser-card h2 {
  margin: 0 0 0.4em;
  font-size: 1.08rem;
}

.teaser-card p {
  font-size: 0.94rem;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.teaser-card a.view-all {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
}

@media (max-width: 640px) {
  .teasers { grid-template-columns: 1fr; }
}

/* ---------- Project cards ---------- */
.project-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--card-bg);
  padding: 22px 26px;
  margin-bottom: 20px;
}

.project-card h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.project-meta {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
  margin-bottom: 10px;
}

.project-card a.view-more {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.86rem;
}

/* ---------- Footer ---------- */
footer.site {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site a {
  color: var(--ink-faint);
  border-bottom-color: rgba(0,0,0,0.08);
}

footer.site a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 540px) {
  html, body { font-size: 17px; }
  .wrap { padding: 36px 20px 72px; }
  header.site { gap: 14px; }
  header.site .logo img { width: 52px; height: 52px; }
  h1 { font-size: 1.55rem; }
}

/* ---------- Print ---------- */
@media print {
  nav.primary, footer.site { display: none; }
  body { background: #fff; color: #000; }
}
