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;
}

/* ===== TOP CONTACT BAR (badge + links) ===== */
.contact-top {
  position: fixed;
  top: 26px;
  right: 40px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 26px;
}

/* Green textured "actively looking" badge */
.contact-badge {
  position: relative;
  padding: 12px 18px;
  width: fit-content;
  max-width: 130px;
  transition: opacity 0.25s ease;
}
.contact-badge::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #325825;
  border-radius: 16px;
  filter: url(#nav-wobble);
  z-index: -1;
}
.contact-badge-text {
  margin: 0;
  font-family: "Libre italic", serif;
  font-style: italic;
  font-size: 12px;
  line-height: 1.4;
  color: #fff;
}

/* Twitter / Email / LinkedIn links */
.contact-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.contact-link {
  position: relative;
  font-family: "Libre", serif;
  font-size: 17px;
  color: rgba(75, 45, 21, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
  cursor: pointer;
}
/* All links: bold italic + underline on hover; email keeps it after a click */
.contact-link:hover,
.contact-email.is-active {
  color: #4b2d15;
  font-family: "Libre italic", serif;
  font-style: italic;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-email-wrap {
  position: relative;
}

.contact-email {
  display: inline-flex;
  align-items: center;
}

.contact-email-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 14px;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateX(-4px);
  color: inherit;
  transition:
    width 0.2s ease,
    margin-left 0.2s ease,
    opacity 0.18s ease,
    transform 0.2s ease;
}

.contact-link:hover .contact-email-icon,
.contact-email.is-active .contact-email-icon {
  width: 14px;
  margin-left: 6px;
  opacity: 1;
  transform: translateX(0);
}

/* Shared flyout for tooltip + copied toast — animates in */
.contact-flyout {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 16px 16px 16px;
  background: #efece0;
  border: 1.5px solid rgba(75, 45, 21, 0.35);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(75, 45, 21, 0.16);
  white-space: nowrap;
  color: #4b2d15;
  opacity: 0;
  transform: translate(-50%, -10px);
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}
.contact-flyout.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}
.contact-tooltip-label {
  font-family: "Manrope", serif;
  font-weight: 800;
  font-size: 14px;
  color: rgba(75, 45, 21, 0.55);
}
.contact-tooltip-email {
  font-family: "Manrope bold", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #4b2d15;
}
.contact-copied {
  font-family: "Manrope bold", sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: #4b2d15;
}
/* ===================================== */

/* ── 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: links pinned top-center, badge drops to the bottom */
  .contact-top {
    top: 18px;
    right: 0;
    left: 0;
    justify-content: center;
    gap: 0;
  }
  .contact-links {
    gap: 26px;
  }
  .contact-badge {
    position: fixed;
    top: auto;
    bottom: 92px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 78vw;
    text-align: center;
  }
  .contact-badge.badge-hidden {
    opacity: 0;
    pointer-events: none;
  }
  /* Mobile has no hover — only the clicked (copied) state shows */
  .contact-tooltip {
    display: none;
  }
  .contact-flyout {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
  }
  .contact-flyout.is-visible {
    transform: translateX(-50%) translateY(0);
  }
}

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

@font-face {
  font-family: "Libre italic";
  src: url("./assets/Libre_Baskerville/LibreBaskerville-Italic-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  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: 180px;
  background-color: #fffced;
  background-image: url(assets/bgtexturefinal.jpg);
  background-repeat: repeat;
  background-blend-mode: multiply;
}

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

h1 {
  font-family: "Libre italic", serif;
  font-weight: 900;
  font-size: 24px;
  line-height: 1.2;
  padding-top: 8px;
  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: 0px 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.6rem;
  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: 1.4rem;
  }
}
