@font-face {
  font-family: "Snell";
  src: url("../fonts/SnellRoundhand.ttc") format("truetype");
}

:root {
  /* Shared book colors and dimensions so the 3D pieces stay aligned. */
  --cream: #f5f0e8;
  --bk-face: #ff1aec;
  --bk-dark: #1a0a1a;
  --bk-border: #d4a0c8;
  --book-width: 230px;
  --book-height: 320px;
  --book-depth: 38px;
}

#sp-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  overflow: hidden;
}

.sp {
  position: absolute;
  animation: spA var(--sd, 1s) ease-out forwards;
}

@keyframes spA {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(var(--sx), var(--sy)) scale(0.08) rotate(var(--sr));
  }
}

.hb-hero {
  height: 320vh;
  position: relative;
}

.hb-hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg0);
}

#dive-ov {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
}

.scene {
  /* Perspective lives on the parent so child transforms read like a real book in space. */
  perspective: 1600px;
  perspective-origin: 50% 47%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  position: relative;
  width: var(--book-width);
  height: var(--book-height);
}

.book {
  width: var(--book-width);
  height: var(--book-height);
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  transform: translateY(180px) rotateX(72deg) rotateY(-20deg) rotateZ(7deg);
}

.f {
  position: absolute;
  backface-visibility: hidden;
}

.cvr {
  /* Front cover rotates around the left edge like a hinged hardback cover. */
  position: absolute;
  width: var(--book-width);
  height: var(--book-height);
  transform-style: preserve-3d;
  transform-origin: 0 50%;
  transform: translateZ(19px);
  will-change: transform;
}

.cvr-front {
  width: var(--book-width);
  height: var(--book-height);
  position: absolute;
  top: 0;
  left: 0;
  background: var(--bk-face);
  box-shadow:
    inset 5px 0 10px rgba(0, 0, 0, 0.45),
    inset -1px 0 2px rgba(255, 255, 255, 0.06);
}

.cvr-front::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -55deg,
      transparent 0,
      transparent 4px,
      rgba(255, 255, 255, 0.018) 4px,
      rgba(255, 255, 255, 0.018) 5px
    ),
    linear-gradient(
      to right,
      rgba(0, 0, 0, 0.28) 0%,
      transparent 10%,
      transparent 90%,
      rgba(0, 0, 0, 0.18) 100%
    );
}

.pg {
  /* Each page is its own 3D plane so JS can fan them open at slightly different depths. */
  position: absolute;
  width: var(--book-width);
  height: var(--book-height);
  top: 0;
  left: 0;
  transform-style: preserve-3d;
  transform-origin: 0 50%;
  will-change: transform;
}

.pg .pf,
.pg .pb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.pg .pb {
  transform: rotateY(180deg);
}

.pg--third .pf {
  background: #e5e0d7;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 22px,
    rgba(0, 0, 0, 0.03) 22px 23px
  );
}

.pg--third .pb {
  background: #ddd8cf;
}

.pg--second .pf {
  background: #ece7df;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 22px,
    rgba(0, 0, 0, 0.035) 22px 23px
  );
}

.pg--second .pb {
  background: #e5e0d8;
}

.pg--first .pf {
  background: #f5f0e8;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 22px,
    rgba(0, 0, 0, 0.04) 22px 23px
  );
}

.pg--first .pb {
  background: #ede8df;
}

.back-cvr {
  width: var(--book-width);
  height: var(--book-height);
  background: var(--bk-dark);
  transform: translateZ(-19px) rotateY(180deg);
  box-shadow: inset 5px 0 10px rgba(0, 0, 0, 0.5);
}

.spine {
  width: var(--book-depth);
  height: var(--book-height);
  left: 0;
  top: 0;
  transform-origin: right center;
  transform: rotateY(-90deg);
  background: linear-gradient(to right, #0a0012, var(--bk-dark) 40%, #0a0012);
}

.pages {
  width: var(--book-depth);
  height: var(--book-height);
  left: 0;
  top: 0;
  transform-origin: left center;
  transform: translateX(var(--book-width)) rotateY(90deg);
  background: repeating-linear-gradient(to right, #ede8df 0 1.5px, #d8d3ca 1.5px 2.5px);
}

.top-f {
  width: var(--book-width);
  height: var(--book-depth);
  top: 0;
  left: 0;
  transform-origin: bottom center;
  transform: rotateX(90deg);
  background: linear-gradient(to bottom, #ddd8cf, #c8c3ba);
}

.bot-f {
  width: var(--book-width);
  height: var(--book-depth);
  top: 0;
  left: 0;
  transform-origin: top center;
  transform: translateY(var(--book-height)) rotateX(-90deg);
  background: #b8b3aa;
}

.inner-pg {
  width: var(--book-width);
  height: var(--book-height);
  top: 0;
  left: 0;
  transform: translateZ(18px);
  background: var(--cream);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 22px,
    rgba(0, 0, 0, 0.04) 22px 23px
  );
}

.cva {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.2rem;
}

.bo {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 160, 200, 0.5);
}

.bi {
  position: absolute;
  inset: 16px;
  border: 0.5px solid rgba(212, 160, 200, 0.22);
}

.cc {
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--bk-border);
  border-style: solid;
  opacity: 0.88;
}

.cc.tl {
  top: 6px;
  left: 6px;
  border-width: 1px 0 0 1px;
}

.cc.tr {
  top: 6px;
  right: 6px;
  border-width: 1px 1px 0 0;
}

.cc.bl {
  bottom: 6px;
  left: 6px;
  border-width: 0 0 1px 1px;
}

.cc.br {
  bottom: 6px;
  right: 6px;
  border-width: 0 1px 1px 0;
}

.cover-star {
  width: 20px;
  height: 20px;
  opacity: 0.85;
}

.cover-star__outer {
  fill: rgba(212, 160, 200, 0.85);
}

.cover-star__inner {
  fill: rgba(255, 255, 255, 0.5);
}

.cv-title {
  font-family: "Snell", cursive;
  font-size: 2.1rem;
  color: rgba(255, 255, 255, 0.93);
  text-align: center;
  line-height: 1.25;
}

.cv-rule {
  width: 42px;
  height: 1px;
  background: rgba(212, 160, 200, 0.5);
}

.cv-lbl {
  font-size: 0.52rem;
  letter-spacing: 0.22em;
  color: var(--bk-border);
  text-transform: uppercase;
  font-variation-settings: "wght" 500;
}

.bk-shadow {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 190px;
  height: 22px;
  background: radial-gradient(ellipse, rgba(3, 168, 158, 0.14) 0%, transparent 70%);
  filter: blur(8px);
}

.prompt {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  white-space: nowrap;
}

.prompt.on {
  opacity: 1;
}

.prompt-ln {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent);
  animation: pl 2s ease-in-out infinite;
}

@keyframes pl {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.hbs-scroll {
  height: calc(var(--slide-count, 4) * 160vh);
  position: relative;
  background: #000000;
}

.hbs-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.slide-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  height: 100%;
  gap: 0.4rem;
  overflow: hidden;
}

/* font for hobbies title */
.hobbies-title {
  font-family: "Bodoni Moda", serif;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 0.95;
  margin: 0;
  color: #1a1a1a;
}

.hobbies-title-first {
  font-family: "Snell", cursive;
  font-size: 1.28em;
  display: inline-block;
  line-height: 0.78;
  vertical-align: -0.1em;
  margin-right: 0.01em;
  color: #1a1a1a;
}

/* font for hobbies body slide */
.hobbies-body {
  color: rgba(0, 0, 0, 0.58);
  font-size: 1.2rem;
  line-height: 1.2;
  font-variation-settings: "wght" 400;
  letter-spacing: -0.025em;
}

.slide-page-host {
  position: relative;
  width: min(85vw, calc(82vh * 230 / 320));
  aspect-ratio: 230 / 320;
  overflow: hidden;
  background: var(--cream);
  box-shadow:
    0 8px 60px rgba(0, 0, 0, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.35);
  border-radius: 2px;
}

.sl-bo {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(212, 160, 200, 0.5);
  pointer-events: none;
  z-index: 5;
}

.sl-bi {
  position: absolute;
  inset: 16px;
  border: 0.5px solid rgba(212, 160, 200, 0.22);
  pointer-events: none;
  z-index: 5;
}

.sl-cc {
  position: absolute;
  width: 11px;
  height: 11px;
  border-color: var(--bk-border);
  border-style: solid;
  opacity: 0.88;
  pointer-events: none;
  z-index: 5;
}

.sl-tl { top: 6px; left: 6px; border-width: 1px 0 0 1px; }
.sl-tr { top: 6px; right: 6px; border-width: 1px 1px 0 0; }
.sl-bl { bottom: 6px; left: 6px; border-width: 0 0 1px 1px; }
.sl-br { bottom: 6px; right: 6px; border-width: 0 1px 1px 0; }

.title-oval {
  border: 1.5px solid var(--bk-border);
  border-radius: 50%;
  padding: 0.5em 1.6em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  flex-shrink: 0;
}

.flip-ov {
  /* A full-screen wipe that sells the transition between hobby slides like a page turn. */
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: linear-gradient(
    to right,
    #e5e0d7 0%,
    var(--cream) 45%,
    #fff 50%,
    var(--cream) 55%,
    #ddd8cf 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
}

@keyframes ltr {
  0% {
    transform: translateX(-50%);
  }

  100% {
    transform: translateX(0%);
  }
}

.cf-link {
  display: inline;
  text-decoration: none;
  padding: 0em 0.05em;
  border-radius: 0px;
  transition:
    background 0.1s,
    color 0.1s;
  font-variation-settings: "wght" 540;
}

.cf-link:hover {
  background: var(--accent);
  color: #000;
}

.hobbies-link{
    color: #ff1aec;
    text-decoration: none;
    padding: 0em 0.05em;
    border-radius: 0px;
    transition:
        background 0.1s,
        color 0.1s;
  font-variation-settings: "wght" 540;
}

.hobbies-link:hover {
  background: #ff1aec;
  color: #fff;
}


#globe-wrap {
  /* The globe stays draggable, so the wrapper owns the cursor state. */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

#globe-wrap:active {
  cursor: grabbing;
}

#globe {
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.1));
}

#country-lbl {
  position: absolute;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  padding: 0.22em 0.6em;
  border-radius: 3px;
  font-size: 0.78rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  font-variation-settings: "wght" 450;
  z-index: 20;
  transform: translate(-50%, -100%);
}

.foot {
  background: #000000;
  min-height: 30vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.85rem;
}

.foot-title {
  font-family: "Snell", cursive;
  font-size: 1.65rem;
  color: rgba(255, 255, 255, 0.5);
}

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

.foot a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .slide-page-host {
    width: min(92vw, calc(88vh * 230 / 320));
  }
}
