@font-face {
  font-family: "Libre Baskerville";
  src: url("/fonts/libre-baskerville/LibreBaskerville-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("/fonts/libre-baskerville/LibreBaskerville-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  background: #0f1115;
  color: #e6e8ee;
  font-family: "Libre Baskerville", Georgia, "Times New Roman", serif;
  min-height: 100vh;
  padding-top: 70px;
  padding-bottom: 80px;
}

footer.footer {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1030;
}

@media (min-width: 1200px) {
  .container {
    max-width: 960px;
  }
}

a {
  color: #8fb3ff;
}

a:hover {
  color: #b8ccff;
}

.navbar,
.footer,
.card {
  background: #151922 !important;
  color: #e6e8ee;
  border-color: #2b3240 !important;
}

.navbar .nav-link,
.navbar .navbar-brand {
  color: #e6e8ee !important;
}

.navbar .nav-link:hover,
.navbar .navbar-brand:hover {
  color: #ffffff !important;
}

.text-muted {
  color: #a1a8b5 !important;
}

.blog-preview {
  background: #121620;
  border-color: #2b3240;
}

.form-control,
.form-select {
  background-color: #121620;
  color: #e6e8ee;
  border-color: #2b3240;
}

.form-control:focus,
.form-select:focus {
  background-color: #121620;
  color: #e6e8ee;
  border-color: #4c6fff;
  box-shadow: 0 0 0 0.2rem rgba(76, 111, 255, 0.2);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.blog-editor {
  display: grid;
  gap: 1rem;
}

.blog-markdown {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.blog-markdown.blog-markdown-drop {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

.blog-preview {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  padding: 1rem;
  min-height: 220px;
  background: #f8f9fa;
}

body .blog-preview {
  background: #121620;
  border-color: #2b3240;
  color: #e6e8ee;
}

.blog-toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.blog-size-label {
  margin-bottom: 0;
}

.blog-size-select {
  width: auto;
  min-width: 140px;
}

.blog-post-body pre {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #f1f3f5;
}

.blog-post-body code {
  background: #f1f3f5;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
}

.blog-post-body img,
.blog-preview img {
  max-width: 100%;
  height: auto;
}

.landing-body img {
  max-width: 100%;
  height: auto;
}

.landing-hero {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid #2b3240;
}

.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gallery-card {
  background: #151922;
  border: 1px solid #2b3240;
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.gallery-image {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #2b3240;
  display: block;
}

.gallery-caption {
  margin-top: 0.5rem;
  color: #a1a8b5;
}

.gallery-dropzone {
  border: 1px dashed #2b3240;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #121620;
}

.gallery-dropzone-active {
  border-color: #4c6fff;
  box-shadow: 0 0 0 0.2rem rgba(76, 111, 255, 0.2);
}

.gallery-lightbox-image {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  border: 1px solid #2b3240;
}

.gallery-lightbox-caption {
  margin-top: 0.75rem;
  color: #a1a8b5;
  text-align: center;
}

.gallery-caption-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #2b3240;
  border-radius: 999px;
  color: #e6e8ee;
  background: #151922;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.footer-social-link:hover {
  border-color: #4c6fff;
  transform: translateY(-2px);
  color: #ffffff;
}

.footer-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-custom-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.social-icon-preview {
  width: 48px;
  height: 48px;
  display: block;
}

.footer-icon-fetlife {
  color: #d94a4a;
}

.site-logo {
  height: 36px;
  max-width: 160px;
  object-fit: contain;
}

.site-logo-preview {
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
}

.card h2.h6,
.card h3.h6 {
  font-size: 1rem;
}

@media (min-width: 992px) {
  .blog-editor {
    grid-template-columns: 1fr 1fr;
  }

  .blog-editor > .mb-3:nth-of-type(1),
  .blog-editor > .mb-3:nth-of-type(2) {
    grid-column: 1 / 2;
  }

  .blog-editor > .mb-3:nth-of-type(3) {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .blog-editor > .d-flex {
    grid-column: 1 / 3;
  }
}
