:root {
  --page-padding: 24px;
}

body, form, input, button {
  font-family: Helvetica, Arial;
  font-weight: normal;
  font-size: 16px;
  line-height: 18px;
  letter-spacing: 0.2px;
}

h1, h2, h3 {
  font-size: 30px;
  line-height: 30px;
  margin-bottom: 2px;
}

h1 {
  margin-bottom: 16px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: var(--page-padding);
}

:where(a, a:visited) {
  color: black;
}

a[target="_blank"]::after {
  content: " ↗";
}

p {
  margin-bottom: 10px;
  max-width: 600px;
}

p:last-of-type {
  margin-bottom: 0;
}

.etc-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.site-name {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav-about {
  margin-left: 12px;
}

:where(.site-header nav > a, button, summary) {
  display: block;
  padding: 2px 4px;
  background: #000;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

summary {
  list-style: none;
}

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


footer {
  padding: var(--page-padding);
}

:where(a:hover, button:hover, summary:hover, a[aria-current], details[open] > summary) {
  background: blue;
  color: white;
}

.cv-table {
  width: 100%;
  max-width: 800px;
  margin: 1em 0 2em;
  border: 2px solid #000;
  border-collapse: collapse;
}

.cv-table :where(th, td) {
  border: 1px solid #000;
  padding: 12px;
  vertical-align: top;
  text-align: left;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cv-table th {
  background: #000;
  color: #fff;
  font-weight: normal;
  text-transform: uppercase;
}

.cv-table :where(th, td):first-child {
  width: 5em;
  font-variant-numeric: tabular-nums;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 48px 32px;
}

.works-grid a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 12px;
}

.works-grid picture {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.works-grid img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.view-options {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.view-options legend,
.view-options input,
.visually-hidden,
.works-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.view-options label {
  cursor: pointer;
}

.view-options span {
  padding: 2px 4px;
}

.view-options input:checked + span {
  background: black;
  color: white;
}

.view-options label:hover span {
  background: blue;
  color: white;
}

.view-options input:focus-visible + span {
  outline: 2px solid blue;
  outline-offset: 3px;
}

.works-table {
  display: none;
}

.works-view:has(input[value="table"]:checked) .works-grid {
  display: none;
}

.works-view:has(input[value="table"]:checked) .works-table {
  display: table;
}

.works-table img {
  width: 100px;
}

.works-table td:first-child {
  width: 124px;
}

.works-table td:nth-child(2) {
  white-space: nowrap;
}

@media (max-width: 600px) {
  :root {
    --page-padding: 16px;
  }

  .site-header {
    display: block;
  }

  .site-header nav {
    margin-top: 8px;
  }

  .works-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .works-grid a {
    aspect-ratio: auto;
    padding: 0;
  }

  .works-grid picture {
    height: auto;
  }

  .works-grid img {
    width: 100%;
    height: auto;
  }

  .works-table :where(th, td):nth-child(2) {
    display: none;
  }
}

.work-images {
  max-width: 600px;
  display: grid;
  gap: 12px;
  margin: 10px 0;
}

.enlarge-image {
  display: block;
  justify-self: start;
  max-width: 100%;
  cursor: zoom-in;
}

.enlarge-image:hover {
  background: transparent;
}

.image-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  padding: var(--page-padding);
  background: white;
  color: black;
}

.image-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.image-viewer-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.image-viewer-navigation:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image-viewer-navigation button {
  min-width: 32px;
}

.image-viewer button:disabled {
  background: black;
  opacity: 0.35;
  cursor: default;
}

.image-viewer-stage {
  display: grid;
  place-items: center;
  overflow: auto;
  overscroll-behavior: contain;
}

.image-viewer-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  cursor: zoom-in;
}

.image-viewer.is-zoomed .image-viewer-stage {
  display: block;
}

.image-viewer.is-zoomed img {
  max-width: none;
  max-height: none;
  cursor: grab;
}

@media (min-width: 601px) {
  .work-images img {
    width: auto;
    max-height: max(240px, calc(100dvh - 200px));
  }
}

.work-navigation {
  display: flex;
  justify-content: space-between;
  max-width: 600px;
  margin-top: 12px;
}

.work-navigation [rel="next"] {
  margin-left: auto;
}

@media (min-width: 801px) {
  .work-media {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 10px 0;
  }

  .work-images {
    min-width: 0;
    margin: 0;
  }

  .work-navigation {
    flex-direction: column;
    flex-shrink: 0;
    gap: 8px;
    margin-top: 0;
  }

  .work-navigation [rel="next"] {
    margin-left: 0;
  }
}

main {
  min-width: 0;
  padding: var(--page-padding) var(--page-padding) 80px;
}

.table-scroll {
  overflow-x: auto;
}

.inventory-filters:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 16px 0;
}

.inventory-filters label {
  display: grid;
  gap: 4px;
  max-width: 100%;
}

.inventory-filters :where(select, input) {
  border: 1px solid black;
  padding: 6px;
  min-width: 0;
  max-width: 100%;
  background: white;
  color: black;
}

.inventory-filters button {
  padding: 7px;
}

.inventory-table {
  min-width: 1200px;
  max-width: none;
}

.inventory-table img {
  width: 80px;
}

.inventory-table :where(th, td):first-child {
  width: 104px;
}

.inventory-table td:last-child {
  min-width: 200px;
  white-space: pre-line;
}
