/* ———————————— FONTS ———————————— */
@font-face {
    font-family: "Archivo_medium";
    src: url("fonts/Archivo_medium.woff");
    font-style: bold;
    font-weight: 600;
}

@font-face {
    font-family: "Archivo_regular";
    src: url("fonts/Archivo-Regular.woff2");
    font-style: normal;
    font-weight: 500;
}

@font-face {
  font-family: "CMUNBold";
  src: url("fonts/cmunbbx.woff") format("woff");
  font-style: normal;
  font-weight: 700;
}

@font-face {
  font-family: "CMUNMedium";
  src: url("fonts/cmunbmr.woff") format("woff");
  font-style: normal;
  font-weight: 500;
}

@font-face {
  font-family: "CMUNOblique";
  src: url("fonts/cmunbmo.woff") format("woff");
  font-style: oblique;
  font-weight: 500;
}

@font-face {
  font-family: "CMUNBoldOblique";
  src: url("fonts/cmunbxo.woff") format("woff");
  font-style: oblique;
  font-weight: 700;
}

/* ———————————— DOT ———————————— */
.dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
  clip-path: circle(20%);
  overflow: visible;
  z-index: 10000;
}

/* ———————————— Global page layout ———————————— */

html {
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
  cursor: none;
}

@media (hover: none), (pointer: coarse), (max-width: 1024px) {
  *,
  *::before,
  *::after,
  html,
  body,
  button,
  a {
    cursor: auto;
  }

  .dot {
    display: none;
  }
}

/* this just to control the grid!! */
/* body > * {
  outline: 1px dashed rgba(0, 0, 0, 0.1);
} */

body {
  margin: 0;
  padding: 30px 50px;
  font-family: "Archivo_regular", "Archivo_medium", Helvetica;
  background: #050505;
  color: #f5f5f5;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 40px;
}

.portfoliopage {
  grid-template-rows: auto repeat(3, minmax(0, 1fr));
  height: 100vh;
  overflow: hidden;
}

html,
body,
button,
a {
  cursor: none;
}

p {
    max-width: 100%;
    margin-top: 0%;
    text-align: justify;
    margin-bottom: -5pt;
    font-size: clamp(14px, 1vw + 12px, 16px);
}

h4 {
    margin-top: 24pt;
    margin-bottom: -5pt;
    font-weight: 600;
}

/* ———————————— Header / navigation panel ———————————— */
.panel {
  width: 100%;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.portfoliopage .panel { 
  grid-column: 1 / 2;
  grid-row: 1 / 5;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: start;
}

/* ———————————— Logo ———————————— */
.logo {
  grid-column: 1 / 2;
  align-self: end;
  justify-self: start;
  padding-bottom: 8px;
}

.portfoliopage .logo {
  align-self: start;
}

.logo img {
  height: 45px;
  width: auto;
  display: block;
  filter: invert(1) brightness(1.2);
}

.menu {
  /* grid-based mega header */
  grid-column: 3 / -1;
  grid-row: 1 / 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.portfoliopage .menu {
  grid-column: 1 / 2;
  grid-row: 2 / 5;
  grid-template-columns: 1fr;
  justify-self: stretch;
  align-self: end;
}

/* ———————————— artwork page title ———————————— */

.title-block {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  align-self: start;
  justify-self: end;
}

.title-block h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  word-break: break-word;
}

.portfoliopage .title-block {
  grid-column: 3 / -1;
  grid-row: 1 / 2;
  justify-self: end;
  align-self: start;
  text-align: right;
}

.portfoliopage .content {
  grid-column: 2 / 6;
  grid-row: 2 / 5;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  align-self: stretch;
  justify-self: stretch;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.portfoliopage .content-text {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.portfoliopage .artwork-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px;
}

.portfoliopage .artwork-info p {
  margin: 0;
  line-height: 1.4;
}

.portfoliopage .artwork-info p:first-line {
  font-weight: 600;
}

.portfoliopage .content img {
  grid-column: 2 / 5;
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.dreamatlas-page .content img:first-of-type {
  grid-column: 1 / -1;
}

.slider {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 10px;
}

.slider-track {
  position: relative;
  width: 100%;
  height: min(500px, 60vh);
  max-height: 500px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  z-index: 1;
}

.slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  place-items: center;
  opacity: 1;
  visibility: visible;
}

.slide img {
  width: 100%;
  height: 100%;
}

.slide:not(.is-active) {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245, 255, 245, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #111;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  z-index: 2;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.slider-control[data-prev] {
  left: 14px;
}

.slider-control[data-next] {
  right: 14px;
}

.slider-control:hover,
.slider-control:focus-visible {
  border-color: rgba(0, 0, 0, 0.25);
  background: rgba(255, 255, 255, 0.95);
  outline: none;
}

.slider-dots {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.slider-dot.is-active {
  transform: scale(1.25);
  background: rgb(252, 252, 252);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 999;
}

[hidden].lightbox {
  display: none;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.15);
}


.category {
  /* floating dropdown blocks */
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
}

.category-title {
  font-size: 16px;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  color: inherit;
  text-align: inherit;
}

.category-title.selected {
  text-decoration: underline;
}

.category-items {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding-left: 2px;
}

.category-items.selected {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding-left: 2px;
}

.category.active .category-items {
  display: flex;
}

.category-items a {
  text-decoration: none;
  color: inherit;
  font-size: 16px;
  opacity: 0.9;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.category-items a:hover {
  opacity: 1;
  transform: translateX(4px);
}

/* Keep menu alignment stable when dropdowns open */
body:not(.portfoliopage) {
  --menu-align: flex-end;
  --menu-text-align: right;
}

.portfoliopage {
  --menu-align: flex-start;
  --menu-text-align: left;
}

.menu {
  align-items: var(--menu-align, flex-start);
  text-align: var(--menu-text-align, left);
}

.category {
  align-items: var(--menu-align, flex-start);
  text-align: var(--menu-text-align, left);
  width: 100%;
}

.category-title {
  align-self: var(--menu-align, flex-start);
}

.category-items {
  align-items: var(--menu-align, flex-start);
  text-align: var(--menu-text-align, left);
  width: 100%;
}

/* ———————————— Mobile ———————————— */
@media (min-width: 1400px) {
  .portfoliopage .content .content-text {
    grid-column: 1 / 4;
  }
  
}

@media (max-width: 1024px) {
  body {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px;
    gap: 24px;
  }

  body:not(.portfoliopage) .logo {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 5;
  }

  .portfoliopage {
    grid-template-rows: auto;
    height: auto;
    overflow: visible;
  }

  .panel {
    grid-template-columns: 1fr;
    gap: 16px;
    align-self: start;
  }

  .portfoliopage .panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }


  .menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    align-items: flex-end;
  }

  .category {
    grid-column: auto !important;
    align-items: flex-end;
  }

  .category-items {
    padding-left: 0;
    align-items: flex-end;
  }

  .portfoliopage .menu {
    align-items: flex-start;
    text-align: left;
  }

  .portfoliopage .category,
  .portfoliopage .category-items {
    align-items: flex-start;
    text-align: left;
  }

  .title-block,
  .portfoliopage .title-block {
    grid-column: 1 / -1;
    justify-self: start;
    text-align: left;
    max-width: 100%;
  }

  .title-block h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

  .portfoliopage .content {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 18px;
    max-height: none;
    overflow: visible;
  }

  .portfoliopage .content img {
    grid-column: 1 / -1;
  }

  .portfoliopage .content-text {
    gap: 12px;
  }

  .slider {
    margin-top: 0;
  }

  .slider-track {
    aspect-ratio: 4 / 3;
    height: auto;
    max-height: 70vh;
  }

  .slider-control {
    width: 40px;
    height: 40px;
  }

  .slider-control[data-prev] {
    left: 10px;
  }

  .slider-control[data-next] {
    right: 10px;
  }

  .slider-dots {
    margin-left: 0;
    justify-content: center;
  }

}

@media (max-width: 720px) {
  .title-block,
  .portfoliopage .title-block {
    max-width: 100%;
  }

  .title-block h1 {
    font-size: clamp(1.4rem, 9vw, 2rem);
  }
}

/* ———————————— CONTENT ———————————— */
.content {
  max-width: 100%;
}

.content img {
  max-width: 100%;
  height: auto;
}
