:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
  background: #070b12;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

.site-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 200;
  overflow: hidden;
  pointer-events: auto;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 22, 0.000000001);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 0;
}

.site-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
  overflow: hidden;
}

.footer-container {
  max-width: 100%;
  padding: clamp(.2vw, .2vw, .2vw);
  padding-inline: clamp(2vw, 2vw, 2vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.footer-container p {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.76rem;
  margin: 0;
  flex: 1;
  text-align: center;
}

.footer-license-link {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.76rem;
  margin-left: auto;
}

.nav-container {
  max-width: 100%;
  padding: clamp(.4vw, .4vw, .4vw);
  padding-inline: clamp(2vw, 2vw, 2vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2vw, 3vw, 4vw);
  position: relative;
  z-index: 1;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand img {
  width: 50px;
  height: auto;
  transform-origin: 50% 50%;
}

.nav-brand a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand a:link,
.nav-brand a:visited,
.nav-brand a:hover {
  color: rgba(255, 255, 255, 0.88);
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  flex-wrap: wrap;
}

.nav-volume-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.nav-volume-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
}

.nav-volume-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  user-select: none;
  line-height: 1;
}

.nav-volume-slider {
  width: 44px;
  height: 16px;
  accent-color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.nav-mute-btn {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.nav-mute-btn[aria-pressed="true"] {
  background: rgba(200, 160, 0, 0.7);
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: rgba(255, 255, 255, 1);
}

.nav-links a:active {
  color: rgba(255, 255, 255, 1); /* Keep the hover color on active */
}

.nav-links a:link {
  color: rgba(255, 255, 255, 0.82);
}

.nav-links a:visited {
  color: rgba(255, 255, 255, 0.82);
}

.header-image-gallery {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 60%;
}

.gallery-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(120, 200, 255, 0.3);
}

/* Unvisited links */
a:link {
  color: #3887e0; /* A soft blue that works on dark backgrounds */
  text-decoration: none; /* Optional: Remove underlines */
}

/* Visited links */
a:visited {
  color: #7b68ee; /* A lighter purple for visited links */
}

/* Hover effect */
a:hover {
  color: #90cdfc; /* White on hover for contrast */
  text-decoration: underline; /* Optional: Add underline on hover */
}

/* Active (clicked) state */
a:active {
  color: #cde4ff; /* A subtle red for active state */
}

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  min-height: auto;
}

.layout.single {
  grid-template-columns: 1fr;
}

.middle-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  padding-top: clamp(4vh, 5vw, 6vh);

  display: grid;
  place-items: center;

  /* Decorative layer above backgrounds, below all content */
  background:
    radial-gradient(1200px 700px at 20% 20%, rgba(120, 200, 255, 0.10), transparent 60%),
    radial-gradient(1000px 600px at 80% 70%, rgba(170, 140, 255, 0.10), transparent 60%);
}

.middle-layer > img,
.middle-layer > video,
.middle-layer > iframe {
  display: block;
}

.column {
  position: relative;
  padding: 0 clamp(2vw, 2vw, 2vw);
  display: flex;
  align-items: center;
  min-height: auto;
}

.column::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-size: 180% 180%;
  background-position: 0% 50%;
  animation: drift 90s ease-in-out infinite;
}

.left {
  background: #0a1020;
  align-items: stretch;
  z-index: 300;
}

.left::before {
  background-image:
    radial-gradient(900px 500px at 15% 20%, rgba(120, 200, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 85% 80%, rgba(170, 140, 255, 0.14), transparent 55%);
}

.right {
  background: #0a0d16;
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  align-items: stretch;
}

.right::before {
  background-image:
    radial-gradient(900px 500px at 20% 80%, rgba(170, 140, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 85% 15%, rgba(120, 200, 255, 0.12), transparent 60%);
  animation-duration: 105s;
}

.single {
  background: #0a1020;
  align-items: stretch;
  z-index: 300;
}

.single::before {
  background-image:
    radial-gradient(900px 500px at 15% 20%, rgba(120, 200, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 85% 80%, rgba(170, 140, 255, 0.14), transparent 55%);
}

.column-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none;
}

.left .column-inner {
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.right .column-inner {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: auto;
}

.single .column-inner {
  display: flex;
  flex-direction: column;
  min-height: auto;
}

h1,
h2 {
  margin: 4px 0 8px;
  letter-spacing: -0.02em;
}

.post-box {
  flex: 1 1 auto;
  border-radius: 16px;
  border: 0;
  overflow: hidden;
  position: relative;
  background: transparent;
  margin-bottom: 15px;
}

.post-box > * {
  position: relative;
  z-index: 1;
}

.post-box::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 0;
}

.post-list {
  height: auto;
  overflow: visible;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  z-index: 1;
}

/* Generic scroll container for any .post-box content */
.post-scroll {
  height: auto;
  overflow: visible;
  padding: 14px;
  position: relative;
  z-index: 1;
}

.post-scroll > p {
  margin: 0 0 14px;
}

.post-scroll > :last-child {
  margin-bottom: 0;
}

.post-scroll.no-scroll {
  overflow: visible;
}

.post {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 12px;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  position: relative;
  background: transparent;
}

.post::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.12);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none;
  z-index: 0;
}

.post > * {
  position: relative;
  z-index: 1;
}

.post-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-sticky-label {
  margin-left: auto;
  white-space: nowrap;
}

.post-content {
  display: grid;
  gap: 10px;
}

.post-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.86);
}

.post-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  max-width: 100%;
}

.post-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.post-empty {
  color: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px;
}

.pill {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  animation: floaty 36s ease-in-out infinite;
}

@keyframes drift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes floaty {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .column::before,
  .pill {
    animation: none;
  }
}
