/* ========================================
   IDM SHOWCASE SPRING 2026
   CLEANED SHARED STYLESHEET

   Sections:
   1. Global reset + variables
   2. Shared body + footer
   3. Splash page
   4. Splash mobile
   5. Project listing page
   6. Project listing mobile
   7. Project detail page
   ======================================== */

/* ----------------------------------------
   1. GLOBAL RESET + VARIABLES
---------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --board-width: 1440;
  --board-height: 850;
  --footer-height: 3.5rem;

  --brown: #5a341d;
  --paper-ink: #2a1a0a;
  --cork-bg: #d9b98f;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background-color: var(--cork-bg);
  background-image: url("./images/corkboard.jpg");
  background-repeat: repeat;
  background-size: 1500px auto;

  font-family: system-ui, sans-serif;
}

img {
  max-width: 100%;
}

/* ----------------------------------------
   2. SHARED FOOTER
---------------------------------------- */

.idm-showcase__footer {
  width: 100%;
  min-height: var(--footer-height);

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;

  background: var(--brown);
}

.footer-icons {
  width: 8rem;
  transform: translateY(0.25rem);
}

.footer-icon-row {
  display: inline-flex;
  align-items: center;
}

.footer-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  width: 3rem;
  height: 3rem;
  text-decoration: none;
}

.footer-icon img {
  width: 4rem;
  height: 4rem;
  object-fit: contain;
}

.idm-showcase__footer img {
  filter: invert(1);
}

.footer-text {
  margin: 0;
  text-align: center;
  font-size: 1rem;
  line-height: 1.8;
  color: white;
}

.footer-link {
  color: white;
  text-decoration: underline;
}

.footer-logo {
  width: 10.5rem;
  height: 3.5rem;
  object-fit: contain;
}

@media (max-width: 600px) {
  .idm-showcase__footer {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .footer-icons {
    width: auto;
    transform: none;
  }

  .footer-icon-row {
    justify-content: flex-end;
  }

  .footer-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .footer-icon img {
    width: 3.5rem;
    height: 3.5rem;
  }

  .footer-text {
    text-align: right;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }

  .footer-logo {
    width: 8rem;
    height: auto;
    margin-bottom: 1.5rem;
  }
}

/* ----------------------------------------
   3. SPLASH PAGE
---------------------------------------- */

.showcase-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.desktop-board {
  position: relative;

  width: min(
    100vw,
    calc(
      (100vh - var(--footer-height)) * var(--board-width) / var(--board-height)
    )
  );

  aspect-ratio: var(--board-width) / var(--board-height);

  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  margin-bottom: auto;

  overflow: visible;
}

.board-img {
  position: absolute;
  display: block;
  height: auto;
  pointer-events: none;
}

.board-img--headline,
.board-img--paragraph,
.board-img--day1,
.board-img--day2 {
  z-index: 10;
}

.board-img--pins {
  z-index: 20;
}

.board-img--magnifyer {
  z-index: 25;
}

.board-link {
  position: absolute;
  display: block;
  z-index: 30;
}

.board-link img {
  width: 100%;
  height: auto;
  display: block;
}

/* Desktop splash image placement */

.board-img--headline {
  left: 1.25%;
  top: -5%;
  width: 48%;
}

.board-img--paragraph {
  left: 49.4%;
  top: -0.3%;
  width: 45%;
}

.board-img--day1 {
  left: 5.5%;
  top: 44%;
  width: 36%;
}

.board-img--day2 {
  left: 58%;
  top: 44%;
  width: 36%;
}

.board-img--pins {
  left: 11.5%;
  top: -0.5%;
  width: 76.5%;
}

.board-img--magnifyer {
  left: 45%;
  top: 32%;
  width: 17%;
  transform: rotate(335deg);
}

.board-link--day1-rsvp {
  left: 26%;
  top: 44%;
  width: 17%;
}

.board-link--day2-rsvp {
  left: 77.5%;
  top: 47.5%;
  width: 20%;
}

.board-link--archives {
  left: 44%;
  top: 82.5%;
  width: 18%;
}

.board-link--project-listing {
  left: 45.5%;
  top: 43.5%;
  width: 9%;
}

/* ----------------------------------------
   4. SPLASH MOBILE
---------------------------------------- */

.mobile-board {
  display: none;
}

@media (max-width: 600px) {
  .desktop-board {
    display: none;
  }

  .mobile-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0;
  }

  .mobile-img,
  .mobile-link img {
    display: block;
    width: 100%;
    height: auto;
  }

  .mobile-img--top-bar {
    width: 100%;
    margin-bottom: -1.5rem;
  }

  .mobile-img--headline {
    width: 96%;
    transform: translateX(-3%);
  }

  .mobile-img--paragraph {
    width: 96%;
    transform: translateX(-2%);
  }

  .mobile-link--project-listing {
    width: 100%;
    margin-bottom: 2rem;
  }

  .mobile-img--day1,
  .mobile-img--day2 {
    width: 80%;
    margin-bottom: -5rem;
  }

  .mobile-link--day1-rsvp {
    width: 85%;
    transform: translateX(-5%);
    margin-bottom: 1.5rem;
  }

  .mobile-link--day2-rsvp {
    width: 90%;
    margin-bottom: 1.5rem;
  }

  .mobile-link--archives {
    width: 90%;
  }
}

/* ----------------------------------------
   5. PROJECT LISTING PAGE
---------------------------------------- */

.listing-page {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.listing-board {
  position: relative;
  width: min(100vw, 1440px);
  min-height: calc(100vh - var(--footer-height));
  margin: 0 auto;
  padding: 2rem 3rem 4rem;
}

.listing-headline-link {
  display: block;
  width: 40%;
  margin-bottom: 2rem;
  transform: translateX(-5rem) rotate(-10deg);
}

.listing-headline-link img {
  width: 100%;
  height: auto;
  display: block;
}

/* Filter paper */

.filter-column {
  position: absolute;
  left: 0.5rem;
  top: 15rem;
  width: 22rem;
}

.filter-image-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.filter-paper {
  position: relative;
  z-index: 2;
  padding: 5.8rem 3.5rem 5rem;
}

.filter-paper__content {
  position: relative;
  font-family: "Special Elite", monospace;
  font-size: 1rem;
  line-height: 0.9;
}

.filter-label {
  margin: 0 0 1rem;
  font-weight: bold;
}

.filter-link,
.filter-button {
  display: block;
  margin-bottom: 0.25rem;

  font-family: inherit;
  font-size: inherit;
  color: black;
  text-decoration: underline;

  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.filter-paper label {
  display: block;
  margin-bottom: 0.25rem;
}

.filter-paper input {
  accent-color: black;
}

.filter-paper hr {
  width: 100%;
  border: none;
  border-top: 0.15rem solid black;
  margin: 1rem 0 1.5rem;
}

/* Project grid */

.projects-section {
  margin-left: 24rem;
  margin-top: -12rem;
  padding-top: 0;
}

.projects-header {
  width: fit-content;
  margin: 0 auto 3rem;
  padding: 0.4rem 2.5rem;

  background: var(--brown);
  color: white;

  font-family: "Playfair Display SC", Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  text-align: center;

  transform: rotate(-3deg);
}

.projects {
  list-style: none;
  padding: 0;
  margin: 0 0 4rem;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
}

.project-card {
  min-width: 0;
}

.project-card__link {
  display: block;

  width: 13.75rem;
  height: 15.5rem;
  padding: 1rem;

  background: white;
  color: black;
  text-decoration: none;
  overflow: hidden;

  box-shadow: 0.35rem 0.45rem 0.45rem rgba(0, 0, 0, 0.25);
}

.project-card__image {
  width: 10.875rem;
  height: 7.25rem;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
}

.project-card__title {
  margin: 0 0 0.75rem;
  font-family: "Reenie Beanie", cursive;
  font-size: 1.8rem;
  line-height: 1;
  text-align: center;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card__author {
  margin: 0;
  font-family: "Reenie Beanie", cursive;
  font-size: 1.55rem;
  line-height: 1;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Listing desktop footer behavior only */

@media (min-width: 601px) {
  .listing-page > .idm-showcase__footer {
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 1000;
  }

  .listing-board {
    padding-bottom: calc(var(--footer-height) + 4rem);
  }
}

/* ----------------------------------------
   6. PROJECT LISTING MOBILE
---------------------------------------- */

.back-to-top {
  display: none;
}

@media (max-width: 600px) {
  .listing-board {
    width: 100%;
    min-height: auto;
    padding: 0 0 3rem;
  }

  .listing-headline-link {
    width: 110%;
    margin: 0 auto 1.5rem;
    transform: translateX(-3%) rotate(-6deg);
  }

  .filter-column {
    position: relative;
    left: auto;
    top: auto;
    width: 92%;
    margin: 0 auto 2.5rem;
  }

  .filter-image-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
  }

  .filter-paper {
    padding: 4.8rem 2.8rem 3.5rem;
  }

  .filter-paper__content {
    font-size: clamp(0.75rem, 3.3vw, 1rem);
    line-height: 1.05;
  }

  .filter-paper hr {
    margin: 0.8rem 0 1.1rem;
  }

  .projects-section {
    margin-left: 0;
    margin-top: 0;
    padding-top: 0;
  }

  .projects-header {
    font-size: 2.45rem;
    padding: 0.35rem 1.5rem;
    margin: 2rem auto 2rem;
    transform: rotate(-3deg);
  }

  .projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.25rem;
    margin-bottom: 3rem;
  }

  .project-card__link {
    width: 22rem;
    height: 22.5rem;
    padding: 1rem;
  }

  .project-card__image {
    width: 18.5rem;
    height: 11.5rem;
    margin-bottom: 1.25rem;
  }

  .project-card__title {
    font-size: 3rem;
    line-height: 0.95;
  }

  .project-card__author {
    font-size: 2rem;
  }

  .listing-page > .idm-showcase__footer {
    position: static;
  }

  .back-to-top {
    display: flex;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1001;

    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;

    background: var(--brown);
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    border-radius: 999px;
  }
}

/* ----------------------------------------
   7. PROJECT DETAIL PAGE
---------------------------------------- */

.page {
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.project-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.folder-wrapper {
  position: relative;
  width: auto;
  height: calc(100vh - var(--footer-height));
  margin: 0 auto;
  max-width: 100vw;
}

.folder-bg {
  height: 100%;
  width: auto;
  max-width: 100vw;
  display: block;
  object-fit: contain;
}

.student-image {
  position: absolute;
  top: 28%;
  left: 15%;
  width: 25%;
  /* aspect-ratio: 4 / 3; */
  /* object-fit: cover; */
}

.project-title {
  position: absolute;
  top: 22%;
  left: 5%;
  width: 40%;

  margin: 0;
  color: var(--paper-ink);

  font-family: "Special Elite", monospace;
  font-size: clamp(0.75rem, 1.5vw, 1.1rem);
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
}

.project-name {
  position: absolute;
  top: 70%;
  left: 4.5%;

  color: var(--paper-ink);
  font-family: "Reenie Beanie", cursive;
  font-size: 2.3vw;

  transform: rotate(-90deg);
  transform-origin: left center;
}

.project-text {
  position: absolute;
  top: 23%;
  right: 10%;
  width: 36%;
  height: 70%;

  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.25rem;
}

.project-description {
  margin: 0.25rem 0 0;
  color: var(--paper-ink);

  font-family: "Special Elite", monospace;
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  line-height: 1.4;
}

.project-keywords {
  margin: 0.25rem 0 0;
  color: var(--brown);

  font-family: "Special Elite", monospace;
  font-size: clamp(0.6rem, 0.9vw, 0.75rem);
  font-style: italic;
}

.social-links {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
  flex-wrap: wrap;
}

.social-links a {
  color: var(--brown);
  font-family: "Special Elite", monospace;
  font-size: clamp(0.45rem, 0.8vw, 0.65rem);
  text-decoration: underline;
}

.project-buttons {
  display: flex;
  gap: 0;
}

#portfolio-btn {
  position: absolute;
  top: 78%;
  left: 30%;
  width: 12%;
  z-index: 10;
  transform: rotate(8deg);
}

#project-btn {
  position: absolute;
  top: 75%;
  left: 12%;
  width: 12%;
  z-index: 10;
  transform: rotate(350deg);
}

.project-buttons a img {
  width: 100%;
  height: auto;
  display: block;
}

.project-header-link {
  position: absolute;
  top: 5%;
  left: 11%;
  width: 15%;
  z-index: 10;
  display: block;
  transform: rotate(-5deg);
}

.project-header-link img {
  width: 100%;
  height: auto;
  display: block;
}

.project-meta {
  position: absolute;
  top: 5%;
  right: 2.5%;
  z-index: 20;
}

.project-tag {
  position: absolute;

  padding: 0.6rem 1.2rem;

  font-family: "Special Elite", monospace;
  font-size: 1.25rem;
  line-height: 1;

  text-align: center;
  text-decoration: underline;
  color: #2a1a0a;

  box-shadow:
    0 0.2rem 0 rgba(0, 0, 0, 0.18),
    0 0.35rem 0.7rem rgba(0, 0, 0, 0.15);
}

/* purple tag */
.project-tag--year {
  top: 0;
  right: 0;

  background: #d9b8f3;

  transform: rotate(-1deg);
}

/* yellow tag */
.project-tag--medium {
  top: 4.5rem;
  right: 1rem;

  background: #efe173;

  transform: rotate(1deg);
}

/* ---------------------------------------- */
/* PROJECT DETAIL MOBILE                    */
/* ---------------------------------------- */

.project-page-mobile {
  display: none;
}

.project-back-link {
  display: none;
}

@media (max-width: 600px) {
  .page {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .project-page--desktop {
    display: none;
  }

  .project-page-mobile {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem;
  }

  .project-back-link-mobile {
    align-self: flex-start;
    font-family: "Special Elite", monospace;
    font-size: 2rem;
    color: black;
    text-decoration: none;
  }
  .mobile-project-cover {
    position: relative;
    width: 100%;
    padding: 0;
    overflow: hidden;

    /* width: 100%; */
    /* padding: 2rem 1rem; */
  }

  .mobile-project-cover-bg {
    display: block;
    width: 100%;
    height: auto;
  }

  .project-header-link-mobile {
    display: block;
    width: 30%;
    margin: -1rem auto 2rem;
    /* transform: rotate(-5deg); */
  }

  /* .project-header-link-mobile img {
    display: block;
    width: 100%;
    height: auto;
  }

  #title-mobile {
    margin: 0 0 0.5rem;
    font-family: "Special Elite", monospace;
    font-size: 1.5rem;
    text-align: center;
    color: var(--paper-ink);
  }

  #name-mobile {
    margin: 0;
    font-family: "Reenie Beanie", cursive;
    font-size: 1.4rem;
    text-align: center;
    color: var(--paper-ink);
  } */

  .project-header-link-mobile {
    position: absolute;
    top: 3%;
    left: 28%;
    width: 58%;

    display: block;
    transform: rotate(-5deg);
    z-index: 2;
  }

  .project-header-link-mobile img {
    display: block;
    width: 80%;
    height: auto;
    transform: translateX(2.5rem) translateY(3rem) rotate(12deg);
  }

  #title-mobile {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);

    width: 80%;
    margin: 0;

    font-family: "Special Elite", monospace;
    font-size: 2rem;
    line-height: 1.1;
    text-align: center;
    color: var(--paper-ink);

    z-index: 2;
  }

  #name-mobile {
    position: absolute;
    top: 85%;
    left: 50%;
    transform: translateX(-50%);

    width: 80%;
    margin: 0;

    font-family: "Reenie Beanie", cursive;
    font-size: 2.5rem;
    line-height: 1;
    text-align: center;
    color: var(--paper-ink);

    z-index: 2;
  }

  .mobile-project-content {
    background: #f6efcf;
    border-radius: 1rem;
    padding: 1.25rem;
  }

  #main-img-mobile img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }

  #description-mobile {
    margin: 0 0 1rem;
    font-family: "Special Elite", monospace;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--paper-ink);
  }

  #keywords-mobile {
    margin: 0 0 1rem;
    font-family: "Special Elite", monospace;
    font-size: 0.75rem;
    line-height: 1.35;
    font-weight: bold;
    color: var(--paper-ink);
  }

  #social-links-mobile {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-family: "Special Elite", monospace;
    font-size: 0.85rem;
  }

  #social-links-mobile a {
    color: var(--brown);
    text-decoration: underline;
  }

  .mobile-project-actions {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: center;
  }

  #project-btn-mobile,
  #portfolio-btn-mobile,
  #year-mobile,
  #medium-mobile {
    display: block;
    width: 75%;
    padding: 0.75rem 1rem;
    text-align: center;

    font-family: "Special Elite", monospace;
    font-size: 0.9rem;
    color: var(--paper-ink);
    text-decoration: underline;

    background: #f6efcf;
    box-shadow: 0.25rem 0.25rem 0.4rem rgba(0, 0, 0, 0.2);
  }

  #year-mobile {
    background: #d9b8f3;
  }

  #medium-mobile {
    background: #efe173;
  }
}
