/* Container styles */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Portfolio grid layout */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-medium);
  padding-top: var(--spacing-medium);
}

@media (max-width: 1400px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    padding-top: var(--spacing-xsmall);
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    padding-top: var(--spacing-xsmall);
  }
}


/* Content area styles */
.content-area {
  width: 85%;
  max-width: 1600px; /* Adjust this value as needed */
  padding: var(--spacing-medium);
  box-sizing: border-box;
  margin: 60px auto 0; /* Centers the content and adds top margin */
}

/* Header styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-medium);
  transition: background-color 0.3s ease;
  z-index: 1005;
  box-sizing: border-box;
}

.header .main-title {
  font-size: var(--font-size-large);
  margin: 0;
  padding: 5px 10px;
  background-color: transparent;
}

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

.header .main-nav {
  display: flex;
  align-items: center;
}

.header .main-nav ul {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.header .main-nav li {
  margin-left: var(--spacing-medium);
}

.header .secondary-nav {
  margin-left: auto;
}

.header nav a {
  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);
}

.header nav a.active {
  color: var(--menu-hover-color);
  background-color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
  opacity: 0.6;
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header .main-title.scrolled,
.header nav a.scrolled {
  color: var(--menu-hover-color);
}

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

/* Media queries */
@media (max-width: 768px) {
  .header {
    flex-wrap: nowrap;
    height: auto;
    padding: var(--spacing-small);
  }

  .header .main-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header .main-title {
    font-size: var(--font-size-base);
    margin: 0;
    padding: 5px 10px;
  }

  .header .main-nav ul {
    display: flex;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
  }

  .header .main-nav li {
    margin: 0 0 0 var(--spacing-small);
  }

  .header nav a {
    margin-bottom: 0;
    display: inline-block;
  }

  .content-area {
    margin-top: 80px;
  }
}

@media (max-width: 480px) {
  .header {
    flex-wrap: wrap;
    height: auto;
    padding: var(--spacing-small);
  }

  .header .main-title {
    width: 100%;
    text-align: center;
    margin-bottom: var(--spacing-small);
  }

  .header .main-nav {
    position: static;
    transform: none;
    width: 100%;
  }

  .header .main-nav ul {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .header .main-nav li {
    margin: 0 var(--spacing-small);
  }

  .header nav a {
    margin-bottom: 0;
    display: inline-block;
  }

  .content-area {
    margin-top: 80px;
  }
}

/* Subpage Styles */

/* Subpage header styles */
.subpage-content-area {
  margin-top: 80px; /* Adjust based on your header height */
}

.header .back-button {
  color: var(--main-text-color);
  text-decoration: none;
  font-size: var(--font-size-base);
  white-space: nowrap;
}

.header .back-button:hover {
  color: var(--menu-hover-color);
}

/* Portfolio Item Styles */
.portfolio-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Portfolio Item Media */
.portfolio-item-media {
  position: relative;
  padding-top: 56.25%;
}

.portfolio-item-media img,
.portfolio-item-media video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Menu Bar Styles */
.menu-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  z-index: 1004;
}

.menu-bar nav {
  width: 100%;
}

.menu-bar ul {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ASCII Background Styles */
#ascii-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

#ascii-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Project Page Styles */
.project-content {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
  box-sizing: border-box;
}

/* Subpage Content Area Styles */
.subpage-content-area {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: var(--spacing-medium);
  box-sizing: border-box;
}

.project-header-description {
  display: flex;
  flex-direction: row;
  margin-bottom: var(--spacing-large);
  gap: var(--spacing-large);
}

.project-header {
  flex: 0 0 30%;
}

.project-description {
  flex: 1;
}

.project-main {
  display: flex;
  flex-direction: column;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
  .project-header-description {
    flex-direction: row;
    gap: var(--spacing-large);
  }

  .project-header {
    flex: 0 0 30%;
  }

  .project-description {
    flex: 1;
  }
}

@media (max-width: 768px) {
  .project-header-description {
    flex-direction: column;
  }

  .project-header {
    flex: 1 0 auto;
    margin-bottom: var(--spacing-medium);
  }
}

@media (max-width: 1200px) {
  .project-content {
    padding: 0 var(--spacing-medium);
  }
}

@media (max-width: 768px) {
  .project-header-description {
    flex-direction: column;
  }

  .project-header, .project-description {
    width: 100%;
  }

  .subpage-content-area {
    margin-top: 60px;
  }
}

@media (max-width: 480px) {
  .project-media img,
  .project-media video,
  .project-media iframe,
  .side-by-side-container img {
    width: 100%;
    height: auto;
    margin-left: 0;
    margin-right: 0;
  }

  .side-by-side-container {
    flex-direction: column;
  }
}

/* About Page Styles */
.about-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--spacing-large);
  box-sizing: border-box;
  position: relative;
  z-index: 1003;
  width: 85%; /* Match the width of the portfolio grid */
  max-width: 1200px; /* Match the max-width of the portfolio grid */
  margin: auto; /* Center the content */
  /* min-height: calc(100vh - 10px); Subtract header height */
}

.about-text {
  font-size: calc(var(--font-size-base) * 1.9);
  line-height: 1.6;
  text-align: left;
  margin-bottom: var(--spacing-large);
  padding: var(--spacing-large);
  border-radius: 30px;
  background: radial-gradient(
    ellipse at center,
    rgba(235, 245, 255, 0.703) 10%,
    rgba(235, 245, 255, 0.5) 50%,
    rgba(235, 245, 255, 0) 100%
  );
  position: relative;
  z-index: 1003;
  width: 100%;
  max-width: 100%; /* Ensure it takes the full width of the container */
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.about-text p {
  margin-bottom: var(--spacing-medium);
}

@media (max-width: 768px) {
  .about-content {
    width: 90%;
    padding: var(--spacing-medium);
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    align-items: center;
  }

  .about-text {
    font-size: var(--font-size-base);
    padding: var(--spacing-medium);
    text-align: left;
  }
}

@media (max-width: 480px) {
  .about-content {
    width: 95%;
    padding: var(--spacing-small);
  }

  .about-text {
    font-size: var(--font-size-small);
    padding: var(--spacing-small);
    text-align: left;
  }
}


/* Contact Page Styles */
.contact-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--spacing-large);
  box-sizing: border-box;
  position: relative;
  z-index: 1003;
  width: 85%; /* Match the width of the portfolio grid */
  max-width: 1200px; /* Match the max-width of the portfolio grid */
  margin: 60px auto 0; /* Center the content and add top margin */
}

.contact-info {
  font-size: calc(var(--font-size-base) * 1.9);
  line-height: 1.6;
  text-align: left;
  margin-bottom: var(--spacing-large);
  padding: var(--spacing-large);
  border-radius: 30px;
  background: radial-gradient(
    ellipse at center,
    rgba(235, 245, 255, 0.703) 10%,
    rgba(235, 245, 255, 0.5) 50%,
    rgba(235, 245, 255, 0) 100%
  );
  position: relative;
  z-index: 1003;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.contact-info h2 {
  font-weight: normal;
}

@media (max-width: 768px) {
  .contact-content {
    width: 90%; /* Adjust width for smaller screens */
    padding: var(--spacing-medium);
    margin-top: 60px; /* Ensure it is just beneath the header */
    align-items: center; /* Center items horizontally */
  }

  .contact-info {
    font-size: var(--font-size-base);
    text-align: left; /* Center text */
  }
}

@media (max-width: 480px) {
  .contact-content {
    width: 95%; /* Adjust width for mobile screens */
    padding: var(--spacing-small);
  }

  .contact-info {
    font-size: var(--font-size-small);
  }
}

/* test */
