/* ================================
   FONT DEFINITIONS
================================ */
.ibm-plex serif-regular {
  font-family: "IBM Plex Serif", serif;
  font-weight: 400;
  font-style: normal;
}

.ibm-plex mono-regular {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: normal;
}

.ibm-plex mono-bold {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  font-style: normal;
}

.ibm-plex mono-regular-italic {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
  font-style: italic;
}

/* ================================
   GLOBAL RESET
================================ */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px; /* 1rem = 16px */
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
}

html,
body {
  margin: 0;
}

body {
  margin: 0;
  background-color: #f3f3f3;
  user-select: none;
  overflow-x: hidden;
}

body.archive {
  background-color: orange;
}

a img {
  text-decoration: none;
}

img {
  border-style: none;
  width: 100%;
}

video {
  display: block;
  margin-top: 0.25rem;
  max-width: 102.75rem;
  width: 100%;
  height: auto;
}

/* ================================
   HEADER / NAVIGATION
================================ */
.logo {
  position: absolute;
  top: -1.8125rem;
  right: 0.375rem;
  width: 83%;
}

ul {
  display: inline;
  margin: 0;
  padding: 1.6rem 0 0.3125rem 0;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 0.75rem;
  color: black;
}

ul.actions {
  float: left;
}

ul.actions.archive {
  float: none;
}

ul.archive-link {
  float: right;
}

/* INDEX page buttons */
#indexNav button,
#indexNav #sortByDate,
#indexNav #shuff,
#indexNav .archive-link button {
  padding: 0.125rem 0.375rem;
  background-color: #f3f3f3;
  color: black;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px outset ButtonBorder;
}

#indexNav button:hover,
#indexNav #sortByDate:hover,
#indexNav #shuff:hover,
#indexNav .archive-link button:hover {
  background-color: #e0e0e0;
}

#indexNav button:active,
#indexNav #sortByDate:active,
#indexNav #shuff:active,
#indexNav .archive-link button:active {
  background-color: #d0d0d0;
  border: 1px inset ButtonBorder;
}

/* ARCHIVE page buttons */
.stamp-archive .filter-button,
.stamp-archive #sortByDate,
.stamp-archive #shuff {
  background-color: orange;
  color: black;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px outset ButtonBorder;
}

.stamp-archive .filter-button:hover,
.stamp-archive #sortByDate:hover,
.stamp-archive #shuff:hover {
  background-color: #ee9a00;
}

.stamp-archive .filter-button.btnSelected,
.stamp-archive #sortByDate:active,
.stamp-archive #sortByDate.btnSelected,
.stamp-archive #shuff:active {
  background-color: #cc8400;
  border: 1px inset ButtonBorder;
}

.bar.archive {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* remove the old inline/float interference */
.bar.archive ul {
  all: unset;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* actions start on the right */
.bar.archive .actions.archive {
  margin-left: auto;
  justify-content: flex-end;
}

/* when wrapped (JS will add this class) */
.bar.archive.wrapped {
  flex-direction: column;
  align-items: flex-start;
}

.bar.archive.wrapped .actions.archive {
  margin-left: 0;
  margin-top: 5px;
  justify-content: flex-start;
}


/* ================================
   ANIMATIONS
================================ */

.gradient-btn {
  position: relative;
  top: 0.25rem;
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px outset ButtonBorder;
  padding: 0;
  overflow: hidden;
  cursor: help !important;
}

.gradient-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    red 0%,
    red 8%,
    lime 8%,
    lime 16%,
    cyan 16%,
    cyan 24%,
    magenta 24%,
    magenta 32%,
    yellow 32%,
    yellow 40%,
    blue 40%,
    blue 48%
  );
  background-size: 200% 100%;
  animation: glitchShift 0.2s steps(6) infinite, hueCycle 1.2s linear infinite;
}

.gradient-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.3) 10%,
    transparent 20%
  );
  background-size: 0.5rem 100%;
  mix-blend-mode: difference;
  opacity: 0.9;
}

@keyframes glitchShift {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -100% 0;
  }
}

@keyframes hueCycle {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}

/* ================================
   TYPOGRAPHY
================================ */
.weirdText {
  font-size: 1.2rem;
  line-height: 0.99;
}

.material-icons {
  font-size: 0.75rem !important;
}

span.NStime {
  display: block;
  padding-bottom: 1.8125rem;
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-size: 0.9rem;
}

span.title {
  font-family: "IBM Plex Mono";
  font-weight: 700;
}

span.subtitle {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: italic;
}

p {
  margin: 0.1875rem 0;
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.5;
  clear: both;
  color: #1a1a1a;
}

p.year {
    display: block;
    position: relative;
    top: 0;
    left: 0;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono";
    font-weight: 400;
    z-index: 3;
    color: black;
}

p.year.project {
    display: block;
    position: absolute;
    top: 0;
    left: 1.25rem;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono";
    font-weight: 400;
    z-index: 3;
    color: black;
}

a .year {
  text-decoration: none !important;
}

p.year.archive {
  position: absolute;
  top: 1rem;
  right: 0.625rem;
  transform: translateY(-50%);
}

.year.archive {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
  margin: 0;
  line-height: 1;
}

.year.archive img.thumb {
  position: relative;
  right: 0.5rem;
  flex: 0 0 auto;
  display: none;
  width: 1.5rem;
  height: 1.5rem;
  object-fit: cover;
}

p.category {
    display: block;
    position: absolute;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono";
    font-weight: 400;
    right: 1.25rem;
    top: 0;
    z-index: 3;
}

p.client {
  float: left;
  padding-right: 0.9375rem;
  padding-bottom: 0.1rem;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 1.2rem;
}

p.client.archive {
  font-size: 1rem;
}

h1 {
  float: left;
  clear: both;
  margin: 1.8rem 0 -0.25rem 0;
  padding: 0;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 1.3rem;
  color: black;
}

h1.archive {
  float: right;
}

/* ================================
   GRID + PROJECTS
================================ */
.container {
  display: flex;
  padding: 0;
  justify-content: center;
  margin: 0;
}

.grid {
  position: relative;
  width: 100%;
  max-width: 102.75rem;
  padding: 1.25rem;
  margin-top: 5vh;
}

.grid:after {
  content: "";
  display: block;
  clear: both;
}

.grid-item {
  float: none;
}

.grid-item.archive {
  width: calc(100% - 2.5rem) !important;
}

.grid-item-content {
  width: 25rem;
  height: 15.625rem;
  padding: 1.25rem;
}

.grid-item-content.archive {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100% !important;
  height: 2rem;
  padding: 0 0.625rem;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
}

.grid-item-content.archive:hover {
  cursor: pointer;
}

.grid-item.grid-item--large {
  width: 100% !important;
  max-width: 75rem;
}

.grid-item.archive.grid-item--large {
  width: calc(100% - 2.5rem) !important;
  max-width: 100% !important;
}

.grid-item.grid-item--large .grid-item-content {
  width: 100%;
  height: auto !important;
  display: flow-root;   
}

.grid-item.grid-item--large .projectImage {
    position: static !important;      /* stop absolute just for expanded */
    float: right;
    width: 50%;
    max-width: 31.25rem;
    height: auto;
    margin: -5.1rem -1.25rem -1.5rem 0;
  }

.grid-item.grid-item--large .grid-item-content.archive {
  width: 100%;
  height: 5.5rem !important;
}

.grid-item.grid-item--large .hiddenInfo {
  display: block;
}

.hiddenInfo {
  display: none;
  padding-bottom: 0;
}

.hiddenInfo.archive {
  position: absolute;
  top: 1.75rem;
}


/* ================================
   PROJECT IMAGE / TEXT
================================ */

.projectImage img {
  width: 100%;
  height: auto;
  padding: 0;
}

.projectImage.noText {
  padding: 0.375rem 0;
}

.projectText {
  float: left;
  margin: 1.8rem 0;
  position: relative;
  width: 100%;
}

.projectLocation.archive p {
    font-size: 0.8rem;
}

.projectLocation p::before {
  content: "📍";
  margin-right: 4px;
}

.infoRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  position: absolute;
  top: 1px;
  min-height: 1.2em; /* keeps consistent height */
}

.infoRow .projectLocation p::before {
  content: "📍";
  margin-right: 4px;
  filter: hue-rotate(-125deg) saturate(3);
}

.infoRow .projectLocation {
  opacity: 0;
  visibility: hidden;
}

.grid-item--large .infoRow .projectLocation {
  opacity: 1;
  visibility: visible;
}

/* ================================
   EXTRA LAYOUT + COMPONENTS
================================ */
.projectInfo {
  position: relative;
  z-index: 2;
  clear: left;
  float: left;
  width: 46%;
  margin-bottom: 0.4375rem;
}

.projectInfo.archive {
  width: 400px;
}

.projectInfo.archive p {
  line-height: 1.2;
  font-size: 0.8rem;
}

.projectInfo.archive a {
  color: black;
}

.projectInfo a,
.projectText a {
  text-decoration: underline;
}

.leftInfo {
  float: left;
  clear: both;
}

.grid-item-icon {
  width: 5.25rem;
  padding-top: 1.25rem;
  margin-left: -0.15rem;
}

.grid-spacer {
  width: 12.5rem;
  height: 15.625rem;
  background: none;
  border: none;
  pointer-events: none;
}

.imgFix {
  padding-top: 0.3125rem;
}

.imgFix img {
  display: block;
  width: 100%;
  height: 100%;
}

.colorBlock-autoNS {
    width: 120px;
    display: block;
    margin-right: 10px;
    margin-bottom: -5px;
    border: none;
}

.XS {
    height: 170px;
}

.S {
    height: 180px;
}

.M {
    height: 220px;
}

.L {
    height: 280px;
}

.colorBlock-autoNS p {
    font-style: italic;
    font-size: 0.75rem;
    position: relative;
    top: -4px;
    left: 0;
    line-height: 1.1;
}

/* ================================
   EXPAND
================================ */
.expand {
  display: block;
  z-index: 999;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
}

.expand:hover,
.no-expand:hover {
  cursor: pointer;
}

.no-expand {
  display: block;
  z-index: 999;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
}

.no-expand .year {
  text-decoration: none;
}

/* ================================
   STAMPS
================================ */
.stamp {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  padding: 1.25rem;
}

.stamp-about {
  width: 100%;
  height: auto;
  padding-bottom: 40px;
}

.stamp-archive {
  width: 100%;
  height: 6.25rem;
}

.stamp-pp {
  width: 100%;
  max-width: 102.75rem;
  top: 3.125rem;
}

.stamp-pp::after {
  content: "";
  display: block;
  clear: both;
}

.stamp-pp img {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
}


/* ================================
   MODALS
================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: pointer;
}

.modal-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}


/* ================================
   MISC
================================ */
a {
  text-decoration: none;
  color: orange;
}

a.email {
  text-decoration: underline;
}

.categoryBlock {
  padding: 2.5rem 1.25rem;
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a1a;
  background: #f0f0f0;
  text-align: center;
  cursor: default;
}

img.icon {
  display: block;
  width: 3.125rem;
  padding: 1.25rem 0 2.125rem 0;
}

.hideMe {
  display: none !important;
}

.hideAllTxt {
  opacity: 0;
}

.hideAllImg {
  opacity: 0;
}

.hiddenThumbs {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.hiddenThumbs img {
  width: 100%;
  height: 100%;
}

.showAllImg {
  opacity: 1 !important;
}

.invis {
  background-color: transparent;
  border: none;
}

.embedContainer {
    display: block;
    margin: 1.8rem 0;
}

p.sign {
    display: block;
    text-align: right;
    line-height: 1.7;
    font-size: 0.8rem;
    font-family: "IBM Plex Mono";
    font-weight: 400;
    position: relative;
    margin: 25px 0 30px 0;
    bottom:0;
}

/* ================================
   MEDIA QUERIES
================================ */

@media only screen and (max-width: 768px) {
  .grid-spacer { display:none; opacity:0; }

  .bar.archive ul {
    gap: 3px;
  }

  .stamp {
    padding: 1.25rem !important;
  }

  .stamp-pp {
    width: 100%;
  }

  p.category {
    right: 1rem;
  }

  .projectText {
    width: 100%;
  }

  .embedContainer {
  width: 100%;
  margin: 1rem 0;
}

.embedWrapper {
  position: relative;
  width: 100%;
  padding-top: 62.4%; /* 312 / 500 × 100 = 62.4% aspect ratio */
  overflow: hidden;
}

.embedWrapper embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}


  .stamp-archive .filter-button, .stamp-archive #sortByDate, .stamp-archive #shuff {
    font-size: 0.75rem;
  }

  .year.archive img.thumb {
    display: none;
  }

  .hiddenInfo.archive {
    top: 1.1rem;
    margin-right: 7px;
  }

  .grid-item {
    margin-left: -1.25rem;
  }

  .grid-item.archive {
    margin-left: -1.25rem;
    width: 100% !important;
  }

  .grid-item.grid-item--large .grid-item-content.archive {
    padding: 0 0.625rem !important;
  }

  .grid-item.archive.grid-item--large {
    width: 100% !important;
  }

  /* restore header spacing and auto height */
  .grid-item.grid-item--large .grid-item-content {
    padding: 1.25rem 1.25rem 0 1.25rem !important;     
    height: auto !important;
    max-height: none !important;
    display: flow-root;                 
  }

  /* full-bleed image without breaking flow */
  .grid-item.grid-item--large .projectImage {
    float: left;
    position: static !important;
    display: block !important;
    margin: 1rem -1.25rem 0 !important;  /* cancel container padding left/right */
    width: calc(100% + 2.5rem) !important;
    border: 0 !important;
  }
  .grid-item.grid-item--large .projectImage img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  /* text block uses container padding; avoid double padding */
  .grid-item.grid-item--large .projectInfo {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin-top: 1rem !important;
    box-sizing: border-box;
  }

  .projectInfo {
    width: 100%;
  }

  .bar.archive.wrapped .actions.archive {
    position: absolute;
    right: 1.25rem;
    top: 2.5rem;
  }

  /* full-bleed projectImage on mobile */
.stamp .projectImage > img,
.stamp .projectImage > video {
  display: block;
  width: 100vw !important;
  max-width: 100vw !important;
  height: auto !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}
}
