/* Global box-sizing for easier sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Press Start 2P', monospace;
  background-color: #0f100d; /* very dark almost-black with a bit of warmth */
  background-image:
    linear-gradient(#2a2f23 2px, transparent 2px),
    linear-gradient(90deg, #2a2f23 2px, transparent 2px),
    linear-gradient(#181c14 1px, transparent 1px),
    linear-gradient(90deg, #181c14 1px, #0f100d 1px);
  background-size:
    50px 50px,
    50px 50px,
    10px 10px,
    10px 10px;
  background-position:
    -2px -2px,
    -2px -2px,
    -1px -1px,
    -1px -1px;
  background-repeat:
    repeat,
    repeat,
    repeat,
    repeat;
  color: #b7c49b;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('https://projectradio.org/artists/box3.png') center/cover no-repeat;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

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

/* Sidebar */
.sidebar {
  width: 220px;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background:
    url("https://projectradio.org/spinkskull.gif") bottom center no-repeat,
    #2e3822;
  background-size: contain, cover;
  border-right: 5px solid #3e4f22;
  box-shadow: 2px 0 5px #0d0e0a;
  z-index: 10;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
}

.sidebar nav a {
  display: block;
  padding: 0.8rem 1rem;
  color: #dce3b5;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid #3e4f22;
  background: rgba(46, 56, 34, 0.5);
  text-shadow: 1px 1px 1px #3c452a;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar nav a:hover {
  background: rgba(100, 130, 30, 0.3);
  color: #cdd7b0;
}

.sidebar-logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.5rem auto;
}

/* Main content */
.main-content {
  margin-left: 220px;
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* XP window styles (generic) */
.xp-window {
  border: 2px solid #0d0e0a;
  border-radius: 6px;
  box-shadow: 2px 2px 5px #0d0e0a;
  background: #4f5f3d;
}

.xp-titlebar {
  background: linear-gradient(to bottom, #3b5a26, #1f3920);
  padding: 0.4rem 0.6rem;
  border-bottom: 2px solid #26431e;
  color: #dce3b5;
  text-shadow: 1px 1px 1px #1b2a17;
  text-align: justify;
}

.title-text {
  font-size: 0.8rem;
  text-shadow: 1px 1px 1px #1b2a17;
}

.xp-body {
  padding: 1rem;
  color: #dce3b5;
}

/* --- Artist profile grid --- */
.artist-showcase,
.radio-showcase,
.article-showcase {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

@media (min-width: 721px) {
  .artist-showcase,
  .radio-showcase,
  .article-showcase {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Profile cards with hover overlay (Artist, Radio, Article) */
.artist-profile,
.radio-profile,
.article-profile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.artist-profile:hover,
.radio-profile:hover,
.article-profile:hover {
  transform: scale(1.03);
}

.artist-profile img,
.radio-profile img,
.article-profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Artist hover overlay */
.artist-info,
.radio-info,
.article-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
}

.artist-profile:hover .artist-info,
.radio-profile:hover .radio-info,
.article-profile:hover .article-info {
  opacity: 1;
}

.artist-profile {
  border: 3px solid #556b38;
  background: #1b1d17;
  box-shadow: 3px 3px 8px #2a2f23;
}

.artist-info {
  background: rgba(85, 107, 56, 0.49);
  color: #e6ebdf;
}

.artist-name,
.radio-name,
.article-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 4px #0a0b07;
}

.artist-bio,
.radio-bio,
.article-bio {
  font-size: 0.85rem;
  opacity: 0.95;
}

/* Radio profile */
.radio-profile {
  border: 3px solid #2c4e70;
  background: #2d557d;
  box-shadow: 3px 3px 8px #121f0a;
}

.radio-info {
  background: rgba(0, 0, 40, 0.49);
  color: #e5ecf7;
}

/* Article profile */
.article-profile {
  border: 3px solid #7a5515;
  background: #8b651a;
  box-shadow: 3px 3px 8px #6a4b12;
}

.article-info {
  background: rgba(64, 42, 5, 0.7);
  color: #fff6e1;
}

/* Featured content layout */
.featured-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.featured-content .artist-showcase {
  flex: 0 0 auto;
}

.featured-content .featured-text {
  flex: 1;
}

/* --- Uplink box (uses same hover overlay as artist) --- */
.uplink-box {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 300px;
  background: rgba(204, 211, 158, 0.49);
  padding: 1.5rem;
  border: 3px solid #3e4f22;
  box-shadow: 2px 2px 5px #1a1e12;
  color: #1f2d0c;
  overflow: hidden;
  border-radius: 6px;
}

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

.uplink-box .profile-image {
  flex: 0 0 auto;
  width: 150px;
  height: 150px;
  border-radius: 12px;
  border: 2px solid red;
}

/* Text next to image in Uplink box */
.uplink-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.uplink-text h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #3e4f22;
  padding-bottom: 0.3rem;
}

.uplink-text p {
  margin: 0;
  line-height: 1.4;
}

/* Hover overlay for uplink image */
.uplink-box .artist-profile:hover .artist-info {
  opacity: 1;
}

/* Footer */
.footer {
  font-size: 0.65rem;
  color: #9aab7f;
  text-align: center;
  padding: 1rem;
  background: rgba(110, 130, 70, 0.9);
  border: 2px solid #26431e;
  border-radius: 6px;
  box-shadow: 2px 2px 5px #0f120c;
}

@media (max-width: 720px) {
  /* Sidebar becomes full-height vertical nav */
  .sidebar {
    width: 100%;
    height: 100vh; /* full height of viewport */
    position: fixed; /* stays on screen */
    top: 0;
    left: 0;
    border-right: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1rem;
    background: #2e3822; /* same background as desktop */
    z-index: 20;
  }

  .sidebar-logo {
    margin: 0 auto 1rem auto;
  }

  .sidebar nav {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    flex: 1;
  }

  .sidebar nav a {
    flex: 1 1 auto;
    text-align: center;
    margin: 0;
    border-bottom: 1px solid #556b38;
    padding: 1rem 0;
  }

  /* Main content adjusts to sidebar height */
  .main-content {
    margin-left: 0;
    margin-top: 0;
    padding: 1rem;
  }

  /* Other responsive adjustments (grids, uplink box, etc.) remain the same */
  .artist-showcase,
  .radio-showcase,
  .article-showcase {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .uplink-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .uplink-box .profile-image {
    width: 120px;
    height: 120px;
    margin-bottom: 1rem;
  }

  .featured-content {
    flex-direction: column;
    align-items: center;
  }

  .featured-content .featured-text {
    width: 100%;
    text-align: center;
  }

  .xp-window,
  .radio-window,
  .article-window,
  .featured-box {
    width: 100%;
    padding: 1rem;
  }

  .xp-titlebar .title-text,
  .radio-titlebar .radio-text,
  .article-titlebar .article-text,
  .uplink-text h2 {
    font-size: 1rem;
  }

  .footer {
    font-size: 0.6rem;
    padding: 0.5rem;
  }
}
@media (max-width: 720px) {
  body {
    font-size: 0.75rem; /* scale down global text */
  }

  .xp-window, 
  .radio-window, 
  .article-window, 
  .uplink-box, 
  .featured-box {
    padding: 0.8rem; /* reduce internal padding */
  }

  .uplink-box .profile-image {
    width: 100px;
    height: 100px;
  }

  .artist-showcase,
  .radio-showcase,
  .article-showcase {
    gap: 0.8rem;
  }

  .sidebar nav a {
    padding: 0.6rem 0;
    font-size: 0.75rem;
  }

  .footer {
    font-size: 0.55rem;
    padding: 0.5rem;
  }
}
