/* =========================
   COOLVETICA
========================= */
@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica UltraLight.otf") format("opentype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica Book.otf") format("opentype");
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Coolvetica";
  src: url("../fonts/Coolvetica Heavy.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* =========================
   MADE OKINE SANS
========================= */
@font-face {
  font-family: "Made Okine Sans";
  src: url("../fonts/MADEOkineSansPERSONALUSE-Thin.otf") format("opentype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Made Okine Sans";
  src: url("../fonts/MADEOkineSansPERSONALUSE-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Made Okine Sans";
  src: url("../fonts/MADEOkineSansPERSONALUSE-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Made Okine Sans";
  src: url("../fonts/MADEOkineSansPERSONALUSE-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Made Okine Sans";
  src: url("../fonts/MADEOkineSansPERSONALUSE-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050505;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --dark: #050505;
  --pink: #eca2dd;
  --pink-strong: #e25ac7;
  --radius-lg: 32px;
}

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

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  font-family: "Made Okine Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  cursor: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.cursor-circle {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--dark);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
  background: white;
  opacity: 0.85;
  transition: width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
}

.cursor-circle.active {
  width: 58px;
  height: 58px;
  opacity: 0.65;
}

@media (hover: none) {
  body {
    cursor: auto;
  }

  .cursor-circle {
    display: none;
  }
}

/* =========================
   NAV BAR
========================= */
/* =========================
   NAV BAR / MOBILE MENU — copied from home page
========================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transform: translateZ(0);
  background: transparent;
  border-bottom: 0;
  padding: 0;
  transition: padding 0.35s ease;
}

.nav-inner {
  width: calc(100% - 150px);
  height: 76px;
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  transition:
    width 0.35s ease,
    height 0.35s ease,
    padding 0.35s ease,
    background 0.35s ease,
    border 0.35s ease,
    box-shadow 0.35s ease,
    backdrop-filter 0.35s ease;
}

.nav.scrolled {
  padding: 14px 0;
}

.nav.scrolled .nav-inner {
  width: min(920px, calc(100% - 40px));
  height: 58px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.logo-img {
  max-height: 35px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: max-height 0.35s ease;
}

.invert-logo {
  filter: invert(1);
}

.nav.scrolled .logo-img {
  max-height: 30px;
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.star {
  width: 34px;
  height: 34px;
  background: var(--dark);
  clip-path: polygon(50% 0%, 61% 36%, 100% 50%, 61% 64%, 50% 100%, 39% 64%, 0% 50%, 39% 36%);
}

.nav-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
  color: rgba(255, 255, 255);
  font-size: 18px;
  letter-spacing: 0.05em;
  font-weight: 300;
}

.nav-links a {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1;
}

.nav-links a span {
  display: inline-block;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s ease;
}

.nav-links a::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;

  color: #eca2dd;

  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover span,
.nav-links a.active span {
  transform: translateY(-115%);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: translateY(-100%);
}

.nav-role {
  font-size: 18px;
  letter-spacing: 0.05em;
  font-weight: 300;
  text-transform: uppercase;
  color: rgba(255, 255, 255);
  white-space: nowrap;
  grid-column: 1;
  justify-self: start;
}

.menu-toggle {
  display: none;
  grid-column: 3;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 1001;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 6px auto;
  background: #fff;
  border-radius: 999px;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  transform: scale(1.08);
}

.menu-toggle:hover span {
  background: #eca2dd;
}

.menu-toggle:hover span:nth-child(1) {
  width: 30px;
}

.menu-toggle:hover span:nth-child(2) {
  width: 18px;
}

.menu-toggle:hover span:nth-child(3) {
  width: 30px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(236, 162, 221, 0.14), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08), transparent 30%),
    rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.45s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.mobile-close {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 1002;

  width: 48px;
  height: 48px;

  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;

  color: white;
  font-size: 34px;
  line-height: 1;

  cursor: pointer;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.mobile-menu-links a {
  font-family: "Made Okine Sans", sans-serif;
  font-weight: 500;
  font-size: clamp(44px, 13vw, 92px);
  line-height: 0.9;
  color: #fff;

  letter-spacing: 0.055em;
  opacity: 0;
  transform: translateY(32px);

  transition:
    color 0.25s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    letter-spacing 0.35s ease,
    opacity 0.45s ease;
}

.mobile-menu-links a:hover {
  color: #eca2dd;

  transform:
    translateY(-6px) scale(1.12);

  letter-spacing: 0.16em;
}

.mobile-menu-links a.active {
  color: #eca2dd;
  letter-spacing: 0.16em;
}

.mobile-menu.open .mobile-menu-links a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.open .mobile-menu-links a:nth-child(1) {
  transition-delay: 0.08s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(2) {
  transition-delay: 0.16s;
}

.mobile-menu.open .mobile-menu-links a:nth-child(3) {
  transition-delay: 0.24s;
}

body.menu-open {
  overflow: hidden;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--dark);
  color: white;
  font-weight: 650;
  font-size: 14px;
  border: 1px solid var(--dark);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
  position: relative;
  overflow: hidden;
}

.button:hover {
  background: #2a2a2a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.button::after {
  content: "";
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  position: absolute;
  top: var(--btn-y, 50%);
  left: var(--btn-x, 50%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.35s ease;
  pointer-events: none;
}

.button:hover::after {
  transform: translate(-50%, -50%) scale(4);
}

.button span {
  position: relative;
  z-index: 1;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

/* =========================
   PORTFOLIO PAGE
========================= */
.portfolio-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 45vw) 1fr;
  grid-template-rows: auto;
  background: transparent;
  isolation: isolate;
}

.portfolio-page>* {
  min-width: 0;
}

.portfolio-left-panel {
  grid-column: 1 / -1;
  grid-row: 1;

  position: sticky;
  top: 0;
  z-index: 0;

  height: 100vh;
  min-height: 720px;

  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;

  padding: clamp(90px, 9vw, 150px) clamp(26px, 4vw, 72px) clamp(70px, 7vw, 120px);
}

.portfolio-left-video {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.portfolio-left-gradient {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.78) 0%,
      rgba(0, 0, 0, 0.28) 42%,
      rgba(0, 0, 0, 0.94) 100%);
}

.portfolio-left-content {
  position: relative;
  z-index: 1;
  width: min(570px, 100%);
}

.portfolio-page-title {
  display: inline-block;
  font-family: "Coolvetica", sans-serif;
  font-size: clamp(100px, 7vw, 200px);
  font-weight: 400;
  font-style: normal;
  line-height: 0.86;
  letter-spacing: 0.01em;
  margin-bottom: clamp(14px, 1.4vw, 24px);
  background: linear-gradient(180deg, #ffffff 0%, #e25ac7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  padding-top: 0.04em;
  padding-right: 0.08em;
}

/* Same visual settings as .portfolio-stack-desc from home page */
.portfolio-page-desc {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(18px, 1.1vw, 23px);
  font-weight: 300;
  line-height: 1.55;
  max-width: 1000px;
}

.portfolio-right-panel {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 2;

  min-height: 100vh;
  padding: clamp(110px, 8vw, 150px) clamp(22px, 3vw, 68px) clamp(80px, 8vw, 130px);

  background: transparent;
}

@media (min-width: 1161px) {
  .portfolio-left-content {
    width: min(570px, 42vw);
  }

  .portfolio-right-panel {
    margin-left: 0;
  }

  .project-grid {
    position: relative;
    z-index: 2;
  }
}

.portfolio-filter-wrap {
  position: sticky;
  top: 88px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  padding: 8px 0 22px;
  pointer-events: auto;
}

.portfolio-filter-wrap::before {
  content: "";
  position: absolute;
  top: -180px;
  left: 0;
  right: 0;
  bottom: -28px;
  z-index: -1;
  pointer-events: none;

  background: linear-gradient(to bottom,
      #000 0%,
      rgba(0, 0, 0, 0.98) 48%,
      rgba(0, 0, 0, 0.72) 78%,
      rgba(0, 0, 0, 0) 100%);
}

@media (max-width: 1160px) {
  .portfolio-filter-wrap::before {
    display: none;
  }

  .portfolio-left-panel {
    z-index: 1;
  }

  .portfolio-right-panel {
    position: relative;
    z-index: 2;
    background: #000;
  }

  .portfolio-filter-wrap {
    position: relative;
    top: auto;
    z-index: 3;
  }
}

.filter-button {
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: "Made Okine Sans", sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.filter-button:hover,
.filter-button.is-active {
  transform: translateY(-2px);
  color: #050505;
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.92);
}


.portfolio-mobile-filter-bar {
  display: none;
  position: relative;
  z-index: 15;
  margin-bottom: 24px;
}

.filter-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.92);
  font-family: "Made Okine Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
}

.filter-menu-icon {
  width: 18px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.filter-menu-icon span {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.filter-menu-icon span:nth-child(2) {
  width: 68%;
}

.filter-menu-icon span:nth-child(3) {
  width: 86%;
}

.portfolio-filter-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(236, 162, 221, 0.14), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08), transparent 30%),
    rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
  transition:
    opacity 0.45s ease,
    visibility 0.45s ease,
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    backdrop-filter 0.45s ease;
}

.portfolio-filter-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.portfolio-filter-close {
  position: fixed;
  top: 28px;
  right: 28px;
  z-index: 1002;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.portfolio-filter-menu-options {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.portfolio-filter-menu-options .filter-button {
  width: min(360px, 86vw);
  min-height: 52px;
  padding: 0 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
  letter-spacing: 0.08em;
}

.portfolio-filter-menu.open .portfolio-filter-menu-options .filter-button {
  opacity: 1;
  transform: translateY(0);
}


.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: clamp(22px, 2.4vw, 42px);
  align-items: start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.project-card {
  max-width: 100%;
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1;
  border-radius: 30px;
  overflow: hidden;
  clip-path: inset(0 round 30px);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  contain: paint;
  cursor: pointer;
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.25s ease,
    border-color 0.25s ease;
  will-change: transform;
}

.project-card.is-hidden {
  display: none;
}

.project-card:hover {
  border-color: rgba(236, 162, 221, 0.34);
}

.project-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: translateZ(0) scale(1.01);
  backface-visibility: hidden;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
}

.project-card:hover img {
  transform: translateZ(0) scale(1.055);
  filter: saturate(1.06) contrast(1.02);
}

.project-card-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62%;
  z-index: 1;
  pointer-events: none;

  /* blurry/frosted effect */
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  /* transparent to black tint */
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.68) 0%,
      rgba(0, 0, 0, 0.34) 50%,
      rgba(0, 0, 0, 0) 100%);

  /* makes the blur fade out smoothly */
  -webkit-mask-image: linear-gradient(to top,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.82) 30%,
      rgba(0, 0, 0, 0) 100%);

  mask-image: linear-gradient(to top,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.82) 30%,
      rgba(0, 0, 0, 0) 100%);
}

.project-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: clamp(18px, 2vw, 26px);
  transform: translateZ(28px);
}

.project-card h2 {
  font-family: "Made Okine Sans", sans-serif;
  font-size: clamp(22px, 2.05vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.015em;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 10px 28px rgba(0, 0, 0, 0.46);
}

.project-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(0, 0, 0, 0.12);
  font-family: "Made Okine Sans", sans-serif;
  font-size: clamp(11px, 0.78vw, 13px);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =========================
   FOOTER
========================= */
footer {
  width: 100%;
  padding: 0;
  color: rgba(255, 255, 255);
  font-family: "Made Okine Sans", sans-serif;
  font-size: clamp(16px, 3.8vw, 18px);
  font-weight: 300;
  letter-spacing: 0.05em;
  background: #000;
}

.footer-inner {
  width: calc(100% - 110px);
  min-height: 120px;
  margin: 0 auto;
  padding: 30px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.footer-left {
  justify-self: start;
}

.footer-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 76px);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 4vw, 50px);
}

.footer-links a {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.1;
  color: rgba(255, 255, 255);
}

.footer-links a span {
  display: inline-block;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.25s ease;
}

.footer-links a::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
  color: var(--pink);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.footer-links a:hover span {
  transform: translateY(-115%);
}

.footer-links a:hover::after {
  transform: translateY(-100%);
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 22px;
  line-height: 1;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.back-to-top:hover {
  color: var(--pink);
  transform: translateY(-4px);
}

@media (max-width: 1160px) {
  .portfolio-page {
    display: block;
  }

  .portfolio-left-panel {
    position: relative;
    top: auto;
    height: 100vh;
    min-height: 100vh;
    align-items: flex-end;
    overflow: hidden;
    padding: clamp(110px, 12vw, 150px) clamp(24px, 6vw, 72px) clamp(64px, 8vw, 110px);
  }

  .portfolio-left-content {
    width: min(720px, 100%);
  }

  .portfolio-page-title {
    font-size: clamp(86px, 12vw, 150px);
  }

  .portfolio-page-desc {
    max-width: 680px;
  }

  .portfolio-right-panel {
    min-height: auto;
    padding: 46px 24px 84px;
  }

  .portfolio-filter-wrap {
    position: sticky;
    top: 88px;
    justify-content: flex-start;
  }

  .portfolio-filter-wrap::before {
    left: -24px;
    right: -24px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  /* Keep the custom circle cursor on desktop/tablet responsive widths.
     It will only be hidden on real touch devices by the hover:none rule below. */

  /* NOT SCROLLED: normal transparent nav */
  .nav-inner {
    width: calc(100% - 40px);
    height: 76px;
    padding: 0;
    grid-template-columns: 1fr auto 1fr;

    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
  }

  /* SCROLLED: rounded pill nav */
  .nav.scrolled {
    padding: 14px 0;
  }

  .nav.scrolled .nav-inner {
    width: min(420px, calc(100% - 32px));
    height: 58px;
    padding: 0 22px;

    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  }

  .nav-role,
  .nav-links {
    display: none;
  }

  .brand {
    grid-column: 2;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .menu-toggle span {
    width: 24px;
    height: 1.5px;
    margin: 4px auto;
  }

  .footer-inner {
    width: calc(100% - 40px);
    grid-template-columns: 1fr;
    padding: 24px 0;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    justify-self: center;
  }

  .footer-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 28px;
  }
}

@media (max-width: 620px) {
  .portfolio-left-panel {
    height: 100vh;
    min-height: 100vh;
    padding: 110px 22px 58px;
  }

  .portfolio-page-title {
    font-size: clamp(58px, 18vw, 100px);
  }

  .portfolio-page-desc {
    max-width: 94%;
    font-size: clamp(15px, 4vw, 18px);
    line-height: 1.5;
  }

  .portfolio-right-panel {
    padding: 32px 16px 68px;
  }

  .portfolio-mobile-filter-bar {
    display: flex;
    justify-content: flex-start;
  }

  .portfolio-filter-wrap {
    display: none;
  }

  .portfolio-filter-wrap::before {
    display: none;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .project-card {
    border-radius: 24px;
    clip-path: inset(0 round 24px);
  }

  .project-card-content {
    padding: 20px;
  }

  .project-card h2 {
    font-size: clamp(26px, 8vw, 38px);
  }

  .footer-inner {
    width: calc(100% - 32px);
    min-height: auto;
    padding: 28px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    text-align: center;
  }

  .footer-left {
    justify-self: center;
  }

  .footer-right {
    width: 100%;
    justify-self: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
  }

  .footer-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(12px, 1.5vw, 30px);
  }

  .footer-links a {
    font-size: clamp(13px, 3.5vw, 16px);
    white-space: nowrap;
  }

  .back-to-top {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    font-size: 18px;
  }
}


/* =========================
   RESPONSIVE FIXES
   - Prevent description cut-off from 820px to 621px
   - Keep intro section at least full-screen, but allow content to fit
========================= */
@media (max-width: 1160px) {
  .portfolio-left-panel {
    min-height: 100svh;
    height: auto;
  }
}

@media (min-width: 621px) and (max-width: 820px) {
  .portfolio-left-panel {
    min-height: 100svh;
    height: auto;
    padding-top: clamp(120px, 16vw, 150px);
    padding-bottom: clamp(105px, 14vw, 140px);
  }

  .portfolio-left-content {
    width: min(680px, 100%);
  }

  .portfolio-page-title {
    font-size: clamp(76px, 12.5vw, 110px);
    line-height: 0.88;
  }

  .portfolio-page-desc {
    max-width: 620px;
    font-size: clamp(17px, 2.25vw, 21px);
    line-height: 1.58;
  }
}

@media (max-width: 620px) {
  .portfolio-left-panel {
    min-height: 100svh;
    height: auto;
  }
}

body.filter-menu-open {
  overflow: hidden;
}


@media (max-width: 620px) {
  .portfolio-filter-close {
    z-index: 1002;
  }
}

/* =========================
   OVERFLOW / NAV STABILITY FIXES
   Prevent tiny horizontal scrolling caused by sticky gradients, hover transforms,
   and oversized children. Also keeps fixed nav above page content while scrolling.
========================= */
.nav {
  z-index: 100;
  transform: translateZ(0);
}

@supports (overflow: clip) {

  html,
  body {
    overflow-x: clip;
  }
}

.portfolio-left-panel,
.portfolio-right-panel,
.project-grid,
footer {
  max-width: 100%;
}

@media (max-width: 1160px) {
  .portfolio-filter-wrap::before {
    left: -24px;
    right: -24px;
  }
}

@media (max-width: 620px) {

  .portfolio-mobile-filter-bar,
  .filter-menu-toggle,
  .project-grid,
  .project-card {
    max-width: 100%;
  }
}

@media (max-width: 650px) {
  footer .footer-links {
    width: min(100%, 420px);
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  footer .footer-links a {
    min-height: 50px;
    padding: 13px 10px;
    font-size: clamp(16px, 3.8vw, 20px);
    line-height: 1.1;
  }

  footer .copyright,
  footer .footer-copyright,
  footer .copyright-line,
  footer .footer-bottom,
  footer .footer-note,
  .copyright,
  .footer-copyright,
  .copyright-line {
    font-size: clamp(16px, 1.15vw, 20px) !important;
    line-height: 1.35 !important;
  }

  footer .footer-links a,
  footer .footer-links a:hover,
  footer .footer-links a:active,
  footer .footer-links a:focus {
    transform: none !important;
    letter-spacing: 0.04em !important;
  }

  footer .footer-links a span,
  footer .footer-links a:hover span {
    transform: none !important;
    transition: none !important;
  }

  footer .footer-links a::before,
  footer .footer-links a::after {
    content: none !important;
    display: none !important;
  }
}