@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/Geist-Regular.ttf") format("truetype");
}

@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/Geist-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/fonts/GeistMono-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/fonts/InstrumentSerif-Regular.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --ink: #000;
  --muted: #858585;
  --line: #ebebeb;
  --chip: #f5f5f5;
  --sans: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce-strong: cubic-bezier(0.34, 3.85, 0.64, 1);
  --text-swap-dur: 150ms;
  --text-swap-translate-y: 4px;
  --text-swap-blur: 2px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.canvas {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 12px;
  background: #fff;
}

.site-header {
  position: relative;
  display: block;
  width: 100%;
  height: 33px;
  flex: 0 0 33px;
  border-bottom: 1px solid var(--line);
}

.menu-toggle {
  display: none;
}

.menu-toggle__open-icon,
.menu-toggle__close-icon {
  display: none;
}

.identity {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 20px;
  white-space: nowrap;
}

.identity__avatar {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  object-fit: cover;
}

.identity span {
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.8px;
}

.sidebar__intro {
  width: 464px;
  height: 60px;
  margin: 12px 0 0;
  color: #000000;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
}

.social-links {
  display: flex;
  position: absolute;
  top: 0;
  left: 50%;
  align-items: flex-start;
  gap: 24px;
  width: max-content;
  transform: translateX(-50%);
}

.social-links a {
  display: inline-flex;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--duration-quick) var(--ease-smooth-out);
}

.social-links a:hover {
  opacity: 0.6;
}

.social-links a img {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

.open-to-work {
  position: absolute;
  top: 0;
  right: 16px;
  display: flex;
  width: max-content;
  height: 20px;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #000000;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
  white-space: nowrap;
}

.open-to-work__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00B533;
  animation: open-to-work-blink 2s step-end infinite;
}

@keyframes open-to-work-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
}

.timestamp {
  position: absolute;
  bottom: 12px;
  right: 16px;
  width: max-content;
  margin: 0;
  color: #000000;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
  white-space: nowrap;
}

.menu-status {
  display: contents;
}

.work {
  width: 100%;
  flex: 0 0 auto;
  margin-top: 40px;
}

.work-toolbar {
  display: flex;
  width: 100%;
  height: 20px;
  align-items: center;
  justify-content: space-between;
}

.section-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-tabs__item {
  display: inline-flex;
  width: 60px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.56px;
  text-decoration: none;
  transition:
    background-color var(--duration-quick) var(--ease-smooth-out),
    color var(--duration-quick) var(--ease-smooth-out);
}

.section-tabs__item:hover,
.section-tabs__item:focus-visible {
  background: #eaeaea;
}

.section-tabs__item.is-active {
  background: var(--ink);
  color: #fff;
}

.gallery-controls {
  display: flex;
  width: max-content;
  height: 20px;
  align-items: center;
  gap: 4px;
}

.gallery-controls__button {
  display: flex;
  width: 28px;
  height: 20px;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--chip);
  cursor: pointer;
  transition:
    background-color var(--duration-quick) var(--ease-smooth-out),
    transform var(--duration-fast) var(--ease-bounce-strong);
}

.gallery-controls__button:hover,
.gallery-controls__button:focus-visible {
  background: var(--ink);
  transform: translateY(-1px);
  transition:
    background-color var(--duration-quick) var(--ease-smooth-out),
    transform var(--duration-quick) var(--ease-smooth-out);
}

.gallery-controls__button img {
  display: block;
  width: 12px;
  height: 12px;
  transition: filter var(--duration-quick) var(--ease-smooth-out);
}

.gallery-controls__button:first-child img {
  transform: rotate(180deg);
}

.gallery-controls__button:hover img,
.gallery-controls__button:focus-visible img {
  filter: brightness(0) invert(1);
}

.project-gallery {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1416 / 528;
  margin-top: 16px;
  overflow: hidden;
}

.project-gallery__canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

.project-copy {
  position: relative;
  width: min(821px, 100%);
  height: 44px;
  margin-top: 12px;
}

.project-copy__description-group {
  width: min(464px, 100%);
  height: 44px;
}

.project-copy__title {
  display: flex;
  width: 100%;
  height: 20px;
  align-items: center;
  gap: 4px;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
  white-space: nowrap;
}

.project-copy__title img {
  display: block;
  width: 4px;
  height: 4px;
  flex: 0 0 4px;
}

.project-copy__description {
  width: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
  white-space: pre-line;
}

.t-text-swap {
  display: inline-block;
  transform: translateY(0);
  filter: blur(0);
  opacity: 1;
  transition:
    transform var(--text-swap-dur) ease-in-out,
    filter var(--text-swap-dur) ease-in-out,
    opacity var(--text-swap-dur) ease-in-out;
  will-change: transform, filter, opacity;
}

.t-text-swap.is-exit {
  transform: translateY(calc(var(--text-swap-translate-y) * -1));
  filter: blur(var(--text-swap-blur));
  opacity: 0;
}

.t-text-swap.is-enter-start {
  transform: translateY(var(--text-swap-translate-y));
  filter: blur(var(--text-swap-blur));
  opacity: 0;
  transition: none;
}

.project-copy__actions {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  height: 20px;
  align-items: center;
  gap: 4px;
  transition: none;
}

.project-action {
  display: inline-flex;
  width: max-content;
  min-width: 0;
  height: 20px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: 0;
  background: var(--chip);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.56px;
  text-decoration: none;
  white-space: nowrap;
}

.project-action--case-study {
  min-width: 101px;
  cursor: default;
}

.project-action--download,
.project-action--live-site,
.project-action--demo {
  width: 93px;
  min-width: 93px;
}

a.project-action:hover,
a.project-action:focus-visible {
  background: var(--ink);
  color: #fff;
}

.project-action img {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
}

a.project-action:hover img,
a.project-action:focus-visible img {
  filter: brightness(0) invert(1);
}

.t-tt {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  overflow: hidden;
  translate: var(--tt-x, 0px) 0;
  scale: 0.98;
  transform-origin: 0 100%;
  padding: 14px 16px;
  border-radius: 0;
  background: #fff;
  color: #2f2f2f;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.56px;
  white-space: nowrap;
  box-shadow:
    0 2px 6px 0 rgba(0, 0, 0, 0.05),
    0 4px 42px 0 rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 50ms ease-out,
    scale 50ms ease-out,
    translate 160ms var(--ease-smooth-out),
    width 160ms var(--ease-smooth-out);
}

.t-tt[data-show="true"] {
  scale: 1;
  opacity: 1;
  transition:
    opacity 150ms ease-out 80ms,
    scale 150ms ease-out 80ms,
    translate 160ms var(--ease-smooth-out),
    width 160ms var(--ease-smooth-out);
}

.t-tt-text {
  white-space: nowrap;
}

.t-tt-dots span {
  opacity: 0;
  animation: tt-dot-1 3s steps(1, end) infinite;
}

.t-tt-dots span:nth-child(2) {
  animation-name: tt-dot-2;
}

.t-tt-dots span:nth-child(3) {
  animation-name: tt-dot-3;
}

@keyframes tt-dot-1 {
  0% { opacity: 0; }
  25%, 99.9% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes tt-dot-2 {
  0%, 24.9% { opacity: 0; }
  50%, 99.9% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes tt-dot-3 {
  0%, 49.9% { opacity: 0; }
  75%, 99.9% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .t-tt-dots span {
    animation: none;
    opacity: 1;
  }
}

.gallery-controls__button:focus-visible,
.section-tabs__item:focus-visible,
.social-links a:focus-visible,
.project-action:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.copyright {
  display: none;
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: max-content;
  height: 20px;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: -0.64px;
}

.copyright img {
  display: block;
  width: 14px;
  height: 14px;
}

@media (min-width: 768px) {
  .copyright {
    display: flex;
  }
}

.timestamp__zone {
  color: var(--muted);
}

@media (max-width: 1100px) and (min-width: 768px) {
  .desktop-break {
    display: none;
  }

  .project-copy {
    width: 100%;
    height: auto;
  }

  .project-copy__description-group {
    width: 100%;
    height: auto;
  }

  .project-copy__title {
    white-space: normal;
  }

  .project-copy__description {
    white-space: normal;
  }

  .project-copy__actions {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 8px;
  }
}

@media (max-width: 767px) {
  html,
  body {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .canvas {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    gap: 0;
    padding: 12px;
    overflow: hidden;
  }

  .site-header {
    display: flex;
    height: 33px;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
  }

  .identity {
    gap: 8px;
  }

  .identity__avatar {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .identity span {
    font-size: 18px;
    line-height: 20px;
  }

  .menu-toggle {
    display: flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle__open-icon {
    display: block;
    width: 16px;
    height: 16px;
  }

  .sidebar__intro {
    width: min(464px, 100%);
    height: auto;
    flex: 0 0 auto;
    margin: 12px 0 0;
  }

  .desktop-break {
    display: none;
  }

  .social-links {
    display: none;
  }

  .timestamp,
  .open-to-work {
    display: none;
  }

  .menu-status {
    display: contents;
  }

  .site-header.is-menu-open {
    z-index: 12;
  }

  .site-header.is-menu-open .identity {
    position: relative;
    z-index: 14;
  }

  .site-header.is-menu-open .social-links {
    position: fixed;
    z-index: 13;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: var(--menu-height);
    flex-direction: column;
    align-items: flex-start;
    gap: 32px;
    width: auto;
    padding: 69px 12px 12px;
    background: #fff;
    transform: none;
  }

  .site-header.is-menu-open .social-links::before {
    position: absolute;
    top: 45px;
    right: 12px;
    left: 12px;
    height: 1px;
    background: var(--line);
    content: "";
  }

  .site-header.is-menu-open .social-links a {
    width: auto;
  }

  .site-header.is-menu-open .social-links a:last-of-type {
    margin-bottom: auto;
  }

  body.menu-open {
    --menu-height: max(50vh, 280px);
    --menu-height: max(50dvh, 280px);
  }

  body.menu-open .menu-status {
    position: fixed;
    z-index: 14;
    right: 12px;
    left: 12px;
    top: calc(var(--menu-height) - 32px);
    display: flex;
    height: 20px;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
  }

  body.menu-open .timestamp {
    display: block;
    position: static;
    width: auto;
    margin: 0;
    font-size: 16px;
  }

  body.menu-open .copyright {
    display: flex;
    position: static;
    width: max-content;
    height: 20px;
    flex: 0 0 auto;
    align-self: auto;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .site-header.is-menu-open .menu-toggle {
    position: relative;
    z-index: 15;
  }

  .site-header.is-menu-open .menu-toggle__open-icon {
    display: none;
  }

  .site-header.is-menu-open .menu-toggle__close-icon {
    display: block;
  }

  body.menu-open::before {
    position: fixed;
    z-index: 10;
    inset: 0;
    background: rgb(0 0 0 / 60%);
    content: "";
  }

  .work {
    display: flex;
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    margin-top: 32px;
  }

  .work-toolbar {
    flex: 0 0 20px;
  }

  .project-gallery {
    min-height: 0;
    flex: 1 1 auto;
    aspect-ratio: auto;
    margin-top: 10px;
    overflow-x: hidden;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-behavior: smooth;
    touch-action: pan-y;
  }

  .project-gallery::-webkit-scrollbar {
    display: none;
  }

  .mobile-gallery__track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
  }

  .mobile-gallery__track.is-animating {
    transition: transform var(--duration-fast) var(--ease-smooth-out);
  }

  .mobile-gallery__slide {
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    overflow: hidden;
  }

  .mobile-gallery__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .gallery-controls__button {
    width: 28px;
    height: 20px;
    flex-basis: 28px;
  }

  .project-copy {
    width: 100% !important;
    height: auto;
    flex: 0 0 auto;
    margin-top: 8px;
    padding-bottom: 8px;
  }

  .project-copy__description-group {
    width: 100%;
    height: 60px;
  }

  .project-copy__title {
    overflow: hidden;
    font-size: 16px;
    text-overflow: ellipsis;
  }

  .project-copy__description {
    display: -webkit-box;
    height: 36px;
    overflow: hidden;
    font-size: 14px;
    line-height: 18px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .project-copy__actions {
    position: relative;
    top: auto;
    right: auto;
    height: 20px;
    margin-top: 12px;
  }

  .project-action--case-study {
    min-width: 101px;
  }

  .copyright {
    display: none;
  }

  .site-header.is-menu-open .social-links a {
    height: 20px;
    font-size: 16px;
  }

  .site-header.is-menu-open .social-links a img {
    width: 12px;
    height: 12px;
  }

}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .project-gallery {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

}
