/* ─────────────────────────────────────────
   GENERAL
───────────────────────────────────────── */

html,
body {
  overflow-x: clip;
  overflow-y: visible;
  width: 100%;
}

body {
  position: relative;
  margin: 0;
}

.body {
  position: relative;
  overflow-x: clip;
}

.homepage-container {
  margin-left: 44px;
  align-items: flex-start;
}

.about-container {
  margin-left: 60px;
  align-items: flex-start;
}

.project-container {
  margin-left: 45px;
  padding-left: 15px;
  padding-right: 15px;
  align-items: flex-start;
}

.tag-container {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
}

.test {
  background-color: coral;
}

.test2 {
  background-color: cornflowerblue;
  min-height: 200vh;
}

.test3 {
  background-color: greenyellow;
}

.bg {
  background-color: white;
}

.bg-profile {
  background-color: #bbf4ff;
}

.wrapper {
  position: relative;
}

/* ─────────────────────────────────────────
   FONTS
───────────────────────────────────────── */

@font-face {
  font-family: "psans-regular";
  src: url(../fonts/PracticeSans-Regular.woff) format("woff");
}

@font-face {
  font-family: "psans-medium";
  src: url(../fonts/PracticeSans-Medium.woff) format("woff");
}

@font-face {
  font-family: "psans-bold";
  src: url(../fonts/PracticeSans-Bold.woff) format("woff");
}

.nav-text {
  font-family: "psans-bold";
  font-size: 2em;
  color: #4e3916;
}

.title {
  font-family: "psans-bold";
  font-size: 3em;
  color: #4e3916;
}

.blurb {
  font-family: "psans-bold";
  font-size: 2em;
  color: #4e3916;
}

.home-project-title {
  font-family: "psans-bold";
  font-size: 1.5em;
  color: #4e3916;
}

.home-project-desc {
  font-family: "psans-medium";
  font-size: 1em;
  color: #4e3916;
  margin-top: 20px;
}

.footer-type {
  font-family: "psans-medium";
  font-size: 1em;
  color: #4e3916;
}

.footer-type-bold {
  font-family: "psans-bold";
  font-size: 1em;
  color: #4e3916;
}

.body-text {
  font-family: "psans-regular";
  font-size: 1.2em;
  line-height: 1.2em;
  color: #4e3916;
}

.body-text-bold {
  font-family: "psans-bold";
  font-size: 1.2em;
  line-height: 1.2em;
  color: #4e3916;
}

.body-text-transparent {
  font-family: "psans-regular";
  font-size: 1.2em;
  line-height: 1.2em;
  color: #4e3916;
  opacity: 50%;
}

.description-text {
  font-family: "psans-regular";
  font-size: 1.5em;
  line-height: 1.5em;
  color: #4e3916;
}

.text-indent {
  text-indent: 2em;
}

.text-box {
  column-count: 1;
  column-gap: 20px;
}

a.nav-text {
  text-decoration: none;
  color: #4e3916;
}

/* ─────────────────────────────────────────
   DECORATIVE
   NOTE: standardized spacing rule — every dashed
   line (top/bottom/left/right) gets 15px of padding
   on the side it sits on. Where two elements share
   a line (e.g. grid columns), each side gets 15px,
   totaling 30px between them.
───────────────────────────────────────── */

.holepunch {
  width: 1em;
  height: 1em;
  background-color: #4e3916;
  border-radius: 1em;
  margin-bottom: 3em;
}

.dot {
  border-right: 1px dashed #4e3916;
}

.border-left,
.border-right {
  top: 0;
  bottom: 0;
  box-sizing: content-box;
  width: 1em;
  background-image: radial-gradient(
    circle at 0.5em 0.5em,
    #4e3916 0.5em,
    transparent 0.5em
  );
  background-size: 1em 4em;
  background-position: center top;
  background-repeat: repeat-y;
}

.border-left {
  padding-left: 15px;
  padding-right: 15px;
  border-right: 1px dashed #4e3916;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.border-right {
  padding-left: 15px;
  padding-right: 15px;
  border-left: 1px dashed #4e3916;
  position: absolute;
  top: 0;
  right: 0;
  pointer-events: none;
}

.border-left.line-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  box-sizing: content-box;
  width: 1em;
  background-image: radial-gradient(
    circle at 0.5em 0.5em,
    #4e3916 0.5em,
    transparent 0.5em
  );
  background-size: 1em 4em;
  background-position: center top;
  background-repeat: repeat-y;
}

.line-left {
  border-left: 1px dashed #4e3916;
  padding-left: 15px;
}

.line-left-solid {
  border-left: 1px #4e3916;
}

.line-right {
  border-right: 1px dashed #4e3916;
  padding-right: 15px;
}

.line-top {
  border-top: 1px dashed #4e3916;
  padding-top: 15px;
}

.line-bottom {
  border-bottom: 1px dashed #4e3916;
}

.footer {
  left: 0;
  bottom: 0;
  width: 100%;
  margin-bottom: 60px;
  margin-top: 1em;
  gap: 1em;
}

.tag {
  font-family: "psans-medium";
  font-size: 1em;
  letter-spacing: 0.05em;
  color: white;
  border: 1px solid #4e3916;
  border-radius: 30px;
  background-color: #4e3916;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  padding-left: 1em;
  padding-right: 1em;
}

.tag-home {
  font-family: "psans-medium";
  font-size: 0.75em;
  letter-spacing: 0.025em;
  color: white;
  border: 1px solid #4e3916;
  border-radius: 30px;
  background-color: #4e3916;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 1.25em;
  padding-right: 1.25em;
  align-content: center;
  text-decoration: none;
  display: inline-block;
}

.link-button {
  font-family: "psans-medium";
  font-size: 1em;
  letter-spacing: 0.05em;
  color: #4e3916;
  border: 1px solid #4e3916;
  border-radius: 30px;
  background-color: white;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  padding-left: 1em;
  padding-right: 1em;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.link-button:hover {
  color: white;
  background-color: #4e3916;
}

/* ─────────────────────────────────────────
   POSITION
───────────────────────────────────────── */

.sticky {
  position: sticky;
  top: 0;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.nav {
  position: fixed;
  height: 100vh;
}

.topright {
  right: 0;
  top: 0;
}

.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
  height: 100%;
}

/* ─────────────────────────────────────────
   FLEX
───────────────────────────────────────── */

.flex {
  display: flex;
}

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.spacebetween {
  justify-content: space-between;
  width: 100%;
}

.hidden {
  color: transparent;
}

.align-stretch {
  align-items: stretch;
}

.flex-images {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ─────────────────────────────────────────
   BOXES
───────────────────────────────────────── */

.width20 {
  width: 20%;
  box-sizing: border-box;
  padding: 15px;
}

.width40 {
  width: 40%;
  box-sizing: border-box;
  padding: 10px;
}

.width50 {
  width: 50%;
  box-sizing: border-box;
}

.width50-x {
  width: calc(50% - 7.5px);
  box-sizing: border-box;
}

.width60 {
  width: 60%;
  box-sizing: border-box;
  padding: 10px;
}

.width80 {
  width: 80%;
  box-sizing: border-box;
  padding: 15px;
}

.width100 {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.height100vh {
  height: 100vh;
}

/* ─────────────────────────────────────────
   GRID
───────────────────────────────────────── */

.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 15px;
  column-gap: 15px;
}

.grid-containers {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.grid-container-contact {
  display: grid;
  grid-template-columns: 1fr 3fr;
}

.grid-experience {
  display: grid;
  grid-template-columns: 2fr 3fr;
}

.gap {
  gap: 1em;
}

/* ─────────────────────────────────────────
   MARGINS AND PADDINGS
───────────────────────────────────────── */

.projectcard-margin {
  margin-top: 10px;
}

.margin-top-15px {
  margin-top: 15px;
}

.margin-top-30px {
  margin-top: 30px;
}

.margin-bottom-5px {
  margin-bottom: 5px;
}

.margin-bottom-10px {
  margin-bottom: 10px;
}

.margin-bottom-15px {
  margin-bottom: 15px;
}

.margin-bottom-20px {
  margin-bottom: 20px;
}

.margin-bottom-30px {
  margin-bottom: 30px;
}

.margin-bottom-60px {
  margin-bottom: 60px;
}

.padding-bottom-30px {
  padding-bottom: 30px;
}

/* ─────────────────────────────────────────
   IMAGES
───────────────────────────────────────── */

img,
video {
  display: block;
}

.projectimage {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid #4e3916;
  border-radius: 15px;
}

.profilepic {
  max-width: 100%;
  height: auto;
  margin-bottom: 1em;
  border: 1px solid #4e3916;
  border-radius: 15px;
  object-fit: cover;
}

.cardimage-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid #4e3916;
  line-height: 0;
  background-color: #4e3916;
}

.cardimage-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(transparent 40%, rgba(255, 255, 0, 0.8) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cardimage-wrapper:hover::after {
  opacity: 1;
}

.cardimage {
  display: block;
  width: 100%;
  height: 600px;
  background-color: #4e3916;
  object-fit: cover;
}

/* Sidequest grid tiles — square, cropped, consistent across img + video */
.sidequest-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  border: 1px solid #4e3916;
  border-radius: 15px;
}

.sidequest-item {
  width: 100%;
  padding-top: 15px;
  text-align: center;
}

.sidequest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

@media (max-width: 1100px) {
  .sidequest-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────
   LAYOUT ROWS (project gallery)
───────────────────────────────────────── */

.layout-row {
  display: flex;
  flex-direction: row;
  gap: 15px;
  width: 100%;
  align-items: stretch;
}

.img-full {
  width: 100%;
  box-sizing: border-box;
}

.img-full .projectimage,
.img-full video.projectimage {
  width: 100%;
  height: auto;
  display: block;
}

.img-half {
  width: calc(50% - 7.5px);
  box-sizing: border-box;
  display: flex;
}

.img-half .projectimage,
.img-half video.projectimage {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  flex: 1;
}

/* ─────────────────────────────────────────
   PANELS
───────────────────────────────────────── */

.profile-panel {
  position: fixed;
  top: 0;
  right: 0;
  padding-right: 35px;
  width: calc(0.8 * (100vw - 84px));
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(78, 57, 22, 0.3);
  background-color: #cee8ed;
}

.profile-panel.is-open {
  transform: translateX(0);
}

.backdrop {
  position: fixed;
  inset: 0;
  opacity: 0%;
  background: rgba(78, 57, 22, 0.9);
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 99;
}

.backdrop.is-open {
  opacity: 1;
  pointer-events: all;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='24'%3E%3Ctext y='18' font-family='sans-serif' font-size='16' fill='%234e3916'%3EBACK%3C/text%3E%3C/svg%3E")
      30 12,
    auto;
}

#about-link,
#sidequests-link,
#touchgrass-link,
#touchgrass-img-link {
  cursor: pointer;
}

.project-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: calc(0.8 * (100vw - 84px));
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(78, 57, 22, 0.3);
  background-color: white;
}

.project-panel.is-open {
  transform: translateX(0);
}

.fixed-left {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 101;
}

.invert {
  position: sticky;
  top: 0;
  mix-blend-mode: difference;
  color: #4e3916;
  z-index: 110;
  pointer-events: none;
  background-color: transparent;
  padding-top: 15px;
  padding-bottom: 15px;
}

.sidequest-header {
  position: sticky;
  top: 0;
  z-index: 110;
}

/* ─────────────────────────────────────────
   LINKS / CARDS
───────────────────────────────────────── */

.project-link {
  text-decoration: none;
  color: inherit;
  padding-bottom: 30px;
}

.body-text-link {
  text-decoration: none;
  color: inherit;
}

/* ─────────────────────────────────────────
   CLOSE BUTTON
───────────────────────────────────────── */

.panel-close {
  display: none;
}

@media (max-width: 1100px) {
  .panel-close {
    display: block;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    border: none;
    background: transparent;
    color: #4e3916;
    font-size: 2em;
    width: 100%;
    text-align: right;
    padding: 10px 20px;
    cursor: pointer;
    font-family: "psans-regular";
    position: sticky;
    top: 0;
    z-index: 200;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — TABLET
───────────────────────────────────────── */

@media (max-width: 1100px) {
  .border-left,
  .border-right {
    display: none;
  }

  .projectcard-margin {
    margin-top: 0px;
  }

  .project-link {
    padding-bottom: 15px;
  }

  .project-link > .flex-row.spacebetween {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .home-project-desc {
    margin-top: 10px;
    margin-bottom: 15px;
  }

  .wrapper {
    margin-right: 0px;
  }

  .homepage-container {
    flex-direction: column;
    margin-left: 5px;
    margin-right: 5px;
  }

  .padding-bottom-30px {
    padding-bottom: 10px;
  }

  .width20 {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-right: none;
    border-bottom: 1px dashed #4e3916;
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 50;
  }

  .width20 .profilepic {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
  }

  .sticky {
    position: sticky;
    top: 0;
  }

  .height100vh {
    height: auto;
  }

  .nav-text {
    font-size: 1.2em;
  }

  .width80 {
    width: 100%;
    padding: 10px;
  }

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

  .grid-container > .project-link:nth-child(2n) {
    border-left: none;
    padding-left: 0;
  }

  .grid-container > .project-link:nth-child(odd) {
    padding-right: 0;
  }

  .grid-containers {
    grid-template-columns: 1fr;
  }

  .cardimage {
    height: 300px;
  }

  .about-container {
    margin-left: 15px;
    margin-right: 15px;
  }

  .width40,
  .width60,
  .width50 {
    width: 100%;
  }

  .title {
    font-size: 2em;
  }

  .blurb {
    font-family: "psans-regular";
    font-size: 1.4em;
  }

  .home-project-title {
    font-size: 1.2em;
  }

  .description-text {
    font-size: 1em;
  }

  .profile-panel,
  .project-panel {
    width: 100%;
  }

  .project-container {
    margin-left: 10px;
    margin-right: 10px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .grid-container-contact,
  .grid-experience {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .text-indent {
    text-indent: 0;
  }

  .tag-container {
    flex-wrap: wrap;
    margin-bottom: 0;
  }

  .button-container {
    flex-wrap: wrap;
  }

  .flex-images {
    flex-direction: column;
  }

  .project-container .spacebetween {
    flex-direction: column;
  }

  /* Stack layout rows on mobile */
  .layout-row {
    flex-direction: column;
  }

  .img-full,
  .img-half {
    width: 100%;
  }

  .img-half .projectimage,
  .img-half video.projectimage {
    height: auto;
    object-fit: cover;
  }

  .tag {
    font-size: 0.75em;
    letter-spacing: 0.025em;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    padding-left: 1.25em;
    padding-right: 1.25em;
    margin-bottom: 15px;
  }

  .link-button {
    font-size: 0.75em;
    letter-spacing: 0.025em;
    padding-top: 0.25em;
    padding-bottom: 0.25em;
    padding-left: 1.25em;
    padding-right: 1.25em;
    margin-bottom: 15px;
  }

  .year {
    font-family: "psans-regular";
  }

  .sidequest-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — MOBILE (max 480px)
───────────────────────────────────────── */

@media (max-width: 480px) {
  .nav-text {
    font-size: 1em;
  }

  .title {
    font-size: 1.6em;
  }

  .blurb {
    font-family: "psans-regular";
    font-size: 1.2em;
  }

  .cardimage {
    height: 220px;
  }

  .body-text,
  .body-text-transparent,
  .body-text-bold {
    font-size: 1em;
  }
}
