@font-face {
  font-family: 'Founders Grotesk X Condensed Semibold';
  font-style: normal;
  font-weight: 400;
  src: url('./FoundersGroteskX-CondensedWeb-Semibold.DhMIe0Fy.woff2') format('woff2');
  font-display: swap;
}

:root {
  /* Line heights */
  --body-l: 1.28;
  --small-l: 1.28;
  --medium-l: 1.21;
  --large-l: 0.72;

  /* Fluid typography */
  --small: 0.71875rem;
  --body: 0.71875rem;
  --medium: 0.875rem;
  --large: clamp(5.0625rem, 21.875vw - 15.609375rem, 9rem);

  /* Colors */
  --black: #000000;
  --black-rgb: 0, 0, 0;
  --white: #ffffff;
  --color-background: #ffffff;
  --color-text: var(--black);
  --color-text-tint: rgba(var(--black-rgb), 0.33);
  --color-text-tint-light: rgba(var(--black-rgb), 0.08);
  --color-text-tint-darker: rgba(var(--black-rgb), 0.15);

  /* Gutters & Dimensions */
  --gutter: 15px;
  --gutter-2: calc(var(--gutter) * 2);
  --gutter-3: calc(var(--gutter) * 3);
  --gutter-4: calc(var(--gutter) * 4);
  --gutter-5: calc(var(--gutter) * 5);
  --menuHeight: 84px;
  --topGutter: calc(var(--menuHeight) + 40vh);
}

@media only screen and (min-width: 1800px) {
  :root {
    --small: 0.875rem;
    --body: 1rem;
    --medium: 1.4375rem;
    --large: 9rem;
    --topGutter: calc(var(--menuHeight) + 40vh);
    --menuHeight: 121px;
  }
}

@media only screen and (max-width: 1380px) {
  :root {
    --small: 0.6875rem;
    --body: 0.6875rem;
    --medium: 0.875rem;
    --large: 5.0625rem;
    --topGutter: calc(var(--menuHeight) + 180px);
    --menuHeight: 76px;
  }
}

@media only screen and (max-width: 1380px) and (orientation: portrait) {
  :root {
    --menuHeight: 82px;
  }
}

@media only screen and (max-width: 812px) {
  :root {
    --small: 0.6875rem;
    --body: 0.6875rem;
    --medium: clamp(0.875rem, 4.375vw, 1rem);
    --large: 4rem;
    --menuHeight: 60px;
    --topGutter: calc(var(--menuHeight) + 120px);
    --gutter: 10px;
  }
}

body.no-overflow {
  overflow: hidden !important;
}

/* ==========================================================================
   DESKTOP NAVBAR (.main-menu)
   ========================================================================== */
nav.main-menu {
  background: var(--color-background);
  font-family: 'Founders Grotesk X Condensed Semibold', sans-serif;
  font-size: var(--large);
  font-style: normal;
  font-weight: 400;
  left: 0;
  letter-spacing: -0.01em;
  line-height: 1;
  padding: 15px var(--gutter);
  position: fixed;
  text-transform: uppercase;
  top: 0;
  width: 100%;
  z-index: 9500;
  box-sizing: border-box;
}

@media only screen and (max-width: 1380px) and (orientation: portrait),
       only screen and (max-width: 812px) {
  nav.main-menu {
    display: none;
  }
}

nav.main-menu ul {
  column-gap: var(--gutter);
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  list-style: none;
  margin: 0;
  padding: 0;
  row-gap: 0;
  align-items: baseline;
}

nav.main-menu ul li {
  line-height: 1;
  position: relative;
}

nav.main-menu ul li a {
  display: block;
  line-height: 1;
  margin-bottom: -0.13em;
  margin-top: -0.24em;
  transition: color 0.7s cubic-bezier(0.45, 0, 0.15, 1);
  width: fit-content;
  color: var(--color-text);
  text-decoration: none;
}

/* Item 1: CD&CO. (col 1 span 6 / 7) */
nav.main-menu ul li:first-child {
  grid-column: 1 / span 6;
}
@media only screen and (min-width: 1800px) {
  nav.main-menu ul li:first-child {
    grid-column: 1 / span 7;
  }
}
nav.main-menu ul li:first-child a {
  margin-left: -0.03em;
}

/* Item 2: PROJECTS (col 7 / 8 span 5) */
nav.main-menu ul li:nth-child(2) {
  grid-column: 7 / span 5;
  left: -1.5px;
}
@media only screen and (min-width: 1800px) {
  nav.main-menu ul li:nth-child(2) {
    grid-column: 8 / span 5;
    left: -3px;
  }
}

/* Item 3: PROFILE (col 12 / 13 span 5 / 4, right-aligned) */
nav.main-menu ul li:nth-child(3) {
  grid-column: 12 / span 5;
}
@media only screen and (min-width: 1800px) {
  nav.main-menu ul li:nth-child(3) {
    grid-column: 13 / span 4;
  }
}
nav.main-menu ul li:nth-child(3) a {
  margin-left: auto;
}
nav.main-menu ul li:last-of-type {
  text-align: right;
}

/* Hover dimming effect */
nav.main-menu ul:has(a:hover) a:not(:hover) {
  color: var(--color-text-tint-light);
  transition: color 0.7s cubic-bezier(0.45, 0, 0.15, 1);
}

/* ==========================================================================
   MOBILE NAVBAR & OVERLAY PANEL (.mobile-menu)
   ========================================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9500;
  box-sizing: border-box;
}

@media only screen and (max-width: 1380px) and (orientation: portrait),
       only screen and (max-width: 812px) {
  .mobile-menu {
    display: block;
  }
}

.menu-bar {
  background: var(--color-background);
  font-family: 'Founders Grotesk X Condensed Semibold', sans-serif;
  font-size: var(--large);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: var(--large-l);
  text-transform: uppercase;
  z-index: 100;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.menu-bar ul {
  align-items: center;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: var(--gutter);
}

.menu-bar ul li {
  position: relative;
  top: -3px;
  margin-bottom: -0.025em;
  margin-top: -0.05em;
  line-height: 1;
}

.menu-bar ul li:first-child a {
  margin-left: -0.03em;
  display: block;
  color: var(--color-text);
  text-decoration: none;
  touch-action: manipulation;
}

.menu-bar ul li button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  border-radius: 0;
  color: var(--color-text);
  cursor: pointer;
  display: block;
  font-family: 'Founders Grotesk X Condensed Semibold', sans-serif;
  font-size: var(--large);
  font-style: normal;
  font-weight: 400;
  height: auto;
  letter-spacing: -0.01em;
  line-height: var(--large-l);
  outline: none;
  padding: 0;
  position: relative;
  text-align: right;
  text-transform: uppercase;
  touch-action: manipulation;
}

/* Crossfade between MENU and CLOSE */
.menu-bar ul li button .btn-label {
  display: inline-block;
  transition: opacity 0.8s cubic-bezier(0.45, 0, 0.15, 1);
}

.menu-bar ul li button .btn-label.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.menu-bar ul li button .btn-label--close {
  position: absolute;
  right: 0;
  top: 0;
}

/* Fullscreen Mobile Drawer Panel */
.menu-panel {
  background: var(--color-background);
  display: none;
  opacity: 0;
  height: 100dvh;
  left: 0;
  overflow-y: auto;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 99;
  box-sizing: border-box;
}

.menu-panel .menu-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  justify-content: space-between;
  padding: var(--gutter);
  padding-top: calc(var(--menuHeight));
  padding-bottom: var(--gutter);
  box-sizing: border-box;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
}

.menu-nav ul {
  font-family: 'Founders Grotesk X Condensed Semibold', sans-serif;
  font-size: var(--large);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: var(--large-l);
  list-style: none;
  margin: 0;
  padding: 0;
  text-transform: uppercase;
}

.menu-nav ul li {
  line-height: 1;
  opacity: 0;
  transform: translateY(20px);
}

.menu-nav ul li a {
  color: var(--color-text);
  display: block;
  text-decoration: none;
  line-height: var(--large-l);
  transition: color 0.7s cubic-bezier(0.45, 0, 0.15, 1);
  margin-bottom: 0.1em;
}

/* Mobile menu items hover dimming */
.menu-nav ul:has(a:hover) a:not(:hover) {
  color: var(--color-text-tint-light);
  transition: color 0.7s cubic-bezier(0.45, 0, 0.15, 1);
}

/* Mobile drawer footer */
.footer-content {
  opacity: 0;
  color: var(--color-text-tint);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--small);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--small-l);
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(8, 1fr);
  margin-top: 40px;
}

.footer-column {
  grid-column: 1 / span 8;
  margin-bottom: 12px;
}

.footer-column:last-child {
  margin-bottom: 0;
}

.footer-content a {
  color: var(--color-text-tint);
  display: block;
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.3s ease;
}

.footer-content a:hover {
  color: var(--color-text);
}

.footer-content p {
  color: var(--color-text-tint);
  margin: 0;
}
