@font-face {
  font-family: 'Neue Montreal';
  src: url('../fonts/NeueMontreal-Regular.otf');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Neue Montreal';
  src: url('../fonts/NeueMontreal-Medium.otf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'GT Super Text';
  src:
    url('../fonts/GTSuperText-Book.otf'),
    url('../fonts/GTSuperText-Book.woff2') format('woff2'),
    url('..fonts/GTSuperText-Book.woff') format('woff');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'JetBrains Mono';
  src:
    url('../fonts/JetBrainsMono-Regular.woff2') format('woff2'),
    url('../fonts/JetBrainsMono-Regular.woff') format('woff'),
    url('../fonts/JetBrainsMono-Regular.ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-SemiBold.ttf');
  font-weight: 600;
  font-style: normal;
}

.ph-bold {
  font-size: 14px;
}

/* Define the keyframes for the fade-in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in-on-load {
  opacity: 0; /* Set the initial opacity to 0 */
  animation: fadeIn 0.3s ease forwards; /* Use "forwards" to retain the final state */
  animation-delay: 0.7s;
}

/* TODO: sleep background only works in ocean mode. The whole thing needs to change for a light mode where text starts from black... or i should just redo the sleep feature*/
@keyframes sleepBackground {
  0% {
    background-color: var(--bg-color);
  }
  50% {
    background-color: #282e31;
  }
  100% {
    background-color: #181d1f;
  }
}

/* Just for the name, SVG edition */
.logo {
  width: 111px;
  height: 24px;
}
.logo path {
  fill: var(--title-text-color);
}

/* Subheadings, Titles */
h2 {
  color: var(--heading-text-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'Neue Montreal', sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 24px; /* 111.111% */
  margin: 0px;
}

/* Long text */
p.large {
  color: var(--heading-text-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'GT Super Text', serif;
  font-size: 17px;
  font-style: normal;
  font-weight: 300;
  line-height: 28px; /* 164.706% */
  letter-spacing: -0.1px;
  margin: 0px;
}

p.small {
  color: var(--body-text-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'GT Super Text', serif;
  font-size: 15px;
  font-style: normal;
  font-weight: 300;
  line-height: 22px; /* 146.667% */
  letter-spacing: -0.1px;
  margin: 0px;
}

p.decorative {
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'JetBrains Mono', monospace;
  color: var(--body-text-color);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 18px; /* 128.571% */
  margin: 0px;
}

p.decor-case-study {
  color: var(--accent-color);
  font-size: 10px;
  line-height: 15px; /* 150% */
}

/* Noise */
body::before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/noise.png');
  opacity: 0.6;
  background-repeat: repeat;
  mix-blend-mode: overlay;
  z-index: -1;
}

/* Solid background.*/
body {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg-color);
  animation: var(--sleep-animation);
  animation-delay: 20s;
  min-height: 100dvh;
  /* fallback options */
  margin: 0;
  /* Mobile scroll improvements */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Grainy Vector */
div.svg-bg {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: -2;
}

.svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  opacity: 0; /* Set the initial opacity to 0 */
  animation: fadeIn 2s ease forwards;
  animation-delay: 1.2s, 20s;
  height: auto;
}

.svg path {
  stroke-width: 101px;
}

div.header {
  display: flex;
  padding: 12px 16px;
  align-items: center;
  gap: 12px;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: 100px;
  position: sticky;
  top: 20px;
  z-index: 100;
  width: fit-content;
  margin-left: 32px;
  box-shadow: 0 0 1px 0 rgba(255,255, 255, 0.32), 0 0 2px 0 rgba(255, 255, 255, 0.08);
  mix-blend-mode: var(--blend-mode);
  backdrop-filter: var(--header-backdrop-filter, blur(10px));
  -webkit-backdrop-filter: var(--header-backdrop-filter, blur(10px));
  background: var(--header-bg);
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

div.header:hover {
  transform: scale(1.02);
}

div.main {
  display: flex;
  padding: 32px 40px 60px 40px;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
  align-self: stretch;
  flex: 1;
  overflow-x: hidden;
  scrollbar-width: thin;
  mix-blend-mode: var(--blend-mode);
}

div.work-list {
  display: flex;
  max-width: 500px;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  align-self: stretch;
}

div.work-item-case-study {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  align-self: stretch;
}

div.case-study {
  display: flex;
  padding: 12px 16px;
  align-items: center;
  align-content: center;
  gap: 8px 12px;
  align-self: stretch;
  flex-wrap: wrap;
  border-radius: 6px;
  border: 1px solid var(--case-study-border-color);
  background-color: var(--case-study-color);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

div.case-study:hover {
  background-color: var(--case-study-hover-color);
  border: 1px solid var(--case-study-border-hover-color);
  transition: background-color 0.3s ease;
}

div.case-study:hover #case-study-arrow {
  transition: background-color 0.3s ease;
  color: var(--accent-color);
}

div.case-study-image {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.case-study-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Maintain the aspect ratio of the image */
  mix-blend-mode: normal !important;
}

div.case-study-content {
  display: flex;
  min-width: 100px;
  align-items: center;
  align-content: center;
  gap: 2px 4px;
  flex: 1 0 0;
  flex-wrap: wrap;
}

div.case-study-title-subhead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 0 0;
}

div.work-item {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  gap: 6px 24px;
  align-self: stretch;
  flex-wrap: wrap;
}

div.work-title-descr {
  display: flex;
  min-width: 300px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1 0 0;
}

div.colophon {
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  gap: 32px;
  align-self: stretch;
  flex-wrap: wrap;
}

div.colophon-section {
  display: flex;
  min-width: 300px;
  max-width: 500px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1 0 0;
}

div.name-and-nav {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 8px 48px;
  align-self: stretch;
  flex: 1 0 0;
  flex-wrap: wrap;
}

div.nav {
  display: flex;
  min-width: 240px;
  align-items: flex-start;
  gap: 4px;

  /* for left text alignment on wrap: */
  margin-left: -8px;
}

/* Define the keyframes for the fade-in animation */
@keyframes moveIn {
  from {
    bottom: -60px;
  }
  to {
    bottom: 0px;
  }
}
div.toolbar {
  position: fixed;
  bottom: -60px;
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 8px;
  background: var(--toolbar-bg);
  backdrop-filter: var(--toolbar-backdrop-filter);
  -webkit-backdrop-filter: var(--toolbar-backdrop-filter);
  animation: moveIn 0.6s ease forwards;
  animation-delay: 1.2s;
  overflow-x: scroll;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.toolbar::-webkit-scrollbar {
  display: none;
}

div.toolbar-item {
  display: flex;
  position: relative;
  padding: 8px;
  align-items: center;
  gap: 16px;
  background: var(--toolbar-item-bg);
  align-self: stretch;
  white-space: nowrap;
}

div.toolbar-item:hover {
  cursor: pointer;
}

div.toolbar-item span {
  color: var(--toolbar-item-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'JetBrains Mono';
  font-size: 12px;
  font-weight: 500;
  line-height: 18px; /* 150% */
  text-transform: uppercase;
}

div.toolbar-item i {
  color: var(--toolbar-item-color);
}

/* div.toolbar-disabled span div i { */
div.toolbar-disabled span {
  cursor: default;
  color: var(--toolbar-item-disabled-color);
}

div.toolbar-disabled div i {
  cursor: default;
  color: var(--toolbar-item-disabled-color);
}

div.icon-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Animation for pill entrance and exit */
@keyframes pillEnter {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pillExit {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

.pill-enter {
  animation: pillEnter 0.25s ease forwards;
  opacity: 1; /* Ensure it's fully opaque at the end */
}

.pill-exit {
  animation: pillExit 0.25s ease forwards;
}

/* Marquee animation for now playing text */
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(max(-100%, -100% + 130px));
  }
  75% {
    transform: translateX(max(-100%, -100% + 130px));
  }
  100% {
    transform: translateX(0);
  }
}

.marquee-text {
  color: var(--toolbar-item-color);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  white-space: nowrap;
  display: inline-block;
  color: inherit;
  letter-spacing: 0.5px;
}

.marquee-text::before {
  content: '【 ';
}

.marquee-text::after {
  content: ' 】';
}

hr {
  border-color: var(--border-color);
  height: 0.5px;
  margin: 0;
  width: 100%;
  border-style: outset;
}

hr.half {
  max-width: 500px;
}

a {
  font-family: 'Neue Montreal', sans-serif;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
}

a.accent {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
  border-bottom: 1.5px dotted;
  background-color: var(--button-hover-color);
}

a.accent:hover {
  text-decoration: none;
  border-bottom: none;
  background-color: var(--accent-color);
  color: var(--highlight-text-color);
}

/* a.accent:hover::after{
  content: "! ↗";
} */

a:after {
  content: ' ↗';
}

span.subtle {
  color: var(--body-text-color);
}

::selection {
  background-color: var(--accent-color);
  color: var(--highlight-text-color);
}

button.header {
  padding: 4px 8px;
  border-radius: 6px;
  background: none;
  border: none;
}

button.header span {
  /* copied from h2 */
  color: var(--heading-text-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'Neue Montreal', sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 111.111% */
}

button.header:hover {
  background: var(--button-hover-color);
  cursor: pointer;
}

button.disabled:hover::before {
  /* copied from h2 */
  color: var(--hover-button-disabled-color);
  font-feature-settings:
    'clig' off,
    'liga' off;
  font-family: 'Neue Montreal';
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 24px; /* 111.111% */
  content: 'Still cooking...';
}

button.disabled:hover {
  background: none;
  cursor: default;
}

button.disabled:hover span {
  display: none;
}

#cursor-stats-clickable {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

#waveform-visualizer {
  width: 200px;
  height: 80px;
  min-width: 200px;
  min-height: 80px;
  display: block;
}

/* Oneko cat blend mode */
#oneko {
  mix-blend-mode: var(--blend-mode);
}

/* Remove all block visualizer styles as they are now in blockVisualizer.css */
