@font-face {
  font-family: 'VT323';
  font-style: normal;
  src: url('../fonts/vt323/VT323-Regular.ttf');
}

@font-face {
  font-family: 'Sahitya';
  font-style: normal;
  src: url('../fonts/sahitya/Sahitya-Regular.ttf');
}

@font-face {
  font-family: 'Sahitya';
  font-style: normal;
  font-weight: bold;
  src: url('../fonts/sahitya/Sahitya-Bold.ttf');
}

@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  src: url('../fonts/pt_serif/PTSerif-Regular.ttf');
}

@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: bold;
  src: url('../fonts/pt_serif/PTSerif-Bold.ttf');
}

@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  src: url('../fonts/pt_serif/PTSerif-Italic.ttf');
}

@font-face {
  font-family: 'PT Serif';
  font-style: italic;
  font-weight: bold;
  src: url('../fonts/pt_serif/PTSerif-BoldItalic.ttf');
}

@font-face {
  font-family: 'Inconsolata';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inconsolata/Inconsolata-Regular.ttf');
}

@font-face {
  font-family: 'Inconsolata';
  font-style: normal;
  font-weight: 700;
  src: url('../fonts/inconsolata/Inconsolata-Bold.ttf');
}

body {
  background-image: linear-gradient(
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.5)
  ),
                    url("/static/images/dali-sky-background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #3f3f3f;
  padding-left: 20px;
  padding-right: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Sahitya', 'PT Serif', Times, Times New Roman;
  display: flex;
  flex-direction: column;
  font-size: 14pt;
  min-width: 10ch;
}

.main-wrapper {
  flex: 1;
  min-height: 95.5vh;
}

a {
  color: #9a4048;
  text-decoration: none;
  transition: text-shadow .22s;
}

a:hover {
  text-shadow: 0px 0px 2px #cb6397;
}

a:visited {
  color: #712e2c;
  text-decoration: none;
}

div.header-logo-wrapper {
  text-align: center;
}

a.header-logo img {
  box-shadow: 0px 0px 3px #aa9c74;
  max-width: 78%;
  height: auto;
  border-radius: 10px;
}

.header-logo img,
.header-logo > img {
  max-height: 40vh;
  width: auto;
  height: auto;
}

div.navbar-menu {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-left: auto;
  margin-right: auto;
  padding: 10px;
  font-size: 1.5em;
  margin-bottom: 5px;
  font-family: 'Inconsolata', monospace;
  max-width: 760px;
  border-radius: 8px;
  border: 3px solid #cacae4;
  background: #2e2b2b;
  color: #ded8c5;
}

div.navbar-menu > div {
  margin-left: .5ch;
  margin-right: .5ch;
  justify-content: center;
  text-align: center;
}

div.navbar-menu a {
  color: #e3ddca;
  text-decoration: none;
  transition: text-shadow .3s;
  text-shadow: 0px 0px 3px #4f4d51;
}

div.navbar-menu a:hover {
  text-shadow: 0px 0px 3px #ffffff;
}

div.content-box {
  box-shadow: 0px 0px 3px #aa9c74;
  border-radius: 5px;
  background: #fffbf9;
  padding: 14px 36px;
  margin-bottom: 12px;
}

div.homepage-about {
  margin-left: 30px;
  margin-right: 30px;
}

.bigger-text {
  font-size: 16pt;
}

h1 {
  color: #3c2610;
  font-size: 1.6em;
  text-align: center;
}

h2 {
  color: #3c2610;
  font-size: 1.3em;
  text-align: center;
}

h1.title {
  text-align: left;
}

h1.title.title-with-feed {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6em;
}

.atom-feed-widget {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  position: relative;
  vertical-align: middle;
  font-size: 1rem;
}

.atom-feed-button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1;
  text-decoration: none;
}

.atom-feed-button img {
  display: inline-block;
  width: 28px;
  height: 28px;
  max-width: none;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
  flex: 0 0 auto;
}

.atom-feed-button:hover,
.atom-feed-button:focus-visible {
  text-shadow: none;
  filter: drop-shadow(0 0 3px rgba(154, 64, 72, 0.45));
}

.atom-feed-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.atom-feed-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35em;
  height: 1.35em;
  padding: 0;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: 'Inconsolata', monospace;
  font-size: 0.9rem;
  line-height: 1;
  cursor: help;
}

.atom-feed-help-popup {
  display: none;
  position: absolute;
  z-index: 50;
  top: calc(100% + 0.45rem);
  left: 0;
  width: min(28rem, calc(100vw - 3rem));
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #fffbf9;
  color: #3f3f3f;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  font-family: 'Sahitya', 'PT Serif', Times, Times New Roman;
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
}

.atom-feed-help:hover .atom-feed-help-popup,
.atom-feed-help:focus-within .atom-feed-help-popup {
  display: block;
}

.tags-list {
  padding-left: 2ch;
}

.tags-list li {
  margin: 0.25em 0;
}

.tags-list .atom-feed-widget {
  margin-left: 0.75em;
}

.footer {
  font-size: 10pt;
  text-align: center;
}

.footer span {
  background: #fffbf9;
  padding: 1px 5px;
  border-radius: 5px;
}

.footer > a:hover {
  text-shadow: 0px 0px 1px #a981a9;
}

div.code {
  border-radius: 5px;
  border: 3px solid #110e13;
  background: #110e13;
  padding: 20px;
  margin: 20px;
  overflow: hidden;
  white-space: pre;
  font-family: 'Inconsolata', monospace;
}

.blogpost {
  margin-top: 10px;
  margin-bottom: 10px;
}

.blogpost .post-body img {
  max-width: min(100%, 760px);
  max-height: 70vh;
  width: auto;
  height: auto;
}

/* If a paragraph has multiple adjacent images/videos, lay them out inline/wrapped. */
.blogpost .post-body p:has(:is(img, video) + :is(img, video)) {
  text-align: center;
}

.blogpost .post-body p:has(:is(img, video) + :is(img, video)) :is(img, video) {
  display: inline-block;
  vertical-align: middle;
  max-width: min(100%, 360px);
  max-height: 45vh;
  width: auto;
  height: auto;
  margin: 0.25em;
}


.blogpost .post-body img.blogpost-lightbox-image {
  cursor: zoom-in;
}

.blogpost .post-body img.blogpost-lightbox-image:focus-visible {
  outline: 3px solid #9a4048;
  outline-offset: 3px;
  border-radius: 8px;
}

.blogpost .post-body video {
  display: block;
  margin: 1em auto;
  max-width: min(100%, 760px);
  max-height: 70vh;
  width: 100%;
  height: auto;
}

.blogpost .post-body audio {
  display: block;
  margin: 1em auto;
  width: min(100%, 760px);
}

.blogpost .post-about,
.light-card .post-about,
.light-gallery-date {
  margin-top: 0;
  font-size: .75em;
  color: #595a51;
}

.blogpost .post-about {
  margin-top: -5px;
}

.blogpost .title a {
  color: #ffffff;
}

.news-header {
  border-radius: 5px;
  border: 2px solid #2c2a2c;
  margin: 15px 350px;
  text-align: center;
  background: #2c2a2c;
}

.news-header h3 {
  color: #f2d7f2;
  margin-top: 5px;
  margin-bottom: 3px;
}

.homepage-video-box {
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.homepage-video-box video {
  width: min(960px, 100%);
  height: auto;
  padding-bottom: 1em;
}

.homepage-news-items {
  list-style: none;
  padding-left: 2ch;
}

.news-feed-content {
  padding-left: 2ch;
  margin-bottom: 1em;
}

.news-feed-item-date {
  font-style: italic;
  margin-right: 1em;
}

.news-feed-content p {
  margin-top: .5em;
  margin-bottom: .5em;
}

.news-feed-content img {
  max-height: 10em;
}

.consume-more-buttons {
  padding-left: 2ch;
}

video {
  outline: none !important;
}

.post-audio,
.post-video {
  margin-top: .5em;
  width: 100%;
}

hr.pre-follow-us {
  border-top: 1px dashed #3f3f3f;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
}

.follow-us {
  text-align: center;
}

.teacup-avatar {
  float: left;
  margin: 10px 8px 10px 0;
  border-radius: 8px;
  overflow: hidden;
}

.site-main-content img {
  display: block;
  margin: auto;
  max-width: 100%;
  height: auto;
}

img.handc-logo {
  border-radius: 10px;
}

.light-grid {
  column-count: 2;
  column-gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.light-grid > li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 18px 0;
  padding: 0;
}

.light-card {
  display: block;
  width: 100%;
  background: #fffbf9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0px 0px 4px #aa9c74;
}

.light-card-link {
  display: block;
  color: inherit;
  padding: 0;
}

.light-card-link:hover,
.light-slide-trigger:hover,
.light-slide-trigger:focus {
  text-shadow: none;
}

.light-card img,
.light-card video,
.light-card audio,
.light-slide img,
.light-slide video,
.light-slide audio {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}

.light-card-title,
.light-card .post-about {
  padding-left: 12px;
  padding-right: 12px;
}

.light-card-title {
  display: block;
  padding-top: 10px;
  padding-bottom: 4px;
  font-family: 'Inconsolata', monospace;
  font-size: 1em;
  line-height: 1.3;
  word-break: break-word;
}

.light-card .post-about {
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 2px;
}

.light-gallery {
  width: 100%;
}

.light-gallery-body {
  margin: 1rem 0 2rem 0;
}

.light-slideshow {
  column-count: 3;
  column-gap: 18px;
  align-items: initial;
}

.light-slide-column-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  margin: 0 0 18px 0;
  display: block;
}

.light-slide {
  display: inline-block;
  width: 100%;
  background: #fffbf9;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0px 0px 4px #aa9c74;
  height: auto;
}

.light-slide-trigger {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.light-slide-trigger:focus-visible {
  outline: 3px solid #9a4048;
  outline-offset: 3px;
  border-radius: 14px;
}

.light-audio-slide {
  padding-top: 10px;
}

.light-slide-caption {
  display: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.lightbox[aria-hidden="false"] {
  display: block;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 10, 12, 0.9);
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: default;
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: 0 minmax(0, 1fr) 0;
  grid-template-rows: 0 minmax(0, 1fr) 0;
  grid-template-areas:
    ". . ."
    "prev media next"
    ". . .";
  align-items: stretch;
  justify-items: stretch;
}

.lightbox-close-row {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: flex;
  justify-content: flex-end;
  padding: 0;
  pointer-events: none;
}

.lightbox-close,
.lightbox-nav {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.lightbox-close {
  min-width: 48px;
  min-height: 48px;
  font-size: 1.5rem;
  line-height: 1;
  pointer-events: auto;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 96px;
  margin-top: -48px;
  font-size: 2.4rem;
  line-height: 1;
}

.lightbox-nav.prev {
  left: 18px;
  grid-area: prev;
}

.lightbox-nav.next {
  right: 18px;
  grid-area: next;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: none;
}

.lightbox-media-wrap {
  grid-area: media;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-media {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  border-radius: 0;
  box-shadow: none;
}

.lightbox-media.audio {
  width: min(900px, calc(100vw - 140px));
  max-width: min(900px, calc(100vw - 140px));
  max-height: none;
  background: #1c1a1a;
  padding: 28px;
  border-radius: 14px;
  box-shadow: 0px 0px 18px rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
  display: none;
}

.lightbox-counter {
  display: none;
}

body.lightbox-open {
  overflow: hidden;
}

@media (min-width: 1500px) {
  body {
    max-width: 1400px;
  }

  .light-grid {
    column-count: 2;
    column-gap: 22px;
  }

  .light-grid > li {
    margin-bottom: 22px;
  }

  .light-slideshow {
    column-count: 3;
    column-gap: 22px;
  }

  .light-slide-column-item {
    margin-bottom: 22px;
  }
}

@media (max-width: 1200px) {
  body {
    max-width: 1100px;
  }

  .light-grid {
    column-count: 2;
    column-gap: 14px;
  }

  .light-grid > li {
    margin-bottom: 14px;
  }

  .light-slideshow {
    column-count: 3;
    column-gap: 14px;
  }

  .light-slide-column-item {
    margin-bottom: 14px;
  }
}

@media (max-width: 900px) {
  body {
    max-width: 1024px;
  }

  .light-grid {
    column-count: 2;
    column-gap: 12px;
  }

  .light-grid > li {
    margin-bottom: 12px;
  }

  .light-slideshow {
    column-count: 2;
    column-gap: 12px;
  }

  .light-slide-column-item {
    margin-bottom: 12px;
  }
}

@media (max-width: 700px) {
  body {
    max-width: 1024px;
  }

  .light-grid {
    column-count: 1;
    column-gap: 0;
  }

  .light-grid > li {
    margin-bottom: 10px;
  }

  .light-gallery {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
  }

  .light-slideshow {
    column-count: 2;
    column-gap: 10px;
  }

  .light-slide-column-item {
    margin-bottom: 10px;
  }

  .light-slide,
  .light-card {
    border-radius: 10px;
  }

  .lightbox-dialog {
    display: block;
    height: 100vh;
    width: 100%;
  }

  .lightbox-close-row {
    top: 0;
    right: 0;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding: 12px;
    pointer-events: none;
  }

  .lightbox-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.45);
  }

  .lightbox-nav,
  .lightbox-caption {
    display: none !important;
  }

  .lightbox-media-wrap {
    height: 100vh;
    width: 100vw;
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-media {
    display: block;
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
    margin: auto;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
  }

  .lightbox-media.audio,
  .lightbox-media.video {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

@media (max-width: 420px) {
  .light-gallery {
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-right: -12px;
  }

  .light-slideshow {
    column-count: 2;
    column-gap: 8px;
  }

  .light-slide-column-item {
    margin-bottom: 8px;
  }

  .light-slide,
  .light-card {
    border-radius: 8px;
  }

  .lightbox-close-row {
    padding: 10px;
  }

  .lightbox-close {
    min-width: 40px;
    min-height: 40px;
    font-size: 1.2rem;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f3ede5;
    background-color: #1c1a1a;
    background-image: linear-gradient(
      rgba(15, 14, 14, 0.74),
      rgba(15, 14, 14, 0.74)
    ),
                      url("/static/images/dali-sky-background.jpg");
  }

  div.content-box,
  .footer span,
  .light-card,
  .light-slide {
    background: #262222;
  }

  div.content-box,
  a.header-logo img,
  div.navbar-menu,
  .light-card,
  .light-slide,
  div.code {
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.45);
  }

  div.content-box,
  .footer span,
  div.code,
  .light-card-title {
    color: #f3ede5;
  }

  div.navbar-menu {
    background: #191717;
    border-color: #5b5768;
    color: #efe7d6;
  }

  div.navbar-menu a {
    color: #f3ead5;
    text-shadow: 0px 0px 3px #000;
  }

  div.navbar-menu a:hover {
    text-shadow: 0px 0px 6px #ffffff;
  }

  h1, h2, h3, h4 {
    color: #ead29a;
  }

  .news-header {
    background: #191717;
    border-color: #5b5768;
  }

  .news-header h3 {
    color: #f1dff1;
  }

  a {
    color: #ff9ca8;
  }

  a:visited {
    color: #f2b6bd;
  }

  a:hover {
    text-shadow: 0px 0px 6px rgba(255, 182, 193, 0.25);
  }

  .blogpost .post-about,
  .light-card .post-about,
  .light-gallery-date {
    color: #a4a695;
  }

  .footer span {
    color: #ddd3c3;
  }

  div.code {
    background: #111014;
    border-color: #111014;
  }

  hr.pre-follow-us {
    border-top-color: #8c867d;
  }

  .site-main-content img:not(.header-logo img):not(.handc-logo) {
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.35);
    border-radius: 8px;
  }

  video,
  audio {
    filter: brightness(0.92) contrast(1.02);
  }

  .light-slide-trigger:focus-visible,
  .blogpost .post-body img.blogpost-lightbox-image:focus-visible {
    outline-color: #ff9ca8;
  }

  @media (max-width: 700px) {
    .lightbox-close {
      background: rgba(0, 0, 0, 0.55);
    }
  }

  .atom-feed-help-popup {
    background: #262222;
    color: #f3ede5;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
  }
}
