body { margin: 30px; padding: 0; background-color: #ebebeb; color: #6a6a6a; }
h1, h2, h3 { font-family: "univers-next-pro"; line-height: 1.4em; }
h2, h3 { font-weight: 300; padding: 0; font-size: 15px; }
h1 { font-weight: 400; margin: 20px 0; padding: 0; font-size: 18px; letter-spacing: 1px;}
h2 { margin: 0 0 8px 0; }
h3 { margin: 0; }
p, p > div { font-family: "univers-next-pro"; font-weight: 300; margin: 0 0 8px 0; padding: 0;font-size: 14px; line-height: 1.5em;}
a { cursor: pointer; color: #6a6a6a; text-decoration: none; }
a:hover > h2 {font-weight:400;}
img.icon {
  margin-top: 4px;
  filter: invert(43%) sepia(0%) saturate(0%) hue-rotate(266deg) brightness(94%) contrast(89%);
}
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 160px;
  padding: 24px 0 0 24px;
  /*padding: 24px 0 20px 24px;*/
  z-index: 1000;
}
/* initial state before load */
#page {
  opacity: 0;
  transition: opacity 300ms ease;
}

/* page visible */
body.is-loaded #page {
  opacity: 1;
}

/* leaving page */
body.is-leaving #page {
  opacity: 0;
}
#nav {
  display: block;
  position: fixed;
  top: 74px;              /* same as header height */
  left: 0;
  width: 160px;
  padding: 20px 0 24px 24px; /* top padding pushes items below header */

  height: calc(100vh - 74px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#nav::-webkit-scrollbar {
  display: none;                /* Chrome / Safari */
}
.mobile-menu-toggle {display: none;}
#nav.item {
  flex: 0 0 180px;
}
/* Main nav */
.nav-button {
  display: block;
  font-weight: 300;
  font-size: 15px;
  margin: 0;
}
/* Bold current section */
.nav-button.current-page h2 {
  font-weight: 400;
}

/* Subpages inside Projects */
.nav-button.subpage {
  padding-left: 16px; /* indent subpages */
  font-size: 14px;
}

#nav .instagram{
  padding-bottom: 48px;
}

/* markdown styling for descriptions */
.richtext p {
  font-size: 15px;
  line-height: 1.4em;
}

.richtext p:last-child {
}

.richtext a:hover {
  text-decoration: underline;
}

.container {
  list-style: none;

  -moz-flex-flow: row wrap;
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  
  -ms-box-orient: horizontal;
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -moz-flex;
  display: -webkit-flex;
  display: flex;
}
.current-page h2 {
  font-weight: 400;
}
main {
  margin-left: 180px; /* nav width + padding */
  margin-top: 64px;
  width: 70%;
}
main .item {
  flex: 1 1;
  background: none;
}
.italic {
  font-style: italic;
}
.full-width {
  grid-column: 1 / -1;
  width: 100%;
  display: block;
}
footer {
  margin: 48px 0 0 0;
}
.special-projects, .stdissue, .glossary, .printed-matter, .press, .index-layout {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 equal columns */
  gap: 14px; /* gap scales with container width */
  width: 100%; /* matches main content width */
  max-width: 1100px;
  margin: 0;
}
.hover-card {
  position: relative;         /* for overlay */
  background-color: #e0e0e0;
  padding: 6px;
  font-family: "univers-next-pro";
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4; 
  color: #6a6a6a;

  display: flex;
  align-items: flex-end;      /* keep text at bottom */
  justify-content: flex-start;

  aspect-ratio: 36 / 49;    /* maintain rectangle ratio (width:height) */

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* hide title by default */
.hover-card .item-title {
  opacity: 0;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
}

/* show only on hover */
.hover-card:hover .item-title {
  opacity: 1;
}

.span-4 {
  grid-column: span 4;
  margin-bottom: 14px;
}
.stdissue {
  margin-bottom: 14px;
}
/* Hero spans all columns */
.stdissue-hero {
  grid-column: 1 / -1;
  width: 100%;
}

.stdissue-hero img {
  width: 100%;
  display: block;
}
.stdissue-text {
  margin-top: 24px;
}
.color-toggle {
  display: none; /* hide the actual radio buttons */
}

.color-group {
  display: inline-flex;    /* use inline-flex so it behaves like text inline on mobile */
  flex-wrap: nowrap;       /* never break the group */
  gap: 6px;                /* space between labels */
  margin-bottom: 8px;      /* optional spacing below group */
}

.color-group label {
  display: inline-flex;    /* inline-flex keeps text & padding together nicely */
  padding: 4px 10px;
  border: 1px solid #c3c3c3; /* outline box */
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;      /* prevent label text from wrapping inside itself */
  font-family: "univers-next-pro";
  font-weight: 300;        /* default weight */
  font-size: 14px;
}

.color-toggle:checked + label {
  border-color: #6a6a6a;   /* optional: highlight border for selected */
}

.product-images img {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.product-images img.fade-out {
  opacity: 0;
}
/* Fade out and fade in transitions */
.page-fade {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  /* Ensure it occupies space and is visible to the layout */
  visibility: visible;
}
.page-fade.active {
  opacity: 1;
}

.project-images {
  position: relative;
}

.project-pagination {
  position: absolute;
  top: 0;
  right: -28px; /* adjust this number */
  display: flex;
  flex-direction: column;
  font-size: 20px;
}
/* Overlay */
.hover-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(235, 235, 235, 0); /* start fully transparent */
  transition: background-color 0.3s ease;
  pointer-events: none; /* allows clicks through overlay */
  z-index: 1;
}

/* On hover */
.hover-card:hover::after {
  background-color: rgba(235, 235, 235, 0.8); /* 80% white overlay */
}
.hover-card > a {
  position: relative; /* ensures text stays above overlay */
  z-index: 2;
  margin: 0;
  padding: 4px 0;
}

.continent-name {
  margin-top: 2rem;
}
.country-name{
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}
.state-name{
  padding-left: .5rem;
  margin-bottom: 0.25rem;
}
.store {
  padding-left: 1.25rem;
  margin-bottom: .75rem;
}
.project-layout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 20px;
  width: 100%;
  margin-top: 92px;
}
figure { margin: 0 0 16px 0; }
.project-images {
  grid-column: 1 / span 3;
}
.project-images img {
  width: 100%;
  display: block;
  margin-bottom: 8px;
}
.project-text {
  grid-column: 4 / span 2;
}
.bold {
  font-weight: 400;
}
.nav-glossary {
  display:grid;
  width:80%;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-bottom: 16px;
}
.nav-glossary-letter {
  background-color: #e0e0e0;
  padding: 2px;
}
.current-letter {
  background-color: #ebebeb;
  padding: 2px;
}
.nav-glossary-letter > p, .current-letter > p {
  margin: 2px;
}
.glossary-text {
  margin-bottom: 2em;
}

@media only screen and (max-width: 1000px) {
  .special-projects, .glossary, .press, .printed-matter {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 5 equal columns */
    gap: 10px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin: 0;
  }
  .text-4column {
    width: 100%;
  }
  .stdissue {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 14px;
  }

  /* hero still spans all columns */
  .stdissue-hero {
    grid-column: 1 / -1;
  }
}
@media only screen and (max-width: 768px) {
  html {
    -ms-overflow-style: none;  /* IE/Edge */
    scrollbar-width: none;     /* Firefox */
  }
  ::-webkit-scrollbar {
    display: none;             /* Chrome, Safari, Opera */
  }
  header {
    position: fixed;
    margin: 0;
    padding: 0;
    width: calc(100% - 24px);
    height: 70px;
    top: 0;
    left: 12px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999; 
    background-color: rgba(235, 235, 235, 0.95);
  }
  /* Push menu to the right */
  .mobile-menu-toggle {
    display: flex;
    cursor: pointer;
  }
  #nav.item.active {
    display: flex; /* show menu when toggled */
  }
  main {
    width: 100%;
    margin: 60px 0 0 0;
  }
  #nav {
    position: fixed;       /* float above everything */
    top: 70px;                /* align to top */
    left: 0;
    width: 100%;           /* full width */
    height: auto;         /* full viewport height */
    background-color: rgba(235, 235, 235, 0.95); /* semi-transparent overlay */
    display: none;         /* hidden by default */
    flex-direction: column;
    z-index: 9998; 
    overflow-y: auto;
    padding: 0 12px 8px 12px;
  }
  #nav.active {
    display: flex;         /* show when toggled */
  }
  .menu-text {
    font-family: "univers-next-pro";
    font-size: 14px;
  }
  .menu-icon {
    font-size: 24px;
  }
  #nav.item {
    display: none;
    flex: none;
  }
  #nav a {
    width: calc(100% - 24px);
    border-bottom: 1px dotted #6a6a6a;
  }
  #nav a.subpage {
    border-bottom: none;
  }
  #nav .instagram {
    padding-bottom: 6px;
  }
  body {
    margin: 12px;
  }
  .hero {
    width: 100%;
    height: auto;
  }
  .special-projects, .glossary, .press, .printed-matter {
    display: grid;
    gap: 14px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin: 0;
  }
  .stdissue {
    margin: 0 0 14px 0;
  } 
  .project-layout {
    grid-template-columns: 1fr;
    width: 100%;
    margin: 0;
    padding-top: 10px;
  }
  .project-text { order: -1; padding-bottom: 8px}

  .project-images,
  .project-text {
    grid-column: auto;
  }
  .stdissue > .hover-card .item-title {
    display: none !important;
  }
  .hover-card .item-title {
    opacity: 1 !important;
    position: absolute; /* keep it on top of the image */
    bottom: 0;        /* adjust vertical position */
    left: 0;
    width: 100%;
    background-color: rgba(235, 235, 235, 0.8); /* white background behind text */
    color: #000;        /* make text readable */
    padding: 4px 8px;   /* space around text */
    box-sizing: border-box;
    font-size: 14px;    /* optional: adjust font size for mobile */
    font-weight: 300;
  }

  /* Remove overlay for mobile */
  .hover-card::after {
    background-color: rgba(0,0,0,0) !important;
  }

  /* Reset absolute positioning */
  .project-pagination {
    position: static;         /* instead of absolute */
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between; /* prev left, next right */
  }
  .project-pagination a {
    flex: 0 0 auto;    /* don't let them grow or shrink */
    text-align: center;  /* center the arrow */
  }
}
@media only screen and (max-width: 500px) {
  .special-projects, .glossary, .press, .printed-matter {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 5 equal columns */
    gap: 12px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin: 0;
  }
  .stdissue {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 5 equal columns */
    gap: 12px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin-bottom: 14px;
  }
  .stdissue {
    margin: 0 0 12px 0;
  } 
}
@media only screen and (max-width: 300px) {
  .special-projects, .glossary, .press, .printed-matter {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 equal columns */
    gap: 12px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin: 0;
  }
  .stdissue {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* 5 equal columns */
    gap: 12px; /* gap scales with container width */
    width: 100%; /* matches main content width */
    max-width: 1100px;
    margin
}