/* === Base Reset === */
html {
  scroll-behavior: smooth; 
}
body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  background: none;
  overflow-x: hidden;
  padding: 2rem 2rem 0rem 2rem;
}

/* === Fullscreen WebGL Canvas === */
canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: -1;
}

/* === Default Text Styles === */
.textstyle {
  line-height: 1.2;
  position: relative;
  z-index: 0;
  color: white;
	mix-blend-mode: difference;
}

.contact-button {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  color: white;
  text-transform: uppercase;
  font-weight: bold;
  padding: 0.5rem 1rem;
  font-family: "Space Grotesk", sans-serif;
  transition: background 0.3s ease, transform 0.2s ease;
}

.contact-button:hover {
  background: #fff;
	color: black;
  transform: translateY(-2px);
}

/* === H1 Container === */
.h1-wrapper {
  display: flex;
  justify-content: left;
  width: 100%;
  overscroll-behavior-x: contain;
  transform: translateZ(0);
  z-index: 0;
}

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
  padding: 0;
  mix-blend-mode: difference;
  will-change: transform;
  z-index: 0;
}

/* === H2, H3, Paragraphs === */
h2 {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  max-width: 45ch;
  z-index: 0;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 0;
}

p {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.6;
  max-width: 65ch;
  margin: 0 0 1rem;
  transition: color 0.2s ease;
  z-index: 0;
}

/* === About Section === */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin-top: 4rem;
}

.about-text {
  flex: 1 1 300px;
}

/* === Work Section === */
.work-section {
  background-color: rgba(220, 220, 220, 0.4);
  backdrop-filter: normal;
  mix-blend-mode: normal;
  max-width: 100vw;
  padding: 2rem;
  margin: 4rem 0;
  border-radius: 2rem;
  color: white;
}

.work-wrapper {
  max-width: 100vw;
  margin: 0 auto;
}

.brand-logos {
  margin-bottom: 3rem;
}

/* === Contact Section === */
.contact-section {
  isolation: isolate;
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.85);
  color: black;
  padding: 4rem 2rem;
  margin-top: 4rem;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
}

.contact-links a {
  color: #000;
  border-bottom: 1px solid #2c3e50;
  text-decoration: none;
}

.contact-links a:hover {
  color: #a6cbff;
  border-bottom-color: #a6cbff;
}

/* === Job History === */
.job-history ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.job-history li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 1rem;
}

/* === Brand Logos === */
.logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: flex-start;
}

.logo-grid a {
  display: inline-block;
}

.logo-grid img {
  height: 100px;
  width: auto;
  opacity: 1;
  transition: transform 0.3s ease, filter 0.3s ease, background 0.3s ease;
  filter: none;
  background: transparent;
  border-radius: 0;
}

.logo-grid img:hover {
  transform: translateY(-3px);
  filter: invert(1);
  background: #000;
  border-radius: 0.5rem;
}

/* === Tablet Styles === */
@media (max-width: 1024px) {
  p {
    font-size: 1.1rem;
  }
}

/* === Mobile Styles === */
@media (max-width: 767px) {
  p {
    font-size: 1rem;
  }

  .about-content {
    flex-direction: column-reverse;
    align-items: flex-start;
  }

  .logo-grid img {
    height: 100px;
  }

  /* Default to stacked layout */
  .logo-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-grid a {
    margin-bottom: 1rem;
  }

  /* === Full-width Current Projects === */
  .logo-grid a.current-project {
    width: 100%;
  }

  .logo-grid a.current-project img {
    width: 100%;
    height: 150px;
    max-height: 150px;
    object-fit: contain;
  }

  /* === Two-column layout for Past Clients === */
  .brand-logos:not(:has(.current-project)) .logo-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .brand-logos:not(:has(.current-project)) .logo-grid a {
    width: calc(50% - 0.75rem);
    margin-bottom: 1.5rem;
  }

  .brand-logos:not(:has(.current-project)) .logo-grid img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
