/* RESET / BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: #000;
  font-family: 'Courier New', Courier, monospace;
  color: #39ff14;
  min-height: 100vh;
  overflow-x: hidden;
}

/* STARFIELD */
.snow-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.snowflake {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #fff;
  opacity: .3;
  image-rendering: pixelated;
  animation: fall linear infinite, sway ease-in-out infinite;
}
@keyframes fall { to { top: 110vh } }
@keyframes sway {
  0% { transform: translateX(0) }
  50% { transform: translateX(10px) }
  100% { transform: translateX(-10px) }
}

/* MUSIC CONTROLLER */
.music-controller {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #04004d;
  border: 2px solid #0ff;
  border-radius: 6px;
  padding: 6px 12px;
  z-index: 2;
  box-shadow: 0 0 8px #0ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #0ff;
  image-rendering: pixelated;
}
.music-controller .ctrl-row {
  display: flex;
  gap: 10px;
}
.music-controller button {
  width: 32px;
  height: 24px;
  background: #000;
  border: 2px solid #0ff;
  color: #0ff;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite alternate;
  cursor: pointer;
}
.music-controller #music-btn,
.music-controller #repeat-btn {
  animation: none;
}
.music-controller button:hover {
  background: #002;
  border-color: #39ff14;
  color: #39ff14;
}
@keyframes pulse {
  from { box-shadow: 0 0 4px #0ff }
  to   { box-shadow: 0 0 10px #0ff }
}
#volume-slider {
  -webkit-appearance: none;
  width: 140px;
  height: 6px;
  background: #000;
  border: 2px solid #0ff;
  cursor: pointer;
}
#volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  background: #0ff;
  border: 1px solid #fff;
  border-radius: 2px;
}

/* YOUTUBE FULLSCREEN */
#yt-holder {
  display: none;
}
#yt-holder.bg-active {
  display: block;
}
#yt-holder iframe {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 3 !important;
}

/* DIM, TILTED OVERLAY */
#video-overlay {
  display: none;
}
#video-overlay.visible {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  transform: skewY(-3deg);
  transform-origin: top left;
  z-index: 4;
  pointer-events: none;
}

/* FADE-OUT UI */
#main-ui {
  position: relative;
  z-index: 1;
  transition: opacity 10s ease;
}
#main-ui.inactive {
  opacity: 0;
}

/* PAGE LAYOUT */
.page-wrapper {
  width: 1182px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* CONTAINER */
.container {
  background: rgba(10,10,50,0.85);
  border-radius: 10px;
  padding: 1.5rem;
  width: 900px;
}

/* HEADER + SEARCH */
header {
  text-align: center;
  margin-bottom: 1.5rem;
}
header h1 {
  color: #ff00cc;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px #ff00cc;
}
.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
#search-input,
.projects-button {
  width: 100%;
  max-width: 400px;
  padding: .5rem;
  font-size: 1rem;
  background: #000;
  border: 2px solid #39ff14;
  border-radius: 4px;
  color: #39ff14;
}
.projects-button {
  text-align: center;
  text-decoration: none;
  border-color: #0ff;
}
.projects-button:hover {
  background: #111;
  color: #0ff;
  text-shadow: 0 0 4px #0ff;
}

/* MAIN CONTENT */
.content {
  margin-top: 1.5rem;
}
.content p,
.content h3 {
  margin-bottom: 1rem;
  color: #eee;
}

/* BLOG POSTS */
.blog-posts {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
}
.blog-post {
  background: rgba(0,0,0,0.75);
  border: 2px solid #ff00cc;
  border-radius: 6px;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
  transition: .2s;
}
.blog-post img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.blog-post:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px #0ff;
}
.post-title {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  padding: .2rem .5rem;
  border-radius: 4px;
  font-size: .8rem;
  color: #39ff14;
  white-space: nowrap;
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sidebar-section {
  background: #04004d;
  padding: 1rem;
  border-radius: 6px;
  color: #fff;
}

/* PROJECT TITLE */
.project-title {
  position: relative;
  background: yellow;
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
}
.project-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

/* BLOG PREVIEW */
.blog-preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: #0ff;
  width: 100%;
  max-width: 160px;
}
.preview-box img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  border: 2px solid #fff;
  border-radius: 6px;
}
.preview-box span {
  margin-top: .3rem;
  font-size: .9rem;
  color: #0ff;
}
.preview-box:hover span {
  text-decoration: underline;
  color: #fff;
}

/* SOCIAL */
.social {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: .5rem;
}
.social img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border: 1px solid #fff;
  border-radius: 4px;
}

/* HIDE ON MOBILE */
@media(max-width: 800px) {
  .sidebar,
  .desktop-only {
    display: none;
  }
}
