/* Color variables */

:root {
  --color-black: #2f2c3e;
  --color-white: #fdfdfd;
  --color-grey-1: #ededed;
  --color-grey-2: #726d6d;
  --color-grey-3: #454545;
}

/*text highlight color*/
::selection {
  background: #E37AFF;
  color: #000; /* keep or change if needed */
}

/* Firefox */
::-moz-selection {
  background: #E37AFF;
  color: #000;
}

/* Reset some default margins/paddings */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* html {
    font-size: 16px;
  }
   */

/* body {
    font-family: 'SF Pro','Geist', sans-serif;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
  } */

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

ul {
  list-style: none; /* remove bullets */
  margin: 0; /* remove default margin */
  padding: 0; /* remove default padding */
}

li {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--color-white);
  width: 100%;
}

img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ========== Tiempos Text Font import ========== */

/* Regular – 400 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Regular Italic – 400 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-regular-italic.woff2")
    format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Semi Bold – 600 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Semi Bold Italic – 600 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-semibold-italic.woff2")
    format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Bold – 700 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic – 700 */
@font-face {
  font-family: "Tiempos Text";
  src: url("/assets/fonts/tiempos-text-web-bold-italic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ========== SF Pro Font import ========== */

/* Regular – 400 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Regular Italic – 400 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-regularitalic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Semi Bold – 600 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Semi Bold Italic – 600 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-semibolditalic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* Bold – 700 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic – 700 */
@font-face {
  font-family: "SF Pro";
  src: url("/assets/fonts/sf-pro-text-bolditalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ========== SF Pro Mono Font import ========== */

/* Regular – 400 */
@font-face {
  font-family: "SF Pro Mono";
  src: url("/assets/fonts/sfmono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ========== Text styles ========== */

/* H1 */
h1 {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.25rem); /* min 36px, max 60px */
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

/* H2 */
h2 {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 4.2vw, 2.75rem); /* min 32px, max 50px */
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

/* H3 */
h3 {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem); /* min 24px, max 36px */
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

/* H4 */
h4 {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  font-size: clamp(1.375rem, 3vw, 1.75rem); /* min 22px, max 28px */
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-grey-2);
}

/* H5 */
h5 {
  font-family: "SF Pro Mono", "Geist", sans-serif;
  font-weight: 400;
  font-size: clamp(0.875rem, 2vw, 1rem); /* min 16px, max 20px */
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: normal;
  color: var(--color-grey-2);
}

/* H6 */
h6 {
  font-family: "SF Pro", "Geist", sans-serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.25rem); /* min 18px, max 20px */
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--color-black);
}

/* Body text */
p {
  font-family: "SF Pro", "Geist", sans-serif;
  font-weight: 400;
  font-size: 1rem; /* 16px base */
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--color-grey-3);
}

.body {
  font-family: "SF Pro", "Geist", sans-serif;
  font-weight: 400;
  font-size: 1rem; /* 16px base */
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--color-grey-3);
  margin-left: 1rem;
}

.copyright-text {
  color: var(--color-grey-3);
}

.grey {
  color: var(--color-grey-2);
}

.callout {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-grey-3);
  font-style: italic;
  padding: 0.75rem 1.25rem;
  border-left: 2px solid var(--color-grey-3);
}

.appendix {
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  text-transform: none;

  /* font-style: italic; */
}

.bio-link {
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  display: inline;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='1' y1='2' x2='9' y2='2' stroke='%23726d6d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 16px 4px;
  background-position: 0 100%;
  transition: background-image 0.4s ease;
}

.bio-link:hover {
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='4' xmlns='http://www.w3.org/2000/svg'%3E%3Cline x1='1' y1='2' x2='9' y2='2' stroke='%232f2c3e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.bullet-list {
  list-style-type: circle;
}

/* ========== Button styles ========== */

button {
  background: none;
  border: none;
}

.nav-button {
  font: 400 1rem/1.5 "SF Pro", "Geist", sans-serif;
  color: var(--color-black);
  position: relative;
}

.nav-button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: var(--color-black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}

.nav-button:hover::after {
  transform: scaleX(1);
}

.aside-nav-button {
  font-family: "SF Pro", "Geist", sans-serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.25rem); /* min 18px, max 20px */
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--color-grey-2);
  text-align: left;
  transition: color 0.2s ease;
}

.aside-nav-button:hover {
  color: var(--color-black);
}

.aside-nav-button.active {
  color: var(--color-black);
}

#backToTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;

  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-grey-1);

  font-family: "SF Pro Mono", "Geist", sans-serif;
  font-weight: 400;
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: normal;
  color: var(--color-grey-2);
  background-color: var(--color-white); /* make sure default bg is set */

  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease,
    color 0.3s ease;

  z-index: 1000;
}

#backToTop:hover {
  background-color: var(--color-black);
  border: 2px solid var(--color-black);
  color: var(--color-white);
}

/* Show button */
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Visible state */
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}

/* ========== Navbar ========== */
header {
  position: sticky;
  top: 2.25rem;
  z-index: 1000;
  width: 100vw;
}

/* Blur background always visible */
header::before {
  content: "";
  position: fixed;
  top: calc(2.25rem); /* aligns with header top */
  left: 50%;
  transform: translateX(-50%);
  width: 95vw; /* same width as navbar */
  height: var(--nav-blur-height); /* controlled by JS */
  background: rgba(250, 250, 250, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  pointer-events: none;
  transition: height 0.25s ease;
}

.navbar {
  position: relative;
  max-width: 95vw;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  z-index: 1000; /* above blur */
}

/* top row: logo + hamburger */
.navbar-small {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: auto;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.navbar-items {
  display: flex;
  justify-content: flex-end;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  width: auto;
}

.logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  font-family: "Tiempos Text", "Source Serif Pro", serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 3vw, 1.5rem); /* min 22px, max 28px */
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.logo-gif {
  height: 34px;
  width: auto;
}

/* ========== Footer ========== */
footer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 3.75rem;
}

.footer-text {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.footer-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.copyright {
  border-top: solid 0.0625rem var(--color-grey-2);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.copy-email:hover {
  cursor: pointer;
}

/* ========== Layout ========== */

/* basics */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-row,
.flex-row-desktop,
.flex-row-desktop-only {
  flex-direction: row;
}

.about-text {
  min-width: 50vw;
  max-width: 55vw;
  flex: 0 1 auto;
}

.space-between {
  justify-content: space-between;
}

.width-100 {
  width: 100%;
}

.gap-xs {
  gap: 0.25rem;
}

.gap-s {
  gap: 0.75rem;
}

.gap-m {
  gap: 1.25rem; /*20px*/
}

.gap-l {
  gap: 2rem;
}

.gap-xl {
  gap: 6.25rem;
}

.gap-xl-m {
  gap: clamp(1.25rem, 5.5vw, 6.25rem);
}

.gap-clamp {
  gap: clamp(0.75rem, 4vw, 1.25rem);
}

.none-desktop {
  display: none;
}

.right-align {
  align-items: flex-end;
}

/* ========== blur animation ========== */

/* Page starts BLURRED */
#page-content {
  filter: blur(20px);
  transition: filter 0.6s ease;
}

/* Unblur state */
#page-content.is-unblurred {
  filter: blur(0);
}

#page-blur {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.35);
  opacity: 1;
  transition: opacity 0.6s ease;
  z-index: 10;
  pointer-events: none;
}

#page-blur.is-hidden {
  opacity: 0;
}

/* If NOT coming from a blur transition, start unblurred */
.no-blur-transition #page-content {
  filter: blur(0);
}

.no-blur-transition #page-blur {
  opacity: 0;
}


/* home page */

.bg-gradient {
  background: linear-gradient(
    to bottom,
    #f9d4ff 0%,
    /* Top color */ #ffffff 20%,
    /* Start of white */ #ffffff 90%,
    /* End of white */ #ffa976 100% /* Bottom color */
  );
}

.hero {
  width: 100%; /* fill the viewport width */
  display: flex;
  padding-top: clamp(3.75rem, 10vw, 5rem); /* 100–140px */
  padding-right: clamp(1.25rem, 4vw, 3.75rem); /* 32–60px */
  padding-bottom: clamp(2.5rem, 10vw, 3.75rem);
  padding-left: clamp(1.25rem, 4vw, 3.75rem); /* 32–60px */
}

.featured {
  width: 100%; /* fill the viewport width */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(2.5rem, 10vw, 3.75rem);
  padding-right: clamp(1.25rem, 4vw, 3.75rem); /* 32–60px */
  padding-bottom: clamp(2.5rem, 10vw, 3.75rem);
  padding-left: clamp(1.25rem, 4vw, 3.75rem); /* 32–60px */
}

.featured-work-wrapper {
  display: flex;
  flex-direction: column;
  width: auto;
  gap: 0.75rem; /* 12px */
}

.body-heading {
  text-align: left;
  width: 100%;
}

.featured-work {
  column-count: 2;
  column-gap: 0;
}

.video-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-wrapper {
  width: 100%;
  max-width: 1200px;   /* desktop width */
  aspect-ratio: 16 / 9;
  margin: 0 auto;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* case study pages */

.case-study-hero {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-top: clamp(3.75rem, 10vw, 5rem); /* 100–140px */
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem); /* 40–80px */
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
}

.case-study-details-left {
  width: auto;
}

.case-study-content {
  display: grid;
  grid-template-columns: minmax(16%, 20%) 1fr minmax(16%, 20%);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  overflow: visible;
}

/* .grid-centre {
        grid-column: 2 / span 1;
    }

    .with-right {
        grid-column: 2 / span 2;
    } */

.content-nav {
  position: sticky;
  top: 7.5rem; /* adjust this for your desired offset */
  align-self: start;
}

.case-study-body {
  gap: clamp(0.75rem, 4vw, 1.255rem);
}

.case-study-content-frame {
  border: 2px solid var(--color-grey-1);
}

/* .case-study-content-img {
    width: auto;
  height: auto;
  max-height: 400px;       /* optional limit */
/* max-width: 100%;
  object-fit: cover;
  } */

.none-mobile {
  display: flex;
}

.pt-l {
  padding-top: clamp(1.25rem, 2.22vw, 2rem);
}

.pt-xl {
  padding-top: 3rem;
}

.mt-m {
  margin-top: 1.25rem;
}

.mt-xxl {
  margin-top: 3.5rem;
}

.mt-l {
  margin-top: clamp(1.25rem, 2.22vw, 2rem);
}

/* ========== Case study card contents ========== */

.case-study-card-2:hover {
  background-color: var(--color-white);
}

/* SVG overlay layer */
.border-svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.case-study-card-2:hover .border-svg {
  opacity: 1;
}

/* make SVG fill the card */
.border-svg svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* draw the dashed outline */
.border-rect {
  x: 1px;
  y: 1px;
  width: calc(100% - 2px);
  height: calc(100% - 2px);
  fill: none;
  stroke: var(--color-grey-1);
  stroke-width: 2px;
  stroke-dasharray: 8px 8px; /* dash + gap length */
  stroke-linecap: round; /* rounded ends */
}

.pfp {
  /* width: 315px;            */
  max-width: 65%;
  min-width: 25%;
  height: auto;
  object-fit: cover; /* crop if needed */
  flex-shrink: 1; /* allow shrinking first */
}

.case-study-card-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: auto;
  min-width: 60%;
}

.case-study-card-info {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  gap: 0.25rem;
}

/* ========== Figma prototype iframe ========== */

.mobile-prototype {
  aspect-ratio: 9 / 16;
}

.presentation {
  aspect-ratio: 13.6 / 9;
}

/* ========== Read more section ========== */

.read-more {
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.more-work {
  display: flex;
}

.case-study-card-2 {
  break-inside: avoid;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1000px;
  padding: 1.25rem;
  /* margin: 10px; */
  gap: 1.25rem;
  /* border-radius: 0.75rem; */
  position: relative; /* needed for pseudo-element */
  overflow: hidden; /* clips SVG edges */
  transition: transform 0.2s ease;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  will-change: transform;
}

.horizontal-viz {
  aspect-ratio: 16 / 9;
}

/* about page */
.max-width-desktop {
  max-width: 55vw;
}

.about-contents {
  column-count: 3;
  column-gap: 0;
}

.about-pfp {
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: transform 0.3s ease;
}

.about-pfp.tilted {
transform: rotate(-3deg);
}

.about-bio {
  font-size: clamp(1.75rem, 3vw, 2rem);
  color: var(--color-grey-3);
  line-height: 1.6;
}

.appendix-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto); /* enough rows for your items */
  gap: 1rem;
}


.inline-viz {
  display: inline; /* Keeps image in text flow */
  height: 3rem; /* Scales to text height (1.2x for slight emphasis) */
  width: auto; /* Maintains aspect ratio */
  vertical-align: middle; /* Centers with text baseline */
  margin: 0 2px; /* Small breathing room */
}

/* ========== Media queries ========== */

/*just for about page*/
@media (max-width: 1300px) {
  .flex-row-desktop-only {
    flex-direction: column;
  }

  .about-text {
    max-width: 100vw;
  }
}

/* Tablet: smaller than desktop */
@media (max-width: 800px) {
  .hamburger {
    display: block;
  }

  .navbar-small {
    width: 100%;
  }

  .navbar-items {
    display: none;
    position: absolute;
    top: 100%; /* below .navbar-small */
    left: 0;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: transparent; /* blur handled by ::before */
    z-index: 1001;
  }

  header.open .navbar-items {
    display: flex;
  }

  /* when open, extend the blur background down */
  header.open::before {
    height: var(--nav-blur-height, 250px);
  }

  header::before {
    max-width: 90vw;
  }

  .navbar {
    width: 90vw;
  }

  .case-study-content {
    grid-template-columns: minmax(12%, 16%) 1fr;
  }
  /* ========== Footer ========== */

  footer {
    padding: 2rem;
  }

  .footer-text {
    gap: 0.75rem;
  }

  /* .case-study-card {
        flex-direction: column;
        height: auto;
        gap: 0.75rem;
      } */

  .pfp {
    width: 100%;
    height: auto;
    max-width: none;
    min-width: none;
    flex-shrink: 1;
    padding: 1rem;
  }

  /* .featured {
        padding: 2.5rem 6rem 2.5rem 6rem;
    } */

  .case-study-card-text {
    gap: 0.5rem;
    flex-shrink: 1;
  }

  .about-contents {
    column-count: 2;
  }

  .flex-row-desktop-only {
    flex-direction: column;
  }

  .about-text {
    max-width: 100vw;
  }
}

/* Mobile: smaller than tablet */
@media (max-width: 425px) {
  .featured {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .featured-work {
    column-count: 1;
    column-gap: 0;
  }

  .video-wrapper {
    max-width: 100%;
  }

  .case-study-details-all {
    order: 1;
  }

  .case-study-content {
    display: grid;
    grid-template-columns: 1fr;
  }
  .content-nav {
    display: none;
  }

  .flex-row-desktop {
    flex-direction: column;
  }

  .none-mobile {
    display: none;
  }

  .none-desktop {
    display: flex;
  }

  .about-contents {
    column-count: 1;
  }
  .appendix-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: none; /* reset */
    grid-auto-flow: row;
  }
}
