/* ── tokens ─────────────────────────────────────────── */

:root {
  --bg: #f9f9f7;
  --text: #1a1815;
  --lime: #aaff00;
  --placeholder: #e8e3dc;
  --font: 'Plus Jakarta Sans', 'Helvetica Neue', Arial, sans-serif;
  --gutter: 56px;
  --header-x: 56px;
  --header-y: 28px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (max-width: 767px) {
  :root {
    --gutter: 24px;
    --header-x: 28px;
    --header-y: 24px;
  }
}

/* ── base ───────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ol,
ul {
  margin: 0;
  padding: 0;
  font-weight: inherit;
  font-size: inherit;
}

ol,
ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-anim {
  animation: fade-up 0.45s var(--ease) both;
}

/* ── custom cursor (fine pointers only) ─────────────── */

.cursor,
.cursor-label {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  html.has-cursor,
  html.has-cursor * {
    cursor: none !important;
  }

  html.has-cursor .cursor,
  html.has-cursor .cursor-label {
    display: block;
  }
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.cursor.is-visible {
  opacity: 1;
}

.cursor::before,
.cursor::after {
  content: '';
  position: absolute;
  background: var(--lime);
}

.cursor::before {
  width: 12px;
  height: 1px;
  top: -0.5px;
  left: -6px;
}

.cursor::after {
  width: 1px;
  height: 12px;
  top: -6px;
  left: -0.5px;
}

.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9990;
  pointer-events: none;
  font-size: 9.3px;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
}

.cursor-label.is-visible {
  opacity: 1;
}

/* ── header ─────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--header-y) var(--header-x);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.logo {
  font-size: 11.2px;
  font-weight: 550;
  line-height: 16.8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s;
}

.logo .tt,
.home-title .tt {
  letter-spacing: -0.055em;
}

.logo .l,
.home-title .l {
  margin-left: 0.09em;
}

.logo:hover {
  color: var(--lime);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-left: auto;
}

.nav a {
  font-size: 12.48px;
  line-height: 18.72px;
  transition: color 0.2s;
}

.nav a[aria-current='page'] {
  font-weight: 550;
}

.nav a:hover {
  color: var(--lime);
}

.menu-toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 26px;
  margin-left: auto;
  transition: opacity 0.3s;
}

.menu-toggle span {
  position: absolute;
  left: 4px;
  width: 24px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text);
}

.menu-toggle span:nth-child(1) {
  top: 4px;
}

.menu-toggle span:nth-child(2) {
  top: 12px;
}

.menu-toggle span:nth-child(3) {
  top: 20px;
}

/* home: the big centred title replaces the small logo */
.site-header--home .logo {
  visibility: hidden;
}

body.menu-open .site-header--home .logo {
  visibility: visible;
}

/* ── mobile menu ────────────────────────────────────── */

.mobile-menu {
  display: none;
}

@media (max-width: 767px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  body.menu-open .menu-toggle {
    opacity: 0.4;
  }

  body.menu-open {
    overflow: hidden;
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0s linear 0.5s;
  }

  body.menu-open .mobile-menu {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s;
  }

  body.menu-open .home-title {
    opacity: 0;
    pointer-events: none;
  }
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-menu__links a {
  padding: 12px 0;
  font-size: 41.6px;
  line-height: 63px;
  text-transform: capitalize;
}

.mobile-menu__links a[aria-current='page'] {
  font-weight: 550;
}

.mobile-menu__place {
  position: absolute;
  bottom: 40px;
  font-size: 9.3px;
  line-height: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── home ───────────────────────────────────────────── */

.home-title {
  position: fixed;
  top: 50%;
  left: 0;
  z-index: 40;
  width: 100%;
  padding: 0 var(--header-x);
  transform: translateY(-50%);
  color: #000;
  font-size: clamp(1.1rem, 4.5vw, 3.15rem);
  font-weight: 550;
  line-height: 1.1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.3s;
}

.home-title a {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  pointer-events: auto;
}

.home-title a > span:nth-child(2) {
  text-align: center;
}

.home-title a > span:nth-child(3) {
  text-align: right;
}

.moodboard {
  position: relative;
  z-index: 0; /* dragged photos stack inside the board, always under the title */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 140px;
  overflow: hidden;
}

.moodboard__item {
  position: relative;
  display: block;
  flex: none;
  width: var(--w);
  margin-left: var(--ml);
  margin-top: var(--mt);
  background: var(--placeholder);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.moodboard__item img {
  width: 100%;
  pointer-events: none;
}

.moodboard__item.is-dragging {
  transition: none;
}

.moodboard__item.is-lifted {
  transform-origin: center;
  transition: scale 0.15s;
  scale: 1.02;
}

@media (max-width: 767px) {
  .moodboard {
    padding-bottom: 64px;
  }

  .moodboard__item {
    width: var(--mw);
    margin-left: var(--mml);
    margin-top: var(--mmt);
  }
}

/* ── inner pages ────────────────────────────────────── */

.page {
  min-height: 100vh;
  padding: 96px var(--gutter) 80px;
}

/* cards (objects grid + "more" grids) */

.card {
  display: block;
}

.card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--placeholder);
}

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}

.card:hover .card__img {
  transform: scale(1.05);
}

.card__title {
  margin-top: 10px;
  font-size: 11.2px;
  font-weight: 550;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .card__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1152px;
  margin: 0 auto;
}

@media (max-width: 767px) {
  .objects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
  }
}

/* projects */

.project-list {
  max-width: 672px;
}

.project-row {
  display: flex;
  align-items: flex-start;
  gap: 19px;
  padding: 24px 0;
}

.project-row__num {
  flex: none;
  margin-top: 12.8px;
  font-size: 9.28px;
  line-height: 13.92px;
  font-variant-numeric: tabular-nums;
}

.project-row__text {
  display: block;
  min-width: 0;
}

.project-row__title {
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}

.project-row:hover .project-row__title,
.project-row:focus-visible .project-row__title {
  color: var(--lime);
}

.project-row__sub {
  display: block;
  margin-top: 4px;
  font-size: 10.88px;
  line-height: 16.32px;
}

.project-preview {
  position: fixed;
  top: 50%;
  right: var(--gutter);
  z-index: 10;
  width: 36vw;
  max-width: 520px;
  height: 68vh;
  transform: translateY(-50%);
  pointer-events: none;
}

.project-preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  opacity: 0;
}

.project-preview__img.is-visible {
  opacity: 1;
}

@media (max-width: 767px) {
  .project-row__num {
    margin-top: 8.6px;
  }

  .project-row__title {
    font-size: 18px;
    line-height: 28px;
  }

  .project-preview {
    display: none;
  }
}

/* info */

.info {
  max-width: 576px;
}

.info__bio {
  font-size: 25px;
  font-weight: 450;
  line-height: 30px;
  letter-spacing: 0.005em;
}

@media (max-width: 767px) {
  .info__bio {
    letter-spacing: -0.03em;
    word-spacing: 0.05em;
  }
}

.info__portrait {
  display: none;
}

.info__section {
  margin-top: 56px;
}

.info__label {
  font-size: 9.6px;
  line-height: 14.4px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  font-size: 13.6px;
  line-height: 21px;
  letter-spacing: 0.06em;
}

.info__links--contact {
  gap: 10px;
}

.info__links a {
  transition: color 0.2s;
}

.info__links a:hover {
  color: var(--lime);
}

.info__arrow {
  display: inline-block;
  margin-left: 2px;
  vertical-align: 0;
}

.portrait-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  width: 227px;
  height: 302px;
  overflow: hidden;
  background: var(--placeholder);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.portrait-float.is-visible {
  opacity: 1;
  visibility: visible;
}

.portrait-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767px) {
  .info__portrait {
    display: block;
    width: 100%;
    aspect-ratio: 355 / 800;
    margin-top: 20px;
    object-fit: cover;
    background: var(--placeholder);
  }

  .portrait-float {
    display: none;
  }
}

/* ── detail (object / project) ──────────────────────── */

.detail__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  min-height: 100vh;
}

.carousel {
  position: relative;
  height: 100vh;
  overflow: hidden;
  background: var(--placeholder);
}

.carousel__track {
  position: absolute;
  inset: 0;
}

.carousel__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.carousel__img.is-active {
  opacity: 1;
  z-index: 1;
}

.carousel.has-lightbox .carousel__track {
  cursor: zoom-in;
}

.carousel__btn {
  position: absolute;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 100%;
  transition: color 0.2s;
}

.carousel__btn--prev {
  left: 0;
}

.carousel__btn--next {
  right: 0;
}

.carousel__btn svg {
  transition: transform 0.2s;
}

.carousel__btn:hover {
  color: var(--lime);
}

.carousel__btn--prev:hover svg {
  transform: translateX(-4px);
}

.carousel__btn--next:hover svg {
  transform: translateX(4px);
}

.detail__info {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 64px var(--gutter);
}

.detail__text {
  width: 100%;
  max-width: 576px;
  margin: 0 auto;
}

.detail__title {
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  line-height: 1.2;
}

.detail__place {
  margin-top: 14px;
  font-size: 9.6px;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.detail__meta {
  margin-top: 32px;
  font-size: 13.12px;
  line-height: 1.9;
}

.detail__desc {
  margin-top: 16px;
  font-size: 13.12px;
  line-height: 1.65;
}

.detail__close {
  position: fixed;
  top: 96px;
  right: 40px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.detail__close span,
.lightbox__close span {
  position: absolute;
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: transform 0.2s, background-color 0.2s;
}

.detail__close span:nth-child(1),
.lightbox__close span:nth-child(1) {
  transform: rotate(45deg);
}

.detail__close span:nth-child(2),
.lightbox__close span:nth-child(2) {
  transform: rotate(-45deg);
}

.detail__close:hover span {
  background: var(--lime);
}

.detail__close:hover span:nth-child(1) {
  transform: rotate(135deg);
}

.detail__close:hover span:nth-child(2) {
  transform: rotate(45deg);
}

@media (max-width: 767px) {
  .detail__hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .carousel {
    height: 72vh;
  }

  .detail__info {
    min-height: 0;
    padding: 40px 28px;
  }

  .detail__close {
    top: 80px;
    right: 12px;
  }
}

/* lightbox */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox__img {
  max-width: 88vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  transform: translateY(-50%);
  transition: color 0.2s;
}

.lightbox__btn--prev {
  left: 12px;
}

.lightbox__btn--next {
  right: 12px;
}

.lightbox__btn:hover,
.lightbox__close:hover {
  color: var(--lime);
}

/* ── reduced motion ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
