/* Design tokens from Figma (Portfolio Website — 1440w) */

:root {
  --color-yellow-white: #ffffff;
  --color-yellow-primary: #fffb91;
  --color-yellow-primary-80: #fffedb;
  --color-yellow-grey-80: #262626;
  --color-yellow-grey-50: #696969;
  --color-black-solid: #000000;
  --item-spacing-20: 20px;
  --item-spacing-md: 16px;
  --item-spacing-xl: 32px;
  --item-spacing-2xl: 40px;
  --font-size-32: 32px;
  --font-size-24: 24px;
  --font-size-18: 18px;
  --font-size-16: 16px;
  --font-size-14: 14px;
  --line-height-22-4: 22.4px;
  --font-family-font-1: "Space Grotesk", sans-serif;
  --font-weight-600: 600;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: auto;
}

body {
  margin: 0;
  background: var(--color-yellow-white);
  font-family: var(--font-family-font-1);
  color: var(--color-black-solid);
  -webkit-font-smoothing: antialiased;
}

/* H1 — 32 / semibold 600 / 1.1 / grey-80 */
.text-h1 {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-32);
  line-height: 1.1;
  color: var(--color-yellow-grey-80);
}

.text-h1--prewrap {
  font-family: var(--font-family-font-1);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-32);
  line-height: 1.1;
  color: var(--color-yellow-grey-80);
}

.text-h1--prewrap p {
  margin: 0;
}

/* H2 — 24 / semibold 600 / 1.1 (H1 stand-in ≤1023px) */
.text-h2 {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-24);
  line-height: 1.1;
  color: var(--color-yellow-grey-80);
}

/* H3 — 16 / semibold 600 / 1.1 */
.text-h3 {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-16);
  line-height: 1.1;
  color: var(--color-black-solid);
}

.text-h3--black {
  color: var(--color-black-solid);
}

/* H4 — 14 / semibold 600 / 1.1 (project card date line) */
.text-h4 {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: var(--font-weight-600);
  font-size: var(--font-size-14);
  line-height: 1.1;
  color: var(--color-black-solid);
  white-space: nowrap;
}

/* B1 — Figma: size 18, line height 120%, Medium, grey-50 */
.text-b1 {
  font-family: var(--font-family-font-1);
  font-weight: 500;
  font-size: var(--font-size-18);
  line-height: 120%;
  color: var(--color-yellow-grey-50);
}

.text-b1 p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* Button / filter label — 14 / Medium / 1.1 / uppercase */
.text-button {
  font-family: var(--font-family-font-1);
  font-weight: 500;
  font-size: var(--font-size-14);
  line-height: 1.1;
  color: var(--color-black-solid);
  text-transform: uppercase;
  white-space: nowrap;
}

.text-filter {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: 500;
  font-size: var(--font-size-14);
  line-height: 1.1;
  color: var(--color-black-solid);
  text-transform: uppercase;
  white-space: nowrap;
}

/* H5 / footer legal — 14 / Medium / line-height 22.4 */
.text-h5 {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: 500;
  font-size: var(--font-size-14);
  line-height: var(--line-height-22-4);
  color: var(--color-black-solid);
  white-space: nowrap;
}

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.icon--chevron-right {
  flex-direction: column;
}

.icon--chevron-right img {
  display: block;
  width: 23.5px;
  height: 7.364px;
  max-width: none;
}

.icon--chevron-top img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Page shell — fluid width; breakpoint layouts below (Figma: 1920 / 1440 / 1024 / 768 / 422) */
.frame {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 1920px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--color-yellow-white);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Header — fixed; transparent at top, white when scrolled */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  justify-content: space-between;
  padding: 10.41px 40px 10.39px;
  overflow: hidden;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.header--scrolled {
  background-color: var(--color-yellow-white);
}

.header__logo {
  font-size: var(--font-size-16);
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
}

/* Body — node 17:1099 */
.body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 1200px;
  width: 100%;
  overflow: hidden;
  background: var(--color-yellow-white);
  flex: 1 1 auto;
}

.section {
  width: 100%;
}

/* Section 1 — node 17:1100 */
.section--hero {
  display: flex;
  height: 600px;
  align-items: center;
  justify-content: center;
  background: var(--color-yellow-primary);
  overflow: hidden;
}

.section-hero__container {
  flex: 1 1 0;
  min-width: 0;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--item-spacing-2xl);
  padding: 0 40px;
  overflow: hidden;
}

.section-hero__copy-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 700px;
  width: 100%;
}

.heading-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

/* Section 2 — node 17:1106 */
.section--case-studies {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--item-spacing-2xl);
  max-width: 1280px;
  width: 100%;
  padding: 80px 40px;
  overflow: hidden;
}

.section-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--item-spacing-20);
  width: 100%;
  overflow: hidden;
}

.section-title__subtitle-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 700px;
  width: 100%;
}

.project-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--item-spacing-2xl);
  width: 100%;
}

.filter-tab-group {
  display: flex;
  align-items: center;
  gap: var(--item-spacing-md);
}

.filter-tab {
  display: flex;
  height: 31px;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.filter-tab--active {
  background: var(--color-yellow-primary);
}

.filter-tab--inactive {
  background: var(--color-yellow-primary-80);
}

/* Project card — node 15:783 pattern */
.project-card {
  display: flex;
  align-items: flex-start;
  gap: var(--item-spacing-2xl);
  width: 100%;
}

.project-card__image {
  flex: 1 1 0;
  min-width: 0;
  height: 360px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
}

.project-card__image-inner {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
}

.project-card__image-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.project-card__content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--item-spacing-md);
  padding-left: 24px;
  overflow: hidden;
  align-self: stretch;
}

.project-card__vertical {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--item-spacing-xl);
  width: 100%;
}

.project-card__title {
  width: 100%;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 500px;
  width: 100%;
}

/* Footer — node 15:1075 (instance on 1440w) */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--item-spacing-2xl);
  width: 100%;
  overflow: hidden;
  background: var(--color-yellow-white);
}

.footer__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 67px 24px;
}

.footer__left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 400px;
}

.footer__back {
  flex-shrink: 0;
}

.footer__legal-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 24px 8px;
  overflow: hidden;
}

/* Same tier as tablet/mobile layout (max-width 1023px): H1 copy uses H2 scale */
@media (max-width: 1023px) {
  .text-h1,
  .text-h1--prewrap {
    font-size: var(--font-size-24);
  }
}

/* ---------------------------------------------------------------------------
   Responsive (Figma frames — metadata already reviewed, no live MCP):
   1920w 16:650 | 1440w 17:1098 | 1024w 17:1320 | 768w 17:1431 | 422w 17:1713
   Base = 1440w. Then: min-width 1920 → 1920 header inset.
   max 1439 & min 1024 → 1024 (40px gutters, row cards).
   max 1023 & min 768 → 768 (24px gutters, stacked cards, list gap 44).
   max 767 → 422 (24px gutters, copy max 374, tabs wrap min-height 70, gap 44).
   --------------------------------------------------------------------------- */

/* 1920w: column 1280px centred; x=320 outer inset → header aligns at 320+40=360 */
@media (min-width: 1920px) {
  .header {
    padding: 10.41px 360px 10.39px;
  }
}

/* 1440w: default rules above (centred 1280, header 40px, row cards). */

/* 1024w: section/hero full width; inner padding 40px; cards stay row 360px tall */
@media (max-width: 1439px) and (min-width: 1024px) {
  .section-hero__container {
    max-width: none;
    width: 100%;
    padding: 0 40px;
  }

  .section--case-studies {
    max-width: none;
    width: 100%;
    padding: 80px 40px;
  }

  .project-card__image {
    height: 360px;
  }
}

/* 768w: 24px gutters; stacked cards; filter→first card gap 44px in Figma (y 31→75) */
@media (max-width: 1023px) and (min-width: 768px) {
  .header {
    padding: 10.41px 24px 10.39px;
  }

  .section-hero__container {
    max-width: none;
    width: 100%;
    padding: 0 24px;
  }

  .section--case-studies {
    max-width: none;
    width: 100%;
    padding: 80px 24px;
  }

  .section-hero__copy-wrap {
    max-width: none;
    width: 100%;
  }

  .section-title__subtitle-wrap {
    max-width: none;
    width: 100%;
  }

  .project-list {
    gap: 44px;
  }

  .project-card {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .project-card__image {
    flex: none;
    width: 100%;
    height: 360px;
  }

  .project-card__content {
    flex: none;
    width: 100%;
    padding-left: 0;
    align-self: auto;
  }

  .project-card__body {
    max-width: 100%;
  }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .footer__left {
    width: 100%;
    max-width: 400px;
  }

  .body {
    min-height: 0;
  }
}

/* 422w: narrow column; filter group 70px tall (two rows) */
@media (max-width: 767px) {
  .header {
    padding: 10.41px 24px 10.39px;
  }

  .section-hero__container {
    max-width: none;
    width: 100%;
    padding: 0 24px;
  }

  .section--case-studies {
    max-width: none;
    width: 100%;
    padding: 80px 24px;
  }

  .section-hero__copy-wrap {
    max-width: none;
    width: 100%;
  }

  .section-title__subtitle-wrap {
    max-width: none;
    width: 100%;
  }

  .filter-tab-group {
    flex-wrap: wrap;
    width: 100%;
    min-height: 70px;
    align-content: flex-start;
    row-gap: 16px;
  }

  .project-list {
    gap: 44px;
  }

  .project-card {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .project-card__image {
    flex: none;
    width: 100%;
    height: 360px;
  }

  .project-card__content {
    flex: none;
    width: 100%;
    padding-left: 0;
    align-self: auto;
  }

  .project-card__body {
    max-width: 100%;
  }

  .footer__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }

  .footer__left {
    width: 100%;
    max-width: none;
  }

  .footer__back {
    align-self: flex-start;
  }

  .text-h5 {
    white-space: normal;
  }

  .body {
    min-height: 0;
  }
}

/* Filter tab interaction */
.filter-tab {
  cursor: pointer;
}

.project-card[hidden] {
  display: none;
}

@keyframes card-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.project-card--visible {
  animation: card-fade-in 300ms ease both;
}

/* Project card hover image swap */
.project-card__hover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.project-card__image:hover .project-card__hover-img {
  opacity: 1;
  animation: hover-zoom 800ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes hover-zoom {
  from { transform: scale(1); }
  to   { transform: scale(1.05); }
}

/* Scroll entrance animation */
.card-animate {
  opacity: 0;
  transform: translateY(20px);
}

.card-animate--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.card-animate--body.card-animate--visible {
  transition-delay: 150ms;
}

/* ─── About trigger ─────────────────────────────────────────────────────── */

.header__right .text-h3 {
  cursor: pointer;
}

/* ─── About Overlay ─────────────────────────────────────────────────────── */

.about-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #fffb91;
  cursor: pointer;
  overflow: hidden;
}

.about-overlay--open {
  display: flex;
}

.about-overlay__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10.41px 40px 10.39px;
}

.about-overlay__inner {
  width: 100%;
  max-width: 1280px;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.about-overlay__left {
  flex: 1;
  min-width: 0;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-overlay__heading {
  margin: 0;
  font-family: var(--font-family-font-1);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
  color: #262626;
}

.about-overlay__body {
  font-family: var(--font-family-font-1);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.4;
  color: #262626;
}

.about-overlay__body p {
  margin: 0;
}

.about-overlay__body p + p {
  margin-top: 25px;
}

.about-overlay__cv {
  cursor: pointer;
}

.about-overlay__right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--font-family-font-1);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  color: #262626;
  white-space: nowrap;
}

.about-overlay__entry {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 767px) {
  .about-overlay {
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 72px;
    padding-bottom: 40px;
  }

  .about-overlay__header {
    padding: 10.41px 24px 10.39px;
  }

  .about-overlay__inner {
    flex-direction: column;
    gap: 32px;
    padding: 0 24px;
  }

  .about-overlay__left {
    max-width: 100%;
  }

  .about-overlay__heading {
    font-size: 20px;
  }

  .about-overlay__body {
    font-size: 16px;
  }

  .about-overlay__right {
    white-space: normal;
    font-size: 14px;
  }
}

/* Custom cursor trailer */
.cursor-trailer {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background: var(--color-black-solid);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
