:root {
  --paper: #f8f6f2;
  --ink: #222b27;
  --body: #515a56;
  --muted: #606864;
  --line: #dbd7cd;
  --green: #273b34;
  --accent: #856b4a;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  font-size: clamp(16px, 1.28vw, 26px);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 1.25rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.12;
}
h1 { font-size: 2.35rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
a {
  color: inherit;
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent); }
button, input { font: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: absolute;
  z-index: 2;
  background: var(--paper);
  padding: .5rem 1rem;
  inset: .5rem auto auto .5rem;
}
.site-shell {
  display: grid;
  grid-template-columns: 20% minmax(0, 1fr);
  max-width: 2050px;
  margin-inline: auto;
}
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 2.75rem 1.9rem;
}
.brand {
  display: inline-block;
  font: 1.75rem/1.08 var(--serif);
  text-decoration: none;
}
.brand span { display: block; }
#navigation {
  display: grid;
  gap: .7rem;
  margin-top: 3.35rem;
}
#navigation a {
  position: relative;
  padding: .2rem 0 .2rem 1rem;
  text-decoration: none;
  color: var(--body);
}
#navigation a:hover { color: var(--accent); }
#navigation a[aria-current] {
  color: var(--ink);
  font-weight: 600;
}
#navigation a[aria-current]::before {
  content: "";
  position: absolute;
  inset: calc(50% - .2rem) auto auto 0;
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: #c8a476;
}
.menu-toggle { display: none; }
.page-wrap { padding: 0 5.1% 0 2.8%; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 2.5rem;
  margin-top: 6rem;
  padding: 1.6rem 0 1.4rem;
  border-top: 1px solid var(--line);
  font-size: .875rem;
  color: var(--muted);
}
.site-footer a {
  text-decoration: none;
  color: var(--ink);
}
.site-footer a:hover { color: var(--accent); }

.home-intro, .company-heading { padding-top: 4.2rem; }
.home-intro { padding-bottom: 3.15rem; }
.home-intro-heading {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.home-intro h1 {
  max-width: 31.4rem;
  font-size: 2.12rem;
  line-height: 1.22;
}
.home-intro p, .company-heading p {
  color: var(--body);
  font-size: 1.07rem;
  line-height: 1.65;
}
.home-intro p {
  max-width: 38rem;
  margin-top: 1.25rem;
}
.home-index { border-bottom: 1px solid var(--line); }
.index-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5.2fr) 1.45rem;
  gap: 1rem;
  align-items: start;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.index-row { padding: 2.05rem 0 2.2rem; }
.index-row h2 { font-size: 2.42rem; }
.index-row p { color: var(--muted); }
.index-row p { margin-top: .85rem; }
.row-arrow {
  justify-self: center;
  color: var(--accent);
  font-size: 1.25rem;
}
.index-row .row-arrow { margin-top: .5rem; }
.book-shelf {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 7.5rem));
  gap: 1.7rem;
  padding-bottom: 2.7rem;
}
.book-shelf > a {
  display: grid;
  align-content: start;
  gap: .7rem;
  color: var(--body);
  text-decoration: none;
  font-size: .81rem;
  line-height: 1.45;
}
.book-shelf > a:hover { color: var(--accent); }
.portrait {
  display: block;
  width: 5.5rem;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  flex: none;
  border-radius: 50%;
}
.cover-image, .manual-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  box-shadow: 0 .55rem 1rem -.35rem rgb(34 43 39 / 23%), 0 2px 3px rgb(34 43 39 / 12%);
}
.cover-image {
  display: block;
  height: auto;
  object-fit: contain;
}
.cover-spinoza { background: linear-gradient(#763515 60%, #aa8f72 60%); }
.cover-kiss { background: #2fbc9a; }
.cover-stack360 { background: #fff; }
.manual-cover {
  position: relative;
  display: grid;
  align-content: center;
  padding: .85rem;
  background: var(--green);
  color: var(--paper);
  font: 1.47rem/1 var(--serif);
}
.manual-cover::before {
  content: "";
  position: absolute;
  inset: .95rem auto auto .85rem;
  width: 1.45rem;
  height: .14rem;
  background: #cfaa7f;
}
.manual-cover small {
  position: absolute;
  inset: auto auto .95rem .85rem;
  font: .63rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .8;
}
.manual-sand {
  background: #ece4d9;
  color: var(--ink);
}
.manual-sand::before { background: var(--green); }
.manual-subtitle {
  margin-top: .45rem;
  font: .72rem/1.3 var(--sans);
  overflow-wrap: anywhere;
}

.writing-nav {
  display: flex;
  gap: 2rem;
  padding-top: .4rem;
  border-bottom: 1px solid var(--line);
}
.writing-nav a {
  margin-bottom: -1px;
  padding: .3rem 0 .65rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: .94rem;
}
.writing-nav a[aria-current] {
  border-color: var(--green);
  color: var(--ink);
  font-weight: 600;
}
.writing-nav a:hover { color: var(--accent); }
.writing-nav span { color: var(--muted); font-weight: 400; }
.writing-authorship {
  color: var(--body);
  font-size: .94rem;
}
#books > .writing-authorship { padding-top: 1.4rem; }
.writing-authorship + .book-group { padding-top: 2rem; }
.book-group { padding-top: 3.4rem; }
.group-label, .category-title {
  font: 600 .74rem/1.4 var(--sans);
  letter-spacing: .15em;
  color: var(--muted);
  text-transform: uppercase;
}
.book-row {
  display: grid;
  grid-template-columns: 10rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  padding: 2.5rem 0 1.7rem;
  border-bottom: 1px solid var(--line);
}
.book-cover-link { text-decoration: none; }
.book-info { max-width: 37rem; }
.book-info h3 { font-size: 1.8rem; }
.book-info h3 a { text-decoration: none; }
.book-info p {
  margin-top: 1.05rem;
  color: var(--body);
  line-height: 1.67;
}
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem 1.5rem;
  margin-top: 1.2rem;
}
.action-link, .sample-link {
  font-size: .94rem;
  font-weight: 500;
  text-decoration: none;
}
.action-link { color: var(--green); }
.external-arrow {
  position: relative;
  display: inline-block;
  width: .8em;
  height: .8em;
  margin-left: .17em;
  color: inherit;
  vertical-align: -.02em;
}
.external-arrow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto auto;
  width: .28em;
  height: .28em;
  border-top: 1px solid;
  border-right: 1px solid;
}
.external-arrow::after {
  content: "";
  position: absolute;
  inset: auto 0 0 auto;
  width: 1.1em;
  border-top: 1px solid;
  transform-origin: right center;
  transform: translateY(-.75em) rotate(-45deg);
}
.sample-link { color: var(--muted); }
.action-link:hover, .sample-link:hover { text-decoration: underline; }

.company-heading p {
  max-width: 41rem;
  margin-top: 1.5rem;
}
.company-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3.8rem;
}
.company-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 2rem;
  border: 1px solid #e4e0d8;
  border-radius: .25rem;
  background: #fff;
}
.company-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: start;
  gap: .65rem;
  width: 100%;
  min-height: 4.5rem;
  margin-bottom: 1.3rem;
}
.company-logo {
  width: auto;
  max-width: 100%;
  height: 4.5rem;
  object-fit: contain;
  object-position: left center;
}
.company-card h2 { font-size: 1.8rem; }
.company-status {
  grid-column: 2;
  padding: .22rem .55rem;
  border-radius: 1rem;
  background: #eaf3ee;
  color: #315c4d;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.company-status-former {
  background: #f1eee9;
  color: #59524b;
}
.company-role { color: var(--accent); font-size: .86rem; }
.company-card .company-role { margin-top: .4rem; }
.company-description {
  color: var(--body);
  margin-top: 1.1rem;
  padding-bottom: 1.15rem;
}
.company-card .action-link { margin-top: auto; }
.page-heading {
  padding: 4.2rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
}
.page-heading p:last-child {
  max-width: 38rem;
  margin-top: 1rem;
  color: var(--body);
}
.eyebrow {
  margin-bottom: .8rem;
  color: var(--muted);
  text-transform: uppercase;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .15em;
}
.essays-section { padding-top: 1.4rem; }
.searchbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
}
.searchbar label { font-weight: 600; }
.searchbar input {
  max-width: 100%;
  padding: .55rem .65rem;
  border: 1px solid #a5aaa4;
  border-radius: .18rem;
  background: transparent;
  color: var(--ink);
}
#result-count { margin-left: auto; color: var(--muted); }
#empty-state { padding: 1.2rem 0; color: var(--body); }
.project, .essay {
  display: grid;
  grid-template-columns: 1.65rem minmax(0, 1fr);
  gap: .8rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.item-number {
  padding-top: .2rem;
  color: var(--muted);
  font-size: .7rem;
  font-variant-numeric: tabular-nums;
}
.item-content h3 { margin-bottom: .35rem; }
.item-content h3 a { text-decoration: none; }
.inline-arrow {
  margin-left: .45em;
  color: var(--accent);
  font: .8em var(--sans);
}
.description {
  color: var(--body);
  font-size: .9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.description p { margin-top: .55rem; }
.description ol { padding-left: 1.1rem; margin-bottom: 0; }
.description a { color: var(--ink); }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .9rem 0;
}
.filters button {
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: .15rem;
  background: transparent;
  color: var(--body);
  font-size: .78rem;
  cursor: pointer;
  min-height: 40px;
}
.filters button.active {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.filters button:hover { border-color: var(--green); }
.category-title { padding: 1rem 0 .25rem; }

@media (max-width: 900px) {
  .site-shell { display: block; }
  .sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 5%;
    border-bottom: 1px solid var(--line);
  }
  .brand { font-size: 1.5rem; }
  .brand span { display: inline; }
  #navigation { display: flex; flex-wrap: wrap; gap: .85rem; margin: 0; }
  #navigation a { padding-left: .7rem; font-size: .9rem; }
  .page-wrap { padding-inline: 5%; }
  .home-intro, .company-heading, .page-heading { padding-top: 3rem; }
  .site-footer { margin-top: 4rem; }
}

@media (max-width: 620px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    padding: .35rem .65rem;
    border: 1px solid var(--line);
    border-radius: .15rem;
    color: var(--ink);
    background: transparent;
  }
  .menu-toggle[aria-expanded="true"] span { transform: rotate(45deg); }
  #navigation { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
  #navigation a { padding-block: .55rem; }
  .menu-toggle[hidden] { display: none; }
  .home-intro, .company-heading, .page-heading { padding-top: 2.3rem; }
  .home-intro { padding-bottom: 2rem; }
  .home-intro-heading { align-items: flex-start; gap: .8rem; }
  .home-intro h1 { font-size: clamp(1.55rem, 6.1vw, 2rem); }
  .portrait { width: 3.8rem; }
  .index-row {
    grid-template-columns: minmax(0, 1fr) 1.4rem;
    gap: .35rem .7rem;
    padding: 1.25rem 0;
  }
  .index-row h2 { font-size: 1.9rem; }
  .index-row p { grid-column: 1; grid-row: 2; margin-top: 0; }
  .index-row .row-arrow { grid-column: 2; grid-row: 1; margin: 0; }
  .book-shelf { grid-template-columns: repeat(2, minmax(0, 8rem)); gap: 1rem; padding-bottom: 1.6rem; }
  .book-group { padding-top: 2rem; }
  .book-row { grid-template-columns: minmax(4.25rem, 27%) minmax(0, 1fr); gap: .9rem; padding: 1.3rem 0; }
  .book-row .manual-cover { padding: .45rem; font-size: .9rem; }
  .manual-subtitle { margin-top: .3rem; font-size: .59rem; }
  .book-row .manual-cover small { left: .45rem; font-size: .52rem; bottom: .5rem; }
  .book-row .manual-cover::before { top: .5rem; left: .45rem; width: 1rem; }
  .book-info h3 { font-size: 1.42rem; }
  .book-info p { font-size: .9rem; margin-top: .6rem; }
  .book-actions { margin-top: .7rem; }
  .company-cards { grid-template-columns: 1fr; gap: 1rem; margin-top: 1.7rem; }
  .company-card { padding: 1.25rem; }
  .site-footer { margin-top: 2.5rem; gap: .5rem 1.25rem; }
  .searchbar label { width: 100%; }
  .searchbar input { flex: 1; width: 60%; min-width: 0; }
}

@media print {
  .sidebar, .skip, .searchbar, .filters, .writing-nav, .site-footer { display: none !important; }
  .site-shell { display: block; }
  .page-wrap { padding: 0; }
  a { color: #000; }
  article { break-inside: avoid; }
  .writing-page section[hidden], .essay[hidden] { display: block !important; }
}
