/* =========================================================
   PROJECT.CSS
   Single project showcase page styles.
   This file extends main.css and only controls project pages.
   ========================================================= */

/* ---------- Active navigation state ---------- */
.active-link {
  color: #e63946;
}

/* ---------- Project page wrapper ---------- */
.project-page {
  max-width: 1060px;
}

/* =========================================================
   PROJECT HERO
   ========================================================= */
.project-hero {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.project-kicker {
  margin-bottom: 14px;

  color: #e63946;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.project-title {
  max-width: 820px;
  margin: 0 auto 22px;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -2px;
}

.project-summary {
  max-width: 680px;
  margin: 0 auto;

  color: #444444;
  font-size: 18px;
}

.project-status-row {
  margin-top: 28px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill {
  padding: 7px 13px;

  color: #555555;
  background-color: #f7f7f7;
  border: 1px solid #eeeeee;
  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;
}

.source-pill {
  color: #111111;
  background-color: #ffffff;
  border-color: #dedede;
}

.private-pill {
  color: #6b4b00;
  background-color: #fff7df;
  border-color: #f1d48a;
}

.open-source-pill {
  color: #0f5132;
  background-color: #e9f7ef;
  border-color: #b7e4c7;
}

.project-actions {
  margin-top: 30px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.button-dark {
  color: #ffffff;
  background-color: #111111;
  border-color: #111111;
}

.button-dark:hover {
  color: #ffffff;
  background-color: #e63946;
  border-color: #e63946;
}

/* =========================================================
   STARTED / COMPLETED DATE STRIP
   Put this below the live website button and above Project Overview.
   ========================================================= */
.project-dates {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  max-width: 820px;
  margin: 38px auto 0;
  padding: 18px 26px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;

  border-radius: 999px;
  background-color: #ffffff;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.045),
    inset 0 0 0 1px rgba(230, 57, 70, 0.10);
}

/* This creates the moving red border light */
.project-dates::before {
  content: "";
  position: absolute;
  z-index: 0;

  width: 180%;
  aspect-ratio: 1 / 1;

  top: 50%;
  left: 50%;

  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    transparent 270deg,
    rgba(230, 57, 70, 0.00) 292deg,
    rgba(230, 57, 70, 0.14) 312deg,
    rgba(230, 57, 70, 0.35) 332deg,
    rgba(230, 57, 70, 0.72) 350deg,
    #e63946 360deg
  );

  transform: translate(-50%, -50%);
  animation: dateBorderRunner 3.4s linear infinite;
}

/* This covers the inside, leaving only the moving border visible */
.project-dates::after {
  content: "";
  position: absolute;
  z-index: 1;

  inset: 2px;
  border-radius: inherit;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(250, 247, 244, 0.98)),
    radial-gradient(circle at top left, rgba(230, 57, 70, 0.08), transparent 34%);

  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.80),
    inset 0 0 24px rgba(230, 57, 70, 0.025);
}

.project-dates > * {
  position: relative;
  z-index: 2;
}

.date-item {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 2px;
}

.date-item span {
  color: #777777;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.date-item strong {
  color: #111111;

  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.date-item-right {
  text-align: right;
  align-items: flex-end;
}

.date-divider {
  width: 1px;
  height: 38px;

  background-color: rgba(230, 57, 70, 0.24);
}

@keyframes dateBorderRunner {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-dates::before {
    animation: none;
  }
}

/* =========================================================
   SCREENSHOT OVERVIEW
   ========================================================= */
.project-overview {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.project-heading-row {
  margin-bottom: 18px;

  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.project-heading-row p {
  max-width: 300px;

  color: #777777;
  font-size: 14px;
  text-align: right;
}

.screenshot-frame {
  overflow: hidden;
  min-height: 360px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 245, 241, 0.92)),
    radial-gradient(circle at top left, rgba(230, 57, 70, 0.10), transparent 32%);

  border: 1px solid rgba(230, 57, 70, 0.16);
  border-radius: 26px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.06);
}

.project-screenshot {
  width: 100%;
  height: 100%;
  min-height: 360px;

  display: block;

  object-fit: cover;
  object-position: top center;

  transition: transform 0.45s ease;
}

.screenshot-frame:hover .project-screenshot {
  transform: scale(1.045);
}

/* =========================================================
   PROJECT DETAILS
   ========================================================= */
.project-details {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.detail-card {
  padding: 30px;

  background-color: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035);
}

.main-detail-card h2,
.small-detail-card h3 {
  margin-bottom: 12px;

  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.main-detail-card h2 {
  font-size: 26px;
}

.small-detail-card h3 {
  font-size: 19px;
}

.detail-card p {
  color: #555555;
  font-size: 15px;
}

.detail-card p + p {
  margin-top: 12px;
}

.project-info-grid {
  margin-top: 18px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.small-detail-card {
  padding: 24px;
}

/* =========================================================
   PREVIOUS / NEXT PROJECT SWITCHER
   ========================================================= */
.project-switcher {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;

  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.switch-button {
  min-height: 96px;
  padding: 22px 24px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;

  color: #111111;
  background-color: rgba(255, 255, 255, 0.86);
  border: 1px solid #eeeeee;
  border-radius: 22px;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.035);

  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.switch-button:hover {
  transform: translateY(-3px);
  border-color: #f1c7cc;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.065);
}

.switch-button span {
  color: #777777;

  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.switch-button strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.switch-button:last-child {
  text-align: right;
  align-items: flex-end;
}

.switch-button.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.46;
  filter: blur(0.35px) grayscale(1);
  box-shadow: none;
}

.switch-button.is-disabled:hover {
  transform: none;
  border-color: #eeeeee;
}

/* =========================================================
   RESPONSIVE DESIGN
   ========================================================= */
@media (max-width: 760px) {
  .project-title {
    font-size: 42px;
    letter-spacing: -1px;
  }

  .project-summary {
    font-size: 17px;
  }

  .project-dates {
    border-radius: 28px;
  }

  .project-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .project-heading-row p {
    max-width: 100%;
    text-align: left;
  }

  .project-info-grid,
  .project-switcher {
    grid-template-columns: 1fr;
  }

  .switch-button:last-child {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .project-actions .button {
    width: 100%;
  }

  .project-dates {
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .date-divider {
    width: 100%;
    height: 1px;
  }

  .date-item-right {
    text-align: left;
    align-items: flex-start;
  }

  .detail-card,
  .small-detail-card,
  .switch-button {
    padding: 24px;
  }

  .screenshot-frame,
  .project-screenshot {
    min-height: 260px;
  }
}