/* Project Pages Styling */

/* Reveal on scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Back Arrow */
.back-arrow {
  position: absolute;
  top: 120px;
  left: 120px;
  z-index: 10;
  color: var(--gray);
  text-decoration: none;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.back-arrow:hover {
  color: var(--brand-blue);
}

/* Project Title and Typography */
.project-page-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  color: #5b616c;
  letter-spacing: -0.02em;
  line-height: 1.1;
  animation: fadeInUp 0.8s ease-out;
  margin-bottom: 0.5rem;
  text-align: left;
}

.project-tagline {
  font-family: var(--font-subtitle);
  font-size: 1.125rem;
  color: #6B7280;
  font-weight: 400;
  margin-bottom: 0;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  text-align: left;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Project Hero Layout */
.project-hero {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(155, 176, 206, 0.2);
}

.project-hero-image {
  order: 1;
  margin: 0;
  animation: fadeInUp 0.8s ease-out;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Make images bigger for specific pages */
.project-hero-image img[src*="portkey-image"],
.project-hero-image img[src*="portkey-mockup"],
.project-hero-image img[src*="speak-easy-hub"] {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 600px;
}

.project-header-content {
  order: 2;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 -2rem;
  width: calc(100% + 4rem);
}

.project-text-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(155, 176, 206, 0.2);
  width: 95%;
  margin: 0 auto;
}

.project-text-left {
  flex: 1;
}

/* Project Meta Info Layout */
.project-meta-info {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  padding: 1rem 2rem 0;
  position: relative;
  justify-content: center;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 180px;
  align-items: flex-start;
  text-align: left;
}

.meta-label {
  font-weight: 600;
  color: var(--gray);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.meta-value {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.4;
  white-space: pre-line;
}

.meta-value a {
  color: var(--gray);
  text-decoration: none;
  transition: color 0.3s ease;
}

.meta-value a:hover {
  color: var(--brand-blue);
}

/* Prototype Button */
.prototype-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 12px 24px;
  border: 1px solid rgba(155, 176, 206, 0.3);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--gray);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.6)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(155, 176, 206, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -1px 0 rgba(155, 176, 206, 0.1);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  animation: fadeInUp 0.8s ease-out 0.4s both;
  flex-shrink: 0;
}

.prototype-button:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(255, 255, 255, 0.8)
  );
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(155, 176, 206, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(155, 176, 206, 0.2);
}

.prototype-button svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.prototype-button:hover svg {
  transform: translate(2px, -2px);
}

/* Project Content Styling */
.project-content {
  max-width: 1200px;
  margin: 0;
  padding: 2rem;
  text-align: left;
}

.overview {
  width: 100%;
  margin: 0 0 4rem 0;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--gray);
  text-align: left;
}

.challenge {
  margin-bottom: 4rem;
  width: 95%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.challenge h2 {
  font-size: 1.5rem;
  color: #5b616c;
  margin-bottom: 1rem;
  text-align: left;
}

.highlight {
  font-size: 1.4rem;
  color: #E85A4F;
  line-height: 1.5;
  text-align: left;
}

.context {
  margin-bottom: 4rem;
  width: 95%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.context h2 {
  font-size: 1.5rem;
  color: #5b616c;
  margin-bottom: 1rem;
  text-align: left;
}

.context p {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: left;
}

.elements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  text-align: left;
}

.element {
  background: #FDF6F1;
  padding: 2rem;
  border-radius: 16px;
  text-align: left;
}

.element h3 {
  color: #E85A4F;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: left;
}

.element p {
  color: var(--gray);
  line-height: 1.5;
  text-align: left;
}

/* SpeakEasy Specific Sections */
.reflections {
  margin-bottom: 4rem;
  width: 95%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.section-header {
  margin-bottom: 2rem;
  text-align: left;
}

.section-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #CD3735;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.5rem;
  text-align: left;
}

.reflections h2 {
  font-size: 2rem;
  color: #076282;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-align: left;
}

.takeaways-content {
  margin-bottom: 3rem;
  text-align: left;
}

.takeaways-content p {
  color: var(--gray);
  line-height: 1.2;
  font-size: 1.125rem;
  text-align: left;
}

.judge-feedback {
  margin-bottom: 2rem;
  text-align: left;
}

.feedback-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2274A5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
  text-align: left;
}

.feedback-list {
  list-style: none;
  padding-left: 0;
  text-align: left;
}

.feedback-list li {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
  text-align: left;
}

.feedback-list li::before {
  content: "•";
  color: #CD3735;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.login-transparency {
  margin-bottom: 4rem;
  width: 95%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.login-transparency h2 {
  font-size: 1.5rem;
  color: #076282;
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: left;
}

.login-transparency p {
  color: var(--gray);
  line-height: 1.6;
  font-size: 1.125rem;
  text-align: left;
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-content {
    padding: 2rem 1rem;
  }

  .overview {
    font-size: 1.1rem;
    margin-bottom: 3rem;
  }

  .highlight {
    font-size: 1.2rem;
  }

  .elements-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .element {
    padding: 1.5rem;
  }
  .back-arrow {
    left: 20px;
    top: 94px; /* moved slightly down on mobile */
  }
  
  /* Add space between back arrow and hero image */
  .project-hero {
    margin-top: 2rem;
  }
  
  .project-text-content {
    flex-direction: row;        /* keep title and button on one line */
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;            /* allow wrap if space is tight */
  }
  
  .project-meta-info {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
  }
  
  .prototype-button {
    align-self: center;       /* inline with title */
    margin-top: 0;            /* same line as title */
    margin-bottom: 0;
  }
  /* Ensure all project page buttons match on mobile */
  .red-prototype-button,
  .blue-prototype-button {
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .project-hero-image img[src*="portkey-mockup"],
  .project-hero-image img[src*="speak-easy"] {
    width: 100%;
    margin-left: 0;
  }

  .project-header-content {
    margin: 0;
    width: 100%;
  }

  .project-text-content,
  .project-meta-info {
    padding: 0;
  }
  .meta-item { align-items: center; text-align: center; }
  .meta-value { text-align: center; }

  /* Give project taglines a little breathing room on mobile */
  .project-tagline { margin-bottom: 0.5rem; }
}
