@import 'normalize.css';

@font-face {
  font-family: 'OT Parralel';
  src: url('/assets/fonts/otparallelunlicensedtrial-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'OT Parralel Italic';
  src: url('/assets/fonts/otparallelunlicensedtrial-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

:root {
  color-scheme: light;
  font-family:
    'OT Parralel',
    Times New Roman,
    serif;
  color: black;
  background: #fff;
  --space: 1rem;
  --header-height: 4rem;
  --slideshow-gutter: 3.8rem;
  --small-font: 1rem;
  --medium-font: 1.5rem;
  --large-font: 2rem;
  --x-large-font: 3rem;
  --green: #97ff67;
  --gray: #ddd;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 1vw;
}

body {
  min-height: 100vh;
  margin: 0;
  font-size: var(--medium-font);
}

body,
button {
  font: inherit;
}

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

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

button:disabled {
  cursor: default;
  opacity: 0.25;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

p {
  margin: 0;
  padding: 0;
}

p:last-child {
  margin: 0 !important;
  padding: 0 !important;
}

em {
  font-style: italic;
  font-family: 'OT Parralel Italic';
}

.page {
  min-height: 100vh;
}

.transition-fade {
  opacity: 1;
  transition: opacity 180ms ease;
}

html.is-changing .transition-fade {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  padding: var(--space) var(--space) 0;
  height: var(--header-height);
  justify-content: space-between;
}

.site-header h1,
.site-header h2 {
  margin: 0;
  font-size: var(--medium-font);
  font-weight: 400;
}

.years {
  padding: 3rem var(--space) var(--space);
}

.year {
  position: relative;
}

.year.is-active {
  z-index: 3;
}

.year summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.75rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 6rem;
  line-height: 6rem;
  transition: font-size 0.3s ease;
  color: var(--green);
}

.year.is-active summary {
  font-size: 8.5rem;
}

.year summary::before {
  position: absolute;
  content: ' ';
  right: calc(100% - 21rem);
  left: 21rem;
  border-top: 2px solid var(--green);
  top: calc(50% - -0.6rem);
  transition: right 0.15s ease;
}

.year.is-active summary::before {
  right: calc(50% - -1rem);
}

.project-list {
  font-size: var(--medium-font);
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: 50%;
  top: calc(50% - 2px);
  transition: opacity 0.3s ease;

  & ul {
    padding: 0;
    margin: 0;
    list-style: none;

    & li::before {
      content: '•';
      position: absolute;
      left: -0.9rem;
      top: 0;
    }

    & li {
      margin-left: 0.9rem;
      position: relative;
    }
  }
}

.year.is-active .project-list {
  opacity: 1;
  pointer-events: auto;
}

.project-list a:hover {
  color: var(--green);
}

.empty {
  margin: 0;
  padding: 1rem 0;
  color: #666;
}

.slideshow-arrow {
  position: fixed;
  z-index: 5;
  top: calc((var(--header-height) + 100dvh) / 2);
  transform: translateY(-50%);
  padding: 0 var(--space);
  height: 2.5rem;
  font-size: 2rem;
  line-height: 1;
}

.slideshow-arrow--prev {
  left: 0;
}

.slideshow-arrow--next {
  right: 0;
}

.slideshow {
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.slideshow__track {
  display: flex;
  height: 100%;
}

.slide {
  display: flex;
  flex: 0 0 100vw;
  flex-direction: column;
  width: 100vw;
  height: 100%;
  min-height: 0;
  padding: 0 var(--slideshow-gutter) var(--space);
  overflow: hidden;
  user-select: none;
}

.slide__images,
.slide figure {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.slide figure {
  margin: 0;
  align-items: center;
}

.slide img {
  display: block;
  flex: 1 1 0;
  min-height: 0;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  cursor: grab;
}

.slide figcaption,
.slide .slide_caption {
  flex: 0 0 auto;
  width: 100%;
  max-width: 50%;
  text-align: center;
  margin-top: var(--small-font);

  & p {
    font-size: var(--small-font);
  }
}

.slide figcaption p {
  margin-bottom: var(--small-font);
}

.slide__text {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 0 var(--slideshow-gutter) var(--space);
  overflow: hidden;
  align-items: center;
  cursor: grab;
}

.slide__text-inner {
  display: flex;
  min-height: 0;
  padding: var(--space);
  max-width: 75vw;
  align-items: center;
  flex: 1;
}

.colour--green .slide__text-inner {
  background: var(--green);
}

.colour--gray .slide__text-inner {
  background: var(--gray);
}

.slide__text-scroll {
  display: flex;
  flex-direction: column;
  padding: var(--space);
  overflow: scroll;
  height: 100%;
}

.slide__text-content {
  column-fill: balance;
}

.alignment--center .slide__text-content {
  margin-block: auto;
}

.slide__text p,
.slide__text .text-m {
  font-size: var(--medium-font);
  margin-bottom: var(--large-font);
}

.slide__text .text-xl {
  font-size: var(--x-large-font);
  line-height: 1.1;
  margin-bottom: var(--large-font);
}

.slide__text .text-l {
  font-size: var(--large-font);
  margin-bottom: var(--large-font);
}

.slide__text .text-s {
  font-size: var(--small-font);
  margin-bottom: var(--large-font);
}

.layout--third .slide__text-content {
  width: 66.6666%;
}

.layout--two .slide__text-scroll {
  overflow-x: hidden;
}

.layout--two .slide__text-content {
  flex: none;
  width: 100%;
  columns: 2;
  column-gap: var(--space);
  column-fill: auto;
}

.project__empty {
  padding: var(--space);
}

@media (max-width: 960px) {
  :root {
    --small-font: 1.2rem;
    --medium-font: 1.5rem;
    --large-font: 2rem;
    --x-large-font: 2.5rem;
  }

  html {
    font-size: 2.5vw;
  }

  .slide__text {
    padding: 0;
  }

  .slide__text-inner {
    max-width: 100%;
  }

  .slide__text .text-xl {
    font-size: var(--x-large-font);
    margin-bottom: var(--large-font);
  }

  .slide__text .text-l {
    font-size: var(--large-font);
    margin-bottom: var(--large-font);
  }

  .slide__text .text-m {
    font-size: var(--medium-font);
    margin-bottom: var(--large-font);
  }

  .slide__text .text-s {
    font-size: var(--small-font);
    margin-bottom: var(--large-font);
  }

  .layout--third .slide__text-content {
    width: 100%;
  }

  .layout--two .slide__text-content {
    columns: 1;
    column-gap: var(--space);
    height: auto;
  }

  /* Project List */
  .year summary::before {
    content: '';
    display: none;
  }

  .project-list {
    position: relative;
    opacity: 1;
    margin: 0;
    padding: 0;
    left: 0;
    top: 0;
    transition: grid-template-rows 0.3s ease;
    display: grid;
    grid-template-rows: 0fr;
  }

  .project-list__inner {
    min-height: 0;
    overflow: hidden;

    & ul {
      margin-bottom: 1rem;
    }
  }

  .year.is-active .project-list {
    grid-template-rows: 1fr;
  }
}
