html {
  overflow-x: hidden;
}

/* Hidden SVG filter container */
.svg-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ── LOADING OVERLAY ── */
#loadingOverlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fffced;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: opacity 0.8s ease;
}

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

#loadingText {
  font-family: "Libre italic", serif;
  font-style: italic;
  font-size: 22px;
  color: #325825;
  white-space: nowrap;
}

.loading-dots span {
  opacity: 0;
  animation: loading-dot 1.5s infinite;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.3s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes loading-dot {
  0%,
  80%,
  100% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
}
/* ─────────────────────── */

/* ===== NEW BOTTOM PILL NAVBAR ===== */

.new-navbar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* z-index 2: visually covers the popup while it slides through */
.nav-pill-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #e8e6da;
  border: 2px solid rgba(75, 45, 21, 0.14);
  border-radius: 60px;
  box-shadow: 0px 3px 4.5px rgba(75, 45, 21, 0.46);
  white-space: nowrap;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  color: rgba(75, 45, 21, 0.48);
  text-decoration: none;
  font-family: "Libre", serif;
  font-size: 16px;
  border-radius: 30px;
  transition: color 0.2s;
}

.nav-item:hover {
  color: #4b2d15;
}

.nav-item.nav-active {
  font-family: "Libre italic", serif;
  font-weight: bold;
  color: #4b2d15;
}

.nav-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  background: #4b2d15;
  color: white;
  border: none;
  border-radius: 50px;
  font-family: "Libre", serif;
  font-size: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.nav-contact-btn:hover {
  background: #3a2010;
  font-family: "Libre", serif;
}

/* chevron rotates on open */
.nav-chevron-icon {
  height: 13px;
  width: 13px;
  flex-shrink: 0;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-contact-btn.btn-open .nav-chevron-icon {
  transform: rotate(180deg);
}

/* z-index 1: sits behind the bar until Contact is clicked */
.nav-above-bar {
  position: relative;
  width: 175px;
  height: 0;
  z-index: 1;
}

/* Contact popup — hidden behind the bar by default, slides up on click */
.nav-contact-popup {
  position: absolute;
  bottom: -45px;
  left: 0%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px;
  min-width: 175px;
  white-space: normal;
  box-sizing: border-box;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Textured background shell — filtered separately so text/icons stay clean */
.nav-contact-popup::before {
  content: "";
  position: absolute;
  inset: 8px 8px 0px 8px;
  background: #325825;
  border-radius: 18px;
  filter: url(#nav-wobble);
  z-index: -1;
}

.nav-contact-popup.open {
  transform: translateX(-20%) translateY(-45%);
  pointer-events: auto;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-popup-text {
  font-family: "Libre italic", serif;
  font-size: 12px;
  color: white;
  margin: 0;
  max-width: none;
  line-height: 1.45;
}

.nav-popup-icons {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
}

.nav-popup-icons a {
  color: white;
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.15s;
}

.nav-popup-icons a:hover {
  opacity: 1;
}

.nav-popup-icons svg {
  width: 19px;
  height: 19px;
  fill: white;
}
/* ===================================== */

/* ── MOBILE HAMBURGER + NAV CARD ── */

/* Hidden on desktop, shown via media query */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(75, 45, 21, 1);
  border-radius: 30px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.nav-hamburger:hover {
  background: rgba(75, 45, 21, 0);
  color: rgba(75, 45, 21, 1);
}

.nav-hamburger-lines {
  display: block;
}
.nav-hamburger-close {
  display: none;
}

.nav-hamburger.is-open .nav-hamburger-lines {
  display: none;
}
.nav-hamburger.is-open .nav-hamburger-close {
  display: block;
}

/* Mobile nav card — fully invisible until hamburger is clicked */
.nav-mobile-menu {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  display: none;
  flex-direction: column;
  gap: 4px;
  background: #e8e6da;
  border: 2px solid rgba(75, 45, 21, 0.14);
  border-radius: 20px;
  padding: 8px;
  min-width: 200px;
  box-shadow: 0px 3px 4.5px rgba(75, 45, 21, 0.46);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.nav-mobile-menu.open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: rgba(75, 45, 21, 0.55);
  text-decoration: none;
  font-family: "Libre", serif;
  font-size: 16px;
  border-radius: 12px;
  transition:
    background 0.15s,
    color 0.15s;
}

.nav-mobile-item:hover {
  background: rgba(75, 45, 21, 0.06);
  color: #4b2d15;
}

.nav-mobile-item.nav-active {
  font-family: "Libre italic", serif;
  font-weight: bold;
  color: #4b2d15;
}

@media (max-width: 800px) {
  /* Collapse desktop links, show hamburger */
  .nav-item {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-mobile-menu {
    display: flex;
  }

  /* Contact popup on mobile: center it and animate only on Y axis */
  .nav-contact-popup {
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-contact-popup.open {
    transform: translateX(-50%) translateY(-40%);
  }

  /* Fade out the popup when the hamburger menu is open */
  .nav-contact-popup.menu-open {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
}

@font-face {
  font-family: "Libre";
  src: url("./assets/Libre_Baskerville/LibreBaskerville-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Libre italic";
  src: url("./assets/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Manrope";
  src: url("./assets/Manrope/Manrope-VariableFont_wght.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: "Manrope bold";
  src: url("assets/Manrope/static/Manrope-Bold.ttf") format("truetype");
  font-weight: 800;
  font-style: bold;
}

header {
  margin: 0px auto;
  padding: 40px 40px;
  max-width: 900px;
  justify-content: center;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  font-weight: 100;
  overflow-x: hidden;
  max-width: 100%;
  padding-bottom: 120px;
}

hr {
  border: 0.1px solid #522b12;
}

h1 {
  font-family: "Libre italic", serif;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.4;
  color: #111111;
  margin: 0;
}

a {
  color: #522b12;
  cursor: pointer;
  font-family: "Libre italic", serif;
}

.bgimage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fffced;
  background-image: url(assets/bgtexturefinal.jpg);
  background-repeat: repeat;
  background-size: cover;
  background-blend-mode: multiply;
  z-index: -1; /* Ensure it stays behind all content */
}

.section-title h1 {
  text-align: center;
  font-family: "Libre italic", sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: #111111;
  margin-top: 24px;
}

p {
  color: #111111;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  margin: 0px;
  max-width: 400px;
}

.paragraph-enter {
  opacity: 1;
  transform: translate(0%, 40%);
}

body::before {
  content: "";
  position: static;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
  background-image: url(assets/noisemax.png);
  background-repeat: repeat;
  z-index: 1;
}

#p5jsholder {
  position: static;
  top: 0;
  left: 0;
  z-index: 2;
}

.navbar {
  padding: 20px;
  font-family: "Manrope", sans-serif;
  font-weight: bold;
  letter-spacing: 0.09rem;
  padding-right: 74px;
  position: fixed;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
  background-color: #e7e6da;
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: -40px; /* how far below the navbar the fade extends */
  left: 0;
  width: 100%;
  height: 40px; /* height of the fade zone — match bottom value */
  background: linear-gradient(
    to bottom,
    #e7e6da,
    /* match your navbar background colour */ transparent
  );
  pointer-events: none; /* so it doesn't block clicks below */
}

.navbar ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: right;
  gap: 20px;
}

.navbar a {
  cursor: pointer;
  color: #111111;
  text-decoration: none;
  font-size: 1.1rem;
}

.navbar a:hover {
  font-family: "Libre italic", serif;
  color: #307436;
}

.navbar.white-text a {
  color: #ffffff;
}

.navbar.white-text a:hover {
  color: #ff4545; /* or any hover color you like on blue */
}

.project.scrollContainer {
  max-width: 900px;
  margin: 0 auto;
}

.project {
  display: flex;
  gap: 24px;
  align-items: center;
  box-sizing: border-box; /* ← prevents padding from causing overflow */
  padding: 40px; /* ← breathing room so content doesn't touch edges */
  overflow: hidden;
}

.project-image {
  width: 50%;
  height: 100%; /* ← fill the flex container height */
  max-height: 80vh; /* ← cap it so it never exceeds the viewport */
  object-fit: contain; /* ← scale proportionally within that space */
  padding: 0;
}

.project-description {
  padding: 12px;
  color: #111111;
  max-width: 400px;
  flex-shrink: 0;
}

/* ── Project tags / badges ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(75, 45, 21, 1);
  background: rgba(75, 45, 21, 0.07);
  border: 1px solid rgba(75, 45, 21, 0.1);
  border-radius: 100px;
  padding: 4px 10px;
  white-space: nowrap;
  text-decoration: none;
  text-transform: capitalize;
}

/* Playground tags sit below the thumbnail */
.sideproject .tags {
  margin-top: 10px;
  margin-bottom: 2px;
}

.sideproject a {
  text-decoration: none;
}
/* ───────────────────────────── */

button {
  cursor: pointer;
  background-color: #522b12;
  padding: 16px 16px;
  font-family: "Libre", serif;
  font-weight: 700;
  font-size: 16px;
  color: #fffced;
  border: none;
  border-radius: 100px;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease; /* Ensure transition applies when hover is removed */
}

button:hover {
  /* transform: translate(4px, 4px); */
  font-family: "Libre italic", serif;
  background-color: #5f2a1a;
  color: #efeddf;
}

h2 {
  font-family: "Libre italic", serif;
  font-size: 24px;
  font-weight: 900;
  color: #111111;
  margin: 0;
  padding: 12px 0px;
}

h3 {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #111111;
  margin: 0;
  padding: 8px 0px;
  text-decoration: none;
}

h4 {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #111111;
  margin: 0;
  padding: 12px 0px;
}

.playstyles {
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 24px 120px;
  box-sizing: border-box;
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 32px;
}

.playimg {
  display: flex;
  flex-direction: row;
  gap: 40px;
  width: 100%;
  object-fit: contain;
  overflow-y: auto;
}

.sticky-header {
  padding: 20px 0;
}

.playimgcontainer {
  display: flex;
  flex-direction: column;
  gap: 40px;
  height: 80vh;
  margin-bottom: 0;
}

.playimg img {
  height: auto;
  max-height: 70%;
  width: auto;
  object-fit: contain;
}

.aboutme {
  display: flex;
  flex-direction: row; /* Side by side by default */
  gap: 40px;
  align-items: flex-start;
  padding: 100px 20px;
  max-width: 900px;
}

.aboutmetext {
  width: 60%; /* Takes up 60% of the horizontal space */
}

.aboutmeimgsketch {
  padding-top: 40px;
  width: 40%;
}

.aboutmeimgsketch img {
  width: 100%; /* Takes up 100% of the 40% div */
  max-width: 100%; /* Ensures it never overflows */
  height: auto; /* Keeps the aspect ratio perfect */
  display: block;
  border-radius: 12px;
}

.playimgcontainer a {
  text-decoration-color: #ffffff;
}

.icontext {
  font-size: 24px;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 4px;
}

/* .icontext a {
  text-decoration: none;
} */

.icontext img {
  height: 20px;
  width: 20px;
}

.blognamebox h3 {
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 48px;
  color: #2a5aeb;
  margin: 0;
}

#islandsection {
  background-color: #d1eae4;
}

.islandToHover {
  transition: filter 0.4s ease;
}

.islandToHover:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0px 12px 8px #314e11);
  cursor: pointer;
}

.islandToHover.active {
  transform: translateY(-6px);
  filter: drop-shadow(4px 6px 16px #314e11);
}

.sideproject {
  display: block;
  gap: 24px;
  width: 100%;
  padding-bottom: 40px;
}

/* ── Phone mockup thumbnail (video + phone frame overlay) ── */
.phone-mockup-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #06010011;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inner wrapper: matches Pixel 9 Pro - Hazel.svg viewBox (1620 x 3136)
   so the screen cutout coordinates map cleanly to percentages. */
.phone-mockup-inner {
  position: relative;
  height: 92%;
  aspect-ratio: 1620 / 3136;
  flex-shrink: 0;
}

/* Position the video exactly over the Pixel 9 Pro's screen cutout.
   Screen rect in SVG units: x 449.49–1290.51, y 201–3059.
   left:   449.49 / 1620 = 27.75%
   top:    201    / 3136 =  6.41%
   width:  841.01 / 1620 = 51.91%
   height: 2858   / 3136 = 91.13% */
.phone-mockup-inner video {
  position: absolute;
  top: 4%;
  left: 7.4%;
  width: 85%;
  height: 92.13%;
  object-fit: contain;
  border-radius: 1.8rem;
  z-index: 0;
  box-shadow: 4px 12px 12px rgba(22, 8, 0, 0.621);
}

/* Device frame sits on top of the video. */
.phone-mockup-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.sideproject img,
.sideproject-video {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* .sideproject h3 {
  font-family: "Manrope", sans-serif;
  font-weight: 900;
  font-size: 16px;
  color: #111111;
  text-decoration: underline #111111;
  margin: 0;
} */

.resumeSection {
  background-color: #d1eae4;
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  padding: 40px 0;
}

.company {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: auto;
}

.company h3 {
  font-family: "Manrope bold", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #111111;
  margin: 0;
}

.company h4 {
  font-family: "Manrope", sans-serif;
  font-weight: normal;
  font-size: 14px;
  color: #111111;
  margin: 0;
}

.aboutme {
  max-width: 900px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 16px;
  }

  .project.scrollContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-top: 20px;
  }

  .project-image {
    width: 80%;
    height: auto;
    padding-left: 0;
  }

  .project-description {
    width: 80%;
  }

  .aboutme {
    flex-direction: column-reverse;
    gap: 24px;
    padding: 20px;
  }

  .aboutmetext,
  .aboutmeimgsketch {
    flex: 0 0 100%; /* Take up full width when stacked */
    width: 100%;
  }

  .aboutmeimgsketch {
    padding-top: 60px;
    width: 100%;
  }

  .navbar {
    margin: 0 auto;
    padding: 12px;
    width: 100%;
  }

  .navbar ul {
    justify-content: center;
  }

  .navbar a {
    font-size: 12px;
  }

  .playstyles {
    padding: 60px 16px 120px;
  }

  .play-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sideproject {
    padding-bottom: 0;
  }

  .phone-mockup-inner video {
    border-radius: 0.8rem;
  }
}
