/* =========================================
   Bite Marks Tumblr-Style Theme
   ========================================= */

:root {
  --background: #170001;
  --background-dark: #090909;
  --background-soft: #210204;

  --post-background: #f4eee8;
  --post-background-dark: #121212;

  --text-dark: #171717;
  --text-light: #f6f0eb;
  --text-muted: #9b8f8b;

  --red: #9f0712;
  --red-bright: #d11222;
  --red-dark: #5f0209;
  --red-glow: rgba(209, 18, 34, 0.22);

  --border-light: rgba(255, 255, 255, 0.12);
  --border-dark: rgba(0, 0, 0, 0.14);

  --sidebar-width: 280px;
  --feed-width: 640px;

  --shadow:
    0 18px 45px rgba(0, 0, 0, 0.34),
    0 2px 8px rgba(0, 0, 0, 0.28);

  --transition: 180ms ease;
}


/* =========================================
   Reset
   ========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-light);
  background:
    radial-gradient(
      circle at 18% 15%,
      rgba(155, 0, 14, 0.28),
      transparent 28rem
    ),
    radial-gradient(
      circle at 92% 72%,
      rgba(90, 0, 10, 0.2),
      transparent 32rem
    ),
    linear-gradient(
      145deg,
      #120001 0%,
      var(--background) 45%,
      #080808 100%
    );
  font-family:
    "Courier New",
    Courier,
    monospace;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.045) 0,
      rgba(0, 0, 0, 0.045) 1px,
      transparent 1px,
      transparent 5px
    );
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}


/* =========================================
   Loading Screen
   ========================================= */

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: #050505;
  transition:
    opacity 500ms ease,
    visibility 500ms ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: min(560px, 78vw);
  max-height: 68vh;
  object-fit: contain;
  filter:
    drop-shadow(0 0 24px rgba(190, 0, 20, 0.34))
    contrast(1.04);
  animation: loadingPulse 850ms ease-in-out infinite alternate;
}

@keyframes loadingPulse {
  from {
    transform: scale(0.985);
    opacity: 0.76;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* =========================================
   Main Layout
   ========================================= */

.site-shell {
  width: min(
    calc(var(--sidebar-width) + var(--feed-width) + 100px),
    calc(100% - 48px)
  );
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, var(--feed-width));
  gap: 72px;
  align-items: start;
  padding: 72px 0 100px;
}

.sidebar {
  position: sticky;
  top: 48px;
  width: 100%;
  padding: 24px 20px 22px;
  overflow: hidden;
  color: var(--text-light);
  background:
    linear-gradient(
      165deg,
      rgba(22, 22, 22, 0.96),
      rgba(5, 5, 5, 0.96)
    );
  border: 1px solid var(--border-light);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.38),
    inset 0 0 0 1px rgba(160, 0, 18, 0.08);
}

.sidebar::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -90px;
  bottom: -95px;
  border-radius: 50%;
  background: var(--red-glow);
  filter: blur(15px);
  pointer-events: none;
}

.feed {
  min-width: 0;
}


/* =========================================
   Sidebar
   ========================================= */

.sidebar-logo-link {
  display: block;
  margin-bottom: 20px;
  text-decoration: none;
}

.sidebar-logo {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(183, 0, 20, 0.26))
    contrast(1.08);
  transition:
    transform var(--transition),
    filter var(--transition);
}

.sidebar-logo-link:hover .sidebar-logo {
  transform: translateY(-2px) rotate(-0.4deg);
  filter:
    drop-shadow(0 0 18px rgba(215, 0, 25, 0.42))
    contrast(1.12);
}

.sidebar-description {
  margin-bottom: 18px;
  color: #d9d0cb;
  font-size: 0.85rem;
  text-transform: lowercase;
}

.sidebar-description p {
  margin: 0 0 3px;
}

.sidebar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin: 0 0 24px;
  padding: 12px 0;
  color: #9f9490;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.7rem;
  letter-spacing: 0.035em;
}

.sidebar-navigation {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
}

.sidebar-navigation a {
  position: relative;
  display: block;
  padding: 7px 4px 7px 15px;
  color: #f2e9e4;
  text-decoration: none;
  text-transform: lowercase;
  transition:
    color var(--transition),
    transform var(--transition);
}

.sidebar-navigation a::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red-bright);
  transition: transform var(--transition);
}

.sidebar-navigation a:hover {
  color: var(--red-bright);
  transform: translateX(3px);
}

.sidebar-navigation a:hover::before {
  transform: scaleX(1.4);
}

.sidebar-socials {
  display: grid;
  gap: 7px;
  margin-bottom: 22px;
  font-size: 0.78rem;
}

.sidebar-socials a,
.sidebar-contact a {
  color: #bdb2ad;
  text-decoration: none;
  transition: color var(--transition);
}

.sidebar-socials a:hover,
.sidebar-contact a:hover {
  color: var(--red-bright);
}

.coming-soon-link {
  color: #675f5c;
  cursor: default;
}

.sidebar-contact {
  position: relative;
  z-index: 1;
  margin-bottom: 30px;
  overflow-wrap: anywhere;
  font-size: 0.72rem;
}

.theme-credit {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #655d59;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}


/* =========================================
   Mobile Header
   ========================================= */

.mobile-header,
.mobile-navigation {
  display: none;
}


/* =========================================
   Tumblr Posts
   ========================================= */

.post {
  position: relative;
  margin: 0 0 52px;
  overflow: hidden;
  color: var(--text-dark);
  background: var(--post-background);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow);
  transform: translateZ(0);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.post:hover {
  transform: translateY(-2px);
  box-shadow:
    0 23px 55px rgba(0, 0, 0, 0.42),
    0 3px 10px rgba(0, 0, 0, 0.32);
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.16) 0,
      rgba(0, 0, 0, 0.16) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: multiply;
}

.post-header {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 11px 16px;
  color: #4f4642;
  background: #ebe3dd;
  border-bottom: 1px solid var(--border-dark);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
}

.blog-name,
.reblog-source strong {
  color: var(--red);
  font-weight: 700;
}

.pinned-label,
.post-type,
.post-permalink {
  color: #837873;
  text-decoration: none;
}

.post-permalink:hover {
  color: var(--red);
}

.post-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  background: #111;
  transition:
    filter var(--transition),
    transform 320ms ease;
}

.photo-post:hover .post-image {
  filter: contrast(1.03) saturate(1.04);
}

.post-caption {
  position: relative;
  z-index: 3;
  padding: 20px 20px 0;
  color: #211b19;
  font-size: 1rem;
}

.post-caption p {
  margin: 0;
  text-transform: lowercase;
}

.post-footer {
  position: relative;
  z-index: 3;
  padding: 18px 20px 17px;
  background: var(--post-background);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 11px;
  margin-bottom: 17px;
}

.post-tags a {
  color: #9b7778;
  font-size: 0.73rem;
  text-decoration: none;
  transition:
    color var(--transition),
    text-shadow var(--transition);
}

.post-tags a:hover {
  color: var(--red-bright);
  text-shadow: 0 0 10px rgba(210, 0, 24, 0.2);
}

.featured-tags a {
  color: var(--red);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 28px;
  color: #665c58;
  border-top: 1px solid rgba(0, 0, 0, 0.11);
  padding-top: 13px;
  font-size: 0.72rem;
}

.note-count {
  margin-right: auto;
  font-weight: 700;
  transition:
    color var(--transition),
    transform var(--transition);
}

.post:hover .note-count {
  color: var(--red);
}

.reblog-button,
.like-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 0;
  color: #655c58;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition:
    color var(--transition),
    transform var(--transition);
}

.reblog-button:hover,
.reblog-button.is-reblogged {
  color: #338d5a;
}

.reblog-button span:first-child {
  display: inline-block;
  font-size: 1rem;
  transition: transform 260ms ease;
}

.reblog-button:hover span:first-child {
  transform: rotate(35deg);
}

.reblog-button.is-reblogged span:first-child {
  transform: rotate(180deg);
}

.like-button:hover,
.like-button.is-liked {
  color: var(--red-bright);
}

.like-button .heart {
  font-size: 1.08rem;
  line-height: 1;
  transition:
    transform 160ms ease,
    color var(--transition);
}

.like-button:hover .heart {
  transform: scale(1.16);
}

.like-button.is-liked .heart {
  transform: scale(1.12);
}

.no-tags .post-actions {
  margin-top: 0;
}


/* =========================================
   Text Posts
   ========================================= */

.text-post-content {
  position: relative;
  z-index: 3;
  padding: 32px 30px 26px;
}

.text-post-content h1,
.text-post-content h2 {
  margin: 0 0 18px;
  color: var(--red);
  font-weight: 700;
  line-height: 1.05;
  text-transform: lowercase;
}

.text-post-content h1 {
  font-size: clamp(2.2rem, 7vw, 4rem);
  letter-spacing: -0.045em;
}

.text-post-content h2 {
  font-size: clamp(1.65rem, 4vw, 2.6rem);
}

.text-post-content p {
  margin: 0 0 13px;
}

.text-post-content p:last-child {
  margin-bottom: 0;
}

.text-post-content a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-post-content a:hover {
  color: var(--red-bright);
}

.pinned-post {
  border-top: 4px solid var(--red);
}

.information-post {
  background:
    linear-gradient(
      135deg,
      #f5eee8 0%,
      #eaded7 100%
    );
}

.placeholder-copy {
  color: #6a5d58;
}


/* =========================================
   Merch Post
   ========================================= */

.merch-post {
  border: 2px solid rgba(178, 0, 19, 0.7);
}

.merch-post .post-caption {
  color: #f8efeb;
  background:
    linear-gradient(
      90deg,
      var(--red-dark),
      var(--red)
    );
  padding: 19px 20px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.merch-post .post-footer {
  border-top: 0;
}


/* =========================================
   Audio Post
   ========================================= */

.audio-post {
  background: #171717;
  color: var(--text-light);
  border-color: rgba(255, 255, 255, 0.13);
}

.audio-post .post-header {
  color: #aaa09b;
  background: #0d0d0d;
  border-color: var(--border-light);
}

.audio-post .post-footer {
  color: var(--text-light);
  background: #171717;
}

.audio-post .post-actions {
  color: #aaa09b;
  border-color: var(--border-light);
}

.audio-post .reblog-button,
.audio-post .like-button {
  color: #aaa09b;
}

.audio-post .reblog-button:hover,
.audio-post .reblog-button.is-reblogged {
  color: #4fbd7b;
}

.audio-post .like-button:hover,
.audio-post .like-button.is-liked {
  color: var(--red-bright);
}

.audio-player {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px;
}

.album-placeholder {
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  color: #fff;
  background:
    radial-gradient(
      circle,
      var(--red-bright),
      var(--red-dark) 72%
    );
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 0 28px rgba(208, 0, 22, 0.24);
  font-size: 2rem;
}

.audio-information p {
  margin: 0;
}

.track-name {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
}

.artist-name {
  margin-top: 3px !important;
  color: var(--red-bright);
}

.release-status {
  margin-top: 10px !important;
  color: #8e8580;
  font-size: 0.75rem;
}

.play-button {
  padding: 8px 12px;
  color: #706964;
  background: transparent;
  border: 1px solid #494440;
  cursor: not-allowed;
}

.fake-waveform {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  height: 52px;
  padding: 0 28px 24px;
}

.fake-waveform span {
  display: block;
  width: 4px;
  height: 18px;
  background: var(--red);
  opacity: 0.78;
}

.fake-waveform span:nth-child(2n) {
  height: 32px;
}

.fake-waveform span:nth-child(3n) {
  height: 24px;
}

.fake-waveform span:nth-child(4n) {
  height: 40px;
}


/* =========================================
   Archive
   ========================================= */

.archive-section {
  margin: 72px 0 48px;
  padding: 26px;
  background:
    linear-gradient(
      145deg,
      rgba(10, 10, 10, 0.96),
      rgba(21, 0, 3, 0.96)
    );
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
}

.archive-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
  margin-bottom: 20px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--border-light);
}

.archive-heading h2 {
  margin: 0;
  color: var(--red-bright);
  font-size: 1.35rem;
  text-transform: lowercase;
}

.archive-heading p {
  margin: 0;
  color: #756d69;
  font-size: 0.72rem;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.archive-grid a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}

.archive-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 0 rgba(205, 0, 22, 0);
  transition:
    box-shadow var(--transition),
    background var(--transition);
}

.archive-grid a:hover::after {
  background: rgba(125, 0, 13, 0.08);
  box-shadow: inset 0 0 0 3px rgba(205, 0, 22, 0.65);
}

.archive-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter:
    saturate(0.78)
    contrast(1.08);
  transition:
    transform 300ms ease,
    filter 300ms ease;
}

.archive-grid a:hover img {
  transform: scale(1.06);
  filter:
    saturate(1.06)
    contrast(1.05);
}


/* =========================================
   Pagination and Footer
   ========================================= */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 58px 0 34px;
  color: #807572;
  font-size: 0.72rem;
  text-transform: lowercase;
}

.page-number {
  color: #c6bab5;
}

.disabled-page {
  opacity: 0.45;
}

.site-footer {
  padding: 22px 0;
  color: #766d69;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.7rem;
}

.site-footer p {
  margin: 0 0 3px;
}

.site-footer a {
  display: inline-block;
  margin-top: 10px;
  color: #a39792;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--red-bright);
}


/* =========================================
   Anchor Positioning
   ========================================= */

.post,
.archive-section {
  scroll-margin-top: 32px;
}


/* =========================================
   Responsive: Tablet
   ========================================= */

@media (max-width: 980px) {
  :root {
    --feed-width: 620px;
  }

  .site-shell {
    width: min(100% - 34px, 700px);
    display: block;
    padding-top: 86px;
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-bottom: 46px;
    padding: 22px;
  }

  .sidebar-logo {
    width: min(320px, 80%);
    margin: 0 auto;
  }

  .sidebar-description,
  .sidebar-stats,
  .sidebar-navigation,
  .sidebar-socials,
  .sidebar-contact,
  .theme-credit {
    display: none;
  }

  .mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 12px 18px;
    color: var(--text-light);
    background: rgba(8, 8, 8, 0.95);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(12px);
  }

  .mobile-brand {
    color: #f8efea;
    font-weight: 700;
    text-decoration: none;
    text-transform: lowercase;
  }

  .mobile-menu-button {
    padding: 6px 9px;
    color: #e1d6d1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    text-transform: lowercase;
  }

  .mobile-menu-button:hover {
    color: var(--red-bright);
    border-color: var(--red);
  }

  .mobile-navigation {
    position: fixed;
    top: 58px;
    left: 0;
    z-index: 190;
    display: grid;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: rgba(11, 11, 11, 0.98);
    border-bottom: 1px solid transparent;
    transition:
      max-height 260ms ease,
      border-color 260ms ease;
  }

  .mobile-navigation.is-open {
    max-height: 360px;
    border-color: var(--border-light);
  }

  .mobile-navigation a {
    padding: 13px 18px;
    color: #ddd2cc;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    text-transform: lowercase;
  }

  .mobile-navigation a:hover {
    color: var(--red-bright);
    background: rgba(150, 0, 17, 0.08);
  }
}


/* =========================================
   Responsive: Phone
   ========================================= */

@media (max-width: 680px) {
  body {
    background:
      radial-gradient(
        circle at 50% 4%,
        rgba(150, 0, 15, 0.22),
        transparent 25rem
      ),
      #0c0304;
  }

  .site-shell {
    width: 100%;
    padding: 72px 0 58px;
  }

  .sidebar {
    margin: 0 14px 32px;
    width: calc(100% - 28px);
    padding: 16px;
  }

  .sidebar-logo {
    width: min(280px, 85%);
  }

  .feed {
    width: 100%;
  }

  .post {
    margin-bottom: 32px;
    border-left: 0;
    border-right: 0;
  }

  .post:hover {
    transform: none;
  }

  .post-header {
    padding: 10px 14px;
  }

  .text-post-content {
    padding: 27px 20px 22px;
  }

  .text-post-content h1 {
    font-size: clamp(2.15rem, 15vw, 3.5rem);
  }

  .post-caption {
    padding: 17px 16px 0;
  }

  .post-footer {
    padding: 16px;
  }

  .post-actions {
    gap: 13px;
  }

  .action-label {
    display: none;
  }

  .archive-section {
    margin: 48px 14px 30px;
    padding: 16px;
  }

  .archive-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }

  .audio-player {
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 20px;
  }

  .album-placeholder {
    width: 72px;
  }

  .play-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .fake-waveform {
    padding-inline: 20px;
  }

  .pagination {
    padding: 0 18px;
  }

  .site-footer {
    margin: 0 18px;
  }
}


/* =========================================
   Extra Small Screens
   ========================================= */

@media (max-width: 410px) {
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-actions {
    flex-wrap: wrap;
  }

  .note-count {
    width: 100%;
    margin-bottom: 2px;
  }

  .audio-player {
    grid-template-columns: 1fr;
  }

  .album-placeholder {
    width: 86px;
  }
}


/* =========================================
   Reduced Motion
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
