:root {
  color-scheme: light;
  --bg: #f8f7f3;
  --paper: #fffdf7;
  --paper-soft: rgba(255, 255, 255, 0.66);
  --ink: #1c1c1c;
  --text: #312f2a;
  --muted: #6a665c;
  --faint: #7a7468;
  --line: #d8d5cc;
  --line-dark: #cfcabf;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.7;
}

a {
  color: inherit;
}

.shell {
  width: min(100% - 48px, 896px);
  margin: 0 auto;
  padding: 56px 0 38px;
}

.site-header {
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.domain {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 8px 0 5px;
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
}

.subtitle {
  margin: 0;
  color: #4f4b42;
  font-size: 14px;
}

.section {
  margin-top: 32px;
}

h2 {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.body-copy {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.85;
}

.cards,
.accordion,
.list {
  display: grid;
  gap: 16px;
}

.card,
.row,
.list article,
.project {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-soft);
}

.card,
.list article {
  padding: 14px 16px;
}

.card h3,
.list h3 {
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.card p,
.list p,
.row-body,
.project small {
  margin: 0;
  color: #4f4b42;
  font-size: 14px;
}

.row {
  overflow: hidden;
}

.row summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  transition: background 160ms ease;
}

.row summary:hover {
  background: rgba(255, 255, 255, 0.76);
}

.row summary::-webkit-details-marker {
  display: none;
}

.row summary::after {
  content: "\203A";
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
  transition: transform 160ms ease;
}

.row[open] summary::after {
  transform: rotate(90deg);
}

.row strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.row em {
  display: block;
  margin-top: 3px;
  color: #4f4b42;
  font-size: 14px;
  font-style: normal;
}

.row-body {
  padding: 13px 16px 15px;
  border-top: 1px solid #e2ddd2;
  line-height: 1.7;
}

.project {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.project:hover {
  border-color: var(--line-dark);
  background: #fff;
}

.project span {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

.tags,
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tags span,
.links a {
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  background: var(--paper);
}

.tags span {
  padding: 7px 10px;
  color: var(--text);
  font-size: 14px;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease;
}

.links a:hover {
  border-color: #a0aab4;
  background: #fff;
}

.links svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 32px, 896px);
    padding-top: 40px;
  }

  .row summary {
    padding-right: 13px;
  }

  .links a {
    flex: 1 1 calc(50% - 12px);
    justify-content: center;
  }

  .footer {
    flex-direction: column;
  }
}
