/*
 * Modern Bauhaus-inspired style sheet for the VDO.ape portfolio.
 * This file defines a small set of CSS custom properties (variables) for
 * colour and typographic scale, alongside global styles that set up the
 * layout and responsive behaviour. Subtle entrance animations are also
 * included for the split hero on the home page. When a user has reduced
 * motion preferences enabled, animations are disabled automatically.
 */

/* Colour tokens */
:root {
  --red: #d60000;
  --ink: #000000;
  --paper: #ffffff;
  --gray-light: #f7f7f7;
  --gray-dark: #1a1a1a;
}

/* Typography scale */
body {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  margin: 0;
  line-height: 1.5;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.display-xxl {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  line-height: 1.0;
  text-transform: uppercase;
}

.section-heading {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--paper);
  z-index: 1000;
  border-bottom: 1px solid var(--gray-light);
}

.nav a {
  margin: 0 1rem;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  font-size: 0.875rem;
  letter-spacing: 1px;
}

.nav a:hover,
.nav a.active {
  color: var(--red);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--red);
}

/* Sections */
.section-hero {
  padding-top: 60px; /* offset for fixed nav */
  display: flex;
  min-height: 100vh;
}

/* Split hero specific layout */
.split-hero .hero-left,
.split-hero .hero-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

.hero-left {
  background-color: var(--red);
  color: var(--paper);
  flex-direction: column;
  padding: 2rem;
  animation: slideInLeft 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.hero-right {
  background-color: var(--paper);
  animation: slideInRight 0.8s cubic-bezier(0.23, 1, 0.32, 1) both;
  padding: 2rem;
}

.hero-video-frame {
  width: 90%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
  border: 2px solid var(--paper);
  box-shadow: 0 0 0 2px var(--ink) inset;
}

.hero-video-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Animations */
@keyframes slideInLeft {
  from {
    transform: translateX(-60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(60px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-left,
  .hero-right {
    animation: none !important;
  }
}

/* Works teaser grid */
.works-teaser {
  padding: 4rem 1rem;
  background-color: var(--paper);
  text-align: center;
}

.teaser-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
}

.work-teaser-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--paper);
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 16 / 9;
}

.work-teaser-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.work-teaser-card:hover img {
  transform: scale(1.05);
}

.teaser-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: transform 0.3s ease;
  transform: translateY(100%);
}

.work-teaser-card:hover .teaser-caption {
  transform: translateY(0);
}

.teaser-caption .category {
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
}

.teaser-caption .title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--paper);
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--paper);
  border-top: 1px solid var(--gray-light);
  font-size: 0.875rem;
  color: var(--gray-dark);
}

/* Works page layout */
.works-page {
  background-color: var(--red);
  color: var(--paper);
  min-height: 100vh;
  padding-top: 80px;
  padding-bottom: 4rem;
}

.works-page h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 3rem;
}

.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab {
  padding: 0.5rem 1rem;
  background-color: var(--paper);
  color: var(--ink);
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  transition: background-color 0.2s ease;
}

/* Updated tab styles: active tab is highlighted with ink background and paper text */
.tab.active {
  background-color: var(--ink);
  color: var(--paper);
}

/* Hover state for tabs retains light gray background */
.tab:hover {
  background-color: var(--gray-light);
}

.works-grid {
  display: grid;
  gap: 1rem;
  /* Increase the minimum size of grid items to make video cards twice as wide */
  grid-template-columns: repeat(auto-fit, minmax(560px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
}

.work-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0.5rem;
  background-color: var(--paper);
}

.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.work-card:hover img {
  transform: scale(1.05);
}

.work-card .card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--paper);
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  pointer-events: none;
  text-transform: uppercase;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 2rem;
}

.lightbox img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
  box-shadow: 0 0 0 2px var(--paper);
}

.lightbox .close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--paper);
  cursor: pointer;
}

/* Recognitions page */
.recognitions-page {
  padding-top: 80px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 4rem;
  line-height: 1.6;
}

.awards-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.award {
  padding: 1rem;
  background-color: var(--gray-light);
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

    /*
     * Increase the size of award and media icons on the recognitions page. The original
     * dimensions were 40px by 40px; these new values make the images twice as large
     * without altering the aspect ratio. This ensures the award badges are more
     * prominent while preserving the responsive grid layout.
     */
    .award img {
      width: 80px;
      height: 80px;
      object-fit: contain;
    }

    /* Media coverage section uses much larger logos (4x the original 40px size) and extra spacing */
    .media-list .award img {
      width: 160px;
      height: 160px;
      object-fit: contain;
    }

    .media-list {
      /* Add generous space above the media coverage section to separate it from awards */
      margin-top: 4rem;
    }

/* Writings page */
.writings-page {
  padding-top: 80px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 4rem;
  line-height: 1.6;
}

.writing-item {
  padding: 1.5rem;
  margin-bottom: 1rem;
  background-color: var(--gray-light);
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.writing-item .title {
  font-weight: 600;
}

.writing-item a {
  color: var(--red);
  text-decoration: none;
  font-size: 0.875rem;
  text-transform: uppercase;
}

/* About page */
.about-page {
  padding-top: 80px;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 4rem;
  line-height: 1.6;
}

.about-page .content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-page img {
  max-width: 300px;
  border-radius: 1rem;
  align-self: center;
}

.about-page h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.about-page p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.cv-download {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 2rem;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.cv-download:hover {
  background-color: var(--ink);
  color: var(--paper);
}