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

@font-face {
  font-family: "abite";
  src: url("fonts/ABITE.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  color: #0a0a0a;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  cursor: url("assets/cursor-silver.svg") 3 2, auto;
}

a {
  cursor: url("assets/cursor-silver.svg") 3 2, pointer;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #ffffff;
  z-index: 100;
  transition: opacity 0.6s ease;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-title {
  font-family: "Aerosoldier", -apple-system, sans-serif;
  font-size: 2.2rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  font-weight: 600;
}

.loader-bar {
  width: 220px;
  height: 18px;
  background: #e0e0e0;
  border: 2px solid #000000;
  border-radius: 0;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: #000000;
  transition: width 0.2s ease;
}

/* ---------- Main site ---------- */
#site {
  position: relative;
  width: 96vw;
  height: 94vh;
  margin: 3vh auto;
  background: #ffffff;
  border: 2px solid #000000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#site.hidden {
  display: none;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 20px 16px 8px;
}

.tab-btn {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  background: #ffffff;
  border: none;
  cursor: url("assets/cursor-silver.svg") 3 2, pointer;
  animation: popIn 0.5s ease-out both;
}

.tab-btn img {
  display: block;
  width: auto;
  /* 2.5x the base tab size, but shrinks proportionally on narrow
     windows so the row always stays on one line without overflowing */
  height: min(210px, calc(12.3vw - 24px));
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  transition: filter 0.2s ease, transform 0.2s ease, opacity 0.25s ease;
}

/* Pre-tinted copies of the artwork, swapped in on top of the default
   (black) image. Using real images here instead of a CSS mask avoids
   mask-image reliability issues with plain JPEGs. */
.tab-btn::after {
  content: "";
  position: absolute;
  inset: 4px 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease;
}

.tab-btn[data-tab="home"]::after {
  background-image: url("images/tabs/tinted/home-red.jpg");
}

.tab-btn[data-tab="music"]::after {
  background-image: url("images/tabs/tinted/music-red.jpg");
}

.tab-btn[data-tab="videography"]::after {
  background-image: url("images/tabs/tinted/videography-red.jpg");
}

.tab-btn[data-tab="bio"]::after {
  background-image: url("images/tabs/tinted/bio-red.jpg");
}

/* Selected tab: ink turns #A81200 instead of black */
.tab-btn.active img {
  opacity: 0;
}

.tab-btn.active::after {
  opacity: 1;
}

/* Hover: ink turns #005AFF and enlarges slightly (wins over the
   active-tab color above since it's declared later) */
.tab-btn:hover img {
  opacity: 0;
  transform: scale(1.12);
}

.tab-btn:hover::after {
  opacity: 1;
  transform: scale(1.12);
}

.tab-btn[data-tab="home"]:hover::after {
  background-image: url("images/tabs/tinted/home-blue.jpg");
}

.tab-btn[data-tab="music"]:hover::after {
  background-image: url("images/tabs/tinted/music-blue.jpg");
}

.tab-btn[data-tab="videography"]:hover::after {
  background-image: url("images/tabs/tinted/videography-blue.jpg");
}

.tab-btn[data-tab="bio"]:hover::after {
  background-image: url("images/tabs/tinted/bio-blue.jpg");
}

.tab-btn:nth-child(1) { animation-delay: 0.15s; }
.tab-btn:nth-child(2) { animation-delay: 0.25s; }
.tab-btn:nth-child(3) { animation-delay: 0.35s; }
.tab-btn:nth-child(4) { animation-delay: 0.45s; }

/* ---------- Boxed content panel ---------- */
.panel-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 3vw;
  display: flex;
  flex-direction: column;
}

.tab-panel {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.tab-panel.active {
  display: flex;
}

.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 32px 24px;
  /* not hidden: lets the pop-in bounce spill into the padding instead of
     clipping. #site's own overflow: hidden further out is still there as
     the real safety boundary against runaway overflow. */
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.link-rows {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.link-rows a {
  color: #000000;
  text-decoration: none;
  font-family: "abite", -apple-system, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  opacity: 0.85;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  width: fit-content;
  animation: popIn 0.55s ease-out both;
}

.link-rows a:nth-child(1) { animation-delay: 0.2s; }
.link-rows a:nth-child(2) { animation-delay: 0.32s; }
.link-rows a:nth-child(3) { animation-delay: 0.44s; }

.link-rows a:hover {
  color: #005aff;
  opacity: 1;
  transform: translateX(6px) scale(1.08);
}

.home-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 5vw;
}

.home-title {
  flex: 0 0 auto;
  font-family: "Aerosoldier", -apple-system, sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0.05em;
  text-transform: lowercase;
  font-weight: 700;
  white-space: nowrap;
  animation: popIn 0.6s ease-out both;
  animation-delay: 0.05s;
  z-index: 1;
}

#profile-photo {
  flex: 0 1 auto;
  min-height: 0;
  min-width: 0;
  max-height: 100%;
  max-width: 40vw;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: popIn 0.6s ease-out both;
  animation-delay: 0.2s;
  /* keep the photo above the title/iPod while their pop-in bounce
     (scale 1.25 overshoot) temporarily overlaps it */
  position: relative;
  z-index: 3;
}

.home-ipod {
  position: relative;
  flex: 0 0 auto;
  min-height: 0;
  min-width: 0;
  animation: popIn 0.6s ease-out both;
  animation-delay: 0.35s;
  z-index: 2;
}

#ipod-graphic {
  display: block;
  height: 26vh;
  max-height: 220px;
  width: auto;
  min-height: 0;
  min-width: 0;
}

.ipod-playpause {
  position: absolute;
  left: 36%;
  top: 68%;
  width: 24%;
  height: 17%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: url("assets/cursor-silver.svg") 3 2, pointer;
}

.bio-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bio-body p {
  font-size: 1rem;
  line-height: 1.5;
  color: #333333;
  animation: popIn 0.6s ease-out both;
  animation-delay: 0.15s;
}

.bio-body a {
  color: #000000;
  text-decoration: none;
  font-family: "abite", -apple-system, sans-serif;
  font-size: 1.3rem;
  width: fit-content;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  animation: popIn 0.6s ease-out both;
  animation-delay: 0.3s;
}

.bio-body a:hover {
  color: #005aff;
  opacity: 1;
  transform: translateX(6px) scale(1.08);
}

/* ---------- Pop-in reveal ---------- */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-4deg) translateY(16px);
  }
  40% {
    opacity: 1;
    transform: scale(1.25) rotate(3deg) translateY(-8px);
  }
  60% {
    transform: scale(0.88) rotate(-2deg) translateY(2px);
  }
  80% {
    transform: scale(1.06) rotate(1deg) translateY(-1px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg) translateY(0);
  }
}

/* ---------- Mouse echo trail ---------- */
.cursor-echo {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  background-image: url("assets/cursor-silver.svg");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 3px rgba(180, 180, 180, 0.7));
  pointer-events: none;
  z-index: 9999;
  opacity: 0.75;
  transform-origin: 12.5% 8.3%;
  transform: translate(-3px, -2px) scale(1);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}

@media (max-width: 700px) {
  #site {
    width: 96vw;
    height: 96vh;
    margin: 2vh auto;
  }

  .tabs {
    flex-direction: column;
  }

  .panel-wrap {
    padding: 6vw;
  }

  .home-body {
    flex-direction: column;
    gap: 4vw;
  }

  .home-body img {
    max-height: 55%;
    max-width: 70%;
  }
}
