/* ==========================================================================
   1. GLOBAL STYLES & LAYOUT
   ========================================================================== */
body {
  background-color: #d2b48c;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.1) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.1) 2px, transparent 2px);
  background-size: 40px 40px;
  background-attachment: fixed;
  font-family: "Courier New", Courier, monospace;
  display: flex;
  justify-content: center;
  padding-top: 50px;
  margin: 0;
}

#container {
  width: 1000px;
  background-color: #ffffff;
  box-shadow: 15px 15px 0px #000;
  border: 4px solid #000;
  display: flex;
  min-height: 600px;
}

main {
  flex: 1;
  padding: 30px;
}

/* ==========================================================================
   2. SIDEBAR NAVIGATION
   ========================================================================== */
nav {
  width: 220px;
  background-color: #f4f4f4;
  border-right: 2px solid #000;
  padding: 20px;
  text-align: center;
}

.logo {
  font-weight: bold;
  font-size: 1.4rem;
  border: 2px solid #000;
  padding: 10px 0;
  background: #fff;
  margin-bottom: 20px;
  box-shadow: 3px 3px 0px #888;
}

nav ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

nav ul li {
  margin-bottom: 10px;
}

nav a {
  display: block;
  text-decoration: none;
  color: #000;
  padding: 5px;
  border: 1px dashed transparent;
}

nav a:hover {
  background-color: #000;
  color: #fff;
  border: 1px dashed #fff;
}

nav ul li a.active {
  background-color: #000;
  color: #fff;
  font-weight: bold;
  padding: 2px 5px;
}

/* ==========================================================================
   3. COMPONENTS & TYPOGRAPHY
   ========================================================================== */
h2 {
  border-bottom: 2px solid #000;
  padding-bottom: 5px;
  margin-top: 0;
}

p {
  line-height: 1.5;
}

.date-stamp,
.photo-date {
  font-size: 0.8rem;
  color: #666;
  /* Back to your original grey */
  font-style: italic;
}

.project-card {
  border: 3px solid #000;
  /* Thicker brutalist border */
  padding: 15px;
  margin-bottom: 25px;
  background: #fff;
  box-shadow: 8px 8px 0px #000;
  /* Matching the thought-entry shadow */
  transition: transform 0.1s;
  /* Smooth little wiggle */
}

.project-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 10px 10px 0px #000;
  /* Shadow grows when hovered */
}

/* Unified Meta/Date Style */
.date-stamp,
.photo-date,
.project-meta {
  font-size: 0.8rem;
  font-weight: bold;
  color: #000;
  background: #ffff00;
  /* Your favorite retro yellow */
  border: 2px solid #000;
  /* Brutalist border */
  padding: 2px 8px;
  display: inline-block;
  text-transform: uppercase;
}

/* ==========================================================================
   4. THOUGHTS & FILTER SYSTEM
   ========================================================================== */
.filter-nav button {
  background: #fff;
  border: 3px solid #000;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 4px 4px 0px #000;
  padding: 5px 10px;
  margin-right: 5px;
  cursor: pointer;
}

.filter-nav button:active {
  box-shadow: 0px 0px 0px #000;
  transform: translate(4px, 4px);
}

.filter-nav button:hover {
  background: #000;
  color: #fff;
}

.filter-column {
  display: none;
}

.show {
  display: block;
}

.thought-header {
  display: flex;
  justify-content: space-between;
  /* This pushes items to opposite ends */
  align-items: center;
  margin-bottom: 15px;
}

.thought-entry {
  border: 3px solid #000;
  padding: 15px;
  margin-bottom: 25px;
  box-shadow: 8px 8px 0px #000;
  /* Keep your category background colors here */
}

/* --- YOUR ORIGINAL HIGH-CONTRAST COLORS --- */
.music {
  background-color: #ff79c6;
}

/* Hot Pink */
.movies {
  background-color: #bd93f9;
}

/* Purple */
.videos {
  background-color: #50fa7b;
}

/* Bright Green */
.books {
  background-color: #ffb86c;
}

/* Orange */
.words {
  background-color: #8be9fd;
}

/* Cyan */

.tag {
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 8px;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  text-transform: uppercase;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: #000;
  text-decoration: none;
  border: 1px solid #000;
  padding: 2px 8px;
  background: #fff;
}

.read-more:hover {
  background: #000;
  color: #fff;
}

/* The background overlay */
.popup-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none; /* Hidden by default */
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

/* The actual "Paper" box inside the popup */
.popup-content {
    background: #fff;
    border: 4px solid #000;
    box-shadow: 15px 15px 0px #000;
    width: 80%;
    max-width: 700px;
    padding: 30px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto; /* Scroll if the text is too long */
}

.close-popup {
    position: absolute;
    top: 10px; right: 20px;
    font-size: 40px;
    cursor: pointer;
    font-weight: bold;
}

.read-more-btn {
    font-family: "Courier New", Courier, monospace;
    font-weight: bold;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
    padding: 5px 10px;
    box-shadow: 4px 4px 0px #000;
}

.read-more-btn:hover {
    background: #000;
    color: #fff;
}

/* ==========================================================================
   5. GALLERY & POPUP
   ========================================================================== */
.gallery-item {
  border: 2px solid #000;
  padding: 10px;
  text-align: center;
  background: #fff;
  box-shadow: 5px 5px 0px #000;
}

.clickable-thumb {
  width: 400px;
  height: 400px;
  object-fit: cover;
  border: 1px solid #000;
  cursor: pointer;
}

.popup-image {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.9);
  height: 100%;
  width: 100%;
  z-index: 1000;
  display: none;
  padding: 20px;
}

.popup-image span {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 50px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}

.popup-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}


#popup-body {
    color: #000;
    line-height: 1.6;
}

#popup-body p {
    margin-bottom: 15px;
}


/* ==========================================================================
   6. RESPONSIVE DESIGN (MOBILE)
   ========================================================================== */

@media screen and (max-width: 800px) {
  /* 1. Stack the Sidebar and Main content vertically */
  #container {
    width: 95%;        /* Leave a tiny gap on the sides */
    flex-direction: column;
    margin: 10px auto;
    box-shadow: 8px 8px 0px #000; /* Smaller shadow for smaller screens */
  }

  /* 2. Make Sidebar full width and horizontal */
  nav {
    width: 100%;
    border-right: none;
    border-bottom: 4px solid #000;
    box-sizing: border-box;
    padding: 15px;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;   /* Wrap links to next line if they don't fit */
    justify-content: center;
    gap: 10px;
  }

  nav ul li {
    margin-bottom: 0;  /* Remove vertical spacing */
  }

  /* 3. Hide the visitor counter or sidebar cards on mobile to save space */
  nav .project-card {
    display: none;
  }

  /* 4. Adjust Main content padding */
  main {
    padding: 15px;
  }

  /* 5. Make Gallery Images fit the screen */
  .clickable-thumb {
    width: 100%;
    height: auto;
  }

  /* 6. Adjust Thought Header for small screens */
  .thought-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* 7. Make the Popup Box wider on mobile */
  .popup-content {
    width: 90%;
    padding: 20px;
  }
}

@media screen and (max-width: 800px) {
  .logo {
    margin: 0 auto 15px auto;
    max-width: 200px;
  }
}
