@font-face {
  font-family: 'GT America';
  src: url('../fonts/GT-America-Regular.woff2') format('woff2'),
       url('../fonts/GT-America-Regular.woff') format('woff');
  font-weight: 400;
}

@font-face {
  font-family: 'GT America';
  src: url('../fonts/GT-America-Medium.woff2') format('woff2'),
       url('../fonts/GT-America-Medium.woff') format('woff');
  font-weight: 500;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: url('../icons/arrow.svg') 16 16, default;
}

html {
  height: 100%;
  overflow: hidden;
  font-family: 'GT America', helvetica, sans-serif;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  user-select: none;
}

body {
  height: 100%;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.3s ease;
}

body.loaded {
  opacity: 1;
}

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

/* ─── Main layout ─── */

.site {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 10px 10px;
}

/* ─── Scrollbar indicator ─── */

.scrollbar-row {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.scrollbar {
  position: relative;
  flex: 1;
  padding: 1rem 0;
  overflow: hidden;
}

.scrollbar__line {
  height: 1px;
  background: lightgrey;
}

.scrollbar__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) translateX(0);
  width: 4rem;
  height: 1.3px;
  background: black;
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ─── Navigation arrows ─── */

.arrow {
  background: none;
  border: none;
  padding: 8px 4px;
  flex-shrink: 0;
  opacity: 0.25;
  transition: opacity 0.2s;
  cursor: url('../icons/arrow.svg') 16 16, pointer;
  line-height: 0;
}

.arrow:hover {
  opacity: 1;
}

/* ─── Works list ─── */

.works-list {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.works-list::-webkit-scrollbar {
  display: none;
}

/* ─── Individual work ─── */

.work {
  display: flex;
  flex-direction: row;
  max-height: 75%;
  align-self: flex-start;
  flex-shrink: 0;
}

/* ─── Cover ─── */

.work__cover {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.work__cover img {
  display: block;
  height: calc(75vh - 3.3rem - 1rem);
  width: auto;
  max-height: 100%;
}

.work.has-details .work__cover img {
  cursor: url('../icons/arrow.svg') 16 16, zoom-in;
}

.work.has-details.is-open .work__cover img {
  cursor: url('../icons/arrow.svg') 16 16, zoom-out;
}

/* ─── See-more hint ─── */

.work__hint {
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.3;
  white-space: nowrap;
  color: black;
  text-decoration: underline;
  transition: opacity 0.2s;
  cursor: url('../icons/arrow.svg') 16 16, pointer;
  padding: 0;
}

.work.is-open .work__hint {
  opacity: 0;
  pointer-events: none;
}

/* ─── Caption ─── */

.work__caption {
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.work__caption b {
  font-weight: 500;
}

/* ─── Detail images (expand) ─── */

.work__details {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  width: 0;
  transition: width 0.35s ease;
  gap: 0;
  align-items: flex-start;
}

.work.is-open .work__details {
  /* width set by JS */
}

.work__details-inner {
  display: flex;
  gap: 1rem;
  padding-left: 1rem;
  align-items: flex-start;
  height: auto;
  flex-shrink: 0;
}

.work__detail-item {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.work__detail-item img {
  display: block;
  height: calc(75vh - 3.3rem - 1rem);
  width: auto;
}

/* ─── Fixed corner elements ─── */

.site-logo {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 100;
  line-height: 0;
}

.site-logo img {
  height: 40px;
}

.site-nav {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 100;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  line-height: 0;
}

.site-nav img {
  height: 40px;
}

@media (max-width: 600px) {
  .site-logo img,
  .site-nav img {
    height: 25px;
  }

  .arrow svg {
    width: 9px;
    height: 16px;
  }

  .work__cover img,
  .work__detail-item img {
    height: calc((75vh - 3.3rem - 1rem) * 0.85);
  }
}

/* ─── About page ─── */

.page-about .about-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 560px;
  width: 90%;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.page-about .about-content p + p {
  margin-top: 1em;
}

.page-about .about-content a {
  text-decoration: underline;
}
