/* Fonts */

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-Regular.woff2);
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-Italic.woff2);
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-Bold.woff2);
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-BoldItalic.woff2);
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-Light.woff2);
  font-weight: light;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Archivo;
  src: url(/fonts/archivo/Archivo-LightItalic.woff2);
  font-weight: light;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: ArchivoExpanded;
  src: url(/fonts/archivo-expanded/Archivo_Expanded-Regular.woff2);
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ArchivoExpanded;
  src: url(/fonts/archivo-expanded/Archivo_Expanded-Italic.woff2);
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: ArchivoExpanded;
  src: url(/fonts/archivo-expanded/Archivo_Expanded-Bold.woff2);
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: ArchivoExpanded;
  src: url(/fonts/archivo-expanded/Archivo_Expanded-BoldItalic.woff2);
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: Departure;
  src: url(/fonts/departure/DepartureMono-Regular.woff2);
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* CSS variables */

:root {
  /* Theme colours */
  --cta-yellow: #FFD100;
  --cta-blue: #29ADFF;
  --cta-green: #10D275;
  --cta-red: #FF3668;
  
  /* Retro colours */
  --cta-yellow-retro: #FFC845;
  --cta-blue-retro: #4FA3F7;
  --cta-green-retro: #2BCB7E;
  --cta-red-retro: #eb5d63;
  
  /* Backgrounds and text */
  --accent-color: #CDFD4D;
  --primary-bg: #020202;
  --secondary-bg: #141414;
  --tertiary-bg: #262626;
  --dark-accent: #464646;
  --primary-text: #FFFFFF;
  --secondary-text: #9E9E9E;
}

/* Base styles */

body {
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  line-height: 1.6;
  font-weight: light;
  margin: 0;
  padding: 0;
  background: var(--primary-bg);
  color: var(--primary-text);
  height: 100vh;
  text-wrap: pretty;
}

/* Layout */

.layout {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: auto;
  background: var(--secondary-bg);
  padding: 32px 0;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar-header {
  margin-bottom: 2rem;
}

.logo {
  width: 40px;
  object-fit: contain;
}

.sidebar-center {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

.sidebar-footer {
  margin-top: 2rem;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: var(--secondary-text);
  text-decoration: none;
  border-radius: 6px;
}

.social:hover {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

.social img,
.social svg {
  width: 24px;
  height: 24px;
    transition: ease 0.1s;
}

.social svg {
  color: var(--secondary-text);
}

.social:hover svg {
  color: var(--accent-color);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* Filter buttons */

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 0;
  color: var(--secondary-text);
  cursor: pointer;
    transition: ease 0.1s;
  position: relative;
  text-decoration: none;
}

.filter-btn:hover {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

.filter-btn.active {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

.filter-btn img,
.filter-btn svg {
  width: 24px;
  height: 24px;
    transition: ease 0.1s;
}

.filter-btn svg {
  color: var(--secondary-text);
}

.filter-btn:hover svg,
.filter-btn.active svg {
  color: var(--accent-color);
}

/* Mobile header */

.mobile-header {
  display: none;
  background: var(--secondary-bg);
  padding: 24px 24px 24px 32px;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--primary-text);
  text-decoration: none;
  font-size: 24px;
  font-weight: normal;
}

.header-title img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  border-radius: 6px;
    transition: ease 0.1s;
  position: absolute;
  right: 24px;
}

.mobile-menu-toggle svg {
  width: 28px;
  height: 28px;
}

.mobile-menu-toggle:hover {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

/* Mobile menu */

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: var(--secondary-bg);
  transition: right 0.3s ease;
  padding: 24px;
  box-sizing: border-box;
  z-index: 1001;
  overflow-x: hidden;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 32px;
}

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
    transition: ease 0.1s;
  font-size: 24px;
}

.mobile-menu-close:hover {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

.mobile-filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
  border: none;
  color: var(--secondary-text);
  cursor: pointer;
  border-radius: 6px;
    transition: ease 0.1s;
  font-size: 16px;
  text-align: center;
  width: 100%;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  text-decoration: none;
  box-sizing: border-box;
}

.mobile-filter-btn:hover {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

.mobile-filter-btn.active {
  background: var(--tertiary-bg);
  color: var(--primary-text);
}

/* Typography */

h1 {
  font-size: 42px;
  line-height: 1.2;
  font-weight: normal;
  text-wrap: pretty;
  font-family: "ArchivoExpanded", sans-serif;
  margin: 0 0 20px 0;
  color: var(--primary-text);
}

h2 {
  font-size: 28px;
  font-weight: normal;
  line-height: 1.4;
  text-wrap: pretty;
}

.media-card .media-grid h2 {
  margin: 0;
}

h1 a,
h2 a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 6px;
  text-decoration-color: transparent;
    transition: ease 0.1s;
}

h1 a:hover,
h2 a:hover {
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
}

p {
  text-wrap: pretty;
}

p a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  text-decoration-color: var(--dark-accent);
  transition: ease 0.1s;
}

p a:hover {
  color: var(--primary-text);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent-color);
}

blockquote {
  padding: 0 0 0 32px;
  border-left: 8px solid var(--accent-color);
  margin: 0;
  text-wrap: pretty;
}

.update-blog-note {
  display: block;
  padding: 24px 32px;
  background: var(--tertiary-bg);
  margin: 30px 0;
  text-wrap: pretty;
  border-radius: 0;
}

/* Feed grid */
.feed {
  position: relative;
}

.feed.single-column {
  max-width: 800px;
  margin: 0 auto;
}

.feed.single-column .grid-sizer,
.feed.single-column .grid-item {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.feed.single-column .grid-item {
  margin-bottom: 32px;
}

.feed.three-column-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.feed.three-column-grid .grid-sizer {
  display: none;
}

.feed.three-column-grid .grid-item {
  width: 100%;
  background: var(--secondary-bg);
  margin-bottom: 0px;
}

.grid-sizer,
.grid-item {
  width: calc((100% - 96px) / 4);
}

.feed[data-active-filter="art"] .grid-sizer,
.feed[data-active-filter="art"] .grid-item {
  width: calc((100% - 96px) / 4);
}

.feed:not(.three-column-grid):not(.single-column) .grid-item {
  margin-bottom: 32px;
}

.feed[data-active-filter="art"] .grid-item,
.feed[data-active-filter="art"] .feed-item {
  margin-bottom: 32px;
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--secondary-bg);
}

/* Feed items */

.feed-item {
  margin-bottom: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--secondary-bg);
}

.feed-item.source-raindrop-bookmarks,
.feed-item.source-reeder-bookmarks {
  background: var(--secondary-bg);
}

.feed-item h1 a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-color: transparent;
}

.feed-item h1 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

.content {
  color: var(--primary-text);
}

.content img,
.note-content img {
  max-width: 100%;
  height: auto;
}

.note-content img {
  margin-top: 12px;
}

/* Item components */

.item-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}

.feed.single-column .item-image {
  aspect-ratio: 1;
}

.feed.single-column .source-raindrop-artwork .artwork-image,
.feed.single-column .source-reeder-artwork .artwork-image,
.feed.single-column .source-tumblr .artwork-image {
  aspect-ratio: auto;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: ease 0.1s;
  display: block;
}

.item-content {
  padding: 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.type-note .item-content {
  padding: 32px 32px 26px 32px;
}

.type-blog .item-content {
  padding: 32px 32px 0 32px;
}

.type-blog .content {
  padding: 0 32px 32px 32px;
}

.type-note {
  background: var(--secondary-bg);
}

.type-note .meta {
  margin-bottom: 0;
}

/* Media cards */

.media-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  aspect-ratio: 16 / 9;
}

.media-card .media-cover {
  height: 100%;
  position: absolute;
  top: 0;
  right: 0;
  overflow: hidden;
  z-index: 1;
}

.media-card .media-cover img {
  width: 300px;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-card .media-overlay {
  position: absolute;
  margin: auto 0;
  width: 55%;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary-bg);
  padding: 32px;
  z-index: 2;
}

.source-backloggd .media-cover {
  left: auto;
  right: 0;
}

.source-backloggd .media-overlay {
  left: 0;
}

.media-card .media-text {
  color: var(--primary-text);
  width: 100%;
}

.media-card .media-action {
  font-family: 'Departure', monospace;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--secondary-text);
}

.media-card .media-title {
  font-family: 'Archivo', sans-serif;
  font-size: 32px;
  font-weight: normal;
  line-height: 1.2;
  margin-top: -3px;
  hyphens: auto;
  color: var(--primary-text);
  text-wrap: pretty;
}

.media-card-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.2s ease;
}

.media-overlay::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background: transparent;
  transition: background 0.2s ease;
}

/* Vertical Media Card (Books/Games) */

.media-card.vertical-card {
  aspect-ratio: auto;
  background: transparent;
  overflow: visible;
  padding-bottom: 0;
}

.media-card.vertical-card::before {
  display: none;
}

.media-card.vertical-card .media-card-link {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: auto;
}

.media-card.vertical-card .media-card-link.backloggd {
  height: 380px;
}

.media-card.vertical-card .media-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  transition: ease 0.1s;
}

.media-card.vertical-card .media-cover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.media-card.vertical-card .media-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card.vertical-card .media-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  flex: 1;
  min-height: 0;
}

.media-card.vertical-card .media-meta {
  font-family: 'Departure', monospace;
  font-size: 16px;
  color: var(--secondary-text);
  text-transform: uppercase;
  word-spacing: -3px;
}

.media-card.vertical-card .media-title {
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  font-weight: normal;
  line-height: 1.2;
  color: var(--primary-text);
  margin: 0;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.media-card.vertical-card .media-info .media-title:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
}

.source-backloggd.media-card.vertical-card .media-info:hover .media-title {
  text-decoration-color: var(--accent-color);
}

.media-card.vertical-card .media-rating {
  display: flex;
  gap: 4px;
  margin-top: auto;
}

.media-card.vertical-card .media-rating .star {
  display: inline-flex;
  width: 20px;
  height: 20px;
}

.media-card.vertical-card .media-rating .star svg {
  width: 100%;
  height: 100%;
}

.media-card.vertical-card .media-rating .star.filled svg {
  fill: var(--accent-color);
  stroke: var(--accent-color);
}

.media-card.vertical-card .media-rating .star:not(.filled) svg {
  fill: none;
  stroke: var(--accent-color);
  opacity: .4;
}

.media-card.vertical-card .media-overlay {
  display: none;
}

/* Media items (books and games) with horizontal layout */

.simple-media-item {
  background: var(--secondary-bg);
  transition: background 0.1s ease;
  position: relative;
  overflow: hidden;
}

.simple-media-item::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 75%;
  background-image: var(--cover-bg);
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 1;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 0;
  transition: filter 0.1s ease;
}

.simple-media-item:hover::before {
  animation: glitch-bg 0.8s ease;
}

@keyframes glitch-bg {
  0%, 100% {
    filter: none;
    transform: translate(0) skew(0deg);
    opacity: 0.3;
  }
  5% {
    filter: drop-shadow(8px 0 0 #FD3902) drop-shadow(-8px 0 0 #2954EE) brightness(1.3);
    transform: translate(-5px, 2px) skew(-2deg);
    opacity: 0.5;
  }
  10% {
    filter: drop-shadow(-6px 0 0 #FD3902) drop-shadow(6px 0 0 #2954EE) brightness(1.2);
    transform: translate(4px, -1px) skew(1deg);
    opacity: 0.4;
  }
  15% {
    filter: drop-shadow(5px 0 0 #2954EE) drop-shadow(-5px 0 0 #FD3902) brightness(1.4);
    transform: translate(-3px, 0) skew(0deg);
    opacity: 0.6;
  }
  20% {
    filter: none;
    transform: translate(0) skew(0deg);
    opacity: 0.3;
  }
  45% {
    filter: drop-shadow(10px 0 0 #FD3902) drop-shadow(-10px 0 0 #2954EE) brightness(1.5);
    transform: translate(-6px, 1px) skew(-3deg);
    opacity: 0.7;
  }
  50% {
    filter: drop-shadow(-8px 0 0 #2954EE) drop-shadow(8px 0 0 #FD3902) brightness(1.3);
    transform: translate(5px, -2px) skew(2deg);
    opacity: 0.5;
  }
  55% {
    filter: drop-shadow(7px 0 0 #FD3902) drop-shadow(-7px 0 0 #2954EE) brightness(1.2);
    transform: translate(-4px, 0) skew(-1deg);
    opacity: 0.4;
  }
  60% {
    filter: none;
    transform: translate(0) skew(0deg);
    opacity: 0.3;
  }
  75% {
    filter: drop-shadow(6px 0 0 #2954EE) drop-shadow(-6px 0 0 #FD3902) brightness(1.4);
    transform: translate(3px, 1px) skew(1deg);
    opacity: 0.5;
  }
  80% {
    filter: drop-shadow(-5px 0 0 #FD3902) drop-shadow(5px 0 0 #2954EE) brightness(1.3);
    transform: translate(-2px, 0) skew(0deg);
    opacity: 0.4;
  }
  85% {
    filter: none;
    transform: translate(0) skew(0deg);
    opacity: 0.3;
  }
}

.media-item-horizontal {
  display: flex;
  gap: 32px;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.media-cover-left {
  position: absolute;
  right: 32px;
  top: 32px;
  width: 124px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: var(--primary-bg) 0 0 10px;
  transition: ease 0.1s;
}

.media-cover-left:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.media-cover-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-content-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.media-cover-left,
.media-covers-group {
  display: none !important;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Departure', monospace;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--secondary-text);
}

.media-date {
  color: var(--secondary-text);
}

.media-action-text {
  font-size: 24px;
  line-height: 1.4;
  color: var(--primary-text);
}

.simple-media-link {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  color: var(--primary-text);
  text-decoration-color: var(--dark-accent);
  transition: text-decoration 0.2s ease;
}

.simple-media-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
}

.media-action-text em {
  font-style: normal;
}

.source-bookwyrm .simple-media-link:hover,
.source-backloggd .simple-media-link:hover {
  text-decoration-color: var(--accent-color);
}

/* Grouped media items */

.media-covers-group {
  position: absolute;
  right: 8px;
  top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.media-cover-small {
  display: block;
  flex-shrink: 0;
  width: 124px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: var(--primary-bg) 0 4px 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.media-cover-small:hover {
  z-index: 10;
  transform: scale(1.05) translateY(-5px);
  box-shadow: var(--primary-bg) 0 16px 32px;
}

.media-covers-group .media-cover-small:nth-child(n+2) {
  margin-left: -24px;
}

/* Center the third item when there are exactly 3 items */
.media-covers-group .media-cover-small:nth-child(3):nth-last-child(1) {
  grid-column: 1 / -1;
  justify-self: center;
}

.media-cover-small:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.media-cover-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video embeds */

.video-container {
  position: relative;
  width: 100%;
}

.item-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--secondary-bg);
  overflow: hidden;
}

.item-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Hide item-content for YouTube videos */

.feed-item:has(.item-video) .item-content {
  display: none;
}

.video-credit {
  background: var(--secondary-bg);
  background-image: url('/assets/bg-repeat.png');
  background-position: right center;
  background-size: auto 500%;
  padding: 28px 32px;
  color: var(--secondary-text);
  font-size: 16px;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  word-spacing: -3px;
  border-radius: 0 0 8px 8px;
}

.video-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-title svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-right: 5px;
}

.video-title a {
  color: var(--secondary-text);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  text-decoration-color: transparent;
    transition: ease 0.1s;
  flex: 1;
}

.video-title a:hover {
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
}

/* Artwork */

.source-raindrop-artwork .artwork-image,
.source-reeder-artwork .artwork-image,
.source-tumblr .artwork-image {
  aspect-ratio: auto;
  height: auto;
  max-height: none;
  position: relative;
}

.source-tumblr .item-image {
  margin: 0;
  padding: 0;
}

.source-tumblr .item-image .tumblr-gallery {
  margin: 0;
  padding: 0;
}

.source-raindrop-artwork .artwork-image img,
.source-reeder-artwork .artwork-image img,
.source-tumblr .artwork-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1.01);
}

.source-raindrop-artwork,
.source-reeder-artwork,
.source-tumblr {
  padding: 0;
  overflow: hidden;
  position: relative;
}

.source-raindrop-artwork .item-content,
.source-reeder-artwork .item-content,
.source-tumblr .item-content {
  padding: 0;
}

.source-raindrop-artwork .item-image,
.source-reeder-artwork .item-image,
.source-tumblr .item-image {
  margin: 0;
  padding: 0;
  width: 100%;
}

.feed.single-column .source-raindrop-artwork,
.feed.single-column .source-reeder-artwork,
.feed.single-column .source-tumblr {
  width: 100%;
}

.feed.single-column .source-raindrop-artwork .artwork-image img:hover,
.feed.single-column .source-reeder-artwork .artwork-image img:hover,
.feed.single-column .source-tumblr .artwork-image img:hover {
  scale: 1.05;
}

.feed.single-column .source-raindrop-artwork .artwork-image,
.feed.single-column .source-reeder-artwork .artwork-image,
.feed.single-column .source-tumblr .artwork-image {
  width: 100%;
}

.feed.single-column .source-raindrop-artwork .artwork-image img,
.feed.single-column .source-reeder-artwork .artwork-image img,
.feed.single-column .source-tumblr .artwork-image img {
  width: 100%;
}

.artwork-credit, .art-grid-item .artwork-credit {
  position: absolute;
  bottom: -1px;
  left: -1px;
  background: var(--secondary-bg);
  padding: 12px 18px;
  color: var(--secondary-text);
  font-size: 16px;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  word-spacing: -3px;
  will-change: auto;
  text-decoration: none;
  display: block;
  transition: ease 0.1s;
  transition-delay: 0.1s;
}

.artwork-credit:hover,
.art-grid-item .artwork-credit:hover,
.feed-item:not(.art-group-grid):hover .artwork-credit,
.art-grid-item:hover .artwork-credit {
  color: var(--primary-bg);
  background: var(--accent-color);
}

.artwork-title svg,
.artwork-title img {
  width: 20px;
  height: 20px;
  position: relative;
  top: 4px;
  margin-right: 4px;
}

.artwork-title svg {
  color: var(--secondary-text);
}

/* Art group grid */

.art-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-bottom: 32px;
  width: 100%;
  background: transparent;
}

.art-grid-item {
  position: relative;
  overflow: hidden;
  background: var(--secondary-bg);
  display: flex;
  flex-direction: column;
}

.art-grid-item .item-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: var(--secondary-bg);
}

.art-grid-item .artwork-image {
  width: 100%;
  height: 100%;
}

.art-grid-item .artwork-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.art-group-grid .art-grid-item:last-of-type a.artwork-credit {
  right: 0;
  left: initial;
}

.art-grid-item .artwork-title svg {
  color: var(--secondary-text);
  width: 20px;
  height: 20px;
  position: relative;
  top: 4px;
  margin-right: 4px;
}

.art-grid-item:hover .artwork-title svg {
  color: var(--accent-color);
}

/* Tumblr galleries */

.tumblr-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
}

.tumblr-gallery a {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  margin: 0;
  padding: 0;
}

.tumblr-gallery a>div {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

.tumblr-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: ease 0.1s;
  display: block;
}

.tumblr-gallery:has(> a:nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.tumblr-gallery:has(> a:nth-child(3):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.tumblr-gallery:has(> a:nth-child(3):last-child)>a:last-child {
  grid-column: 1 / -1;
}

.tumblr-gallery:has(> a:nth-child(4):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

/* Meta */

.external-arrow {
  font-family: 'Departure', monospace;
  color: var(--primary-bg);
  margin-left: 2px;
  position: relative;
  bottom: 6px;
  font-size: 60%;
  line-height: 0;
  font-weight: normal;
  padding: 0 6px 0 8px;
  background: #fff;
  border-radius: 2px;
}

.meta {
  color: var(--secondary-text);
  font-size: 16px;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  margin-bottom: 24px;
  align-items: center;
}

.meta .source svg,
.meta .source img {
  width: 20px;
  height: 20px;
  position: relative;
  top: 4px;
  margin-right: 4px;
}

.meta .source svg {
  color: var(--secondary-text);
}

/* Note meta with icon */

.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.note-meta-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.note-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-icon svg {
  width: 24px;
  height: 24px;
  color: var(--secondary-text);
}

.note-content-inline {
  flex: 1;
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  line-height: 1.4;
  color: var(--primary-text);
  text-transform: none;
  min-width: 0;
}

.note-content-inline p {
  margin: 0;
  display: inline;
}

.note-content-inline p+p {
  margin-top: 1em;
  display: block;
}

.note-date-link {
  flex-shrink: 0;
  white-space: nowrap;
}

.author a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--secondary-text);
}

.empty-state code {
  background: var(--tertiary-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: monospace;
}

/* Source-specific styles */

.source-microblog h1 a:hover,
.type-blog h1 a:hover,
.type-note h1 a:hover {
  color: var(--primary-text);
  background: none;
  text-decoration-color: var(--accent-color);
}

.type-blog .date-link,
.type-note .date-link,
.source-raindrop-quotes .date-link {
  color: var(--secondary-text);
  text-decoration: none;
}

.source-microblog .date-link:hover,
.type-blog .date-link:hover,
.type-note .date-link:hover,
.source-raindrop-quotes .date-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.source-microblog .read-more-btn:hover,
.type-blog .read-more-btn:hover,
.type-note .read-more-btn:hover {
  background: var(--accent-color);
  color: var(--primary-text);
}

.source-microblog .content a:hover,
.type-blog .content a:hover,
.type-note .content a:hover {
  text-decoration-color: var(--accent-color);
}

.source-microblog .content p a:hover,
.type-blog .content p a:hover,
.type-note .content p a:hover {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

.source-raindrop-music .text-content {
  height: auto;
  min-height: 120px;
}

.type-note .content p {
  margin: 0;
}

.source-raindrop-quotes .item-content,
.source-microblog .item-content {
  padding: 32px 32px 0 32px;
}

.source-reeder-bookmarks .content,
.source-raindrop-quotes .content,
.source-microblog .content p,
.source-reeder-bookmarks .tags,
.type-note .tags,
.source-raindrop-bookmarks .tags,
.type-note .content,
.source-raindrop-quotes .content {
  padding: 0 32px 32px 32px;
}

.has-image p:first-of-type {
  margin: -8px 32px 32px 32px;
}

.has-image .content {
  padding: 0;
}

/* Quotes */

.source-raindrop-quotes h1 {
  display: none;
}

.source-raindrop-quotes blockquote {
    border: 0px;
    background: var(--tertiary-bg);
    display: inline;
    font-size: 30px;
    color: var(--primary-text);
    padding: 6px 0;
    line-height: 1.4;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    text-wrap: pretty;
    transition: ease 0.1s;
}

.source-raindrop-quotes blockquote a.quote-link {
    color: inherit;
    text-decoration: none;
    display: inline;
}

.source-raindrop-quotes blockquote:before {
  content: "“";
}

.source-raindrop-quotes blockquote:after {
  content: "”";
}

.source-raindrop-quotes blockquote:before {
    margin-right: -12px;
    position: relative;
    left: -12px;
    background: var(--tertiary-bg);
    padding: 6px 0;
}

.source-raindrop-quotes .quote-source {
  margin: 30px 0 0 0;
  color: var(--secondary-text);
  font-family: 'Departure', monospace;
  font-size: 16px;
  text-transform: uppercase;
}

.source-raindrop-quotes .quote-source a {
  color: var(--secondary-text);
  text-decoration: none;
}

.source-raindrop-quotes .quote-source a:hover {
  text-decoration: underline;
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
}

.source-reeder-bookmarks .tags,
.type-note .tags,
.type-blog .tags,
.source-raindrop-bookmarks .tags {
  display: none;
}

.source-reeder-artwork .content {
  padding: 0;
}

.source-raindrop-bookmarks .content p:last-child {
  margin-bottom: 0;
}

.bookmark-note {
  margin-bottom: 0;
}

.has-accent-color blockquote {
  border-left-color: var(--accent-color);
}

.has-accent-color h1 a:hover {
  background: var(--accent-color);
  color: var(--primary-bg);
}

/* Bookmarks */

.source-raindrop-bookmarks blockquote,
.source-reeder-bookmarks blockquote {
  padding: 0 0 0 24px;
  border-left: 4px solid var(--accent-color);
  font-size: 24px;
  margin-top: 4px;
  color: var(--primary-text);
}

/* Show content block for bookmarks to display descriptions/highlights */

.source-raindrop-bookmarks .content,
.source-reeder-bookmarks .content {
  display: none;
}

/* Show content for quotes */

.source-raindrop-quotes .content {
  display: block;
  margin-top: 8px;
}

/* Bookmark images */

.bookmark-image {
  height: 400px;
  position: relative;
  z-index: 1;
  display: none;
}

.bookmark-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-raindrop-bookmarks .item-content,
.source-reeder-bookmarks .item-content {
  padding: 32px;
}

.source-raindrop-bookmarks .item-content h1,
.source-reeder-bookmarks .item-content h1 {
  margin: 0;
}

.source-raindrop-bookmarks .item-content h1 a,
.source-reeder-bookmarks .item-content h1 a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-color: var(--dark-accent);
  text-decoration-thickness: 4px;
  text-underline-offset: 4px;
}

.source-raindrop-bookmarks .item-content h1 a:hover,
.source-reeder-bookmarks .item-content h1 a:hover {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-color: var(--accent-color);
}

.bookmark-description {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--secondary-text);
}

.bookmark-note {
  color: var(--primary-text);
  font-style: italic;
  margin: 0 0 16px 0;
}

.bookmark-description p {
  margin: 0 0 16px 0;
}

.bookmark-description p:last-child {
  margin-bottom: 0;
}

.bookmark-domain {
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--secondary-text);
  display: block;
  font-weight: normal;
  margin-top: 30px;
  width: max-content;
  transition: ease 0.1s;
}

a.bookmark-domain {
  text-decoration: none;
}

a.bookmark-domain:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.bookmark-meta {
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--secondary-text);
  display: block;
  font-weight: normal;
  margin-bottom: 22px;
  word-spacing: -3px;
}

/* Meta overlay for bookmarks */

.bookmark-image .meta-overlay {
  position: absolute;
  top: 22px;
  left: 22px;
  padding: 10px 16px;
  width: fit-content;
  background: var(--secondary-bg);
  color: var(--secondary-text);
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  word-spacing: -0.15em;
}

/* Horizontal layouts */

.horizontal-layout {
  padding: 0;
}

.horizontal-content {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 32px;
}

.cover-image {
  flex-shrink: 0;
  border-radius: 1px;
  overflow: visible;
  background: var(--tertiary-bg);
}

.cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: ease 0.1s;
}

.text-content .title {
  font-size: inherit;
  font-weight: normal;
  line-height: 1.4;
  display: flex;
  align-items: center;
  flex: 1;
}

.text-content .title a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-color: var(--dark-accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  line-height: 1.45;
  text-decoration-style: solid;
  transition: ease 0.1s;
}

.text-content .title a:hover {
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
}

/* Tags */

.tags,
.post-tags,
.note-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

a.tag {
  color: var(--secondary-text);
  text-decoration: none;
  font-family: 'Departure', monospace;
  font-size: 16px;
  padding: 10px 14px;
  background: var(--tertiary-bg);
  text-transform: uppercase;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  word-spacing: -4px;
  text-decoration-color: transparent;
  transition: ease 0.1s;
}

a.tag:hover {
  color: var(--primary-text);
  background: var(--accent-color);
}

/* Category filters */

.category-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.category-filter-btn {
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--secondary-text);
  background: var(--tertiary-bg);
  border: none;
  padding: 12px 16px;
  cursor: pointer;
  transition: ease 0.1s;
}

.category-filter-btn:hover {
  color: var(--primary-text);
  background: var(--accent-color);
}

.category-filter-btn.active {
  color: var(--primary-text);
  background: var(--accent-color);
}

/* Pagination */


.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 42px;
  padding: 24px 0 0 0;
}

.pagination-link {
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--primary-text);
  background: var(--tertiary-bg);
  text-decoration: none;
  padding: 10px 14px;
  transition: ease 0.1s;
}

.pagination-link:hover {
  color: var(--primary-text);
  background: var(--accent-color);
}

.pagination-info {
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
  color: var(--secondary-text);
}

.pagination-link.pagination-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.pagination-nav {
  font-size: 16px;
  color: var(--primary-text);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin: 24px auto 8px auto;
  padding: 0;
  width: fit-content;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
}

.pagination-bottom {
  margin-top: 3rem;
}

/* Read more button */

.read-more-btn {
  background: var(--tertiary-bg);
  color: var(--primary-text);
  text-decoration: none;
  padding: 12px;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  font-size: 16px;
    transition: ease 0.1s;
  margin: -3px 32px 32px 32px;
  display: block;
  text-align: center;
}

.truncated-content p {
  margin: 0 0 32px 0;
  padding: 0 32px;
}

/* Back to top */

.back-to-top {
  font-family: "Departure", monospace;
  font-size: 24px;
  width: 64px;
  height: 64px;
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 16px 22px;
  background-color: var(--tertiary-bg);
  color: var(--primary-text);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 999;
}

.back-to-top:hover {
  background: var(--accent-color);
  color: var(--primary-bg);
  transition: all .1s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

/* RSS subscribe card */

.rss-subscribe-card {
  border: 2px solid var(--accent-color);
}

.rss-subscribe-card .item-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.rss-subscribe-card .feed-card-links,
.rss-subscribe-card .feed-card-links a {
  font-family: 'Departure', monospace;
  font-size: 16px;
  color: var(--secondary-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: transparent;
}

.rss-subscribe-card .feed-card-links a:hover {
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
    transition: ease 0.1s;
}

.rss-subscribe-card .rss-link {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rss-subscribe-card .rss-link svg {
  width: 20px;
  height: 20px;
  color: var(--secondary-text);
  flex-shrink: 0;
  margin-right: 4px;
}

.rss-subscribe-card .rss-link a {
  font-family: 'Archivo', sans-serif;
  font-size: 24px;
  color: var(--primnary-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: transparent;
    transition: ease 0.1s;
  flex: 1;
}

.rss-subscribe-card .rss-link a:hover {
  color: var(--primary-text);
  text-decoration-color: var(--accent-color);
}

/* Hidden items */

.hidden-item {
  display: none;
}

/* Blog posts and notes */

.blog-post,
.note {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 0;
}

.note {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
}

.post-header .meta,
.note-header .meta {
  color: var(--secondary-text);
  font-size: 16px;
  font-family: 'Departure', monospace;
  text-transform: uppercase;
  margin-bottom: 26px;
  word-spacing: -3px;
}

.post-header h1,
.note-header h1 {
  margin-bottom: 28px;
  font-size: 42px;
  line-height: 1.2;
  font-weight: normal;
  text-wrap: pretty;
}

.post-tags,
.note-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.note-content {
  font-size: 24px;
}

.post-content p,
.note-content p {
  margin-bottom: 1.5rem;
  text-wrap: pretty;
}

.post-content h2,
.note-content h2 {
  font-size: 36px;
  margin: 3rem 0 1.5rem 0;
  color: var(--primary-text);
}

.note-content h2 {
  font-size: 28px;
  margin: 2rem 0 1rem 0;
}

.post-content h3,
.note-content h3 {
  font-size: 28px;
  margin: 2.5rem 0 1rem 0;
  color: var(--primary-text);
  font-weight: normal;
}

.note-content h3 {
  font-size: 24px;
  margin: 1.5rem 0 0.75rem 0;
}

.post-content ul,
.post-content ol,
.note-content ul,
.note-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.note-content ul,
.note-content ol {
  margin: 1.25rem 0;
}

.post-content li,
.note-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote,
.note-content blockquote {
  margin: 32px 0;
  padding: 0 0 0 32px;
  border-left: 8px solid var(--accent-color);
  border-radius: 0 4px 4px 0;
  text-wrap: pretty;
}

.post-content code,
.note-content code {
  background: var(--tertiary-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Departure', monospace;
  font-size: 90%;
}

.note-content code {
  font-size: 85%;
}

.post-content pre,
.note-content pre {
  background: var(--tertiary-bg);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.note-content pre {
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.post-content pre code,
.note-content pre code {
  background: none;
  padding: 0;
}

.post-content p a,
.note-content p a {
  color: var(--primary-text);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent-color);
    transition: ease 0.1s;
}

.post-content p a:hover,
.note-content p a:hover {
  color: var(--primary-text);
  background: var(--accent-color);
}

/* Tag pages */

.tag-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 64px 0 38px 0;
}

.tag-header {
  margin-bottom: 32px;
}

.tag-header h1 {
  margin-bottom: 16px;
  font-size: 42px;
  line-height: 1.2;
}

.tag-count {
  color: var(--secondary-text);
  font-family: 'Departure', monospace;
  font-size: 16px;
  text-transform: uppercase;
  margin: 0;
}

.tag-posts {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tag-post-item {
  padding: 32px;
  background: var(--secondary-bg);
}

.tag-post-item .item-content {
  padding: 0;
}

.tag-post-item .content p {
  margin: 0 0 32px 0;
}

/* Breakpoints */

@media (max-width: 1400px) {

  .grid-sizer,
  .grid-item {
    width: calc((100% - 64px) / 3);
  }

  .feed[data-active-filter="art"] .grid-sizer,
  .feed[data-active-filter="art"] .grid-item {
    width: calc((100% - 64px) / 3);
  }

  .media-card.vertical-card .media-card-link.backloggd {
    height: 590px;
  }

  .feed.three-column-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1100px) {

  .grid-sizer,
  .grid-item {
    width: calc((100% - 32px) / 2);
  }

  .feed[data-active-filter="art"] .grid-sizer,
  .feed[data-active-filter="art"] .grid-item {
    width: calc((100% - 32px) / 2);
  }

  .feed.three-column-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }

  .header-title img {
    width: 42px;
    height: 42px;
  }

  .mobile-header {
    display: flex;
  }

  .media-card.vertical-card .media-card-link.backloggd {
    height: auto;
  }

  .layout {
    flex-direction: column;
    height: 100vh;
  }

  .main-content {
    margin-left: 0;
    padding: 24px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .grid-sizer,
  .grid-item {
    width: 100%;
  }

  .feed.three-column-grid {
    grid-template-columns: 1fr;
  }

  .rss-subscribe-card .item-content {
    display: block;
  }

  .grid-item {
    margin-bottom: 24px;
  }

  .rss-subscribe-card .rss-link {
    margin-bottom: 18px;
  }
  
  .note {
    min-height: calc(100vh - 6rem);
  }
  
  .post-header,
  .note-header {
    padding: 24px 24px 0 24px;
  }
  
  .post-content,
  .note-content {
    padding: 0 24px 24px 24px;
  }
  
  .tag-page {
    padding: 24px;
  }
  
  .tag-post-item {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  
  .pagination-nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  h1 {
    font-size: 38px;
    line-height: 1.2;
  }

  .art-group-grid {
    margin-bottom: 24px;
    gap: 24px;
  }

  .feed.single-column .grid-item, .feed:not(.three-column-grid):not(.single-column) .grid-item {
    margin-bottom: 24px;
  }

  .tumblr-gallery {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  
  .tumblr-gallery:has(> a:nth-child(3):last-child)>a:last-child {
    grid-column: auto;
  }

  .bookmark-image {
    height: 280px;
  }

  .media-card .media-overlay {
    width: 220px;
  }

  .horizontal-content {
    flex-direction: column;
  }

  .media-card .media-cover {
    aspect-ratio: 3 / 4;
  }

  .media-card .media-title {
    font-size: 24px;
  }

  .media-card .media-action {
    font-size: 14px;
  }

  .media-item-horizontal {
    flex-direction: column;
    gap: 16px;
  }

  .media-cover-left {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    display: none;
  }

  .media-covers-group {
    width: 100%;
    gap: 8px;
    display: none;
  }

  .media-cover-small {
    width: 60px;
  }

  .note-content-inline {
    font-size: 20px;
  }
}

@media (max-width: 550px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    font-size: 20px;
    padding: 14px 18px;
  }
}

/* PowerGlitch custom colors */

.glitch-logo .pg-layer-1 {
  filter: drop-shadow(0 0 3px #FD3902) brightness(1.2) contrast(1.1);
  mix-blend-mode: screen;
}

.glitch-logo .pg-layer-2 {
  filter: drop-shadow(0 0 3px #2954EE) brightness(1.2) contrast(1.1);
  mix-blend-mode: screen;
}

.glitch-logo .pg-layer-3 {
  filter: drop-shadow(0 0 2px #FD3902) drop-shadow(0 0 2px #2954EE) brightness(1.1);
  mix-blend-mode: screen;
  opacity: 0.7;
}

.simple-media-item .media-cover-left img.pg-glitched {
  position: relative;
}

.simple-media-item .media-cover-left img.pg-glitched .pg-layer-1 {
  filter: drop-shadow(0 0 2px #FD3902) brightness(1.15) contrast(1.05);
  mix-blend-mode: screen;
  opacity: 0.8;
}

.simple-media-item .media-cover-left img.pg-glitched .pg-layer-2 {
  filter: drop-shadow(0 0 2px #2954EE) brightness(1.15) contrast(1.05);
  mix-blend-mode: screen;
  opacity: 0.8;
}

.simple-media-item .media-cover-left img.pg-glitched .pg-layer-3 {
  filter: drop-shadow(0 0 1px #FD3902) drop-shadow(0 0 1px #2954EE) brightness(1.1);
  mix-blend-mode: screen;
  opacity: 0.5;
}
/* Chromatic aberration glitch for media backgrounds */
.simple-media-item::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 75%;
  background-image: var(--cover-bg);
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background-blend-mode: screen;
  background-color: #2954EE;
  mix-blend-mode: screen;
}

.simple-media-item:hover::after {
  animation: glitch-blue 0.8s ease;
  opacity: 0.6;
}

.simple-media-item:hover::before {
  filter: sepia(1) saturate(3) hue-rotate(330deg);
  mix-blend-mode: screen;
  opacity: 0.6;
}

@keyframes glitch-blue {
  0%, 100% {
    transform: translate(0, 0);
  }
  5%, 10%, 15% {
    transform: translate(10px, 1px);
  }
  45%, 50%, 55% {
    transform: translate(12px, -1px);
  }
  75%, 80% {
    transform: translate(8px, 0);
  }
}

@keyframes glitch-red {
  0%, 100% {
    transform: translate(0, 0);
  }
  5%, 10%, 15% {
    transform: translate(-10px, -1px);
  }
  45%, 50%, 55% {
    transform: translate(-12px, 1px);
  }
  75%, 80% {
    transform: translate(-8px, 0);
  }
}
