@font-face {
  font-family: "HantarexMono-Light";
  src: url("../fonts/HantarexMono-Light.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

html.no-scroll,
body.no-scroll {
  overflow: hidden; /* block native scroll */
  overscroll-behavior: none; /* avoid iOS/Chromium elastic bounce */
}

html {
  background-color: white;
  font-family: "HantarexMono-Light";

  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation; /* Prevent double-tap zoom on mobile */
}

a {
  color: black;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  font-size: 15px;
  letter-spacing: 0.2px;
  font-weight: 300;
  line-height: 1.2;
  background-color: white;
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none; /* IE 10 and IE 11 */
  user-select: none; /* Standard syntax */
  touch-action: manipulation; /* Prevent double-tap zoom */
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  padding: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 1rem;
  box-sizing: border-box;
  flex-direction: column;
  z-index: 100000000;
}

header svg {
  height: 13px;
}
header .site-header__brand {
  display: flex;
  /* height: 100%; */
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
header .site-header__inner,
.site-header__nav,
.tag-list,
.site-header__subnav {
  display: flex;
  gap: 1rem;
  text-transform: uppercase;
  text-transform: none;
  font-variant-caps: all-petite-caps;
}

.navigation {
  padding: 0.5rem;
  box-sizing: border-box;
  right: 0.5rem;
  bottom: 0;
  position: fixed;
  text-transform: uppercase;
  text-transform: none;
  font-variant-caps: all-petite-caps;
  z-index: 100000;
}

.credits {
  padding: 0.5rem;
  box-sizing: border-box;
  left: 0.5rem;
  bottom: 0rem;
  position: fixed;
  text-transform: uppercase;
  text-transform: none;
  font-variant-caps: all-petite-caps;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  flex-direction: row;
  gap: 0.5rem;
  bottom: 0.5rem;
}

.close {
  right: inherit;
  left: 0.25rem;
}

.credit-content {
  display: flex;
  flex-direction: column;
}

.credit-item {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
}

.credit-names {
  display: flex;
  gap: 0.5rem;
}

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

.site-header__subnav {
  font-size: 0.8rem;
  justify-content: flex-end;
  display: none;
}
.site-header__projects-link::before {
  content: "";
  display: inline-block;
  height: 0.25rem;
  width: 0.25rem;
  background-color: white;
  border-radius: 50%;
  vertical-align: middle;
}

.site-header__projects-link:hover::before {
  background-color: black;
}

.site-header__about-link::before {
  content: "";
  display: inline-block;
  height: 0.25rem;
  width: 0.25rem;
  background-color: white;
  border-radius: 50%;
  vertical-align: middle;
}

.site-header__about-link:hover::before {
  background-color: black;
}

.tag-list__item::before {
  content: "";
  display: inline-block;
  height: 0.25rem;
  width: 0.25rem;
  background-color: white;
  border-radius: 50%;
  vertical-align: middle;
}

.tag-list__item:hover::before {
  background-color: black;
}
.tag-list__item--active::before {
  content: "";
  display: inline-block;
  height: 0.25rem;
  width: 0.25rem;
  background-color: black;
  border-radius: 50%;
  vertical-align: middle;
}

.text-wrapper {
  display: flex;
  gap: 0.75rem;
}

.hiddentext {
  color: #d4d4d4f2;
}

.list-project {
  padding: 0.75rem;
  padding-top: 8rem;

  box-sizing: border-box;
}

.list-project .text-container {
  opacity: 0;
}

.about-text {
  padding-top: 8rem;
  max-width: 55ch;
}

/* Line-by-line reveal for About */
.about-text .line {
  display: block;
  opacity: 0; /* start hidden; JS controls enter/leave */
  will-change: opacity, transform;
}

.list-project-absolute {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 1000000;
  pointer-events: none !important;
}

.list-project-absolute .text-container[data-active="false"],
.list-project-absolute .text-container[style*="opacity: 0"] {
  visibility: hidden;
}

.active-absolute-project {
  pointer-events: all !important;
}

/* We manage layout ourselves; kill Keen layout transforms */
#project-keen-slider .keen-slider__slide {
  transform: none !important;
  min-width: 100% !important; /* prevent leftover fixed widths like 815px */
  max-width: 100% !important;
}

/* (Optional) also ensure the track itself doesn't shift things */
#project-keen-slider {
  transform: none !important;
}

.about-wrapper {
  height: 100vh;
  padding: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  box-sizing: border-box;
}

.list-project {
  display: flex;
  flex-direction: column;
}
.list-project a {
  width: fit-content;
}

/* Home page: center the header */
.home-wrapper ~ header,
body:has(.home-wrapper) header {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  padding: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 1rem;
}

.gradient-fixed {
  display: none;
}

.contact {
  text-transform: uppercase;
  text-transform: none;
  font-variant-caps: all-petite-caps;

  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.credits-footer {
  flex: 1;
  text-align: right;
}

@media (max-width: 840px) {
  body {
    font-size: 15px;
  }

  .contact {
    row-gap: 1rem;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 20px;
    row-gap: 0;
  }

  .credits-footer {
    text-transform: uppercase;
    text-transform: none;
    font-variant-caps: all-petite-caps;
    font-size: 14px;
    padding-top: 0.5rem;

  }

  .contact span {
    /* width: 100%; */
    text-align: center;
    width: 100%;
  }

  .gradient-fixed {
    display: flex;
  }
  .credits {
    font-size: 16px;
    padding: 0.75px;
    pointer-events: all !important;
    
  }

  .credits-footer {
    align-items: center;
    text-align: center;
    flex: inherit;
    width: 100%;
  }

  .navigation {
    font-size: 16px;
  }

  .site-header {
    font-size: 20px;
  }
  header {
    flex-direction: column;
    display: flex;
  }
  .site-header__inner {
    flex-direction: column;
    gap: 0.2rem !important;
  }

  .site-header__subnav {
    font-size: 0.9rem;
  }

  header svg {
    width: 100%;
    height: auto;
  }

  .site-header__nav {
    position: relative;
    display: flex;
    align-items: center;
    /* reserve a variable width for the About pill */
    --about-w: 88px; /* tweak if your “About” label changes */
  }

  /* The scrollable tag row spans full width but leaves room for About */
  .site-header__nav .tag-list {
    flex: 1 1 auto;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0 0.5rem;
    padding-right: calc(var(--about-w) + 0.5rem); /* space for About */
    scrollbar-width: none;
  }
  .site-header__nav .tag-list::-webkit-scrollbar {
    display: none;
  }

  .site-header {
    background-color: white;
  }

  /* Pin the About link to the right, vertically centered */
  .site-header__about-link {
    position: absolute;
    right: 0rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: #ffffff;

    /* optional: subtle backdrop for readability over tags */
    /* backdrop-filter: blur(4px); background: color-mix(in srgb, white 70%, transparent); */
  }

  .gradient-fixed {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 1) 50%
    );
    padding-left: 3rem;
    width: 6ch;
    /* background: red; */
    position: absolute;
    /* z-index: 100000; */
    right: 0;
    height: 20px;
    pointer-events: none;
  }

  /* Ensure tag items don't wrap and snap nicely */
  .tag-list .tag-list__item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  /* Make the last tag item (View All) have same width as container so it can scroll fully left */
  .tag-list .site-header__projects-link {
    min-width: 100%;
    flex: 0 0 auto;
  }

  .list-project {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .list-project > div {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-carousel-container {
    position: fixed !important;
    top: 0;
  }

  .credits {
    padding: 0.5rem;
    left: 0;
    bottom: 0;
    z-index: 100000000;
    height: 100vh;
    width: 100vw;
    pointer-events: none !important;
  }

  .credits-toggle {
    pointer-events: all !important;
  }

  .credit-content {
    align-items: flex-start;
    width: 100%;
  }

  .credit-title {
    width: max-content;
    white-space: nowrap;
  }

  .credit-names {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    column-gap: 0.5rem;
    row-gap: 0rem;
  }

  .credit-item {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
  }

  .about-wrapper {
    height: 100svh;
  }

  .site-header__nav {
    height: 25px;
  }

  .site-header__about-link {
    text-transform: uppercase;
    font-size: 15px;
    font-variant-caps: normal;
  }

  .tag-list {
    text-transform: uppercase;
    font-size: 15px;
    font-variant-caps: normal;
  }

  .site-header__about-link::before {
    margin-right: 0.5rem;
  }

  .tag-list,
  .tag-list__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .close {
    right: inherit !important;
    width: max-content !important;
    height: max-content !important;
    left: 0.25rem !important;
    z-index: 1000000000000000000 !important;
    position: fixed !important;
    pointer-events: all !important;
  }
}
