@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Roboto+Mono:wght@100;200;300;400;500;600;700&display=swap');

html {
  font-size: clamp(14px, 0.85vw, 20px);
}

body {
  margin: 0;
  background: #d8d8d8;
  font-family: 'Roboto Mono', monospace;
  cursor: auto;
  overflow: hidden;
}

.vertical-line {
  position: fixed;
  top: 0;
  width: 0.5px;
  height: 100vh;
  background: #212121;
  opacity: 0.3;
  pointer-events: none;
  z-index: 1001;
}

.vertical-line.left {
  left: 5vw;
}

.vertical-line.right {
  right: 5vw;
}

.horizontal-lines-wrapper {
  position: fixed;
  top: 5rem; 
  left: 0;
  z-index: 1000;
  width: 100%;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  background-color: #d8d8d8;
}

.horizontal-lines-wrapper-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
  width: 100%;
  padding-bottom: 2.5rem; 
  box-sizing: border-box;
  background-color: #d8d8d8;
}

.horizontal-line {
  position: relative;
  z-index: 1001;
  width: 100%;
  height: 0.5px;
  margin: 0;
  background: #212121;
  opacity: 0.3;
}

.selected-work-row {
  width: 100%;
  min-height: 0.75rem; 
  margin: 0.25rem 0; 
  padding: 0 5vw;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.selected-work-text {
  padding: 0 0.3125rem; 
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem; 
  font-weight: 600;
  letter-spacing: -0.03125rem; 
  color: #212121;
  opacity: 0;
}

.selected-work-text.left {
  margin-left: 0;
}

.selected-work-text.right {
  margin-right: 0;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 5rem; 
  padding: 0.625rem 5vw 0; 
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 1.25rem; 
  background-color: #d8d8d8;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.header .left {
  width: auto;
  height: 4.375rem; 
  padding-left: 0.3125rem; 
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.brand-logo {
  display: block;
  height: 3rem; 
  width: auto;
}

.header .center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem; 
  line-height: 1.1;
  cursor: default;
}

.header .title {
  font-weight: 600;
  color: #212121;
  letter-spacing: -0.03125rem; 
}

.header .subtitle {
  font-weight: 300;
  color: #757575;
  letter-spacing: -0.03125rem; 
}

.header .right {
  position: relative;
  display: flex;
  align-items: center;
}

.desktop-nav {
  display: flex;
  align-items: center;
}

.hamburger-btn {
  display: none;
}

.header .nav-btn {
  position: relative;
  width: 3.75rem; 
  height: 1.5625rem; 
  margin-left: 0.625rem; 
  margin-right: 0.3125rem; 
  padding-left: 1.25rem; 
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  border: none;
  color: #757575;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem; 
  font-weight: 300;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.03125rem; 
  cursor: pointer;
  z-index: 5;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header .nav-btn::before {
  content: '';
  position: absolute;
  left: 0.4375rem; 
  top: 50%;
  width: 0.375rem; 
  height: 0.375rem; 
  background-color: #000000;
  transform: translateY(-50%) scale(0);
  transform-origin: center center;
  opacity: 0;
  transition: transform 0.15s ease-out, opacity 0.15s ease-out;
}

.header .nav-btn:hover,
.header .nav-btn:focus-visible {
  color: #212121;
}

.header .nav-btn:hover::before,
.header .nav-btn:focus-visible::before {
  transform: translateY(-50%) scale(1);
  opacity: 1;
}

.header .nav-btn.pressed {
  transform: scale(0.95);
}

.nav-angles-container {
  display: none;
}

.main-content-wrapper {
  position: fixed;
  top: calc(5rem + 1.375rem); 
  bottom: 2.5rem; 
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.scroll-container {
  width: 90%;
  margin: 0;
  display: flex;
  align-items: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: auto;
  scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

.scroll-content {
  height: 100%;
  display: flex;
  align-items: flex-start;
  padding-top: 6.5dvh;
}

.img-hover {
  position: relative;
  height: clamp(33.0625rem, 67dvh, 47.5rem); 
  aspect-ratio: 353 / 529;
  width: auto;
  margin-right: 0.3125rem; 
  display: inline-block;
}

.img-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  border-radius: 0.3125rem; 
  box-shadow: none;
}

.img-hover .card {
  transition: transform 0.15s cubic-bezier(0.17, 0.67, 0.83, 0.67),
    opacity 0.2s;
  will-change: transform;
}

.img-hover .gif {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: auto;
  transition: opacity 0.2s,
    transform 0.13s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .img-hover:hover .gif {
    opacity: 1;
  }

  .img-hover:hover .card {
    opacity: 0;
    pointer-events: none;
  }
}

.gif.pressed {
  transform: scale(0.9) translateY(0.375rem) !important; 
  box-shadow: 0 0 0 rgba(0, 0, 0, 0.22);
  transition: transform 0.02s cubic-bezier(0.17, 0.67, 0.83, 0.67),
    box-shadow 0.02s;
}

.card-link {
  opacity: 0;
  display: block;
  transform: translateY(3.125rem); 
  transition: transform 0.9s cubic-bezier(0.19, 1, 0.22, 1),
    opacity 0.6s ease;
}

.card-link.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.scrambling-char {
  color: rgb(128, 62, 255);
}

body.intro-active .vertical-line {
  transform-origin: top;
  transform: scaleY(1);
  transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

body.intro-active .horizontal-line {
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 1s cubic-bezier(0.86, 0, 0.07, 1);
}

body.intro-active .selected-work-text {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

#cursor-ball {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  padding: 0.375rem 0.625rem; 
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  color: #ffffff;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.625rem; 
  letter-spacing: 0;
  border-radius: 0;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0s ease;
}

#cursor-ball span {
  opacity: 1;
}

#cursor-ball.visible {
  opacity: 1;
}


@media (max-width: 768px) {
  body {
    cursor: auto;
    overflow-x: hidden;
  }

  #cursor-ball {
    display: none !important;
  }

  .selected-work-text {
    padding: 0 5px;
    font-size: 12px;
    letter-spacing: -0.5px;
  }

  .header {
    height: 70px;
    padding: 5px 5vw 0;
    column-gap: 20px;
  }

  .header .left {
    height: 60px;
    display: flex;
    align-items: center;
  }

  .brand-logo {
    height: 40px;
    width: auto;
  }

  .header .center.desktop-only {
    display: none;
  }

  .desktop-nav {
    display: none;
  }

  .hamburger-btn {
    position: relative;
    width: 30px;
    height: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
  }

  .hamburger-btn span {
    width: 100%;
    height: 2px;
    background: #212121;
    border-radius: 10px;
    transform-origin: center;
    transition: all 0.3s ease-in-out;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .header {
    background-color: transparent;
    z-index: 1003;
  }

  body.menu-open .hamburger-btn span {
    background: #ffffff;
  }

  body.menu-open .hamburger-btn span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  body.menu-open .hamburger-btn span:nth-child(2) {
    opacity: 0;
  }

  body.menu-open .hamburger-btn span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  body.menu-open .vertical-line {
    z-index: 1001;
  }

  body.menu-open .brand-logo {
    filter: invert(1) brightness(2);
    transition: filter 0.3s ease;
  }

  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1002;
    width: 100%;
    height: 100%;
    padding: 110px 5vw 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    background-color: #212121;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-menu-overlay.active {
    visibility: visible;
    pointer-events: auto;
  }

  .menu-top,
  .menu-bottom {
    flex-shrink: 0;
  }

  .mobile-menu-overlay .center.mobile-only {
    padding: 0;
  }

  .mobile-menu-overlay .center.mobile-only .title {
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
  }

  .mobile-menu-overlay .center.mobile-only .subtitle {
    margin-top: 0;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 300;
    opacity: 0.6;
  }

  .menu-center {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 5vh;
  }

  .mobile-nav-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 0;
  }

  .mobile-menu-overlay .nav-btn {
    width: 100%;
    height: auto;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    text-align: left;
    font-family: 'Roboto Mono', monospace;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 1px;
    color: white;
    text-decoration: none;
    text-transform: none;
  }

  .get-in-touch-btn {
    width: 100%;
    padding: 15px;
    box-sizing: border-box;
    display: block;
    border: 1px solid white;
    background-color: transparent;
    color: white;
    text-align: center;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
  }

  .horizontal-lines-wrapper {
    top: 70px;
    padding-top: 0;
  }

  .selected-work-row {
    min-height: 12px;
    margin: 4px 0;
    padding: 0 5vw;
  }

  .horizontal-lines-wrapper-bottom {
    padding-bottom: 2vh;
  }

  .horizontal-lines-wrapper-bottom .selected-work-row {
    flex-direction: row;
    justify-content: space-between;
  }

  .horizontal-lines-wrapper-bottom .selected-work-text.left {
    margin-left: 0 !important;
  }

  .horizontal-lines-wrapper-bottom .selected-work-text.right {
    margin-right: 0 !important;
  }

  .main-content-wrapper {
    position: fixed;
    top: 2dvh;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0 0 0 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
  }

  .scroll-container {
    width: 90vw;
    margin-left: 5vw;
    margin-right: 5vw;
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    -webkit-overflow-scrolling: touch;
  }

  .scroll-container::-webkit-scrollbar {
    display: none;
  }

  .scroll-content {
    padding-left: 0;
  }

  .scroll-container.no-snap {
    scroll-snap-type: none !important;
  }

  .img-hover {
    width: 80dvw;
    height: 75dvh;
    margin-right: 5px;
    scroll-snap-align: center;
    transition: transform 0.12s cubic-bezier(0.17, 0.67, 0.83, 0.67),
      width 0.35s cubic-bezier(0.19, 1, 0.22, 1);
  }

  .img-hover img {
    border-radius: 5px;
  }

  .img-hover.tap-press {
    transform: scale(0.96) translateY(4px);
  }

  .img-hover.expanded {
    width: 100vw;
    z-index: 10;
  }

  .img-hover.is-active .gif {
    opacity: 1;
  }

  .img-hover.is-active .card {
    opacity: 0;
    pointer-events: none;
  }

  .card-link.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
  }
}
