/* Root and Font Definitions */
:root {
  font-family: "InterVariable", sans-serif;
  font-feature-settings: "liga" 1, "calt" 1;
  --bg-color: #ffffff;
  --text-main: #181818;
  --point-color: #ff8800;
  --canvas-color: #f0f0f0;
}

@font-face {
  font-family: "InterVariable";
  src: url("/archive/assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@supports (font-variation-settings: normal) {
  :root {
    font-family: InterVariable, sans-serif;
  }
}

/* Base Styles */
::selection {
  background-color: var(--point-color);
  color: var(--text-main);
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
}

p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4em;
}

/* Layout Components */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  line-height: 1.2em;
  padding: 1.5rem;
  border-bottom: 2px solid var(--text-main);
}

.title-area {
  position: sticky;
  top: 0;
  font-size: calc(100vw / 16);
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap !important;
  background-color: var(--bg-color);
  z-index: 100;
}

.modal .title-area {
  z-index: 200;
}

/* Tag Components */
.tag {
  display: inline-block;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  font-style: normal;
  text-decoration: none;
  line-height: 1.5em;
  padding: 0.25rem 0.8rem;
  border-radius: 6px;
  background: #ececec;
}

.tag:hover {
  transform: translateX(2px);
}

#name-tag {
  background: var(--point-color);
}

/* Accordion Components */
.accordion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 2rem;
  font-weight: 400;
  background-color: var(--bg-color);
  color: var(--text-main);
  cursor: pointer;
  padding: 1.5rem;
  width: 100%;
  text-align: left;
  border-style: solid;
  border-width: 0 0 1px 0;
  border-color: var(--text-main);
  outline: none;
  transition: 0.4s;
}

.accordion:hover {
  background-color: #ccc;
}

.accordion.active {
  background-color: var(--point-color);
}

.panel {
  flex-direction: row;
  background-color: var(--bg-color);
  display: none;
  overflow: hidden;
  border-bottom: 2px solid var(--text-main);
}

.work-date {
  font-size: 0.875rem;
  line-height: 1.4em;
  font-weight: 700;
}

.work-title {
  font-size: 1.5rem;
  line-height: 1.4em;
  font-weight: 600;
}

.panel-text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  padding: 1.5rem;
}

.description {
  height: 100%;
  line-height: 1.4em;
}

.see-more {
  cursor: pointer;
  background-color: var(--text-main);
  color: var(--bg-color);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  text-decoration: none;
}

.see-more:hover {
  background-color: var(--point-color);
  color: var(--text-main);
  text-decoration: underline;
}

/* Special Character Styles */
.special-character {
  font-feature-settings: "ss06" on;
  font-family: "InterVariable";
  font-display: swap;
  display: inline-block;
  transition: transform 200ms ease-in;
}

.accordion.active .special-character {
  transform: rotate(90deg);
}

/* Modal Components */
.modal {
  z-index: 200;
  background-color: var(--bg-color);
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
}

.modal-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  height: 100%;
  align-items: stretch;
}

.modal-content {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  gap: 1rem;
  border-bottom: 2px solid var(--text-main);
}

.modal-item-1 {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  border-right: 2px solid var(--text-main);
}

.modal-item-2 {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
}

.modal-item-3 {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  border-right: 2px solid var(--text-main);
}

.archive-game {
  grid-column: 1 / 3;
  grid-row: 3 / 5;
  background-color: var(--canvas-color);
}

.close-modal {
  cursor: pointer;
  transition: color 200ms ease-in;
}

.close-modal:hover {
  color: var(--point-color);
  transition: color 200ms ease-in;
}

#info-icon {
  cursor: pointer;
  transition: color 200ms ease-in;
}

#info-icon:hover {
  color: var(--point-color);
  transition: color 200ms ease-in;
}

/* Additional Components */
.instructor {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  text-align: right;
  line-height: 1.2em;
}

.modal-content span {
  line-height: 1.4em;
}

.sketch-container {
  width: 100%;
  height: 600px;
}

.assignment-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

/* iframe Styles */
.sketch-container iframe {
  border: none;
  height: 600px;
  width: 100%;
  background-color: var(--canvas-color);
  touch-action: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.archive-game iframe {
  border: none;
  overflow: hidden;
  touch-action: auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Media Queries */
@media (max-width: 768px) {
  .title-area {
    font-size: 2rem;
  }

  .accordion {
    font-size: 1rem;
  }

  .panel {
    flex-direction: column;
  }

  .panel-text {
    width: initial;
  }

  .description {
    height: initial;
    line-height: 1.4em;
  }

  .modal-container {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto auto auto;
  }

  .modal-item-1 {
    grid-column: 1 / 1;
    grid-row: 3 / 4;
    border-right: none;
  }

  .modal-item-2 {
    grid-column: 1 / 1;
    grid-row: 2 / 3;
  }

  .modal-item-3 {
    grid-column: 1 / 1;
    grid-row: 4 / 5;
    border-right: none;
  }

  .archive-game {
    min-height: 200px;
    grid-column: 1 / 1;
    grid-row: 1 / 2;
    border-bottom: 2px solid var(--text-main);
  }

  .modal {
    overflow-y: auto;
  }

  .sketch-container {
    height: 100vw;
  }

  .sketch-container iframe {
    height: 100vw;
  }
}

@media (min-width: 1280px) {
  .panel-text {
    width: 50%;
  }

  .modal-container {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .modal-item-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }

  .modal-item-2 {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }

  .modal-item-3 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .archive-game {
    grid-column: 1 / 4;
    grid-row: 2 / 3;
  }
}

#alert {
  display: none;
  line-height: 1.4em;
}

#details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#details-button {
  cursor: pointer;
  text-decoration: underline;
  color: #c0c0c0;
}

#details-content {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  color: #c0c0c0;
}
