/* Fonts */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-opsz-italic.woff2") format("woff2-variations");
}

@font-face {
  font-family: "VCR OSD Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/vcr-osd-mono.woff2") format("woff2");
}

/* Tokens */

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "VCR OSD Mono", ui-monospace, monospace;
  --text: #000;
  --text-soft: rgba(0, 0, 0, 0.85);
  --bg: #fff;
  --accent: #ff0000;
  --page-padding: 2rem;
  --gutter: 2rem;
  /* The whole layout scales with the root font size */
  font-size: min(12.96px, 1.6168vw);
}

@media (max-width: 600px) {
  :root {
    font-size: 2.24vw;
    --page-padding: 1rem;
  }
}

/* Base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

a:active {
  opacity: 0.7;
}

a.active {
  color: var(--accent) !important;
}

h1,
h2 {
  margin: 0;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 6.7rem;
  color: var(--text-soft);
}

h2 {
  font-size: 4rem;
}

h1 a,
h2 a {
  text-decoration: none;
}

h1 a:hover {
  color: var(--accent);
}

@media (max-width: 600px) {
  h1 {
    font-size: 5.2rem;
  }
}

.icon {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.22em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

h1 .icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.1em;
}

.icon--peace { --icon: url("../icons/peace.svg"); }
.icon--pencil { --icon: url("../icons/pencil.svg"); }
.icon--command { --icon: url("../icons/command.svg"); }
.icon--mail { --icon: url("../icons/mail.svg"); }
.icon--arrow-right { --icon: url("../icons/arrow-right.svg"); }
.icon--linkedin { --icon: url("../icons/linkedin.svg"); }

.align-center {
  text-align: center;
}

.align-right {
  text-align: right;
}

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: var(--page-padding);
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.site-header a {
  text-decoration: none;
}

.site-header--white {
  color: #fff;
}

.nav--right {
  text-align: right;
}

@media (max-width: 600px) {
  .site-header {
    font-size: 1.5rem;
  }
}

/* Footer: the project list */

.site-footer {
  padding: var(--page-padding) var(--page-padding) calc(var(--page-padding) / 2);
}

.page-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.page-home .home {
  flex: 1;
  min-height: 10rem;
}

/* Columns */

.cols {
  display: flex;
  gap: var(--gutter);
}

.col {
  flex: var(--span) 1 0;
  min-width: 0;
}

.col--empty {
  min-height: 1px;
}

@media (max-width: 600px) {
  .cols {
    flex-direction: column;
    gap: 0;
  }

  .cols .col--empty {
    display: none;
  }

  .cols--no-stack {
    flex-direction: row;
    gap: var(--mobile-gutter, var(--gutter));
  }

  .cols--no-stack .col--empty {
    display: block;
  }
}

/* Media */

.media {
  margin: 0;
}

.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
}

.media.scaled {
  display: inline-block;
}

.zoomable a {
  display: block;
  cursor: zoom-in;
}

.hero .media video,
.hero .media img {
  width: 100%;
}

.gallery {
  display: flex;
  gap: 1rem;
}

.gallery__item {
  flex: var(--ar) 1 0;
  min-width: 0;
}

/* Slideshow */

.slideshow {
  position: relative;
  width: 100%;
}

.slideshow__track {
  position: relative;
  aspect-ratio: 1 / var(--ratio, 0.5625);
}

.slideshow[style*="--height"] .slideshow__track {
  aspect-ratio: auto;
  height: var(--height);
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 0s linear 1s;
}

.slideshow .slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease-in-out, visibility 0s;
}

.slideshow .slide .media,
.slideshow .slide a {
  height: 100%;
}

.slideshow .slide img,
.slideshow .slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slideshow__prev,
.slideshow__next {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(87, 87, 87, 0.35);
  cursor: pointer;
}

.slideshow__prev {
  left: 15px;
}

.slideshow__next {
  right: 15px;
}

.slideshow__prev::before,
.slideshow__next::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border: solid rgba(255, 255, 255, 0.9);
  border-width: 1.5px 1.5px 0 0;
  transform: translate(-65%, -50%) rotate(45deg);
}

.slideshow__prev::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.slideshow__prev:active,
.slideshow__next:active {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .slideshow__prev {
    left: 10px;
  }

  .slideshow__next {
    right: 10px;
  }
}

.no-js .slideshow .slide:first-child {
  opacity: 1;
  visibility: visible;
}

.no-js .slideshow__prev,
.no-js .slideshow__next {
  display: none;
}

/* About page */

.about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 10rem;
}

.about .cols {
  --gutter: 4.4rem;
}

.about .intro {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

.about a {
  text-decoration: underline;
}

.privacy {
  margin-top: 4rem;
}

.privacy h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

.privacy p {
  margin: 0;
}

@media (max-width: 600px) {
  .privacy h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .about {
    padding: 5rem;
  }

  .about .intro {
    font-size: 1.5rem;
  }

  .about .cols {
    gap: 2rem;
  }
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--bg);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox .slideshow__prev,
.lightbox .slideshow__next {
  position: fixed;
}

.lightbox .slideshow__prev {
  left: 25px;
}

.lightbox .slideshow__next {
  right: 25px;
}

@media (max-width: 600px) {
  .lightbox {
    padding: 10px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  .slideshow .slide,
  .slideshow .slide.is-active {
    transition: none;
  }
}

.page-home .site-header {
  position: relative;
}
