/* Portfolio Item Styles */

.main-page-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50vh;
  background: linear-gradient(to bottom, 
      rgba(250, 244, 240, 0.7) 0%,
      rgba(250, 244, 240, 0.5) 30%,
      rgba(250, 244, 240, 0.3) 60%,
      rgba(250, 244, 240, 0) 100%);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 768px) {
  .main-page-backdrop {
    z-index: 2; /* Above ASCII canvas but below other content */
  }
}

/* Portfolio Item Styles */
.portfolio-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  transition: transform 0.3s ease;
  z-index: 2;
}

.portfolio-item:hover {
  transform: translateY(-5px);
}

/* Portfolio Item Text */
.portfolio-item-text {
  position: relative;
  z-index: 2;
  background-color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-small);
  border-radius: 0 0 8px 8px;
}

.portfolio-item-text h3 {
  margin-bottom: var(--spacing-small);
  font-size: var(--font-size-base);
  color: var(--main-text-color);
}

.portfolio-item-text p {
  font-size: var(--font-size-small);
  color: var(--main-text-color);
}

/* Main Title Styles */
.main-title {
  font-size: var(--font-size-large);
  font-weight: bold;
  text-align: center;
  padding: 0 var(--spacing-small);
  word-break: break-word;
  hyphens: auto;
}

/* Menu Bar Styles */
.header nav a {
  font-size: var(--font-size-base);
  color: var(--main-text-color);
  text-decoration: none;
  font-size: var(--font-size-base);
  white-space: nowrap;
  padding: 5px 10px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.header nav a:hover,
.header nav a.scrolled {
  color: var(--menu-hover-color);
  background-color: rgba(255, 255, 255, 0.9);
}

.main-title a {
  color: var(--main-text-color);
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.main-title a:hover {
  color: var(--menu-hover-color);
  background-color: rgba(255, 255, 255, 0.9);
}

/* ASCII Background Styles */
#ascii-canvas {
  opacity: var(--ascii-background-opacity);
}

/* Project Page Styles */
.project-media {
  margin-top: var(--spacing-medium);
}

/* Project Media Styles */
.project-media img,
.project-media video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--spacing-medium);
}

.project-media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: var(--spacing-medium);
}

/* Project Details Styles */
.project-details {
  margin-top: var(--spacing-large);
}


/* Vimeo Wrapper Styles */
.project-media .vimeo-wrapper,
.project-media .youtube-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: var(--spacing-medium);
}

.project-media .vimeo-wrapper iframe,
.project-media .youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-media .youtube-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Project Title Styles */
#project-title {
  font-size: var(--font-size-xxlarge);
  margin-bottom: var(--spacing-small);
}

#project-tags {
  font-size: var(--font-size-base);
  color: var(--secondary-text-color);
}

#project-tags span:not(:last-child)::after {
  content: " | ";
  margin: 0 var(--spacing-xsmall);
}

.project-description {
  margin-bottom: var(--spacing-large);
}

/* Project Media Styles */
.project-media img,
.project-media video,
.project-media iframe {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: var(--spacing-medium);
}

/* Backdrop Styles */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, 
        rgba(250, 244, 240, 0.9) 0%,
        rgba(250, 244, 240, 0.8) 20%,
        rgba(250, 244, 240, 0.6) 40%,
        rgba(250, 244, 240, 0.4) 60%,
        rgba(250, 244, 240, 0.3) 80%,
        rgba(250, 244, 240, 0.1) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Subpage Content Area Styles */
.subpage-content-area {
    position: relative;
    z-index: 1003;
}

/* Back Button Styles */
.back-button {
    z-index: 1006;
    position: relative;
}

/* Overlay Styles */
.overlay {
  z-index: 1;
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.3);
}

/* Overlay Hover Styles */
.portfolio-item:hover .overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Project Description Link Styles */
.project-description a {
    text-decoration: underline;
    color: var(--text-color, #333);
    background-color: transparent;
    padding: 2px 4px;
    border-radius: 3px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.project-description a:hover {
    color: var(--accent-color, #FF6B6B);
    text-decoration: none;
}

/* Side-by-side image container */
.side-by-side-container {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-medium);
    margin-bottom: var(--spacing-medium);
    flex-wrap: wrap;
}

.side-by-side-container img {
    width: calc(50% - var(--spacing-small));
    object-fit: cover;
    max-width: 100%;
}

@media (max-width: 768px) {
    .side-by-side-container {
        flex-direction: column;
    }
    .side-by-side-container img {
        width: 100%;
        margin-bottom: var(--spacing-small);
    }
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin-bottom: var(--spacing-medium);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000; /* Add a black background */
}

/* Highlight Styles */
.highlight {
    color: #d05a40; /* A vibrant blue that complements the existing color scheme */
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-image.active {
  opacity: 1;
}