/* General Page Styles */
body {
  font-family: Inter, sans-serif;
  color: #111;
  margin: 0 auto;
  line-height: 1.5em;
  font-size: 14px;
  font-weight: 350;
}

h1 {
  margin: 0 0 0.25em 0;
  font-size: 2em;
  font-weight: 400;
}

h2 {
  font-size: 1.375em;
  font-weight: 400;
}

a {
  color: #18d;
  text-decoration: none;
}
a:hover {
  opacity: 0.7;
}

section {
  max-width: 55em;
  margin: 0 auto 2em auto;
  padding: 0 2em;
}

.top-spacing {
  height: 4em;
}

/* Profile Layout */
.profile-section {
  display: flex;
  align-items: flex-start;
  gap: 2em 1.5em;
  flex-wrap: wrap-reverse;
}

.profile-text {
  flex-grow: 1;
  flex-basis: 20em;
}

.profile-photo-box {
  display: block;
}

.profile-photo {
  width: 12em;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5%;
  margin-top: -0.7em;
}

/* Paper list */
.paper-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.paper {
  padding: 1em;
  margin-left: -1em;
  margin-right: -1em;
  display: flex;
  align-items: center;
  gap: 1em 1.5em;
  flex-wrap: wrap;
}

.paper-visual {
  width: 13em;
  height: 9.5em;
  object-fit: contain;
  border-radius: 0.2em;
}

.paper-textual {
  flex-grow: 1;
  flex-basis: 20em;
}

.paper-summary {
  opacity: 0.65;
}

/* Show/hide older papers */
#paper-list[data-show-recent="true"] .paper:not(.paper-recent) {
  display: none;
}

#paper-list[data-show-recent="false"] .project {
  display: flex;
}

/* Projects */
.project-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.project {
  padding: 1em;
  margin-left: -1em;
  margin-right: -1em;
  display: flex;
  align-items: center;
  gap: 1em 1.5em;
  flex-wrap: wrap;
}

.project-visual {
  width: 13em;
  height: 9.5em;
  object-fit: contain;
  border-radius: 0.2em;
}

.project-textual {
  flex-grow: 1;
  flex-basis: 20em;
}

/* Show/hide older projects */
#project-list[data-show-recent="true"] .project:not(.project-recent) {
  display: none;
}

#project-list[data-show-recent="false"] .project {
  display: flex;
}


/* Misc (Memories) Section */
.misc-container {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 40px;
}

.misc-item {
  width: 30%;
  text-align: center;
}

.misc-item img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: bottom;
  border-radius: 14px;
}

/* Popup image hover effect */
.popup-img {
  cursor: zoom-in;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.popup-img:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

/* Modal (popup) */
.img-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(2px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  position: fixed;
}

.img-modal-overlay.active {
  display: flex;
}

.img-modal-content {
  max-width: 50vw;
  max-height: 50vh;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

.img-modal-close {
  position: absolute;
  top: 10%;
  right: 10%;
  transform: translate(50%, -50%);
  font-size: 32px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}
