/*
Theme Name: Astab
Theme URI: https://astab.nl/
Author: Astab
Description: Minimal portfolio theme for projects and experiments.
Version: 1.0.10
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: astab
*/

:root {
  --color-paper: #fffcf1;
  --color-ink: #1d1d1d;
  --color-white: #ffffff;
  --font-mono-light: "Azeret Mono", monospace;
  --font-mono-regular: "Azeret Mono", monospace;
  --font-mono-semibold: "Azeret Mono", monospace;
  --line: 1px solid var(--color-ink);
  --page-max-width: 840px;
  --page-min-height: 120svh;
  --page-padding-inline: clamp(0px, 6vw, 300px);
  --content-padding: 16px;
  --section-padding-block: 4px;
  --header-padding-block: 8px;
  --hero-media-size: 115px;
  --card-media-width: clamp(84px, 13vw, 112px);
  --card-media-ratio: 4 / 3;
  --post-media-ratio: 16 / 9;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  scrollbar-color: #424240 #fdfaef;
}

*::-webkit-scrollbar {
  width: 3px;
  height: 3px;
}

*::-webkit-scrollbar-track {
  background-color: #fdfaef;
  border-radius: 0;
  padding: 1px;
}

*::-webkit-scrollbar-track:hover,
*::-webkit-scrollbar-track:active {
  background-color: #fdfaef;
}

*::-webkit-scrollbar-thumb {
  background-color: #424240;
  border-radius: 0;
  min-height: 10px;
}

*::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:active {
  background-color: #424240;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

html,
body {
  margin: 0;
}

body.astab-dark-mode {
  --color-paper: #1d1d1d;
  --color-ink: #fffcf1;
  --color-white: #1d1d1d;
}

menu,
ol,
ul {
  list-style-type: none;
}

img {
  display: block;
  max-width: 100%;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  overflow-x: hidden;
  text-transform: lowercase;
}

a {
  color: inherit;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 1px;
}

.work-card:hover {
  text-decoration: none;
}

strong {
  font-weight: 600;
}

.screen {
  background: var(--color-paper);
  padding: 0 var(--page-padding-inline);
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
  min-height: var(--page-min-height);
  position: relative;
  overflow-x: hidden;
}

.page {
  border-left: var(--line);
  border-right: var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  align-self: stretch;
  flex: 1;
  width: 100%;
  max-width: var(--page-max-width);
  min-height: var(--page-min-height);
  position: relative;
}

.page-content,
.site-footer,
.work-section,
.contact,
.site-footer__copyright,
.post-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
}

.page-content {
  align-items: center;
  flex: 1;
  width: 100%;
}

.site-header {
  border-top: var(--line);
  border-bottom: var(--line);
  padding: var(--header-padding-block) var(--content-padding);
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
}

.site-title,
.hero-title,
.section-title,
.contact-title {
  color: var(--color-ink);
  text-align: left;
  font-family: var(--font-mono-semibold);
  font-size: 20px;
  font-weight: 600;
  position: relative;
}

.site-nav {
  display: flex;
  flex-direction: row;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 1;
  position: relative;
}

.nav-link,
.section-link,
.body-copy,
.contact-copy,
.work-date,
.site-footer__text,
.button {
  color: var(--color-ink);
  text-align: left;
  font-family: var(--font-mono-light);
  font-weight: 300;
  position: relative;
}

.nav-link,
.section-link,
.body-copy,
.contact-copy,
.site-footer__text,
.button {
  font-size: 16px;
}

.hero,
.post-intro {
  border-bottom: var(--line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
}

.post-intro__body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  align-self: stretch;
}

.hero-content,
.post-intro__content {
  padding: var(--content-padding);
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  position: relative;
}

.hero-title {
  align-self: stretch;
  min-height: 20px;
}

.body-copy {
  line-height: 16px;
  max-width: 500px;
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.body-copy,
.post-block__copy,
.contact-copy,
.post-kicker {
  text-align: justify;
}

.post-block--no-justify .post-block__copy {
  text-align: left;
}

.hero-image {
  border-bottom: var(--line);
  align-self: center;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  min-height: 160px;
  object-fit: cover;
}

.section-header,
.contact-header,
.site-footer__bar {
  border-bottom: var(--line);
  padding: var(--section-padding-block) var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
}

.contact-header,
.site-footer__bar {
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  justify-content: center;
}

.contact-header {
  border-top: var(--line);
}

.section-header {
  flex-direction: row;
}

.site-footer {
  margin-top: -1px;
}

.work-section--related {
  margin-top: auto;
}

.work-section--related-border .section-header {
  border-top: var(--line);
}

.work-section--related .work-card {
  border-bottom: 0;
}

.work-section--related .work-card:nth-child(n + 3) {
  border-top: var(--line);
}

.work-grid {
  align-self: stretch;
  flex-shrink: 0;
  display: grid;
  gap: 0;
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, fit-content(100%));
}

.work-card {
  border-bottom: var(--line);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  position: relative;
  color: var(--color-ink);
  min-width: 0;
}

.work-card:nth-child(odd) {
  border-right: var(--line);
}

.work-card__media {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  align-self: stretch;
  flex-shrink: 0;
  width: var(--card-media-width);
  position: relative;
}

.work-card__image {
  border-right: var(--line);
  align-self: stretch;
  flex: 1;
  width: 100%;
  min-height: 84px;
  aspect-ratio: var(--card-media-ratio);
  object-fit: cover;
}

.work-card__content {
  padding: var(--content-padding);
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  position: relative;
}

.work-card__info {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-start;
  justify-content: center;
  flex: 1;
  min-width: 0;
  position: relative;
}

.work-title {
  color: var(--color-ink);
  text-align: left;
  font-family: var(--font-mono-semibold);
  font-size: 16px;
  font-weight: 600;
  position: relative;
  align-self: stretch;
  overflow-wrap: anywhere;
}

.work-subtitle {
  color: var(--color-ink);
  text-align: left;
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
  position: relative;
  max-width: 200px;
  width: 100%;
  overflow-wrap: anywhere;
}

.work-date {
  font-size: 16px;
  align-self: flex-end;
  flex: 0 0 auto;
  margin-top: auto;
  white-space: nowrap;
}

.contact-content {
  padding: var(--content-padding);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
  justify-content: flex-start;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
}

.contact-copy {
  max-width: 500px;
  width: 100%;
}

.contact-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  flex-shrink: 0;
  position: relative;
}

.contact-actions--stacked {
  flex-direction: column;
}

.button {
  border: var(--line);
  background: var(--color-paper);
  padding: 4px 8px;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.button--primary {
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-mono-regular);
  font-weight: 400;
}

.site-footer__copyright {
  border-top: var(--line);
}

.post-kicker {
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
  max-width: 500px;
  width: 100%;
}

.post-intro__meta {
  padding: var(--content-padding);
  display: flex;
  flex: 0 0 min(50%, 260px);
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
}

.post-intro__location {
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
  line-height: 16px;
  max-width: 150px;
  text-align: justify;
  width: 150px;
}

.post-intro__date {
  color: var(--color-ink);
  font-family: var(--font-mono-semibold);
  font-size: 16px;
  font-weight: 600;
  line-height: 16px;
  text-align: end;
  white-space: nowrap;
}

.post-thumb {
  border-bottom: var(--line);
  align-self: center;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: 160px;
  object-fit: cover;
}

.intro-image.post-block--aspect-1-1 {
  aspect-ratio: 1 / 1;
}

.intro-image.post-block--aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.intro-image.post-block--aspect-3-4 {
  aspect-ratio: 3 / 4;
}

.intro-image.post-block--aspect-16-9 {
  aspect-ratio: 16 / 9;
}

.intro-image.post-block--aspect-9-16 {
  aspect-ratio: 9 / 16;
}

.post-section-title {
  align-self: stretch;
  width: 100%;
}

.post-block {
  border-bottom: var(--line);
  display: grid;
  grid-template-columns: minmax(0, var(--post-section-image-width, 45%)) minmax(0, 1fr);
  align-items: stretch;
  align-self: stretch;
  width: 100%;
}

.post-block--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, var(--post-section-image-width, 45%));
}

.post-block__media {
  aspect-ratio: var(--post-media-ratio);
  min-height: 190px;
}

.post-block__image,
.post-block__gif-shell,
.post-block__gif-poster,
.post-block__gif-image,
.post-block__video-shell,
.post-block__video {
  width: 100%;
  height: 100%;
  min-height: 190px;
  aspect-ratio: var(--post-media-ratio);
  object-fit: cover;
}

.post-block__video-shell {
  display: flex;
  flex-direction: column;
}

.post-block__gif-shell {
  display: block;
  overflow: hidden;
  position: relative;
}

.post-block__gif-poster,
.post-block__gif-image {
  display: block;
  inset: 0;
  position: absolute;
}

.post-block__gif-image {
  opacity: 0;
}

.post-block__gif-shell.is-loaded .post-block__gif-image {
  opacity: 1;
}

.post-block__gif-shell.is-loaded .post-block__gif-poster {
  opacity: 0;
}

.post-block__video {
  border: 0;
  display: block;
  flex: 1;
  min-height: 0;
}

.post-block__image-button {
  border: 0;
  cursor: pointer;
  display: block;
  padding: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.post-block__image-button:hover {
  cursor: none;
}

.post-block--aspect-1-1 .post-block__image,
.post-block--aspect-1-1 .post-block__gif-shell,
.post-block--aspect-1-1 .post-block__gif-poster,
.post-block--aspect-1-1 .post-block__gif-image,
.post-block--aspect-1-1 .post-block__video-shell,
.post-block--aspect-1-1 .post-block__video {
  aspect-ratio: 1 / 1;
}

.post-block--aspect-4-3 .post-block__image,
.post-block--aspect-4-3 .post-block__gif-shell,
.post-block--aspect-4-3 .post-block__gif-poster,
.post-block--aspect-4-3 .post-block__gif-image,
.post-block--aspect-4-3 .post-block__video-shell,
.post-block--aspect-4-3 .post-block__video {
  aspect-ratio: 4 / 3;
}

.post-block--aspect-3-4 .post-block__image,
.post-block--aspect-3-4 .post-block__gif-shell,
.post-block--aspect-3-4 .post-block__gif-poster,
.post-block--aspect-3-4 .post-block__gif-image,
.post-block--aspect-3-4 .post-block__video-shell,
.post-block--aspect-3-4 .post-block__video {
  aspect-ratio: 3 / 4;
}

.post-block--aspect-16-9 .post-block__image,
.post-block--aspect-16-9 .post-block__gif-shell,
.post-block--aspect-16-9 .post-block__gif-poster,
.post-block--aspect-16-9 .post-block__gif-image,
.post-block--aspect-16-9 .post-block__video-shell,
.post-block--aspect-16-9 .post-block__video {
  aspect-ratio: 16 / 9;
}

.post-block--aspect-9-16 .post-block__image,
.post-block--aspect-9-16 .post-block__gif-shell,
.post-block--aspect-9-16 .post-block__gif-poster,
.post-block--aspect-9-16 .post-block__gif-image,
.post-block--aspect-9-16 .post-block__video-shell,
.post-block--aspect-9-16 .post-block__video {
  aspect-ratio: 9 / 16;
}

.post-block__media:first-child,
.post-block__image:first-child,
.post-block__image-button:first-child,
.post-block__gif-shell:first-child,
.post-block__video:first-child,
.post-block__video-shell:first-child {
  border-right: var(--line);
}

.post-block__media:last-child,
.post-block__image:last-child,
.post-block__image-button:last-child,
.post-block__gif-shell:last-child,
.post-block__video:last-child,
.post-block__video-shell:last-child {
  border-left: var(--line);
}

.post-block__text,
.post-content > .post-block .post-block__text {
  padding: var(--content-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.post-block__copy,
.post-content p {
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
  line-height: 16px;
  width: 100%;
  overflow-wrap: anywhere;
}

.post-block--text-only {
  display: block;
}

.post-block--text-only .post-block__text {
  justify-content: flex-start;
}

.post-block--image-only {
  display: block;
}

.post-block--image-only .post-block__image,
.post-block--video-only .post-block__video-shell {
  border-left: 0;
  border-right: 0;
  width: 100%;
}

.post-block--image-only .post-block__image-button {
  border-left: 0;
  border-right: 0;
}

.post-block--video-only {
  display: block;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 500px);
}

.contact-page {
  align-self: stretch;
  width: 100%;
}

.contact-content--page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
}

.contact-page__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
}

.contact-form input,
.contact-form textarea {
  border: var(--line);
  background: var(--color-paper);
  color: var(--color-ink);
  font: inherit;
  padding: 8px;
  width: 100%;
}

.astab-modal[hidden] {
  display: none;
}

.astab-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--color-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.astab-modal-open {
  overflow: hidden;
}

.astab-modal-open .screen {
  visibility: hidden;
}

.astab-modal__panel {
  border: var(--line);
  background: var(--color-paper);
  padding: 54px 12px 12px;
  position: relative;
  width: auto;
  min-width: 180px;
  min-height: 120px;
  max-width: min(calc(100vw - 48px), 1000px);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.astab-modal__close {
  color: var(--color-ink);
  cursor: pointer;
  font-family: var(--font-mono-light);
  font-size: 32px;
  font-weight: lighter;
  position: absolute;
  top: 8px;
  right: 12px;
  line-height: 1;
  z-index: 2;
}

.astab-modal__image {
  max-width: 100%;
  max-height: calc(100vh - 126px);
  object-fit: contain;
  visibility: visible;
}

.astab-modal.is-loading .astab-modal__image {
  visibility: hidden;
}

.astab-modal__loader {
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  position: absolute;
}

.astab-modal:not(.is-loading) .astab-modal__loader {
  display: none;
}

.astab-modal__caption {
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 16px;
  font-weight: 300;
  line-height: 16px;
  min-height: 16px;
  text-align: center;
  width: 100%;
}

.astab-modal__caption[hidden] {
  display: none;
}

.astab-modal__caption a {
  color: inherit;
  text-decoration: underline;
}

.astab-modal__caption-line {
  display: block;
}

.astab-cursor-label {
  border: var(--line);
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-mono-light);
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  padding: 4px 8px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999998;
  pointer-events: none;
  transform: translate(12px, 12px);
}

.post-content > p,
.post-content > h2,
.post-content > h3,
.post-content > ul,
.post-content > ol {
  border-bottom: var(--line);
  padding: var(--content-padding);
  align-self: stretch;
}

.post-content h2,
.post-content h3 {
  font-family: var(--font-mono-semibold);
  font-weight: 600;
}

@media (max-width: 900px) {
  :root {
    --page-padding-inline: 0;
  }

  .page {
    border-left: 0;
    border-right: 0;
    max-width: none;
  }
}

@media (max-width: 840px) {
  .work-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .work-card,
  .work-card:nth-child(odd) {
    border-right: 0;
  }

  .work-section--related .work-card:nth-child(n + 2) {
    border-top: var(--line);
  }

  .work-card__content {
    align-items: stretch;
    gap: 4px;
  }

  .work-subtitle {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .post-block,
  .post-block--reverse {
    grid-template-columns: 1fr;
  }

  .contact-content--page {
    grid-template-columns: 1fr;
  }

  .post-block--reverse .post-block__media,
  .post-block--reverse .post-block__image,
  .post-block--reverse .post-block__image-button,
  .post-block--reverse .post-block__gif-shell,
  .post-block--reverse .post-block__video,
  .post-block--reverse .post-block__video-shell {
    order: -1;
  }

  .post-block__media:first-child,
  .post-block__media:last-child,
  .post-block__image:first-child,
  .post-block__image:last-child,
  .post-block__image-button:first-child,
  .post-block__image-button:last-child,
  .post-block__gif-shell:first-child,
  .post-block__gif-shell:last-child,
  .post-block__video:first-child,
  .post-block__video:last-child,
  .post-block__video-shell:first-child,
  .post-block__video-shell:last-child {
    border-left: 0;
    border-right: 0;
    border-bottom: var(--line);
  }
}

@media (max-width: 520px) {
  :root {
    --content-padding: 12px;
    --hero-media-size: 96px;
  }

  .post-intro__body {
    flex-direction: column;
  }

  .post-intro__meta {
    border-top: var(--line);
    flex-basis: auto;
    flex-direction: row;
  }

  .post-intro__date {
    text-align: left;
  }

  .work-card {
    flex-direction: column;
  }

  .work-card__media {
    width: 100%;
  }

  .work-card__image {
    border-right: 0;
    border-bottom: var(--line);
    min-height: auto;
  }

  .contact-actions {
    flex-wrap: wrap;
  }
}
