* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus:not(:focus-visible) {
    outline: none;
}

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

:root {
    color-scheme: light;
    --color-bg: #fff;
    --color-text: #000;
    --color-surface: #eee;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --color-bg: #000;
        --color-text: #fff;
        --color-surface: #1a1a1a;
    }
}

body {
    font-family: 'Familjen Grotesk', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
}

.flex-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.self-stretch {
  align-self: stretch;
}

.justify-self-end {
  justify-self: end;
}

.justify-between {
  justify-content: space-between;
}

.sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-x-sm {
  column-gap: 8px;
}

.gap-y-lg {
  row-gap: 48px;
}

.text-md {
  font-size: 22px;
  line-height: 1.4;
}

.max-w-md {
  max-width: 800px;
}

.px-md {
  padding-left: 24px;
  padding-right: 24px;
}

.my-md {
  margin-top: 24px;
  margin-bottom: 24px;
}

.mt-lg {
  margin-top: 48px;
}

.no-underline {
  color: inherit;
  text-decoration: none;
}

.link {
  color: inherit;
}

.text-sm {
  font-size: 18px;
}

.text-lg {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.quote {
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: start;
}

.portrait {
  width: 380px;
  max-width: 100%;
  height: auto;
}

.text-xl {
  font-size: clamp(36px, 5vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

.font-normal {
  font-weight: 400;
}

.text-muted {
  opacity: 0.6;
}

.header {
  width: 100%;
  height: 64px;
  padding: 0 24px;
  color: #fff;
  mix-blend-mode: difference;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  align-self: stretch;
  color: inherit;
  text-decoration: none;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  color: inherit;
  text-decoration: none;
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: currentColor;
}

.tile {
  height: 480px;
  background-color: var(--color-surface);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 48px 0;
  overflow: hidden;
}

.tile img {
  width: 423px;
  max-width: 100%;
  height: auto;
}

.media {
  container-type: inline-size;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 80px;
  overflow: hidden;
}

.media-sm {
  padding: 60px;
}

.media-bg {
  background-size: cover;
  background-position: center;
}

.shot {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 423px;
  height: auto;
}

.shot-sm {
  max-width: 380px;
}

.device {
  flex: 1;
  min-width: 0;
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 380 / 828;
  container-type: inline-size;
}

.device-body {
  position: absolute;
  inset: 0;
  background-color: #000;
  border-radius: 10cqw;
  overflow: hidden;
}

.device-screen {
  position: absolute;
  inset: 2.632cqw;
  border-radius: 7.368cqw;
  overflow: hidden;
}

.device-screen video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-statusbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.tile img.shot-sm {
  width: 380px;
}

.shot-wide {
  min-width: 0;
  width: 100%;
  max-width: 1215px;
  height: auto;
  border-radius: min(16px, 1.317cqw);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.shot-ipad {
  min-width: 0;
  width: 100%;
  max-width: 1224px;
  height: auto;
}

.tile-wide {
  container-type: inline-size;
  align-items: center;
  padding: 48px;
}

.tile-wide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: min(16px, 1.317cqw);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.tile-wide img.shot-ipad {
  border-radius: 0;
  box-shadow: none;
}

.code-window {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 800px;
  aspect-ratio: 800 / 740;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  background-color: #121212;
  border-radius: min(16px, 2cqw);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
}

.code-window-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75cqw;
  padding: 1.5cqw 2cqw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-window-dot {
  width: 1.5cqw;
  height: 1.5cqw;
  border-radius: 50%;
  border: 1px solid #4a4a4a;
}

.code-window-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.625cqw;
  font-weight: 500;
  color: #f5f5f5;
}

.code-window pre {
  flex: 1;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  margin: 0;
  padding: 2cqw 2.5cqw;
  background: none;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 1.625cqw;
  line-height: 1.6;
  color: #e6e6e6;
  text-shadow: none;
}

.code-gutter {
  flex: none;
  min-width: 2ch;
  text-align: right;
  padding-right: 2.5cqw;
  color: rgba(255, 255, 255, 0.25);
  white-space: pre;
  user-select: none;
}

.code-window pre code {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: inherit;
  text-shadow: none;
}

.code-window:focus,
.code-window:focus-visible,
.code-window :focus,
.code-window :focus-visible {
  outline: none;
}

.code-window .token,
.code-window .token.operator,
.code-window .token.entity,
.code-window .token.url,
.code-window .language-css .token.string,
.code-window .token.string {
  background: none;
}

.code-window .token.comment {
  color: #8b949e;
}

.code-window .token.punctuation {
  color: #7d8590;
}

.code-window .token.selector,
.code-window .token.function {
  color: #d2a8ff;
}

.code-window .token.property {
  color: #79c0ff;
}

.code-window .token.number,
.code-window .token.unit,
.code-window .token.constant {
  color: #79c0ff;
}

.code-window .token.string,
.code-window .token.url {
  color: #a5d6ff;
}

.code-window .token.atrule,
.code-window .token.keyword,
.code-window .token.important {
  color: #ff7b72;
}

.next-section {
  margin-left: 24px;
  margin-right: 24px;
  padding: 32px 0;
  border-top: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 12%, transparent);
}

.next-project {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.next-arrow {
  width: 0.75em;
  height: 0.75em;
  flex: none;
  transition: transform 0.25s ease;
}

.next-project:hover .next-arrow {
  transform: translateX(8px);
}

.footer {
  margin-top: 96px;
  padding: 0 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.no-transitions * {
  transition: none !important;
}

@view-transition {
  navigation: auto;
}

@keyframes page-out {
  to {
    opacity: 0;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(16px);
  }
}

.header {
  view-transition-name: site-header;
}

::view-transition-group(site-header) {
  mix-blend-mode: difference;
}

::view-transition-old(root) {
  animation: page-out 0.35s ease both;
}

::view-transition-new(root) {
  animation: none;
}

main > section {
  animation: rise-in 0.5s ease both;
}

main > section:first-of-type {
  animation-delay: 0.35s;
}

main > section:nth-of-type(2) {
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(*),
  ::view-transition-new(*),
  main > section {
    animation: none;
  }
}

.menu-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

.menu-btn::before,
.menu-btn::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: currentColor;
  transition: transform 0.3s ease;
}

.menu-btn::before {
  top: 15px;
}

.menu-btn::after {
  top: 23px;
}

.menu-btn.open::before {
  transform: translateY(4px) rotate(45deg);
}

.menu-btn.open::after {
  transform: translateY(-4px) rotate(-45deg);
}

@media (max-width: 960px) {
  .sm-hide {
    display: none;
  }

  .header {
    display: flex;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .text-xl {
    font-size: clamp(32px, 8vw, 48px);
  }

  .text-md {
    font-size: 18px;
  }

  .quote {
    font-size: 22px;
  }

  .next-project {
    font-size: 24px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    order: -1;
  }

  .tile {
    height: 320px;
  }

  .media {
    padding: 32px;
    gap: 12px;
  }

  .tile-wide {
    padding: 32px;
  }


  .header {
    mix-blend-mode: normal;
    background-color: var(--color-bg);
    color: var(--color-text);
  }

  ::view-transition-group(site-header) {
    mix-blend-mode: normal;
  }

  .menu-btn {
    display: block;
  }

  .logo,
  .menu-btn {
    position: relative;
    z-index: 2;
  }

  .nav {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
  }

  .nav .nav-link {
    align-self: center;
    font-size: 32px;
    transform: translateY(16px);
    transition: transform 0.35s ease;
  }

  .nav.open .nav-link {
    transform: translateY(0);
  }

  .nav .nav-link[aria-current="page"]::after {
    bottom: -10px;
  }
}
