:root {
  --background-color: #fff;
  --text-color: #111;
  --muted-color: rgba(0, 0, 0, 0.45);
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--background-color);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  font-weight: 300;
  font-size: 11pt;
  line-height: 1.35;
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.content {
  padding: 40px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact {
  margin: auto 0 0 0;
  padding-top: 2.5em;
}

p {
  margin: 0 0 1em 0;
  width: 37ch;
  max-width: 100%;
}

.signature {
  margin: 2.5em 0 0 0;
}

.links {
  list-style: none;
  margin: 2.5em 0 0 0;
  padding: 0;
}

.links li {
  margin: 2px 0 0 0;
}

a {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: olive;
}

/* external links get ↗ after the word */
a[href^="http"]:not([href*="jean-rene-jean.com"])::after {
  content: "\2197";
  display: inline-block;
  margin-left: 0.15em;
}

.muted {
  color: var(--muted-color);
}

.post-media,
.post-body {
  width: 37ch;
  max-width: 100%;
  margin: 0 0 1em 0;
}

.post-media img,
.post-body img {
  display: block;
  width: 100%;
  height: auto;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2.5em;
}

.feed-post + .feed-post {
  margin-top: 4em;
}

.track {
  display: flex;
  gap: 12px;
  align-items: center;
  box-sizing: border-box;
  width: 37ch;
  max-width: 100%;
  margin: 0 0 1em 0;
  border: 1px dotted rgba(0, 0, 0, 0.2);
}

.track-cover {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.06);
}

.track-play {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}

.track-play:hover:not(:disabled) {
  color: olive;
  border-color: olive;
}

.track-play:disabled {
  color: var(--muted-color);
  cursor: default;
}

.track-meta {
  min-width: 0;
}

.track-title {
  display: block;
}

.status-on {
  color: olive;
}

.status-off {
  color: #c00;
}

input,
textarea,
button {
  font: inherit;
  color: inherit;
}

form input,
form textarea {
  display: block;
  box-sizing: border-box;
  width: 37ch;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: transparent;
}

form input[type="checkbox"] {
  display: inline-block;
  width: auto;
  padding: 0;
}

form input[type="file"] {
  border: 1px dotted rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

form input[type="file"]::file-selector-button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin-right: 1ch;
  cursor: pointer;
}

form textarea {
  resize: vertical;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-color: var(--text-color);
}

form button {
  display: block;
  box-sizing: border-box;
  width: 37ch;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px dotted rgba(0, 0, 0, 0.2);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

form button:hover {
  color: olive;
  border-color: olive;
}

form button:disabled {
  color: var(--muted-color);
  cursor: default;
}

.project-blocks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 37ch;
  max-width: 100%;
  margin: 0 0 1em 0;
}

.project-block {
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border: 1px dotted rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

#sections .project-block {
  aspect-ratio: auto;
  flex-direction: row;
}

#vform {
  margin-top: 2.5em;
}

a.project-block:hover {
  color: olive;
  border-color: olive;
}

.project-block.active {
  color: olive;
  border-color: olive;
}

.project-status {
  color: var(--muted-color);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 37ch;
  max-width: 100%;
  margin: 0 0 1em 0;
}

.thumbs:empty {
  display: none;
}

.thumbs img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: cover;
  cursor: pointer;
}

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  cursor: pointer;
}

#lightbox[hidden] {
  display: none;
}

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
}

@media (min-width: 801px) {
  .content {
    align-items: center;
  }

  .contact {
    display: flex;
    justify-content: space-between;
  }
}

@media (max-width: 800px) {
  .content {
    padding: 20px;
  }

  p,
  .post-media,
  .post-body,
  .thumbs,
  .track,
  .project-blocks {
    width: auto;
  }

  form input,
  form textarea {
    font-size: 16px;
  }

  form input,
  form textarea,
  form button {
    width: 100%;
  }
}
